Multi-dimensional LoRA-based city image generation method, apparatus and device, and storage medium

By extracting text semantics and urban keywords using multidimensional LoRA technology and combining them with geometric constraint features, this approach addresses the issues of insufficient analysis of regional cultural characteristics and lack of planning constraints in existing urban planning technologies, thereby achieving precise integration and standardized generation of urban styles.

CN121921406APending Publication Date: 2026-04-24JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGNAN UNIV
Filing Date
2026-03-19
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing technologies cannot accurately analyze regional cultural characteristics in urban planning and design, lack a dynamic integration mechanism for multiple city style elements, and cannot strictly follow planning constraints, resulting in generated images that cannot meet professional design needs.

Method used

By extracting semantic information from text prompts and city keywords, matching them with a multidimensional LoRA model and calculating fusion weights, and combining geometric constraint features, a city image map that conforms to planning constraints is generated.

Benefits of technology

It achieves accurate analysis of regional cultural characteristics, intelligent integration of style elements from multiple cities, and strict adherence to planning constraints, thereby improving the work efficiency of designers and the professionalism and practicality of generated images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921406A_ABST
    Figure CN121921406A_ABST
Patent Text Reader

Abstract

The invention discloses a city image generation method, device and equipment based on multi-dimensional LoRA and a storage medium, and relates to the field of model reasoning. Semantic information of the text cue word and city keywords contained in the text cue word are extracted, a corresponding target LoRA model is matched according to the semantic information and the city keywords, and a corresponding fusion weight is calculated; receiving constraint information corresponding to the text cue word, and extracting geometric constraint features used for constraining the image content according to the constraint information; and extracting target LoRA weight parameters corresponding to the target LoRA model, injecting the target LoRA weight parameters into the Flux model in a mixed manner according to the proportion of fusion weights, performing urban style image reasoning by taking geometric constraint features as constraint conditions, and outputting an urban image map. The scheme has the advantages that regional culture features can be accurately analyzed, multi-city style elements are intelligently fused, and planning constraints are strictly followed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model reasoning, and in particular to a method, apparatus, device, and storage medium for generating urban images based on multidimensional LoRA. Background Technology

[0002] With the development of generative artificial intelligence (AIGC), text-to-image generation technology has been widely applied in fields such as artistic creation and game design. Currently, mainstream technical solutions are typically based on diffusion models, such as Stable Diffusion and Flux. In urban planning and design, designers often use these models to quickly generate concept maps.

[0003] To achieve specific visual style outputs, current technologies generally employ low-rank adaptation techniques to perform lightweight fine-tuning of the base model. A typical implementation involves independently training LoRA weight parameters for a single city dataset, requiring users to manually switch between LoRA models for different cities to obtain corresponding style features. However, when applied to the professional scenario of Chinese city image design, current technologies face the following three key challenges: First, because the general-purpose large model's training data covers the entire globe, it has a significant lack of understanding of the deep cultural characteristics of specific Chinese cities. For example, it cannot accurately represent the blend of ancient and modern architecture in Xi'an, the unique three-dimensional transportation network in Chongqing, or the exquisite spatial texture of Suzhou gardens. This results in the generated images having a blurry "pan-Asian" style, which is difficult to meet the professional needs of urban spatial design. Secondly, in cross-regional design reference scenarios, such as incorporating elements of the Jiangnan water towns into a northern city design, the current technology lacks a dynamic fusion mechanism for the LoRA features of multiple cities. Users must repeatedly switch models and manually adjust parameters, resulting in a cumbersome operation process and abrupt style transitions. Finally, urban planning involves strict physical space constraints, including skyline height control, road network density regulations, and building setback requirements. Plain text prompts are difficult to effectively convey such geometric constraints, resulting in generated images that, while visually appealing, fail to meet actual design specifications.

[0004] These shortcomings severely limit the practical value of generative technology in the field of professional urban planning. There is an urgent need to establish an image generation mechanism that can accurately analyze regional cultural characteristics, intelligently integrate elements of multiple city styles, and strictly adhere to planning constraints. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and storage medium for generating urban images based on multidimensional LoRA, which has the advantages of accurately analyzing regional cultural characteristics, intelligently integrating multiple urban style elements, and strictly adhering to planning constraints.

[0006] On the one hand, this application provides a method for generating urban images based on multidimensional LoRA, the method comprising: Extract semantic information from text prompts and the city keywords they contain; match the corresponding target LoRA model and calculate the corresponding fusion weights based on the semantic information and the city keywords; the LoRA model is used to generate LoRA weight parameters for the corresponding city's visual style and spatial structure. Receive constraint information corresponding to the text prompt words, and extract geometric constraint features for constraining image content based on the constraint information; Extract the target LoRA weight parameters corresponding to the target LoRA model, and inject the text into the image generation model according to the ratio of the fusion weights. Use the geometric constraint features as constraints to perform city style image inference and output a city image that matches the text prompt words.

[0007] Specifically, the extraction of semantic information from text prompts and the city keywords they contain includes: The text prompts are analyzed using natural language processing, and the text sentences are segmented, tagged with parts of speech, and stop words are removed. The named entity recognition method is used to extract geographic entities and architectural planning domain entities from the word segmentation. The matched geographic entities are used as the city keywords to extract a list of city entities. The text sentences are constructed into a syntax tree for dependency parsing, and the modification relationships between words and style description keywords are determined based on part-of-speech tagging. The analysis of contextual modifiers, the parsing of modifiers and modifier phrases, and the extraction of dominant structural information, main framework and detailed elements integrated into the main body, as well as information on implicit relationships of equal parallelism / subordinate relationships are all performed.

[0008] Specifically, after obtaining the list of city entities, the LoRA mapping table is queried based on the city names included, and the target LoRA model is matched from the LoRA model matrix library; When no target LoRA model corresponding to a city name is matched, the target LoRA model is selected according to an approximate regional substitution strategy. When no city keyword is matched, the default weight parameter is selected as the fusion weight based on the general style; When the mapping result is a single LoRA model, the corresponding LoRA weight parameters are directly selected as the fusion weights based on the mapping result.

