Urban function composition ratio interactive generation method based on special large language model

Through the interactive generation method of urban functional composition ratio based on a dedicated large language model, the problem that traditional proportions are difficult to balance multiple factors is solved, an automated and intelligent proportioning process is realized, and a scientific, reasonable and sustainable proportioning scheme for urban functional composition is provided.

CN119721045AActive Publication Date: 2025-03-28SOUTHEAST UNIV

Patent Information

Application Number
CN202411768364.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

The traditional urban functional component ratio is difficult to balance multiple influencing factors such as population, economic development, resource and environmental conditions, and is time-consuming and labor-intensive, and has problems such as strong subjectivity and imperfect analysis perspective.

Method used

The interactive generation method of urban functional composition ratio based on a dedicated large language model is adopted. By automatically collecting urban planning related data, cleaning and preprocessing, semantic analysis and prompt word generation is used to use natural language processing technology and machine learning algorithms to perform semantic analysis and prompt word generation, and model retraining is combined with human feedback reinforcement learning to form a dedicated large language model to generate urban functional composition ratio scheme.

Benefits of technology

The comprehensive, automated and intelligent urban functional composition ratio has been achieved, and multiple factors of urban development can be considered more scientifically and reasonably, and a sustainable proportioning solution can be provided, which improves the rationality, scientificity and efficiency of proportioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721045A_ABST
    Figure CN119721045A_ABST
Patent Text Reader

Abstract

The invention discloses a city function composition ratio interactive generation method based on a special large language model. The method comprises the following steps: collecting city design text case data; screening out corpus data corresponding to the planning region and the partition type of the design site; performing semantic analysis and processing on the associated background information of the design site by using a natural language processing technology, and converting the associated background information into cues related to a function ratio decision to serve as a sample set; pre-training a large language model by using LLama-7B, and sending a preliminary generation result of the pre-trained model to a user; retraining the large language model generated by the city function composition proportion to form a special large language model; and the city function composition ratio is output to an interactive operation platform, and city functions are visualized and can be subjected to interactive modification. The problems that multiple influence factors such as population, economic development and resource and environment conditions are difficult to balance and time and labor are consumed by a traditional urban function composition ratio are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of urban planning, and in particular to an interactive generation method for urban function composition ratio based on a special large language model. Background Art

[0002] The proportion of urban function composition is one of the key tasks in urban planning and design, and is an important basis for the balanced and efficient distribution of urban functions. A reasonable proportion of urban function composition is a scientific use of urban resources, which can improve the overall benefits of the city, meet the diverse needs of residents, optimize urban environmental issues, and promote sustainable urban development. A city is a complex system. The traditional proportion of urban function composition requires comprehensive consideration of planning goals, population structure, economic development level, resource and environmental conditions, and other information. It takes a long time to collect and analyze information, and it relies on the experience and judgment of urban planning experts and professionals. It lacks a comprehensive and integrated evaluation and optimization method, and has problems such as strong subjectivity and imperfect analysis perspective, which affects the long-term development of urban function composition. Summary of the invention

[0003] Purpose of the invention: In view of the shortcomings of the existing technology and matching process, the present invention provides an interactive generation method for the matching of urban functional composition based on a dedicated large language model, which solves the problem that the traditional matching of urban functional composition is difficult to balance multiple influencing factors such as population, economic development, resource and environmental conditions, and is time-consuming and labor-intensive. The present invention has the advantages of comprehensiveness, automation, intelligence, and multi-dimensional analysis. It can fully consider the actual situation and needs of urban development and provide a scientific, reasonable and sustainable matching scheme for urban functional composition.

[0004] The technical solution adopted by the present invention is: a method for interactively generating urban function composition ratio based on a dedicated large language model, comprising:

[0005] (1) Obtain the public standard text data of urban planning-related departments and urban design text case data through the Python webpage data automatic collector, clean and preprocess the collected text data, and split it into complete corpus. Each corpus data is given attribute information describing the corpus characteristics, including corpus type, planning area, and zoning type, to form an urban design text case database;

[0006] (2) According to the planning area and zoning type of the design site input by the user, the urban design text case database is screened to select the corpus data corresponding to the planning area and zoning type of the design site;

[0007] (3) Use natural language processing technology to perform semantic analysis and processing on the relevant background information of the design site, and convert it into prompt words related to functional ratio decision-making as a sample set;

[0008] (4) Use LLama-7B to pre-train the large language model and send the preliminary generation results of the pre-trained model to the user;

[0009] (5) Based on user feedback on the initial generated results, the large language model generated by the urban function composition ratio is retrained using human feedback reinforcement learning (RLHF) to form a dedicated large language model;

[0010] (6) The city function composition ratio is exported to the interactive operation platform, and the city functions are visualized and can be modified interactively.

[0011] Furthermore, the step (1) collects urban design text case data to form an urban design text case database, including:

[0012] We collected and obtained text data related to work reports, statistical yearbooks, and various economic information, social and population norms through official websites of governments at all levels, websites of planning-related functional departments, and the national standard full-text disclosure system. We also used the python webpage data automatic collector to obtain text data of public award-winning works of the Shanghai Urban Design Challenge hosted by the Shanghai Municipal Planning and Natural Resources Bureau.

[0013] The types of normative text data include urban planning-related planning documents, planning design texts, planning scheme evaluation reports, planning implementation evaluation reports, and various current norms, regulations, standards, indicators, guidelines, guidelines, and guidance opinions related to urban planning;

[0014] The collected text data was cleaned and preprocessed by computer automatic recognition and extraction using Python 3.0 language to remove duplicate data, correct erroneous information, and split into complete corpora. Each corpus data was given attribute information describing the characteristics of the corpus, including corpus type, planning area, and zoning type.

[0015] The corpus types are divided into three categories: general knowledge type, counting type and association type. Among them, the general knowledge type corpus data is generalized and basic urban design specifications and models, the counting type corpus is urban design related indicators and quantitative data, and the association type corpus data is descriptive sentences and text expressions with urban planning expertise.

[0016] The planning area includes administrative and geographical coordinate information;

[0017] The zoning types are residential areas, comprehensive service areas, commercial and business areas, industrial development areas, logistics and warehousing areas, green space leisure areas, transportation hub areas, strategic reserve areas, urban flexible development areas, and special-purpose areas. The classification is based on the "Guidelines for the Preparation of Municipal Land and Space Master Plans" compiled by the Ministry of Natural Resources; an urban design text case database is constructed, which includes a general database, a counting database, and an association database, and the corpus data is imported into the three types of databases according to the corpus type;

[0018] The urban design text case database relies on a MySQL database management system and a storage medium for storing corpus data.

[0019] Furthermore, the step (2) acquires the associated case data and the design site associated background information according to the user's selection, including:

[0020] According to the planning area and zoning type of the design site input by the user, write SQL query statements to filter the urban design text case database, and filter out the corpus data corresponding to the planning area and zoning type of the design site in the general database, count database and association database respectively;

[0021] According to the site selected by the user, the background information associated with the design site is obtained.

[0022] Furthermore, the step (3) constructs city function composition ratio prompt words and instruction sentences as a training sample set, including:

[0023] A classification system of prompt words and instruction sentences is established according to the six types of land use functions: commercial services, industrial and mining storage, residential, public management and public services, transportation, and special land. The classification is based on GB / T 21010-2017 "Classification of Current Land Use";

[0024] Use natural language processing technology and machine learning algorithms to automatically classify text data into prompt words and instruction sentences;

[0025] The semantic similarity calculation is used to analyze the association between the prompt word A and the instruction sentence B. The degree of association between them is evaluated by comparing their distance or similarity in the semantic space. The specific formula is:

[0026]

[0027] Where A·B is the dot product of vectors A and B, ||A||×||B|| is the modulus of vectors A and B respectively, and the calculation result range is [-1,1]. The strongly associated prompt words and instruction sentences with calculation results greater than 0.5 are selected to form a prompt word and instruction sentence sample set, and the prompt word and instruction sentence sample set in the selected corpus data is identified;

[0028] Clean and annotate the constructed sample set to remove duplicates and incomplete data;

[0029] The sample set is divided into a training set and a test set, where 70% of the data is used as a training set and 30% of the data is used as a test set;

[0030] Natural language processing technology is used to perform semantic analysis and processing on the relevant background information of the design site, and convert it into prompt words related to functional matching decisions.

[0031] Furthermore, the step (4) uses the llama-7B pre-training large language model method to include:

[0032] Build a large language model based on llama-7B;

[0033] Import prompt words and instruction sentences into the large language model module for pre-training;

[0034] Based on prompts Word fine-tuning The method performs pre-training, freezes all parameters of the main model llama-7B, and continuously updates the sentence embedding vector corresponding to the filling slot in the prompt word structure template through multiple iterations in the embedding layer; the number of iterations is set to 20; every four iterations, an initial result of the pre-trained language large model is generated and returned to the user; the initial training result I=(I1~I5);

[0035] Based on the test set data in S5, the user asks questions to the initial training result I = (I1 ~ I5) according to the prompt template, and generates a candidate answer set N = (N1 ~ N5) containing multiple candidate answers. i )_; Calculate the text similarity T between the candidate answers and the test set data according to the TF-IDF algorithm, and select the initial training model with the highest similarity in the generated results;

[0036] The text similarity T is calculated by using the Jieba word segmentation algorithm in pycharm to calculate the candidate answer N i Split into multiple words, call the TF-IDF algorithm to calculate the similar word area M between the candidate answer and the test set data, and finally calculate