[0009] Specifically, when the mapping result is a multi-LoRA model, the fusion weights corresponding to the target LoRA model are calculated, including: The primary and secondary attribute relationships are determined by combining the results of contextual modifier analysis, the focus of the city image is determined, and the initial weights of the target LoRA model are assigned according to the intensity mapping relationship; wherein the primary weight of the primary LoRA model is determined based on the main structural elements, and the secondary weight of the secondary LoRA model is determined based on the detail embellishment elements; The importance of the identified entities and style description keywords is scored based on the TF-IDF statistical method to obtain semantic weights; the semantic weights reflect the prominence of the corresponding elements in the context of the prompt words. The semantic weights are normalized and fused with the initial weights according to the master-slave attribute relationship to calculate the fusion weights of the target LoRA model; different fusion weights are aggregated to generate a fusion parameter configuration table.

[0010] Specifically, the LoRA model matrix library stores trained LoRA models for different cities, including: Aesthetic scoring and semantic annotation of urban planning were performed on images of different city styles, and interference images with non-target city style features were mixed into each city image dataset. Based on the text-to-image generation model, and using the target city as the trigger keyword, the image datasets of the target city are trained independently. Construct the first target loss based on the target city respectively Construct a second interference loss based on the interference image. Construct the total loss of the model , means as follows: Among them The hyperparameters representing the control of regularization strength, and all weight files after training constitute the LoRA model matrix library.

[0011] Specifically, receiving the constraint information corresponding to the text prompt word and extracting geometric constraint features for constraining the image content based on the constraint information includes: When the constraint information is a sketch or planning map, the image edge line features are extracted to generate a binarized edge map. When the constraint information contains the hierarchical relationship between the control scene, a monocular depth estimation algorithm is used to calculate the depth map from the input sketch or planning map; The segmentation model classifies different areas of the sketch or planning map into different land use properties, generating a mask map with semantic labels; the extracted edge map, depth map and mask map constitute the geometric constraint features.

[0012] Specifically, when the sketch or planning diagram of the constraint information also contains a region mask, and the input contains text constraint words for the region mask, the matching text constraint words are matched and parsed one by one for different region masks; The semantic focus is determined based on the results of semantic information parsing, and the independent region LoRA weight parameters of the region mask are calculated based on the results of contextual modifiers. The LoRA weight parameters calculated by the region mask and the LoRA weight parameters calculated by the non-region mask are used together to generate a LoRA weight spatial distribution map, which is then used as the fusion weight. During the denoising inference stage, the LoRA weight space distribution map is queried in real time to obtain the corresponding LoRA model and its fusion weights for inference generation.

[0013] On the other hand, this application provides a city image generation apparatus based on multidimensional LoRA, the apparatus comprising: The fusion weight calculation module is used to extract the semantic information of the text prompt words and the city keywords contained therein, and to match the corresponding target LoRA model and calculate the corresponding fusion weights based on the semantic information and the city keywords; the LoRA model is used to generate LoRA weight parameters for the corresponding city visual style and spatial structure; The constraint feature extraction module is used to receive constraint information corresponding to the text prompt words and extract geometric constraint features for constraining image content based on the constraint information. The image output module is used to extract the target LoRA weight parameters corresponding to the target LoRA model, and inject text into the image generation model according to the ratio of the fusion weights. It also uses the geometric constraint features as constraints to perform urban style image inference and outputs an urban image that conforms to the text prompt words.

[0014] In another aspect, this application provides a computer device including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, wherein the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the multidimensional LoRA-based urban image generation method described above.

[0015] In another aspect, this application provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the multidimensional LoRA-based urban image generation method described above.

[0016] The beneficial effects of the technical solution provided in this application include at least the following: This solution extracts the semantic information of text prompt words to match the target LoRA model and calculates the fusion weight. At the same time, it extracts geometric constraint features based on constraint information and uses a hybrid injection model for inference. This can accurately analyze regional cultural characteristics, intelligently integrate multiple city style elements, and strictly follow planning constraints, which greatly improves the work efficiency of designers and generates creative images that conform to the characteristics of the city. Attached Figure Description

[0017] Figure 1 This is a flowchart of a city image generation method based on multidimensional LoRA provided in an embodiment of this application; Figure 2 A flowchart of the algorithm for calculating multidimensional LoRA weight parameters based on text prompts is shown; Figure 3 This is a schematic diagram of the model training and image generation algorithm provided in the embodiments of this application; Figure 4 One possible form of sketch / planning diagram is shown; Figure 5 A schematic diagram comparing the city images output by the traditional method and the technical solution of this embodiment is shown. Figure 6 This is a structural block diagram of the urban image generation device based on multidimensional LoRA provided in the embodiments of this application; Figure 7 A structural block diagram of a computer device provided in an exemplary embodiment of this application is shown. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0019] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0020] In urban image generation applications based on diffusion models, the visual characteristics of specific regional cultures are often inaccurately represented. Specifically, the base model relies on a globally available dataset for training, resulting in the inaccurate capture of unique visual identifiers in specific Chinese cities such as Xi'an (a blend of ancient and modern elements), Chongqing (a multi-level transportation system), and Suzhou (a garden landscape), leading to images exhibiting a pan-Asian style. Furthermore, the fusion of features from multiple cities requires manually loading LoRA models from different cities, making dynamic and smooth weight allocation impossible and resulting in abrupt fusion effects. Additionally, rigid constraints in urban planning, such as skyline height, road network density, and building setbacks, cannot be effectively controlled through prompts, resulting in visually appealing but non-compliant images that affect the usability of design solutions.

[0021] For example, in the planning and design of a historical and cultural district in Xi'an, the designer input the prompt "integrate Xi'an's ancient city wall with Chongqing's multi-level transportation elements." The relevant technology might consider loading separate LoRA models of Xi'an and Chongqing. However, the weights are fixed during fusion, resulting in an unnatural connection between the city wall structure and the rail system in the generated image. Simultaneously, the prompt specifying "road network density must meet specifications" cannot be parsed by the model, leading to a road layout that violates design standards. This necessitates repeated adjustments to the prompt and regeneration, prolonging the design process. Therefore, the distortion of regional cultural characteristics and the lack of constraints make the generated results difficult to directly use to assist spatial design decisions.

[0022] If the aforementioned problems are not addressed, the generated urban images will be unable to effectively support professional planning work, requiring designers to rely on additional manual modifications, increasing their workload. Deviations in the regional cultural expression of the generated images may cause design schemes to deviate from local characteristics, affecting the scientific validity and applicability of the planning outcomes. In the long run, this will limit the in-depth application of generative artificial intelligence technology in urban design and hinder the transformation of technical solutions into practical engineering scenarios.

[0023] To address this, this application provides a method for generating urban images based on multidimensional LoRA, such as... Figure 1 As shown, the solution includes the following steps: S1. Extract the semantic information of the text prompts and the city keywords they contain. Match the corresponding target LoRA model and calculate the corresponding fusion weights based on the semantic information and city keywords. The LoRA model is used to generate the LoRA weight parameters for the corresponding city's visual style and spatial structure. Text prompts are natural language descriptions entered by the user to express their desired content, style, and other related requirements for the generated city images; these prompts are the initial input for the system to understand the user's intent.

[0024] Semantic information is the deeper meaning and concepts extracted from text prompts using methods such as natural language processing, including relationships between words, the main idea of ​​sentences, and implicit stylistic tendencies. City keywords, on the other hand, are explicitly mentioned or implied geographical entities, building types, or descriptive terms with regional characteristics in the text prompts, such as specific city names or representative landmarks.

[0025] First, this method involves extracting semantic information from text prompts and the city keywords they contain. In one implementation, the system can pre-define a dictionary or mapping table containing common city names and related descriptive terms. When a user inputs a text prompt, the system uses simple string matching to identify city names present in the dictionary as city keywords and performs a rough word frequency analysis to obtain preliminary semantic information. For example, for the prompt "a modern urban commercial district incorporating elements of the Jiangnan water towns," the system might identify "Jiangnan water towns" as a city keyword and label "modern" and "commercial district" as semantic information. In another implementation, the system can employ a rule-based text analyzer, predefining a series of grammatical rules and patterns to identify the subject, predicate, and object in the text, thereby extracting more structured semantic information and searching for matching city names from a pre-defined city list.

[0026] Secondly, based on the semantic information and city keywords mentioned above, the system needs to match the corresponding target LoRA model and calculate the corresponding fusion weights. In one implementation, the system can maintain a simple mapping table, directly mapping each identified city keyword to a pre-trained LoRA model. For example, if "Shanghai" is identified, it is directly matched to "Shanghai LoRA model". When multiple city keywords are identified, the system can combine speech information to comprehensively allocate and calculate the fusion weights. Specifically, the system can assign different priorities to city keywords based on their order or position in the text prompts, thereby determining the initial fusion weights. For example, the first city keyword to appear may be assigned a higher weight, while subsequent keywords may be assigned a lower weight.

[0027] Its possible form is: "Design a commercial street with the characteristics of Chongqing's mountainous terrain, while incorporating the exquisite landscape of Suzhou gardens." Therefore, the core element can be determined as the distinctive features of "Chongqing," with details highlighting the characteristics of Suzhou gardens. The output fusion weight could be "Chongqing LoRA weight 0.7, Suzhou LoRA weight 0.3."

[0028] The LoRA model in this embodiment is a lightweight model fine-tuning technique that injects a small number of trainable low-rank matrices into a large pre-trained model (such as Flux or other text-to-image generation models) to adapt it to a specific task or style without requiring large-scale modifications to the entire base model. The LoRA weight parameters are specific weight matrices generated after the LoRA model is trained. These parameters guide the base model to generate image features with corresponding urban visual styles and spatial structures.

[0029] S2. Receive the constraint information corresponding to the text prompt words, and extract the geometric constraint features used to constrain the image content based on the constraint information; Constraint information can essentially be auxiliary input, referring to user-provided supplementary input beyond text prompts to further define the content of the generated image. This can include data information containing both images and text. Geometric constraint features, on the other hand, are structured data extracted from constraint information to guide the image generation process spatially. Examples include edge lines, depth information, or semantic segmentation regions of an image, or semantic information based on text, used to further refine the city image map.

[0030] In one implementation, the user can provide a simple hand-drawn sketch / outline or a diagram containing simple geometric shapes (such as rectangles or circles). The system uses image processing technology to identify the boundaries and positions of these shapes and converts them into a set of coordinate points or vector data as geometric constraint features to define the outlines and relative positions of the main elements in the generated image.

[0031] S3. Extract the target LoRA weight parameters corresponding to the target LoRA model, and inject the text into the image generation model according to the ratio of the fusion weights. Then, use geometric constraint features as constraints to perform urban style image inference and output an urban image that matches the text prompts.

[0032] The system extracts the target LoRA weight parameters corresponding to the aforementioned target LoRA model and injects them into the Flux or other text generation model according to the fusion weight ratio. In one implementation, the system can simply linearly superimpose the weight parameters of all matched LoRA models and then inject them into the Flux model, without considering the interaction or fusion ratio between different LoRA models. For example, if two LoRA models are matched, their weight parameters can be directly added. In another implementation, the system can preset a fixed fusion ratio, for example, regardless of how many LoRA models are matched, the fusion injection is performed according to the calculated fusion ratio (e.g., 0.7:0.3). Using the aforementioned geometric constraint features as constraints, the system performs city-style image inference and outputs a city image that matches the text prompts.

[0033] In summary, the present application deeply extracts semantic information and urban keywords from text prompts, and dynamically matches and integrates multiple target LoRA models, enabling the system to accurately capture and integrate the visual styles and spatial structure features of different cities.

[0034] In addition, when related technologies are applied in the field of urban planning and design, there is generally a lack of understanding and integration ability for professional planning constraints. The present application receives additional constraint information and extracts geometric constraint features therefrom, enabling the generation process to strictly follow the spatial layout provided by the user. This technical means of deeply integrating professional planning constraints into the generation process effectively solves the pain point in related technologies that the generated images are beautiful but cannot be used for actual auxiliary design, and greatly improves the practicality and professionalism of the generated images.

[0035] Figure 2 The algorithm flowchart for calculating multi-dimensional LoRA weight parameters based on text prompts provided by embodiments of the present application is shown. This solution first needs to obtain the text prompts input by the user, parse them to determine the target LoRA model, and determine the primary and secondary objects. The primary and secondary objects here are to determine the main framework and auxiliary details of the urban image, and then the fusion weights can be allocated.