[0037] Furthermore, the step (5) is retrained using reinforced learning with human feedback (RLHF) based on user feedback on the preliminary generated results. The specific method is as follows:

[0038] Based on the instruction statement in step (3), the initial training model is asked questions, the model samples and generates multiple candidate answers, and the user sorts the candidate answers; the preference sorting data set A = {sorting number, candidate answer number} is obtained and imported into the database for storage;

[0039] The pre-trained language model is trained based on the preference ranking data using the gradient descent algorithm, and the loss values ​​of the prediction results, selected answers, and wrong answers are calculated. The training result with the minimum learning loss value is regarded as the reward model.

[0040] The learning loss value H is calculated as follows

[0041] H(p,q)=-∑ x p(x)logq(x)

[0042] In the formula, p(x) is the true label label of the current input, and q(x) is the model's predicted value for each label label;

[0043] The enhanced training method is as follows: based on the instruction statement in step (3), the initial training model is asked multiple questions in an ultra-deep computer, and the generated results are optimized by the calculation results of the reward model; the training is stopped after the number of iterations preset by the user is reached, and a dedicated large language model is obtained; the model file is exported in py format and locally deployed on an ultra-deep computer. The configuration requirements of the ultra-deep computer are a 2*8-core processor, 80G video memory, and an NVIDIA DGX-2 deep learning system.

[0044] Furthermore, the step (6) outputs the city function composition ratio to the interactive operation platform, and the specific method is as follows:

[0045] Obtaining the recommended information on the ratio of urban functional land use; the user inputs the Chinese prompt words and question templates of the site in the deployed special large language model; the special large language model index construction tool calls the large language model API to access the large language model module, and obtains the recommended text of a certain urban function ratio under a certain site condition, wherein the recommended text includes the tags [area function positioning], [area main function composition], [building carrier of a certain function], [function ratio], [reference specification and case source] and corresponding content; outputting all texts to the interactive operation platform, which is a dialogue preset program including a conversation unit, an intention recognition unit and a historical record unit; after receiving the generated results, the user continues to initiate a conversation modification instruction, and the intention recognition unit identifies the generated intention parameters and feeds them back to the special large language model, completing a new round of modified content output, which is stored by the historical record unit until the output content meets the user's expectations; the modified content is integrated by using data integration and translation equipment, and the modified content is printed into an urban function ratio planning report by a printing device.

[0046] Beneficial effects:

[0047] (1) The interactive generation system of urban function composition ratio based on the dedicated large language model of the present invention obtains the public standard text data of urban planning related departments and urban design text case data through the Python webpage data automatic collector, cleans and preprocesses the collected text data, and splits it into complete corpus, and gives each corpus data attribute information describing the corpus characteristics, including corpus type, planning area, and zoning type, to form an urban design text case database. The standardization and accuracy of the data are guaranteed, and the rationality, scientificity and efficiency of the generation of urban function composition ratio are greatly improved.

[0048] (2) The interactive generation system of urban function composition ratio based on the dedicated large language model of the present invention screens the urban design text case database according to the planning area and zoning type of the design site input by the user, and respectively screens out the corpus data corresponding to the planning area and zoning type of the design site in the general database, the counting database and the association database, and at the same time obtains the design site related background information according to the site selected by the user, so that the urban information and theoretical basis used to generate the urban function composition are more targeted and comprehensive.

[0049] (3) The present invention is an interactive generation system for the proportion of urban functional composition based on a dedicated large language model. According to the six types of land use functions, namely, commercial services, industrial and mining storage, residential, public management and public services, transportation, and special land, a classification system for prompt words and instruction sentences is established. Natural language processing technology and machine learning algorithms are used to automatically classify prompt words and instruction sentences for text data. The relationship between prompt words and instruction sentences is analyzed using semantic similarity calculation to form a sample set of prompt words and instruction sentences. Natural language processing technology is used to perform semantic analysis and processing on the associated background information of the design site, and it is converted into prompt words related to the functional proportion decision, which can fully improve the scientificity and accuracy of the sample set used to train and generate the large language model for the proportion of urban functional composition.

[0050] (4) The present invention is based on a dedicated large language model for interactively generating a city function composition ratio system, constructs a large language model based on llama-7B, imports prompt words and instruction sentences into the large language model module for pre-training, performs pre-training based on the prompt word fine-tuning method, freezes all parameters of the main model llama-7B, and continuously updates the sentence embedding vector corresponding to the filling slot in the prompt word structure template in the embedding layer through multiple iterations. After every four iterations, an initial result of the pre-trained language large model is generated and returned to the user; the user asks questions to the initial training results based on the test set data according to the prompt template, generates a candidate answer set containing multiple candidate answers, and selects the initial training model with the highest similarity of the generated results, which greatly improves the organicity and accuracy of the large language model used to generate the city function composition ratio.