[0036] In a possible implementation manner, according to the semantic information of the extracted text prompts and the urban keywords included therein, the steps may include the following: A. Parse the text prompts through natural language processing, perform word segmentation,词性标注, and remove stop words on the text statements; This step aims to preprocess the original text, eliminate noise and redundant information, and convert the unstructured text into a structured form that is more easily understood by machines. Specifically, predefined dictionaries and grammar rules are used for word segmentation; or a statistical learning-based method, such as using a hidden Markov model (HMM) or a deep learning model for sequence labeling, is adopted.

[0037] 词性标注is to identify the grammatical category of each word, such as noun, verb, adjective, and its implementation method is similar to word segmentation, which can be based on rules or statistical models. Removing stop words is to remove common words that contribute little or no contribution to the semantics, such as "的", "是", "在", which can be achieved by maintaining a stop word list and performing matching removal.

[0038] B. Use the named entity recognition (NER) method to extract geographical entities (such as "Chongqing", "Suzhou") and architectural planning field entities (such as "commercial street", "garden") in the word segmentation, take the matched geographical entities as urban keywords, and extract the urban entity list; It should be noted that the term "词性标注" in Chinese has been left untranslated as there is no clear English equivalent provided in the context. It should be replaced with the appropriate English term according to the actual situation. Also, the original text seems to have some inconsistent or unclear parts in terms of the overall logic and formatting, which might need further clarification for a more accurate translation.C. Construct a syntax tree for the text statements, perform dependency parsing, and clarify the modification relationships between words and determine style description keywords based on part-of-speech tagging; This is crucial for accurately extracting style description keywords from complex text descriptions, as it distinguishes between primary and secondary information, avoids misjudging irrelevant words as style features, and helps understand which entity or region the style feature refers to. For example, in the sentence "a commercial street with Chongqing mountain characteristics," "Chongqing" modifies "mountain characteristics," and the entire phrase "with Chongqing mountain characteristics" modifies "commercial street." "Mountain characteristics" and "exquisite landscape" are the key words describing the city's style.

[0039] D. Analyze the contextual modifiers, analyze the modifiers and modifier phrases, extract the dominant structural information, the main framework and detailed information integrated into the main body, as well as the implicit information of equal parallel / subordinate relationships.

[0040] This step specifically involves parsing logical information from words such as adverbs, verbs, prepositions, and conjunctions. For example, by identifying adverbs of degree (such as "very" and "slightly") and adverbs of scope (such as "mainly" and "partially"), the importance or coverage of a feature can be determined, thereby extracting the dominant structure and overall framework information described in the text. Verb and prepositional structures (such as "contains," "located in," and "surrounds") can reveal spatial or functional relationships between different entities, helping to construct the main framework and identify details or auxiliary embellishments integrated into the main body. Coordinating conjunctions (such as "and" and "as well as") and subordinating conjunctions (such as "although...but" and "not only...but also") are used to identify the logical relationships between multiple city features or styles described in the text, whether they are equal and parallel, or whether there is a primary and secondary, inclusive, or other relationships.

[0041] The following is a concrete example. Suppose the user inputs the text prompt: "A commercial street that blends the mountainous features of Chongqing with the exquisite landscape of Suzhou gardens, mainly showcasing the grandeur of Chongqing and embellished with the elegance of Suzhou." First, natural language processing is used for word segmentation, part-of-speech tagging, and stop word removal to break the text down into core semantic units. For example, words such as "Chongqing," "mountainous," "features," "Suzhou," "gardens," "exquisite," "landscape," "commercial street," "grand," and "elegant" are identified and retained. Next, named entity recognition is used to extract the geographical entities "Chongqing" and "Suzhou," as well as the architectural and planning entities "commercial street" and "gardens," from these words, and "Chongqing" and "Suzhou" are used as city keywords. Subsequently, dependency parsing is performed on the text to clarify the modification relationships between words. For example, it is identified that "Chongqing" modifies "mountainous features," while "possessing the mountainous features of Chongqing" as a whole modifies "commercial street"; at the same time, "exquisite" modifies "landscape." Finally, the contextual modifiers are analyzed. The adverb "mainly" in "mainly reflects the grandeur of Chongqing" indicates that "the grandeur of Chongqing" is the dominant structural information. The verb "embellish" in "adorn the elegance of Suzhou" indicates that "the elegance of Suzhou" is detailed information integrated into the main subject. Furthermore, based on conjunctions such as "with" and "and," it is understood that "the mountainous characteristics of Chongqing" and "the exquisite landscape of Suzhou gardens" are integrated, with the "Chongqing" style being primary and the "Suzhou" style secondary. Through this detailed semantic analysis, the system can accurately understand the user's primary and secondary preferences for city styles and their integration relationship, providing a crucial basis for subsequently accurately matching the LoRA models of Chongqing and Suzhou and calculating the integration weights reflecting the primary and secondary relationship.

[0042] like Figure 2 As shown, for the case where city keywords are extracted, after obtaining the list of city entities, the LoRA mapping table is queried based on the included city names, and the target LoRA model is matched from the LoRA model matrix library.

[0043] The LoRA mapping table can be a pre-built database or configuration file that stores the correspondence between city names and LoRA models in the LoRA model matrix repository. This mapping table allows for quick indexing of LoRA models for specific cities. The LoRA model matrix repository is a centralized repository that stores all trained LoRA models. These models can be stored as files on a local file system, a distributed storage system, or a cloud storage service. Each model contains LoRA weight parameters corresponding to the city's visual style and spatial structure.

[0044] Furthermore, when no target LoRA model corresponding to a city name is found, a target LoRA model is selected based on a similar regional substitution strategy. Specifically, the system pre-defines a regional similarity rule base, for example, grouping geographically adjacent cities with similar cultural styles. When a target city model is missing, a representative LoRA model from the same group is selected as a substitute. Another approach is to analyze metadata such as urban planning characteristics and architectural styles to calculate the similarity between cities, and select the existing LoRA model with the highest similarity as the substitute.

[0045] Similarly, when no city keywords are matched, default weight parameters (equivalent to default or fixed LoRA weight parameters) are selected as the fusion weights based on a general style. The general style can refer to a widely trained LoRA model that is not biased towards specific city features, or it can refer to the general generation capability inherent in the base Flux model itself. The default weight parameters can be preset fixed values, such as 0.5, indicating a moderate preference for the general style; or they can be parameters dynamically adjusted based on historical generation data or user preference statistics to ensure that reasonable images with a certain stylistic bias can still be generated even in the absence of specific city keywords.

[0046] When the mapping result is a single LoRA model, the corresponding LoRA weight parameters are directly selected as the fusion weights based on the mapping result. The following focuses on the case of multi-dimensional LoRA. When the mapping result is a multi-LoRA model, it is crucial to dynamically and reasonably calculate the fusion weights to smoothly integrate different city features and avoid cumbersome operations and harsh effects.

[0047] When the mapping result is a multi-LoRA model, the process of calculating the fusion weights corresponding to the target LoRA model can be summarized as follows: A. Based on the analysis results of contextual modifiers, determine the primary and secondary attribute relationships, identify the focus of the city image, and assign preliminary weights to the target LoRA model according to the intensity mapping relationship; Determining the primary and secondary attribute relationship means identifying which city keyword is the core subject of the description and which is a secondary or embellishing element. The city image focus indicates which city's visual style or spatial structure features should be prioritized when generating the image. This step can be achieved through matching using preset grammatical rules and semantic patterns. For example, when a sentence structure like "primarily A, incorporating B" appears, A is determined as the primary attribute, and B as the secondary attribute. Then, based on the main structural elements (primary attributes), the primary LoRA model and corresponding primary weights can be determined, and based on the detailed embellishing elements (secondary attributes), the secondary LoRA model and corresponding secondary weights can be determined.

[0048] In addition, machine learning models, such as Transformer-based sequence labeling models, can be used to train text prompts so that they can automatically identify and label the primary and secondary attributes of city keywords and their emphasis in the description.

[0049] For example, if the analysis determines that "Chongqing" is the absolutely dominant core subject, while "Suzhou" is a clear decorative detail, then a significant weight difference of 0.8:0.2 may be assigned; if it is determined that "Chongqing is the main subject and Suzhou is the secondary subject" but the secondary role is strong, then a more balanced weight of 0.6:0.4 may be assigned.

[0050] Alternatively, the system can have a built-in rule base that maps specific modifier combinations to predefined weight ratio ranges. Specifically, this can be achieved by constructing a rule base based on regular expressions or keyword matching, defining high weight differences for word combinations such as "absolutely dominant" and "core subject," while medium or low weight differences are assigned to word combinations such as "primarily, supplemented by" and "combined with." For example, "core...integrated into..." corresponds to (0.7-0.8):(0.3-0.2), while "combined with..." corresponds to a more even (0.5-0.6):(0.5-0.4).

[0051] In addition, fuzzy logic or expert systems can be used, which define a series of fuzzy rules, take the text analysis results as input, and output the corresponding weight ratios.

[0052] B. The importance of the identified entities and style description keywords is scored based on the TF-IDF statistical method to obtain semantic weights; the semantic weights reflect the prominence of the corresponding elements in the context of the prompt words. This step can involve constructing a corpus containing a large amount of city description text, then calculating the term frequency (TF) of each entity and style description keyword in the prompt word and its inverse document frequency (IDF) in the entire corpus. Multiplying these two values ​​yields the TF-IDF value, which serves as the semantic weight. Alternatively, other word embedding models (such as Word2Vec, GloVe, or BERT word vectors) can be used to calculate word importance by calculating the similarity between the word vector and the overall prompt word vector, or by utilizing attention mechanisms to evaluate the word's contribution to the context, thereby obtaining the semantic weight.

[0053] C. Normalize the semantic weights and fuse them with the initial weights according to the master-slave attribute relationship to calculate the fusion weights of the target LoRA model; aggregate the different fusion weights to generate a fusion parameter configuration table.

[0054] This step can be performed using a weighted average method, where the fusion weight = α * initial weight + β * normalized semantic weight; where α and β are adjustable hyperparameters used to balance the influence of the two weights. Alternatively, a neural network-based fusion model can be used, which can learn how to dynamically adjust the influence of semantic weights based on the master-slave attribute relationship and the initial weights, thereby generating a more accurate fusion weight.

[0055] Assuming that after fusion, the final fusion weight for the "Chongqing" LoRA model is calculated to be 0.65, while the fusion weight for the "Suzhou" LoRA model is calculated to be 0.35. These fusion weights are then aggregated to generate a fusion parameter configuration table, for example: {"Chongqing LoRA": 0.65, "Suzhou LoRA": 0.35}. This configuration table will be called by the Flux model to guide its image generation.

[0056] The above calculation method can greatly improve the adaptability and quality of the generated images when the text-to-image generation model is used to handle complex multi-city style fusion tasks. This allows the generated city image map to blend the visual styles and spatial structures of different cities more smoothly and naturally, thereby better assisting urban planning and design.

[0057] This embodiment also provides a method for constructing a LoRA model matrix library, which stores trained LoRA models corresponding to different cities, such as... Figure 3 The diagram shown illustrates the model training and image generation algorithm. The specific training process is detailed below: 1. Construct an urban image dataset by performing aesthetic scoring and urban planning semantic annotation on images of different city styles, and mix in interference images with non-target city style features into each urban image dataset to prevent style overfitting. We collected 366,000 images of Chinese cities, ideally covering first-, second-, and third-tier cities, and conducted aesthetic scoring and urban planning semantic labeling. Aesthetic scoring can be a quantitative assessment of aspects such as visual appeal, compositional balance, and color harmony, achieved through methods such as expert scoring, crowdsourcing platform evaluation, or automated scoring based on pre-trained aesthetic models. Urban planning semantic labeling involves a deeper, structured understanding of the image content. For example, it identifies and marks land use types such as building areas, roads, green spaces, and water bodies; distinguishes between modern, classical, and traditional architectural styles; and measures scale information such as street width and building height.

[0058] Incorporating interfering images with non-target city style features is an effective regularization strategy aimed at enhancing the model's ability to distinguish and generalize the target city's style features. Interfering images can be randomly selected from other cities, other style types (such as rural or natural landscapes), or even completely unrelated images, but their number and proportion need careful design to avoid diluting the target style features. For example, they can be inserted into the target city's training dataset at a certain proportion (e.g., 5%-20%). This approach forces the model to learn not only the common features of the target city's style during training but also how to distinguish these features from those of non-target styles, thus preventing the model from over-memorizing noise or random features from the training data and improving its robustness to new data.