[0051] (5) The present invention is an interactive generation system for city function composition ratio based on a dedicated large language model. Questions are asked to the initial training model. The model samples and generates multiple candidate answers. The user sorts the candidate answers and imports them into a database for storage. The pre-trained language model is trained based on the preference sorting data using a gradient descent algorithm. The loss values ​​of the prediction results and the selected answers and wrong answers are calculated. The training result with the smallest learning loss value is regarded as a reward model, so that the large language model used to generate the city function composition ratio is more intelligent, efficient and accurate.

[0052] (6) The present invention is an interactive generation system for city function composition ratio based on a dedicated large language model. Users can input Chinese site prompt words and question templates into the deployed dedicated large language model to obtain a suggested text of a city function ratio under certain site conditions, and output all texts to a dialog-enabled interactive operation platform including a conversation unit, an intention recognition unit, and a history record unit. After receiving the generated results, the user continues to initiate a conversation modification instruction, and the large language model completes a new round of modification content output until the output content meets the user's expectations. The modified content is integrated with data and printed into a city function ratio planning report, which greatly improves the flexibility and scalability of the city function composition ratio plan. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 is a flow chart of the method of the present invention;

[0054] Figure 2 In the embodiment of the present invention, the designer asks questions to the dedicated large language model and outputs the technical logic of the content. DETAILED DESCRIPTION

[0055] The following takes the urban design of Chuanhuai New District in Zhoukou City as an example to illustrate the specific implementation process of the present invention. Figure 1 , showing the entire process of the present invention.

[0056] Step 1 Specifically, the present invention obtains information through web crawler technology, and obtains public standard text data of urban planning-related departments and urban design text case data through a python web page data automatic collector. This includes collecting and obtaining work reports, statistical yearbooks, and various text data related to economic information, social population, and other norms from official websites of governments at all levels, websites of planning-related functional departments, and national standard full-text disclosure systems. The text data of public award-winning works of the Shanghai Urban Design Challenge hosted by the Shanghai Municipal Planning and Natural Resources Bureau is obtained through a python web page data automatic collector;

[0057] The types of normative text data include urban planning-related planning documents, planning design texts, planning scheme evaluation reports, planning implementation evaluation reports, and various current norms, regulations, standards, indicators, guidelines, guidelines, and guidance opinions related to urban planning;

[0058] Step 2: The collected text data is cleaned and preprocessed by computer automatic recognition and extraction using Python 3.0 language to remove duplicate data, correct erroneous information, and split into complete corpora. Each corpus data is given attribute information describing the characteristics of the corpus, including corpus type, planning area, and zoning type.

[0059] The corpus types are divided into three categories: general knowledge type, counting type and association type. Among them, the general knowledge type corpus data is generalized and basic urban design specifications and models, the counting type corpus is urban design related indicators and quantitative data, and the association type corpus data is descriptive sentences and text expressions with urban planning expertise.

[0060] All three types of corpora are stored in txt format. The content examples are as follows:

[0061] General knowledge type:

[0062] [Weaving the urban green space system, sorting out the gray street corner space in the city, building pocket parks, and providing public spaces for the public to relax and socialize.]

[0063] [Relying on high-speed rail to form a comprehensive service sector]

[0064] Count type:

[0065] [Opening windows over a large area allows natural ventilation to remove indoor heat and moisture while preventing excessive solar radiation from entering. Therefore, the window ratio for public buildings should not be greater than 0.85, and glass with a high shading coefficient should be used.]

[0066] [There are approximately 2.69 square kilometers of parks and green spaces in the city, or 2.99 square meters per person]

[0067] [The ratio of blue and green land exceeds 25%, of which green land accounts for 18% of the total land area and water area accounts for 4% of the total area. ]

[0068] Association Class

[0069] [The super central axis includes the high-strength core of the business portal + the core of Sanshui Huiwo Park + the core of the government office + the core of the performing arts park. The four cores drive the shaping of the urban development axis of the Chuanhuai New District]

[0070] [The renewal sector serves as a new engine for the development of the central part of the city, connecting with important urban functional sectors such as the central business district and the innovation and entrepreneurship cluster area]

[0071] The planning area includes administrative and geographical coordinate information;

[0072] The zoning types are residential areas, comprehensive service areas, commercial and business areas, industrial development areas, logistics and warehousing areas, green space leisure areas, transportation hub areas, strategic reserved areas, urban flexible development areas, and special-purpose areas. The classification is based on the "Guidelines for the Preparation of Municipal Land and Space Master Plans" compiled by the Ministry of Natural Resources;

[0073] Construct an urban design text case database, which includes a general knowledge database, a counting database, and an association database. Import corpus data into the three databases according to the corpus type;

[0074] The urban design text case database relies on a MySQL database management system and a storage medium for storing corpus data.

[0075] Step 3: Input the planning area and zoning type of the design site, write an SQL query statement, filter the urban design text case database, and filter out the corpus data corresponding to the planning area and zoning type of the design site in the general database, the count database, and the association database;