[0059] 2. Based on the text-to-image generation model, and using the target city as the trigger keyword, the image datasets of the target city are trained independently. Taking the Flux model as an example, we used it as the base model to train LoRA models for 77 cities. During training, LoRA fine-tuning techniques can be employed, injecting a small number of trainable low-rank matrices into the pre-trained model to adapt to new tasks without modifying or retraining the entire large model. Using the target city as a trigger keyword, such as "Chongqing style," "Suzhou," or "Suzhou garden," ensures that the LoRA model is accurately activated during generation and guides the generation process to focus on the specific style of that city.

[0060] 3. Construct the first target loss based on the target city respectively. Construct a second interference loss based on the interference image. Construct the total loss of the model , means as follows: Among them The hyperparameters that control the strength of regularization are represented by the LoRA model matrix library, which consists of all the weight files after training.

[0061] The second interference loss is a regularization term designed for interference images. Its purpose is to penalize the model for over-responding to interference images. This design of the combined loss function enables the model to resist interference from non-target styles while optimizing the generation of target city style images, thereby improving the model's generalization ability and robustness.

[0062] After the LoRA model for each city is trained, a set of independent weight files is generated. These weight files are organized into a LoRA model matrix library for subsequent city image generation methods to use. When it is necessary to generate images in a specific city style, the system can load the corresponding weight file from this library and inject it into the base Flux model, thereby enabling the base model to generate images in that city style.

[0063] In some of the solutions described above in this application, semantic information is extracted and LoRA models are matched to generate urban-style images. However, without effective geometric constraints, the generated images may not accurately align with the input layout, control the three-dimensional spatial distribution, or guide the generation of different content, thus failing to meet the design specifications of actual urban planning. To address this, this application further proposes technical details for extracting geometric constraint features based on constraint information to further standardize image output, including the following: 1. When the constraint information is a sketch or planning diagram, extract the edge line features of the image to generate a binarized edge map. The edge map is used to strictly control the alignment of the contour of the generated image with the input layout. When the constraint information is a hand-drawn sketch, CAD drawing, or any image containing clearly defined line outlines, the system can identify and extract the main line information from these images. These lines represent the boundaries, contours, or structural skeletons in the design and are the basis for controlling the overall layout of the generated image. Extraction methods can include, but are not limited to, using the Canny edge detection algorithm, the Sobel operator, or a deep learning-based edge detection model. Subsequently, the system generates a binarized edge map.

[0064] 2. When the constraint information contains the hierarchical relationship between the preceding and following scenes, a monocular depth estimation algorithm is used to calculate the depth map from the input sketch or planning map, guiding the distribution of the generated content in three-dimensional space; The spatial relationships between objects can be represented by text input or by perspective drawing in sketches and outlines. The system will use a monocular depth estimation algorithm to calculate a depth map from the input sketch or plan view. This aims to extract or understand 3D spatial information such as the occlusion and distance relationships of objects in the scene.

[0065] 3. Classify different areas of the sketch or planning map into different land use types (such as building areas, roads, and green spaces) through the segmentation model, and generate a mask map with semantic labels to guide the generation location of different content; the extracted edge map, depth map (if contained) and mask map constitute geometric constraint features.

[0066] The generated semantically labeled mask map can guide the generation location of different content, ensuring that specific types of content (such as buildings, roads, and green spaces) are placed within the corresponding areas specified by the mask map. This results in clear and reasonable functional zoning of the generated image, conforming to the semantic requirements of urban planning. Finally, the extracted edge map, depth map, and mask map together constitute the geometric constraint features. They precisely control the generation process from three dimensions: contour, depth, and semantic zoning, respectively, jointly ensuring that the final generated urban image map highly conforms to the user's design intent and planning specifications in terms of geometric structure.

[0067] See Figure 3 The spatial constraints input by the user are fed into a planning constraint control adapter, which extracts geometric constraint features as guidance. After parsing the weight distribution (main framework and auxiliary details) based on text prompts, these features, along with the invoked LoRA weight parameters, are input into an integrated parameter dynamic fusion engine for fusion parameter calculation and output of fusion weights (i.e., the proportions of different LoRA weight parameters). Further, these geometric constraint features can be combined for denoising inference to generate and output the city image design map.

[0068] In the fields of urban planning and architectural design, especially when designers need to create conceptual designs for new districts or large complexes in China (such as science parks and cultural tourism areas), the aforementioned method and system for generating Chinese urban images based on multi-dimensional LoRA dynamic fusion demonstrates enormous potential. For example, a designer who wants to design a "new Chinese-style science park" for a new district needs to not only integrate the white walls and black tiles and garden textures of Suzhou with the modern high-tech feel and glass curtain wall elements of Shenzhen, but also ensure that the design complies with basic planning constraints, such as the pre-set road network layout. However, in such application scenarios, although the aforementioned technical solution can achieve the fusion of LoRA data from multiple cities and allocate global fusion weights according to the semantic emphasis of prompt words, it still faces a specific technical problem: a lack of fine-grained, spatially perceptive style distribution and fusion capabilities.

[0069] To address specific technical challenges in such unique scenarios, designers can apply different style blending instructions to different regions of the image during the generation process. While inputting basic text prompts and uploading overall geometric constraints (such as a road network map), designers can also provide a series of region masks. Each region mask corresponds to a specific sub-region in the image (e.g., using a white region to represent "R&D area" and another gray region to represent "Central Park"). For each region mask, designers can provide a region-specific text constraint for regional adjustment and optimization. The specific implementation methods are as follows: A. When the sketch or planning diagram of the constraint information also contains region masks, and the input contains text constraint words for the region masks, the matching text constraint words are matched and parsed one by one for different region masks. B. Determine the semantic focus based on the results of semantic information parsing, and calculate the independent region LoRA weight parameters of the region mask based on the results of context modifiers; For example, the constraint terms for "R&D area" are: "towering glass curtain wall buildings, full of futuristic feel," and the constraint terms for "Central Park" are: "small bridges and flowing water, pavilions and towers, Jiangnan garden style." In some embodiments, if the designer has sufficient understanding or proficiency in using LoRA models, they can also directly specify the fusion weights of the LoRA models in that area. For example, R&D area: Shenzhen LoRA 0.8, Suzhou LoRA 0.2; Central Park: Suzhou LoRA 0.7, Shenzhen LoRA 0.3.