[0076] For example, [SELECT latitude between(33°25N,33°49N),logitude between(115°00W,115°38'W),partition type = 'commercial business district' FROM 'general knowledge corpus' WHERE 'file location']

[0077] According to the site selected by the user, the background information associated with the design site is obtained.

[0078] Step 4: Establish a classification system of prompt words and instruction sentences according to the six types of land use functions: commercial services, industrial and mining storage, residential, public management and public services, transportation, and special land. The classification is based on GB / T21010-2017 "Land Use Status Classification";

[0079] Natural language processing technology and machine learning algorithms are used to automatically classify prompt words and instruction sentences for text data; this embodiment does not limit the algorithm, as long as it has classification capabilities.

[0080] The prompt words and template examples are as follows: The bracket information containing the mask is the fill slot, and the internal format of the fill slot is a text vector.

[0081] "You are an experienced urban designer. Please analyze the key information here according to the main functions of the site and the description of the related information of the upper planning {information mask}; in your analysis, it should be reflected that this information is obtained from the site description provided by the user; the site location level and site zoning type must be known information provided by the user. Analyze and provide the land use function positioning {area function positioning mask}, the main function composition ratio {function ratio mask}, and the main building type {building carrier mask}; the analysis process is detailed and the reference document title {reference specification and case source} is given. Speak like a senior urban and rural planner, and have a gentle and friendly tone. The person you are talking to can be

[0082] {Other urban designers, students, scientific researchers};”

[0083] The semantic similarity calculation is used to analyze the association between the prompt word A and the instruction sentence B. The degree of association between them is evaluated by comparing their distance or similarity in the semantic space. The specific formula is:

[0084]

[0085] Where A·B is the dot product of vectors A and B, ||A||×||B|| is the modulus of vectors A and B respectively, and the calculation result range is [-1,1]. The strongly associated prompt words and instruction sentences with calculation results greater than 0.5 are selected to form a prompt word and instruction sentence sample set, and the prompt word and instruction sentence sample set in the selected corpus data is identified;

[0086] Clean and annotate the constructed sample set to remove duplicates and incomplete data;

[0087] The sample set is divided into a training set and a test set, where 70% of the data is used as a training set and 30% of the data is used as a test set;

[0088] Natural language processing technology is used to perform semantic analysis and processing on the relevant background information of the design site, and convert it into prompt words related to functional matching decisions.

[0089] Step 5

[0090] The base large language model used in the present invention is the llama-7B model, which is an open source large language model based on the general language model (GLM) framework with a training parameter of up to 1 trillion. It can be used for commercial purposes. Its technology is similar to ChatGPT. It is one of the best performing open source large language models. In addition, the present invention uses the prompt word fine-tuning method to fine-tune the large language model.

[0091] First, deploy a large language model based on llama-7B 。

[0092] Import the prompt word and instruction sentence files into the large language model for pre-training.

[0093] The present invention is based on the prompt Word fine-tuning The method performs pre-training, freezes all parameters of the main model llama-7B, and continuously updates the sentence embedding vector corresponding to the filling slot in the prompt word structure template through multiple iterations in the embedding layer. The number of iterations is set to 20. After every four iterations, an initial result of the pre-trained language large model is generated and returned to the user. The initial training result I = (I1~I5) is obtained.

[0094] Based on the test set data in S5, the user asks questions to the initial training result I = (I1 ~ I5) according to the prompt template, and generates a candidate answer set N = (N1 ~ N5) containing multiple candidate answers. i ). The text similarity T between the candidate answers and the test set data is calculated based on the TF-IDF algorithm, and the initial training model with the highest similarity in the generated results is selected.

[0095] The text similarity T is calculated by using the Jieba word segmentation algorithm in pycharm to calculate the candidate answer N i Split into multiple words, call the TF-IDF algorithm to calculate the similar word area M between the candidate answer and the test set data, and finally calculate

[0096] Step 6 asks questions to the initial training model based on the instruction statement in step 4, for example

[0097] {

[0098] “Question”: Please write 5 common characteristic scenes in urban design.

[0099] "input":"",

[0100] "output": OK, now we give you the following solution:

[0101] Candidate answer 1: Waterfront park, cultural square, historical district, commercial pedestrian street, ecological green corridor;

[0102] Candidate answer 2: old street style, ancient bridge charm, deep courtyard, city green lung, folk style pavilion;

[0103] Candidate answer 3: Waterfront oasis, ancient alleys, window to the future, green lung heart, cultural square;

[0104] }

[0105] The model samples and generates multiple candidate answers, and the users rank the candidate answers from satisfactory to unsatisfactory. The preference ranking data set A = {ranking number, candidate answer number} is obtained and imported into the database for storage.

[0106] The pre-trained language model is trained based on the preference ranking data using the gradient descent algorithm. The loss values ​​of the prediction results, the selected answers, and the wrong answers are calculated. The training result with the smallest learning loss value is regarded as the reward model.

[0107] The learning loss value H is calculated as follows

[0108] H(p,q)=-∑ x p(x)logq(x)

[0109] In the formula, p(x) is the true label label of the current input, and q(x) is the model's predicted value for each label label.

[0110] The enhanced training method is: based on the instruction statement in step (3), the initial training model is asked multiple questions in the ultra-deep computer, and the generated results are optimized by the calculation results of the reward model. The training is stopped until the number of iterations preset by the user is reached, and a dedicated large language model is obtained. The model file is exported in py format and locally deployed on the ultra-deep computer. The ultra-deep computer configuration requirements are 2*8-core processors, 80G video memory, and equipped with NVIDIA DGX-2 deep learning system.

[0111] Step 7 obtains the recommended information on the ratio of urban functional land use. The user enters the Chinese prompt words and question templates for the site in the deployed special large language model. The special large language model index construction tool calls the large language model API to access the large language model module to obtain the recommended text of a certain urban function ratio under certain site conditions. The recommended text includes tags [area function positioning], [area main function composition], [building carrier of a certain function], [function ratio], [reference specification and case source] and corresponding content.

[0112] In this embodiment, the output result text is as follows:

[0113] {

[0114] "Instruction": We are doing a district-scale urban design competition. The location is in Chuanhuai New District, Zhoukou City, Henan Province. The area within the red line is 2 square kilometers. It is a new district to be developed. Our initial idea is to create a commercial and business district. Based on this information, can you give some suggestions on functional positioning and proportions?

[0115] "input":"",

[0116] “output”: OK, now we recommend the following solutions for you:

[0117] 1. Functional positioning of the area: Financial business center innovation demonstration area

[0118] 2. The main functions of the area are: business office land, cultural and leisure land, commercial retail land, public green land, transportation and infrastructure land,

[0119] 3. Building carrier:

[0120] Business office space: corporate headquarters, financial trading centers, international hotels, high-end business hotels, high-end maker spaces

[0121] Cultural and leisure land: music exhibitions, gymnasiums, art galleries

[0122] Commercial retail land: high-end shopping, charming water street

[0123] Public green space: street parks, rooftop greenways

[0124] Transportation and infrastructure land: including land for roads and public facilities

[0125] 4. Functional ratio: It is recommended to start from the blue-green network, industry leadership, and mixed functions, with 30% for business office land, 20% for retail commercial land, 10% for R&D land, 10% for administrative office land, 10% for life service facilities, 10% for residential land, and 10% for other land;

[0126] 5. Reference standards and case sources: Luoyang Luolong Science and Technology Park Financial Service Center, Tangshan Caofeidian New District Financial Business Center, Reference standard: GB / T 21010-2017 "Land Use Status Classification";

[0127] }

[0128] All texts are output to the interactive operation platform, which is a preset program that can be used for dialogue, including a conversation unit, an intention recognition unit, and a history record unit. After receiving the generated results, the user continues to initiate a conversation modification instruction.

[0129] For example,

[0130] [{mask}, can you give us more details?]

[0131] [Write a few more {mask}], where the mask information is the prompt word

[0132] In this example, the question is

[0133] [Regarding the blue-green network, industry leadership, and hybrid functions, please expand in more detail and output the complete text in combination with historical records]

[0134] The intent recognition unit generates intent parameters and feeds them back to the dedicated large language model to complete a new round of modified content output, which is stored by the history recording unit until the output content meets user expectations.

[0135] The modified output is as follows:

[0136] {

[0137] "output": OK, after modification, the following solutions are recommended for you:

[0138] 1. Functional positioning of the area: Financial business center innovation demonstration area

[0139] 2. The main functions of the area are: business office land, cultural and leisure land, commercial retail land, public green land, transportation and infrastructure land,

[0140] 3. Building carrier:

[0141] Business office space: corporate headquarters, financial trading centers, international hotels, high-end business hotels, high-end maker spaces

[0142] Cultural and leisure land: music exhibitions, gymnasiums, art galleries

[0143] Commercial retail land: high-end shopping, charming water street

[0144] Public green space: street parks, rooftop greenways

[0145] Transportation and infrastructure land: including land for roads and public facilities

[0146] 4. Functional ratio: It is recommended to start from the blue-green network, industry leadership, and functional mixing:

[0147] Blue-green network: protect and restore the water system and green space in the city, establish a complete blue-green network system, organically connect various areas in the area, and form a complete ecological network

[0148] Industry leadership: Facing the demand for new economic forms in future urban development, modern service industries such as financial centers, headquarters economy, and new Internet economy are used as industrial support.

[0149] Functional mix: Urban construction land emphasizes mixed land use and complex functions. Among them, new industrial mixed and residential mixed land includes residential, office, R&D, service and other functions, forming a block unit that integrates work and residence.

[0150] 30% for business office, 20% for retail business, 10% for R&D, 10% for administrative office, 10% for life service facilities, 10% for residential use, and 10% for other uses;

[0151] 5. Reference standards and case sources: Luoyang Luolong Science and Technology Park Financial Service Center, Tangshan Caofeidian New District Financial Business Center, Reference standard: GB / T 21010-2017 "Land Use Status Classification";

[0152] }

[0153] The modified content is integrated by using data integration and translation equipment, and the modified content is printed into an urban function allocation planning report by using printing equipment.

[0154] For detailed process, please refer to Figure 2 .

[0155] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. An interactive generation method for urban function composition ratio based on a dedicated large language model, characterized in that: include: (1) Obtain the public standard text data of urban planning-related departments and urban design text case data through the Python webpage data automatic collector, clean and preprocess the collected text data, and split it into complete corpus. Each corpus data is given attribute information describing the corpus characteristics, including corpus type, planning area, and zoning type, to form an urban design text case database; (2) According to the planning area and zoning type of the design site input by the user, the urban design text case database is screened to select the corpus data corresponding to the planning area and zoning type of the design site; (3) Use natural language processing technology to perform semantic analysis and processing on the relevant background information of the design site, and convert it into prompt words related to functional ratio decision-making as a sample set; (4) Use LLama-7B to pre-train the large language model and send the preliminary generation results of the pre-trained model to the user; (5) Based on user feedback on the initial generated results, human feedback reinforcement learning is used to retrain the large language model generated by the urban function composition ratio to form a dedicated large language model; (6) The city function composition ratio is exported to the interactive operation platform, and the city functions are visualized and can be modified interactively.

2. The interactive generation method of urban function composition ratio based on a dedicated large language model according to claim 1 is characterized in that: The step (1) collects urban design text case data to form an urban design text case database, including: We collected and obtained text data related to work reports, statistical yearbooks, and various economic information, social and population norms through official websites of governments at all levels, websites of planning-related functional departments, and the national standard full-text disclosure system. We also used the python webpage data automatic collector to obtain text data of public award-winning works of the Shanghai Urban Design Challenge hosted by the Shanghai Municipal Planning and Natural Resources Bureau. The types of normative text data include urban planning-related planning documents, planning design texts, planning scheme evaluation reports, planning implementation evaluation reports, and various current norms, regulations, standards, indicators, guidelines, guidelines, and guidance opinions related to urban planning; The collected text data was cleaned and preprocessed by computer automatic recognition and extraction using Python 3.0 language to remove duplicate data, correct erroneous information, and split into complete corpora. Each corpus data was given attribute information describing the characteristics of the corpus, including corpus type, planning area, and zoning type. The corpus types are divided into three categories: general knowledge type, counting type and association type. Among them, the general knowledge type corpus data is generalized and basic urban design specifications and models, the counting type corpus is urban design related indicators and quantitative data, and the association type corpus data is descriptive sentences and text expressions with urban planning expertise. The planning area includes administrative and geographical coordinate information; The zoning types are residential areas, comprehensive service areas, commercial and business areas, industrial development areas, logistics and warehousing areas, green space leisure areas, transportation hub areas, strategic reserve areas, urban flexible development areas, and special-purpose areas. The classification is based on the "Guidelines for the Preparation of Municipal Land and Space Master Plans" compiled by the Ministry of Natural Resources; an urban design text case database is constructed, which includes a general database, a counting database, and an association database, and the corpus data is imported into the three types of databases according to the corpus type; The urban design text case database relies on a MySQL database management system and a storage medium for storing corpus data.

3. The interactive generation method of urban function composition ratio based on a dedicated large language model according to claim 2 is characterized in that: The step (2) acquires the associated case data and the design site associated background information according to the user's selection, including: According to the planning area and zoning type of the design site input by the user, write SQL query statements to filter the urban design text case database, and filter out the corpus data corresponding to the planning area and zoning type of the design site in the general database, count database and association database respectively; According to the site selected by the user, the background information associated with the design site is obtained.

4. The interactive generation method of urban function composition ratio based on a dedicated large language model according to claim 3 is characterized in that: The step (3) constructs the city function composition ratio prompt words and instruction sentences as a training sample set, including: A classification system of prompt words and instruction sentences is established according to the six types of land use functions: commercial services, industrial and mining storage, residential, public management and public services, transportation, and special land. The classification is based on GB / T 21010-2017 "Classification of Current Land Use"; Use natural language processing technology and machine learning algorithms to automatically classify text data into prompt words and instruction sentences; The semantic similarity calculation is used to analyze the association between the prompt word A and the instruction sentence B. The degree of association between them is evaluated by comparing their distance or similarity in the semantic space. The specific formula is: Where A·B is the dot product of vectors A and B, ||A||×||B|| is the modulus of vectors A and B respectively, and the calculation result range is [-1,1]. The strongly associated prompt words and instruction sentences with calculation results greater than 0.5 are selected to form a prompt word and instruction sentence sample set, and the prompt word and instruction sentence sample set in the selected corpus data is identified; Clean and annotate the constructed sample set to remove duplicates and incomplete data; The sample set is divided into a training set and a test set, where 70% of the data is used as a training set and 30% of the data is used as a test set; Natural language processing technology is used to perform semantic analysis and processing on the relevant background information of the design site, and convert it into prompt words related to functional matching decisions.

5. The interactive generation method of urban function composition ratio based on a dedicated large language model according to claim 4 is characterized in that: The step (4) uses the llama-7B pre-training large language model method to include: Build a large language model based on llama-7B; Import prompt words and instruction sentences into the large language model module for pre-training; Based on prompts Word fine-tuning The method performs pre-training, freezes all parameters of the main model llama-7B, and continuously updates the sentence embedding vector corresponding to the filling slot in the prompt word structure template through multiple iterations in the embedding layer; the number of iterations is set to 20; every four iterations, an initial result of the pre-trained language large model is generated and returned to the user; the initial training result I=(I1~I5); Based on the test set data in S5, the user asks questions to the initial training result I = (I1 ~ I5) according to the prompt template, and generates a candidate answer set N = (N1 ~ N5) containing multiple candidate answers. i )_; Calculate the text similarity T between the candidate answers and the test set data according to the TF-IDF algorithm, and select the initial training model with the highest similarity in the generated results; The text similarity T is calculated by using the Jieba word segmentation algorithm in pycharm to calculate the candidate answer N i Split into multiple words, call the TF-IDF algorithm to calculate the similar word area M between the candidate answer and the test set data, and finally calculate 6. The interactive generation method of urban function composition ratio based on a dedicated large language model according to claim 5 is characterized in that: The step (5) uses human feedback reinforcement learning to perform retraining based on the user's feedback on the preliminary generated results. The specific method is as follows: Based on the instruction statement in step (3), the initial training model is asked questions, the model samples and generates multiple candidate answers, and the user sorts the candidate answers; the preference sorting data set A = {sorting number, candidate answer number} is obtained and imported into the database for storage; The pre-trained language model is trained based on the preference ranking data using the gradient descent algorithm, and the loss values ​​of the prediction results, selected answers, and wrong answers are calculated. The training result with the minimum learning loss value is regarded as the reward model. The learning loss value H is calculated as follows H(p,q)=-Σ x p(x)logq(x) In the formula, p(x) is the true label label of the current input, and q(x) is the model's predicted value for each label label; The enhanced training method is as follows: based on the instruction statement in step (3), the initial training model is asked multiple questions in an ultra-deep computer, and the generated results are optimized by the calculation results of the reward model; the training is stopped after the number of iterations preset by the user is reached, and a dedicated large language model is obtained; the model file is exported in py format and locally deployed on an ultra-deep computer. The configuration requirements of the ultra-deep computer are a 2*8-core processor, 80G video memory, and an NVIDIA DGX-2 deep learning system.