[0070] like Figure 4 This diagram illustrates a possible form of sketch / planning map, with its perspective extending from the lower left to the upper right, outlining a coastal landscape. Two masked areas are marked; their size and shape can be adjusted based on the designer's or the system's automatic contour recognition of the target area. These masked areas can be enclosed regions created using sketching or other methods. The first text constraint for the first area mask is described as: "A coastal residential area with courtyards in the style of Southern Fujian architecture, but showcasing the characteristics of Chongqing's mountainous terrain"; the second text constraint for the second area mask is described as: "A beach in the style of Gulangyu Island, but showcasing European landmark architecture." Subsequent contextual analysis of these constraints determines the core style or content tendency of each area, thereby determining the semantic focus and assigning weights (see the analysis process for text prompts for details; this step will not be elaborated upon here).

[0071] C. Generate a LoRA weight spatial distribution map by combining the LoRA weight parameters calculated by the region mask and the LoRA weight parameters calculated by the non-region mask, and use it as the fusion weight; D. During the denoising inference stage, the LoRA weight space distribution map is queried in real time to obtain the LoRA model and its fusion weights corresponding to the region for inference generation.

[0072] The LoRA weight space distribution map is a two-dimensional or three-dimensional data structure that associates each pixel or region in the image space with a specific set of LoRA models and their fusion weights. This map is generated by integrating the LoRA weight parameters of all regions calculated using region masks, as well as the LoRA weight parameters of non-regional parts not covered by any region masks (obtained from parsing the overall text prompts), into a unified mapping structure. For example, it could be a matrix of the same size as the generated image, with each pixel storing its corresponding LoRA model ID and fusion weight vector. In the core process of image generation—the denoising inference stage—the diffusion model gradually recovers the image from the noise.

[0073] Figure 5 The diagram illustrates a comparison between the city images output by the traditional method and the technical solution of this embodiment. The image on the left is a city image directly generated based on text prompts and a general Flux model. While the overall result meets the design requirements, it does not adequately showcase details and urban fabric. The image on the right, on the other hand, is a city image generated based on a multi-dimensional LoRA model fusion. Due to geometric constraints, different regions use different LoRA fusion ratios, but the overall result still satisfies the specific fusion weights calculated in the preceding steps. However, the regional representation is more detailed, with greater distinctiveness in architectural style and urban fabric, fully demonstrating the unique features of different areas.

[0074] Through the aforementioned technical solution, this application achieves independent style control for different regions. This region-level weight calculation and dynamic injection mechanism enables the text-to-image generation model to dynamically adjust the LoRA model's fusion weights in real-time based on the location within the image space during the denoising inference stage. This ensures that the generated city image map exhibits a natural, accurate, and user-expected style fusion effect across different regions. This significantly enhances the flexibility and accuracy of city image generation, allowing designers to integrate multiple city styles and functional areas within a single image, thereby better supporting urban planning and design work.

[0075] In summary, compared with related technologies, this technical solution has the following significant advantages: 1. Extremely high degree of regional cultural reproduction: By training the LoRA model for each city, the problem of cities generated by the general model being "seemingly similar but not quite the same" has been solved; it can accurately reproduce specific visual symbols such as "the light rail passing through buildings in Chongqing" and "the texture of hutongs in Beijing".

[0076] 2. Flexibility and efficiency in design assistance: The introduction of a "semantic routing and dynamic weight allocation" mechanism eliminates the need for designers to manually switch and test models repeatedly. Simply mentioning the city name in the prompts allows the system to automatically retrieve the corresponding style, significantly reducing the time from concept to visualization.

[0077] 3. Balancing Creativity and Standardization: Based on Flux's powerful command-following capabilities and combined with planning constraints, the generated images are no longer purely artistic paintings, but reference maps with spatial logic that meet practical applications such as assisting urban planning and teaching urban awareness.

[0078] 4. High resource utilization: Compared to training a large full-scale fine-tuning model, using the LoRA matrix to store the features of several cities greatly saves GPU memory usage and storage space, and makes it easier to update the model data of a specific city individually later.

[0079] Figure 6 This is a structural block diagram of a city image generation device based on multidimensional LoRA provided in this application embodiment. The device includes: The fusion weight calculation module 610 is used to extract the semantic information of the text prompt words and the city keywords contained therein, and to match the corresponding target LoRA model and calculate the corresponding fusion weight based on the semantic information and the city keywords; the LoRA model is used to generate LoRA weight parameters for the corresponding city visual style and spatial structure; The constraint feature extraction module 620 is used to receive constraint information corresponding to the text prompt words and extract geometric constraint features for constraining image content based on the constraint information. The city image output module 630 is used to extract the target LoRA weight parameters corresponding to the target LoRA model, and inject text into the image generation model according to the ratio of the fusion weights. It also uses the geometric constraint features as constraints to perform city style image inference and output a city image that conforms to the text prompt words.

[0080] It should be noted that the multi-dimensional LoRA-based urban image generation device provided in this embodiment is only an example of the above-described functional modules / units. In practical applications, the functions described above can be assigned to different functional modules / units as needed, that is, the internal structure of the multi-dimensional LoRA-based urban image generation device can be divided into different functional modules / units to complete all or part of the functions described above. Furthermore, the implementation methods of the multi-dimensional LoRA-based urban image generation method provided in the above-described method embodiments and the implementation methods of the multi-dimensional LoRA-based urban image generation device provided in this embodiment belong to the same concept. For details of the specific implementation process of the multi-dimensional LoRA-based urban image generation device provided in this embodiment, please refer to the above-described method embodiments, which will not be repeated here.

[0081] Figure 7This illustration shows a structural block diagram of a computer device provided in an exemplary embodiment of this application. The device can be a desktop computer, laptop computer, handheld computer, or cloud server, among other computer devices. The computer device may include, but is not limited to, a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the GPU scheduling policy execution method described above. The processor and memory can be connected via a bus or other means. The processor can be a Central Processing Unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, graphics processing units (GPUs), embedded neural network processing units (NPUs), or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0082] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0083] In some embodiments, the computer device may also optionally include: a peripheral device interface and at least one peripheral device. The processor, memory, and peripheral device interface can be connected via a bus or signal lines. Each peripheral device can be connected to the peripheral device interface via a bus, signal lines, or a circuit board. Specifically, the peripheral device includes: a physical network interface card (NIC), and at least one of a radio frequency circuit, a display screen, and a keyboard.

[0084] This application also discloses a computer-readable storage medium. Specifically, the computer-readable storage medium is used to store a computer program, which, when executed by a processor, implements the methods described in the above-described method embodiments. Those skilled in the art will understand that implementing all or part of the processes in the methods described in the above-described embodiments of this application can be accomplished by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.

[0085] This specific embodiment is merely an explanation of the present invention and is not intended to limit the invention. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of the present invention.

Claims

1. A method for generating urban images based on multidimensional LoRA, characterized in that, The method includes: Semantic information and city keywords contained in text prompts are extracted. Based on the semantic information and city keywords, a corresponding target LoRA model is matched, and the corresponding fusion weights are calculated. The LoRA model is used to generate LoRA weight parameters for the corresponding city's visual style and spatial structure. Specifically, the primary and secondary attribute relationships are determined by combining the results of contextual modifier analysis to determine the focus of the city image, and the initial weights of the target LoRA model are assigned according to the intensity mapping relationship. The primary weight of the primary LoRA model is determined based on the main structural elements, and the secondary weight of the secondary LoRA model is determined based on the detail embellishment elements. The importance of the identified entities and the style description keywords is scored using the TF-IDF statistical method to obtain semantic weights. The semantic weights reflect the prominence of the corresponding elements in the prompt context. The semantic weights are normalized and fused with the initial weights according to the primary and secondary attribute relationships to calculate the fusion weights of the target LoRA model. Different fusion weights are aggregated to generate a fusion parameter configuration table. Receive constraint information corresponding to the text prompt words, and extract geometric constraint features for constraining image content based on the constraint information; Extract the target LoRA weight parameters corresponding to the target LoRA model, and inject the text into the image generation model according to the ratio of the fusion weights. Use the geometric constraint features as constraints to perform city style image inference and output a city image that matches the text prompt words.

2. The method according to claim 1, characterized in that, The extraction of semantic information from text prompts and the city keywords they contain includes: The text prompts are analyzed using natural language processing, and the text sentences are segmented, tagged with parts of speech, and stop words are removed. The named entity recognition method is used to extract geographic entities and architectural planning domain entities from the word segmentation. The matched geographic entities are used as the city keywords to extract a list of city entities. The text sentences are constructed into a syntax tree for dependency parsing, and the modification relationships between words and style description keywords are determined based on part-of-speech tagging. The analysis of contextual modifiers, the parsing of modifiers and modifier phrases, and the extraction of dominant structural information, main framework and detailed elements integrated into the main body, as well as information on implicit relationships of equal parallelism / subordinate relationships are all performed.

3. The method according to claim 2, characterized in that, After obtaining the list of city entities, the LoRA mapping table is queried based on the city names included, and the target LoRA model is matched from the LoRA model matrix library; When no target LoRA model corresponding to a city name is matched, the target LoRA model is selected according to an approximate regional substitution strategy. When no city keyword is matched, the default weight parameter is selected as the fusion weight based on the general style; When the mapping result is a single LoRA model, the corresponding LoRA weight parameters are directly selected as the fusion weights based on the mapping result.

4. The method according to claim 1, characterized in that, The LoRA model matrix library stores trained LoRA models for different cities, including: Aesthetic scoring and semantic annotation of urban planning were performed on images of different city styles, and interference images with non-target city style features were mixed into each city image dataset. Based on the text-to-image generation model, and using the target city as the trigger keyword, the image datasets of the target city are trained independently. Construct the first target loss based on the target city respectively Construct a second interference loss based on the interference image. Construct the total loss of the model , means as follows: Among them The hyperparameters representing the control of regularization strength, and all weight files after training constitute the LoRA model matrix library.

5. The method according to any one of claims 1-4, characterized in that, The step of receiving constraint information corresponding to the text prompt and extracting geometric constraint features for constraining image content based on the constraint information includes: When the constraint information is a sketch or planning map, the image edge line features are extracted to generate a binarized edge map. When the constraint information contains the hierarchical relationship between the control scene, a monocular depth estimation algorithm is used to calculate the depth map from the input sketch or planning map; The segmentation model classifies different areas of the sketch or planning map into different land use properties, generating a mask map with semantic labels; the extracted edge map, depth map and mask map constitute the geometric constraint features.

6. The method according to claim 2, characterized in that, When the sketch or planning diagram of the constraint information also contains a region mask, and the input contains text constraint words for the region mask, the matching text constraint words are matched and parsed one by one for different region masks; The semantic focus is determined based on the results of semantic information parsing, and the independent region LoRA weight parameters of the region mask are calculated based on the results of contextual modifiers. The LoRA weight parameters calculated by the region mask and the LoRA weight parameters calculated by the non-region mask are used together to generate a LoRA weight spatial distribution map, which is then used as the fusion weight. During the denoising inference stage, the LoRA weight space distribution map is queried in real time to obtain the corresponding LoRA model and its fusion weights for inference generation.

7. A city image generation device based on multidimensional LoRA, characterized in that, The device includes: The fusion weight calculation module is used to extract semantic information and city keywords contained in text prompts, match the corresponding target LoRA model and calculate the corresponding fusion weights based on the semantic information and city keywords; the LoRA model is used to generate LoRA weight parameters for the corresponding city visual style and spatial structure; specifically, the primary and secondary attribute relationships are determined by combining the results of contextual modifier analysis, the focus of the city image is determined, and the initial weights of the target LoRA model are assigned according to the intensity mapping relationship; the primary weight of the primary LoRA model is determined based on the main structural elements, and the secondary weight of the secondary LoRA model is determined based on the detail embellishment elements; the importance of the identified entities and the style description keywords is scored based on the TF-IDF statistical method to obtain semantic weights; the semantic weights reflect the prominence of the corresponding elements in the prompt context; the semantic weights are normalized and fused with the initial weights according to the primary and secondary attribute relationships to calculate the fusion weights of the target LoRA model; different fusion weights are aggregated to generate a fusion parameter configuration table; The constraint feature extraction module is used to receive constraint information corresponding to the text prompt words and extract geometric constraint features for constraining image content based on the constraint information. The image output module is used to extract the target LoRA weight parameters corresponding to the target LoRA model, and inject text into the image generation model according to the ratio of the fusion weights. It also uses the geometric constraint features as constraints to perform urban style image inference and outputs an urban image that conforms to the text prompt words.

8. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the multidimensional LoRA-based urban image generation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the multidimensional LoRA-based urban image generation method as described in any one of claims 1 to 6.