7. The interactive generation method of urban function composition ratio based on a dedicated large language model according to claim 6 is characterized in that: The step (6) outputs the city function composition ratio to the interactive operation platform. The specific method is: Obtaining information on the recommended ratio of urban functional land use; the user inputs the Chinese prompt words and question templates for the site in the deployed dedicated large language model; the dedicated large language model index construction tool calls the large language model API to access the large language model module, and obtains a certain urban functional ratio recommendation text under certain site conditions, wherein the recommendation text includes tags [area functional positioning], [area main functional composition], [building carrier of a certain function], [functional proportion], [reference specification and case source] and corresponding content; outputting all texts to the interactive operation platform, which is a dialog-enabled preset program including a conversation unit, an intention recognition unit and a historical record unit; After receiving the generated results, the user continues to initiate a session modification instruction. The intention recognition unit identifies the generated intention parameters and feeds them back to the dedicated large language model, completing a new round of modified content output, which is stored by the historical record unit until the output content meets user expectations. The modified content is integrated by using data integration and translation equipment, and the modified content is printed into an urban function ratio planning report through a printing device.

Citation Information

Patent Citations

  • Zero-sample large model generation code detection method and system

    CN117608648A

  • Natural language extraction method and device based on low-rank tensor layer

    CN117875305A

  • Conversational software function generation method and system based on large language model

    CN118276826A

  • Urban land planning method and device based on large language model, and electronic equipment

    CN118674179A

  • AU2021105856A4

Cited By

  • Large model reasoning capability optimization method and system and storage medium

    CN119940485A

  • Multi-modal large model fine-tuning corpus production method for planning and natural resource field

    CN121997908A