An automated building energy consumption modeling method based on large language models
Through the large language model automated building energy consumption modeling method, the problem of inefficient relying on manual modeling of existing tools is solved, and rapid and accurate energy consumption simulation is achieved, supporting rapid iteration and low-carbon transformation of architectural design.
Patent Information
- Application Number
- CN202510561048.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-30
AI Technical Summary
Existing building energy modeling tools rely on manual modeling, are inefficient, have a steep learning curve for non-professional users, lack of automation support, and are difficult to meet the real-time energy consumption simulation needs of rapid iteration of architectural design solutions.
Automatic building energy consumption modeling in natural language descriptions is carried out through large language models, natural language requirements descriptions entered by users are obtained, domain semantic analysis is performed, standardized modeling instructions sets that meet the grammatical specifications of building energy consumption simulation engines are generated, and the interface of the target building energy consumption simulation engine is called to generate simulation results.
It significantly reduces the modeling workload, reduces the dependence on professional knowledge and simulation software, supports real-time response to energy consumption simulation in rapid iteration of architectural design solutions, improves modeling efficiency and accuracy, and enhances the robustness of the system.
Smart Images

Figure CN120086954B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of resource environment based on artificial intelligence, and particularly relates to an automated building energy consumption modeling method based on a large language model. Background Art
[0002] Building Energy Modelling (BEM), as the core technology for carbon footprint analysis in the building energy conservation design and operation stages, is mainly realized relying on professional simulation platforms such as EnergyPlus and DesignBuilder. Although such tools can achieve high-precision energy consumption simulation based on thermodynamic principles, their technical frameworks still have the following limitations: First, the modeling process relies on manual completion of building geometric parameterization reconstruction and multi-dimensional physical property definition, with a cumbersome operation process and low efficiency; Second, the user interface is deeply coupled with the modeling logic, building thermodynamics, HVAC system principles, and the syntax rules of specific simulation engines, resulting in a steep learning curve for non-professional users; Third, existing tools lack the ability to support automated modeling and are difficult to meet the real-time requirements of energy consumption simulation for the rapid iteration of building design schemes.
[0003] In recent years, although large language models (LLMs) based on deep learning have demonstrated semantic understanding and logical reasoning advantages in the field of code generation, their application in the BEM field still faces key technical bottlenecks: First, the simulation model files generated by LLMs often have semantic logic deviations, mainly due to the insufficient embedding of the building domain knowledge base and energy consumption calculation rules; Second, the model has insufficient ability to parse the implicit spatial topological relationships and building component constraint conditions in natural language instructions, easily leading to errors in geometric model generation; Third, existing methods do not build a cross-modal data processing mechanism and are difficult to collaboratively process building drawing data and text description information, restricting the fusion application of multi-source heterogeneous data.
[0004] In the prior art, the interaction paradigm of traditional BEM tools relies on manual modeling driven by expert experience, with bottlenecks in efficiency and scalability, becoming the key obstacle restricting the implementation of intelligent building design and low-carbon technologies. Summary of the Invention
[0005] Based on this, it is necessary to address the above technical problems by providing an automated building energy consumption modeling method based on a large language model, which directly converts natural language descriptions into building energy consumption models, significantly reducing the modeling workload and reducing the dependence on professional knowledge and simulation software during the modeling process.
[0006] In a first aspect, the present application provides an automated building energy consumption modeling method based on a large language model, including:
[0007] Obtain the natural language requirement description input by the client, and perform domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters; the requirement description includes building space attributes;
[0008] Input the modeling parameters into the building large language model to generate a standardized modeling instruction set that conforms to the syntax specification of the target building energy consumption simulation engine; among them, the building large language model is obtained by fine-tuning the pre-trained large language model with building domain professional Q&A corpora;
[0009] Call the interface of the target building energy consumption simulation engine to generate simulation instructions, and the simulation instructions are used to instruct the target building energy consumption simulation engine to output simulation results based on the standardized modeling instruction set; the simulation results include the building model file and the key indicators of the building model file.
[0010] In one embodiment, the training method of the large language model fine-tuned with building domain professional Q&A corpora includes the following steps:
[0011] S1: Obtain the fine-tuning data set, and the fine-tuning data set includes natural language description statements and standardized modeling instruction sets;
[0012] S2: Map the byte pair encoding vectors of the fine-tuning data set into matrices, perform matrix operations on the fine-tuning data set using the following formula, and obtain the attention feature matrix using the softmax function:
[0013] ;
[0014] Among them, is the query matrix, is the key-value matrix, is the value matrix, is the dimension of the query matrix and the key-value matrix;
[0015] S3: Split the query matrix, key-value matrix, and value matrix along the feature dimension into multiple independent subspaces, perform multi-head attention parallel calculations on the multiple independent subspaces to obtain a feature tensor including multi-dimensional building modeling features; concatenate the feature tensors output by each independent subspace and project to obtain the fused modeling feature representation of the attention layer; among them, each independent subspace is used to learn different modeling dimension features;
[0016] S4: Input the fused modeling feature representation into the feed-forward neural network, and obtain the non-linear transformation output through the fully connected layer and activation function of the feed-forward neural network; perform residual connection on the fused modeling feature representation and the non-linear transformation output to obtain the residual result; perform layer normalization on the residual result to obtain the normalized feature vector;
[0017] S5: Decode the normalized eigenvector to obtain a generated instruction set, construct a loss function by comparing the difference in the syntax tree structures between the generated instruction set and the standard instructions, and obtain a loss value to drive the backpropagation optimization of the model parameters;
[0018] S6: Repeat steps S2 to S5 until the loss value is less than a preset value to obtain a large language model for architecture fine-tuned with professional Q&A corpus in the architecture field.
[0019] In one embodiment, the method further includes the following steps:
[0020] S1.1: Sample combinations of different building parameters according to the Latin hypercube orthogonal sampling strategy to generate a parameter combination sample set in the multi-dimensional parameter space of building modeling. The parameter combination sample set includes the combination of the standardized modeling instruction set and the corresponding building parameters, which is used to indicate the corresponding building model descriptions with different parameter settings;
[0021] S1.2: Establish a connection between the standardized modeling instruction set and the natural language description based on the parameter combination sample set to obtain a fine-tuning data set.
[0022] Preferably, before performing domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters, it further includes:
[0023] Obtain a hierarchical set of modeling requirement parameters, where the hierarchy is at least divided into two levels; among them, the first-level set of modeling requirement parameters includes the geometric shape parameters of the building base; the second-level set of modeling requirement parameters includes the attributes and detail parameters of the first level; the detail parameters include at least one of window position, internal load, enclosure structure, equipment system parameters, and dynamic control parameters;
[0024] Perform integrity check based on the hierarchical corresponding modeling requirement parameters and the requirement description. If the requirement description cannot cover the hierarchical corresponding modeling requirement parameters, generate a first prompt message, which is used to indicate to the user to input the missing modeling requirement parameters.
[0025] Further, before performing domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters, it further includes:
[0026] Perform lexical-semantic joint analysis on the natural language description input by the user to identify noise and classify the noise types; the noise types include spelling mistakes, omissions, and redundancies;
[0027] Perform differential noise processing according to the noise types to obtain corrected data;
[0028] Generate a requirement description based on the corrected data.
[0029] Furthermore, the architecture large language model processes undefined requirement descriptions through an adaptive learning mechanism, including:
[0030] Extract implicit architectural semantic elements from the undefined format requirement descriptions input by the user side, and generate a structured set of semantic elements;
[0031] Generate a candidate modeling instruction set based on the set of semantic elements, and call the syntax verification interface of the simulation engine to detect the feedback signal of the instruction set; the feedback signal includes logical conflicts and format errors;
[0032] According to the feedback signal returned by the syntax verification interface, dynamically adjust the weight parameters of the model decoder to obtain corrected instructions; store the corrected instructions and the corresponding prompt format features in the fine-tuning data set to form an extensible format-rule mapping relationship, which is used to process undefined format requirement descriptions.
[0033] Furthermore, after calling the interface of the target building energy consumption simulation engine to generate simulation instructions, it further includes:
[0034] Obtain visualization requirements and obtain visualization results based on a multimodal visualization mapping strategy; the multimodal visualization mapping strategy includes at least one of temporal evolution, spatial distribution, and association analysis.
[0035] In a second aspect, the present application also provides an automated building energy consumption modeling system based on a large language model, including:
[0036] A natural language processing module, configured to obtain the natural language requirement description input by the user side; perform domain semantic analysis on the requirement description based on a natural language model to extract modeling parameters; the requirement description includes building space attributes;
[0037] A large language model fine-tuning module, configured to input the modeling parameters into the architecture large language model to generate a standardized modeling instruction set that conforms to the syntax specification of the target building energy consumption simulation engine; wherein, the architecture large language model is fine-tuned by professional Q&A corpus in the architecture field;
[0038] A simulation engine interface module, configured to call the interface of the target building energy consumption simulation engine to generate simulation instructions, and the simulation instructions are used to instruct the target building energy consumption simulation engine to output simulation results based on the standardized modeling instruction set; the simulation results include a building model file and key indicators of the building model file.
[0039] In a third aspect, the present application also provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it implements the above-mentioned automated building energy consumption modeling method based on a large language model.
[0040] In a fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described above are implemented.
[0041] The above-mentioned automated building energy consumption modeling method based on a large language model extracts modeling parameters from the description in the unstructured natural language input by the user through a natural language model, and converts them into a standardized instruction set that conforms to the syntax specification of the building energy consumption simulation engine through a large language model fine-tuned with professional Q&A corpora in the building field. The interface of the target building energy consumption simulation engine is called, and simulation instructions are generated using the standardized instruction set to obtain a simulated building model file and its key indicators. The above method breaks through the strong dependence of traditional BEM tools on professional modeling knowledge and simulation syntax, reduces the manual modeling error rate through automated parameter extraction and instruction generation, lowers the modeling threshold, supports real-time response of energy consumption simulation in the rapid iteration of building design schemes, and effectively solves the technical implementation obstacles in the fields of intelligent building design and low-carbon transformation. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0043] Figure 1 Schematic flowchart of an automated building energy consumption modeling method based on a large language model provided by an embodiment of the present invention;
[0044] Figure 2 Mapping example between natural language description and IDF file;
[0045] Figure 3 Schematic structural diagram of an automated building energy consumption modeling system based on a large language model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] In order to make the objectives, technical solutions, and advantages of the present application clearer, the following further details the present application in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] First, a brief introduction is made to the nouns involved in the embodiments of the present application.
[0048] Building energy consumption modeling refers to the process of simulating and analyzing the energy consumption situation of a building during its use through a mathematical model and computer technology, so as to predict the building energy consumption situation.
[0049] Large language models are deep learning models trained using a large amount of text data, aiming to understand and generate natural language text. Large language models play an important role in the field of natural language processing (NLP) and are widely used in various tasks such as text generation, machine translation, sentiment analysis, and question answering systems. These models are usually based on deep learning techniques and can capture the complexity and diversity of language. Large language models typically adopt neural network structures, are trained using large-scale text data, and learn grammar, semantics, and context information in the text data to generate models with certain language capabilities. The training process of large language models usually includes two stages: pre-training and fine-tuning. The pre-training stage is to train on a large amount of text data to learn various patterns and structures of the language; the fine-tuning stage is to optimize the model according to specific tasks to improve its performance on specific tasks.
[0050] According to the above noun explanations, the implementation environment of the automated building energy consumption modeling method based on large language models provided in the embodiments of this application is described. Schematically, this implementation environment includes: an interaction terminal, a processor, and a domain knowledge storage array. Among them, the interaction terminal can be a voice acquisition sensor or a text input device; the processor includes but is not limited to a central processing unit, a multi-core processor, or an artificial intelligence chip, etc.; the domain knowledge storage array can be a distributed storage system or a centralized storage system, which is not limited here.
[0051] Combined with the above noun explanations and implementation environment, the application scenarios of the embodiments of this application are described. The automated building energy consumption modeling method based on large language models provided in the embodiments of this application can be applied to the following scenarios including but not limited to:
[0052] In the scenario of rapid energy efficiency iteration design of building schemes, building engineers describe the building form through natural language, such as "L-shaped five-story office building, with 40% of the south-facing glass curtain wall", and the system automatically analyzes the spatial topological relationship and generates a parametric model, and synchronously outputs the cloud maps of the cooling and heating load distributions of different window-wall ratio schemes, supporting the design team to conduct energy consumption sensitivity analysis at the initial stage of the scheme.
[0053] In the scenario of auxiliary decision-making for energy conservation renovation of existing buildings, property managers input descriptions of the building's current situation, and the model automatically completes the missing envelope structure parameters, generates energy consumption comparison reports for multiple renovation schemes, and optimizes the priority of renovation investment.
[0054] In the scenario of simulation and deduction of regional energy planning, the urban planning department submits the text of the area planning, batch generates the energy consumption baseline models of typical building clusters, couples the configuration parameters of the regional energy station, and dynamically simulates the carbon emission trajectories under different renewable energy penetration rates.
[0055] Schematically, the automated building energy consumption modeling method provided by the embodiments of the present application based on large language models can also be applied to other application scenarios. Only examples are given here, and the specific application scenarios are not limited.
[0056] In an exemplary embodiment, as Figure 1 shown, an automated building energy consumption modeling method based on large language models is provided, including the following steps 101 to 103, where:
[0057] Step 101, obtain the natural language requirement description input by the user side, and perform domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters; the requirement description includes building space attributes.
[0058] Specifically, receive the natural language description of the requirement description input by the user and perform domain semantic analysis to extract modeling parameters. For example, for the following natural language description input by the user: "Simulate a building that is 50 meters long, 30 meters wide, and 10 meters high, with a window-wall ratio of 0.4.", extract the key modeling parameters: length 50 meters, width 30 meters, height 10 meters, window-wall ratio (WWR) 0.4, and convert them into structured modeling instructions. The user can describe parameters such as the geometric shape of the building, window positions, and internal loads through natural language.
[0059] Step 102, input the modeling parameters into the building large language model to generate a standardized modeling instruction set that conforms to the syntax specification of the target building energy consumption simulation engine; among them, the building large language model is obtained by fine-tuning the pre-trained large language model with building domain professional Q&A corpora.
[0060] Specifically, convert the modeling parameters into structured modeling instructions, and generate industrial document format files required by the target building energy consumption simulation engine (such as EnergyPlus, DeST, etc.) through the building large language model fine-tuned with building domain professional Q&A corpora. For example, the building large language model obtained by fine-tuning the pre-trained large language model with building domain professional Q&A corpora converts the modeling parameters into the IDF file required by EnergyPlus. The fine-tuning process uses a specific dataset in the building modeling field to ensure that the model can accurately understand the requirements of the building modeling task.
[0061] Step 103, call the interface of the target building energy consumption simulation engine to generate a simulation instruction, and the simulation instruction is used to instruct the target building energy consumption simulation engine to output a simulation result based on the standardized modeling instruction set; the simulation result includes a building model file and key indicators of the building model file.
[0062] Specifically, by calling the API interface provided by the target building energy consumption simulation engine, the standardized modeling instruction set is passed to the target simulation engine, and the target simulation engine performs calculations and simulations based on these instructions to generate simulation instructions. For example, by using a Python script to call the API of the EnergyPlus simulation engine, during the simulation process, the simulation engine will read the various parameters in the instruction set and perform energy consumption calculations according to the preset algorithms and models, and finally output the simulation results, including detailed building model files (such as IDF files containing information such as building geometry, internal space division, equipment configuration, etc.) and key indicators of the building model file, such as the total annual energy consumption, energy consumption distribution in different seasons, and consumption ratios of various energy sources (electricity, gas, etc.).
[0063] The above-mentioned automated building energy consumption modeling method based on a large language model extracts modeling parameters from the unstructured natural language described in the user input through a natural language model, and converts them into a standardized instruction set that conforms to the syntax specification of the building energy consumption simulation engine through a large language model fine-tuned with professional Q&A corpora in the building field. It calls the interface of the target building energy consumption simulation engine and uses the standardized instruction set to generate simulation instructions to obtain the simulated building model file and its key indicators. The above method breaks through the strong dependence of traditional BEM tools on professional modeling knowledge and simulation syntax, reduces the manual modeling error rate through automated parameter extraction and instruction generation, lowers the modeling threshold, supports real-time response of energy consumption simulation in the rapid iteration of building design schemes, and effectively solves the technical implementation obstacles in the fields of intelligent building design and low-carbon transformation.
[0064] In one embodiment, the training method of the large language model fine-tuned with professional Q&A corpora in the building field may include the following steps:
[0065] S1: Obtain a fine-tuning data set, which includes natural language description statements and a standardized modeling instruction set.
[0066] Exemplarily, please refer to Figure 2 the provided mapping example of natural language description and IDF file. The fine-tuning data set covers parameter combinations of different building geometries, window-wall ratios, internal loads, etc., and the sample pairs are composed of corresponding natural language descriptions and IDF files.
[0067] S2: Map the byte pair encoding vectors of the fine-tuning data set into a matrix, perform matrix operations on the fine-tuning data set using the following formula, and obtain the attention feature matrix using the softmax function:
[0068] ;
[0069] where is the query matrix, is the key-value matrix, is a value matrix, is the dimension of the query matrix and the key-value matrix.
[0070] Exemplarily, a large language model with an attention module as the core is adopted to construct a query matrix, a key-value matrix, and a value matrix. Among them, the query matrix represents specific information that the model focuses on; the key-value matrix is the input feature that determines the content related to the query matrix; the value matrix is used to provide actual information content and can effectively focus on the most important information. Specifically, the self-attention mechanism allows each word to adjust its importance according to the context during the encoding process, which involves taking the dot product of the encoded input with the query matrix and the key-value matrix with dimension and the value matrix with dimension and then applying a softmax function to obtain the weights of the values; in the building simulation scenario, the query matrix, the key-value matrix, and the value matrix can be understood as representing the influence of different parameters on the simulation results in the downstream task (i.e., building modeling). For example, the influence of heating, cooling, and electricity on the building.
[0071] S3: Split the query matrix, the key-value matrix, and the value matrix along the feature dimension into multiple independent subspaces, perform multi-head attention parallel computing on the multiple independent subspaces to obtain a feature tensor including multi-dimensional building modeling features; concatenate the feature tensors output by each independent subspace in series and project to obtain the fused modeling feature representation of the attention layer; where each independent subspace is used to learn different modeling dimension features.
[0072] Specifically, the multi-head attention mechanism is used to enhance the information capture ability of the model. The attention is divided into multiple heads to capture various information channels in the input data. Especially when dealing with multiple types of input and prompt formats, each head has a different representation type. Exemplarily, according to the architecture design and computing resources of the model, determine the number of heads in the multi-head attention mechanism, and evenly split the query matrix, the key-value matrix, and the value matrix into the corresponding number of independent subspaces according to the feature dimension. Taking 8 heads as an example, each subspace is responsible for processing 1 / 8 of the feature dimension of the original matrix. In a parallel computing environment, let each independent subspace perform attention calculation simultaneously. Within each subspace, when calculating the attention weights, calculate the attention scores according to their respective query matrices and key-value matrices, and then normalize to obtain the attention distribution. The attention calculations of different subspaces will focus on different aspects of the input information. For example, some subspaces pay more attention to information related to the building space structure, and other subspaces focus on the energy consumption characteristics of building equipment. After the calculation is completed, concatenate the feature tensors output by each subspace in series according to the dimension to form a large tensor containing multi-dimensional information, and project the concatenated tensor to the specified dimension through a linear projection layer to obtain the fused modeling feature representation of the attention layer, providing richer and more comprehensive feature information for subsequent model processing.
[0073] S4: Input the fused modeling feature representation into a feed - forward neural network. Obtain a non - linear transformation output through the fully - connected layer and activation function of the feed - forward neural network; perform a residual connection on the fused modeling feature representation and the non - linear transformation output to obtain a residual result; perform layer normalization on the residual result to obtain a normalized feature vector.
[0074] Exemplarily, input the attention - layer fused modeling feature representation into a feed - forward neural network. The fully - connected layer of the feed - forward neural network initializes the weight matrix according to the prior knowledge and data characteristics in the construction field. For example, for the weights corresponding to features such as building orientation and thermal performance of the building envelope, which are closely related to building energy consumption, larger initial values can be assigned to enhance the model's learning ability for key information. Exemplarily, select the ReLU function as the activation function to perform non - linear transformation on the output of the fully - connected layer, enabling the model to learn complex non - linear relationships in the input data. Perform a residual connection operation, directly add the input fused modeling feature representation to the output after non - linear transformation, and perform layer normalization on the result of the residual connection. Calculate the mean and variance of each sample in the feature dimension and perform normalization to obtain a normalized feature vector, so as to ensure that when the model depth increases, information can be effectively transmitted between different layers, avoid the problem of gradient disappearance and over - fitting problems, and provide guarantee for the subsequent stable training of the model.
[0075] S5: Decode the normalized feature vector to obtain a generated instruction set. Construct a loss function and obtain a loss value by comparing the syntactic tree structure difference degree between the generated instruction set and the standard instruction, and drive the back - propagation optimization of the model parameters.
[0076] Exemplarily, in the fine - tuning process, use byte - pair encoding to encode the dataset and adjust the model weights through back - propagation to minimize the difference between the generated IDF file and the actual IDF file.
[0077] S6: Repeat steps S2 to S5 until the loss value is less than a preset value, and obtain a large - language model for construction fine - tuned with construction - field professional Q&A corpus.
[0078] Specifically, set a preset loss - value threshold. In each training iteration, repeat steps S2 to S5. During the training process, regularly evaluate the model using the validation dataset, observe the change trend of the loss value. When the loss value is less than the preset value, it is considered that the model training reaches a good effect, stop the training, and obtain a large - language model for construction fine - tuned with construction - field professional Q&A corpus.
[0079] In one of the embodiments, the method may further include the following steps:
[0080] S1.1: Different combinations of building parameters are sampled according to the Latin hypercube orthogonal sampling strategy to generate a parameter combination sample set in the building modeling multidimensional parameter space. The parameter combination sample set includes a combination of a standardized modeling instruction set and corresponding building parameters, which are used to indicate the corresponding building model descriptions of different parameter settings.
[0081] Specifically, different building shapes can be defined according to the building geometry, such as rectangle, L-shape, U-shape, etc., and the parameter ranges such as side length and angle of each shape can be set; in terms of internal load changes, the parameter ranges such as personnel density, equipment power, and lighting power can be determined according to different building functions (such as residential, office, and commercial). Latin hypercube design sampling is used: the value range of each parameter is divided into multiple intervals, and a value is randomly selected from each parameter interval to form a parameter combination. For example, the building geometry is a rectangle with side lengths of 50 meters and 30 meters respectively, the window-to-wall ratio is 0.5, and the internal load is calculated according to the following formula: According to a set of parameters set by the office building standard, based on the extracted parameter combinations, professional building energy consumption simulation software, such as the parametric modeling tool that comes with EnergyPlus, is used to generate an IDF file that conforms to the EnergyPlus syntax specification. During the generation process, the software will automatically fill in the building geometry, envelope structure characteristics, internal heat gain and other information according to the parameter settings to complete the description of the corresponding building model. Through the above steps, a large number of parameter combinations and corresponding IDF files are generated, forming a data set containing descriptions of different building models with various parameter settings, that is, a parameter combination sample set.
[0082] S1.2: Based on the parameter combination sample set, a connection is established between the standardized modeling instruction set and the natural language description to obtain a fine-tuning dataset.
[0083] Exemplarily, for each parameter combination corresponding to the IDF file, the natural language description of the architectural model information contained therein can be used as a prompt to correspond the natural language description to the corresponding IDF file one by one to form a description-IDF sentence pair. The obtained sentence pairs are used as fine-tuning datasets for further training of the architectural language model that has been fine-tuned with professional question and answer corpus in the architectural field, so that the model can better understand the mapping relationship between natural language requirements and the standardized modeling instruction set (IDF file), thereby more accurately generating corresponding modeling instructions based on the natural language input by the user.
[0084] Preferably, before performing domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters, the following steps may also be included:
[0085] Step 104: Obtain the set of modeling requirement parameters for each level, where the levels are at least divided into two levels. Among them, the set of modeling requirement parameters for the first level includes the geometric shape parameters of the building base; the set of modeling requirement parameters for the second level includes the attributes and detail parameters of the first level. The detail parameters include at least one of window position, internal load, enclosure structure, equipment system parameters, and dynamic control parameters.
[0086] Exemplarily, a database can be used to construct the set of hierarchical modeling requirement parameters. The first level defines the geometric shape parameters of the building base, including but not limited to the shape, length, width, height, and floor area of the building, and corresponding table structures are created in the database to store these parameters. For the set of modeling requirement parameters of the second level, an association table is created in the database and associated with the first-level parameter table. Among them, the attribute parameters can include the use of the building, and different uses correspond to different energy consumption standards and modeling focuses. In terms of detail parameters, for the window position, record the coordinate positions, quantities, and sizes of the windows on each facade of the building; record the internal load parameters such as personnel density, equipment power, and lighting power; record the enclosure structure parameters such as wall materials, insulation layer thickness, and roof structure; record the equipment system parameters such as air conditioning system type and heating method; record the dynamic control parameters such as the start and stop times of the equipment and the conditions for switching operation modes.
[0087] Step 105: Conduct an integrity check based on the modeling requirement parameters and requirement descriptions corresponding to each level. If the requirement description cannot cover the modeling requirement parameters corresponding to the level, generate a first prompt message, which is used to prompt the user to input the missing modeling requirement parameters.
[0088] Exemplarily, an integrity check algorithm based on rule matching and semantic understanding can be used. When the user inputs a requirement description, key information is extracted, and the extracted information is compared with the set of modeling requirement parameters corresponding to the level. If it is found that the requirement description cannot cover the modeling requirement parameters corresponding to the level, a first prompt message is generated according to the type and importance of the missing parameters. For example, if the window position parameter is missing, the prompt message is "Your requirement description does not contain information related to the window position. Please supplement parameters such as the position, quantity, and size of the windows on each facade of the building" to ensure the robustness of the model in case of missing input information.
[0089] Furthermore, before performing domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters, it can also include:
[0090] Step 106: Conduct a combined lexical-semantic analysis on the natural language description input by the user to identify noises and classify the noise types. The noise types include spelling mistakes, omissions, and redundancies.
[0091] Specifically, a natural language processing toolkit can be used to tokenize the natural language description input by the user, perform part-of-speech tagging on each word to determine its part of speech, construct a semantic dependency graph with the help of a semantic analysis tool to analyze the semantic connections between words, compare each word with a standard vocabulary, and if a certain word is not found in the vocabulary or has a very low similarity, mark it as a possible spelling error; check whether there is missing key parameter information in the natural language description, and if so, mark it as missing information; determine whether there is redundant expression or unnecessary modification information.
[0092] Step 107, perform differential noise processing according to the noise type to obtain corrected data.
[0093] Exemplarily, for the identified spelling errors, correction suggestions can be provided or automatically corrected according to the vocabulary and context semantics; for the missing parameter information, default parameter suggestions can be provided or the user can be prompted to supplement according to the existing requirement descriptions and modeling experience; for the redundant information, it is deleted from the natural language description, and the key information is retained to obtain the corrected data after noise processing.
[0094] Step 108, generate a requirement description based on the corrected data.
[0095] Specifically, the words and information after noise processing are recombined according to reasonable grammar and semantic rules to generate a corrected requirement description.
[0096] Furthermore, the construction large language model processes the undefined requirement description through an adaptive learning mechanism, including:
[0097] Step 109, extract the implicit architectural semantic elements from the undefined format requirement description input by the user side to generate a structured set of semantic elements.
[0098] Specifically, the undefined format requirement description input by the user side can be basically text-cleaned to remove extra spaces, punctuation marks, word segmentation, etc. Through a dictionary containing common semantic elements in the construction field, using named entity recognition technology and combined with a deep learning model, the segmented text is scanned to identify the architectural semantic elements therein. For example, for the description "That large shopping mall located in the city center has a lot of windows", "shopping mall" can be identified as the building type, and "city center" as the building location-related element. The identified semantic elements are classified and sorted to obtain a structured set of semantic elements.
[0099] Step 110, generate a candidate modeling instruction set based on the set of semantic elements, and call the syntax verification interface of the simulation engine to detect the feedback signal of the instruction set; the feedback signal includes logical conflicts and format errors.
[0100] Specifically, multiple candidate modeling instruction sets can be generated based on a structured set of semantic elements, combined with the learned knowledge and modeling rules in the construction field. For example, according to the building type of "mall" and the description of "many windows", instructions regarding window area, layout, etc. are generated, and the syntax verification interface of the target building energy consumption simulation engine is called to send the candidate modeling instruction set to this interface for detection. The simulation engine will conduct a detailed inspection of the instruction set and return feedback signals, including logical conflicts (such as the specified window area in the instruction exceeding the building exterior wall area) and format errors (such as the syntax of the instruction not meeting the requirements of the simulation engine).
[0101] Step 111, dynamically adjust the weight parameters of the model decoder according to the feedback signal returned by the syntax verification interface to obtain a corrected instruction; store the corrected instruction and the corresponding hint format features in the fine-tuning data set to form an extensible format-rule mapping relationship, and the format-rule mapping relationship is used to process the requirement description with an undefined format.
[0102] Specifically, according to the feedback signal returned by the syntax verification interface, use the backpropagation algorithm to dynamically adjust the weight parameters of the model decoder. After the weight parameters are adjusted, the model regenerates the instruction to obtain a corrected instruction. The corrected instruction can avoid the previously detected logical conflicts and format errors. Store the corrected instruction and the corresponding hint format features (i.e., the features extracted after processing the user input requirement description with an undefined format) in the fine-tuning data set to form an extensible format-rule mapping relationship and enhance the robustness of the model under different input conditions.
[0103] Furthermore, after calling the interface of the target building energy consumption simulation engine to generate simulation instructions, it may further include:
[0104] Step 112, obtain the visualization requirements and obtain the visualization results based on the multimodal visualization mapping strategy; the multimodal visualization mapping strategy includes at least one of temporal evolution, spatial distribution, and correlation analysis.
[0105] Exemplarily, after calling the simulation engine interface to generate simulation instructions, the user's visualization requirements can be collected through an interactive interface to clarify the direction they are concerned about, such as the temporal change, spatial distribution, or variable correlation of energy consumption. If it is temporal evolution, the energy consumption data corresponding to the time span can be extracted from the simulation data and presented in a line chart; for spatial distribution requirements, match the energy consumption data with the building spatial location and display it through a borrowed map or floor plan; if it is a correlation analysis requirement, then filter the relevant variable data, calculate the correlation, and present the relationship in a scatter plot to improve the visualization level of the simulation output and facilitate the user's understanding.
[0106] In one specific embodiment of the present application, the method can achieve the automated modeling of a simple building model, and the specific steps are as follows:
[0107] (1) Obtain the natural language description input by the user. For example, the user inputs the following natural language description: "Simulate a building that is 50 meters long, 30 meters wide, and 10 meters high, with a window-wall ratio of 0.4."
[0108] (2) Perform natural language processing and LLM fine-tuning on the natural language description. Parse the user input through the natural language processing module to extract the key modeling parameters: length 50 meters, width 30 meters, height 10 meters, window-wall ratio (WWR) 0.4. The system converts these parameters into structured modeling instructions and generates the IDF file required by EnergyPlus through the fine-tuned LLM.
[0109] (3) Invoke the simulation engine and output the results. Automatically generate a building model and perform a simulation by calling the API of the EnergyPlus simulation engine. The simulation results include key indicators such as building energy consumption and indoor temperature, and the system presents the results to the user in a visual form.
[0110] (4) Conduct a robustness test on the natural language description input by the user. Introduce a noise processing mechanism to handle interference such as spelling mistakes, omissions, and redundancies in the user input. For example, even if the user inputs "Simulate a building that is 50 meters long, 30 meters wide, and 10 meters high, with a window-wall ratio of 0.4, and the window height is 2 meters" (where "window height" is redundant information), the IDF file can still be correctly generated.
[0111] (5) Conduct result verification. The generated IDF file is completely matched with the simulation results, and the accuracy rate reaches 100%. The user can complete the modeling within 1 minute, significantly reducing the modeling workload.
[0112] In one specific embodiment of the present application, the method can achieve automated modeling of complex building models, and the specific steps are as follows:
[0113] (1) Obtain the natural language description input by the user. For example, the user inputs the following natural language description: "Simulate a building that is 100 meters long, 50 meters wide, and 20 meters high, with a window-wall ratio of 0.6, a sill height of 4 meters, a window height of 16 meters, and a window frame width of 0.01 meters. The occupancy rate is 5 square meters per person, the lighting level is 10 watts per square meter, and the equipment power consumption is 20 watts per square meter."
[0114] (2) Perform natural language processing and LLM fine-tuning. Parse the user input through the natural language processing module and extract the key modeling parameters: length (100 meters), width (50 meters), height (20 meters), window-wall ratio (0.6), sill height (4 meters), window height (16 meters), window frame width (0.01 meters), occupancy rate (5 square meters per person), lighting level (10 watts per square meter), and equipment power consumption (20 watts per square meter). Convert these parameters into structured modeling instructions and generate the IDF file required by EnergyPlus through the fine-tuned LLM.
[0115] (3) Invoke the simulation engine and output the results. Automatically generate a building model and perform a simulation by calling the API of the EnergyPlus simulation engine. The simulation results include key indicators such as building energy consumption and indoor temperature, and the system displays the results to the user in a visual form.
[0116] (4) Conduct robustness testing. By introducing a noise processing mechanism, it can handle interferences such as spelling mistakes, omissions, and redundancies in the user input. For example, even if the user inputs "Simulate a building with a length of 100 meters, a width of 50 meters, a height of 20 meters, a window-wall ratio of 0.6, a sill height of 4 meters, a window height of 16 meters, and a window frame width of 0.01 meters. The occupancy rate is 5 square meters per person, the lighting level is 10 watts per square meter, and the equipment power consumption is 20 watts per square meter." (where "window frame width" is redundant information), the system can still correctly generate the IDF file.
[0117] (5) Conduct result verification. The generated IDF file is completely matched with the simulation results, and the accuracy rate reaches 100%. Users can complete the modeling within 1 minute, significantly reducing the modeling workload.
[0118] In summary, for the automated building energy consumption modeling method provided by the embodiments of this application, the modeling parameters are extracted from the unstructured natural language description input by the user through the natural language model, and by introducing various prompt formats and noise processing mechanisms, the robustness of the model under different input conditions is improved to handle interferences such as spelling mistakes, omissions, and redundancies; by constructing a fine-tuning data set including natural language description statements and a standardized modeling instruction set, the large language model based on the attention mechanism is fine-tuned to obtain a building large language model fine-tuned with professional Q&A corpus in the building field. Among them, the residual connection and layer normalization design ensure the model stability of complex parameter coupling relationships; the building large language model converts the modeling parameters into a standardized instruction set that conforms to the syntax specification of the building energy consumption simulation engine, calls the interface of the target building energy consumption simulation engine, and uses the standardized instruction set to generate simulation instructions to obtain the simulation building model file and its key indicators; execute the multimodal visualization mapping strategy to obtain the visualization results.
[0119] This application realizes the following technical effects through an automated building energy consumption modeling method based on a large language model: (1) Improve modeling efficiency: Compared with manual modeling, the modeling workload is reduced by more than 95%. (2) Improve modeling accuracy: The generated building model file is completely matched with the simulation results, and the accuracy rate can reach 100%. (3) Enhance robustness: The system can handle interferences such as different intonations, spelling mistakes, omissions, and redundancies, and the generated model file can still meet the simulation requirements. (4) User-friendly: Through the natural language interaction interface, users can quickly generate a building energy consumption model without having professional building science knowledge and simulation software operation skills.
[0120] It should be understood that although each step in the flowcharts involved in the above-described embodiments is displayed sequentially according to the indication of the arrows, these steps do not necessarily need to be executed sequentially according to the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0121] Based on the same inventive concept, the embodiment of this application also provides an automated building energy consumption modeling system based on a large language model for implementing the above-mentioned automated building energy consumption modeling method based on a large language model. The solution provided by this system to solve problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the automated building energy consumption modeling system based on a large language model provided below can refer to the limitations on the automated building energy consumption modeling method based on a large language model in the above text, and will not be repeated here.
[0122] In an exemplary embodiment, as Figure 3 shown, an automated building energy consumption modeling system 20 based on a large language model is provided, including:
[0123] A natural language processing module 21, configured to obtain a natural language requirement description input by a user terminal; perform domain semantic analysis on the requirement description based on a natural language model to extract modeling parameters; the requirement description includes building space attributes.
[0124] The large language model fine-tuning module 22 is used to input the modeling parameters into the building large language model to generate a standardized modeling instruction set that conforms to the syntax specification of the target building energy consumption simulation engine; wherein, the building large language model is obtained by fine-tuning a pre-trained large language model with professional Q&A corpora in the building field.
[0125] The simulation engine interface module 23 is used to call the interface of the target building energy consumption simulation engine to generate simulation instructions, and the simulation instructions are used to instruct the target building energy consumption simulation engine to output simulation results based on the standardized modeling instruction set; the simulation results include a building model file and key indicators of the building model file.
[0126] In one embodiment, the training method of the large language model fine-tuned with professional Q&A corpora in the building field in the large language model fine-tuning module 22 may include the following steps:
[0127] S1: Obtain a fine-tuning dataset, and the fine-tuning dataset includes natural language description statements and a standardized modeling instruction set.
[0128] S2: Map the byte pair encoding vectors of the fine-tuning dataset into matrices, perform matrix operations on the fine-tuning dataset using the following formula, and obtain an attention feature matrix using the softmax function:
[0129] ;
[0130] Wherein, is the query matrix, is the key-value matrix, is the value matrix, is the dimension of the query matrix and the key-value matrix.
[0131] S3: Split the query matrix, key-value matrix, and value matrix along the feature dimension into multiple independent subspaces, perform multi-head attention parallel calculations on the multiple independent subspaces to obtain a feature tensor including multi-dimensional building modeling features; concatenate the feature tensors output by each independent subspace and project to obtain a fused modeling feature representation of the attention layer; wherein, each independent subspace is used to learn different modeling dimension features.
[0132] S4: Input the fused modeling feature representation into a feed-forward neural network, and obtain a non-linear transformation output through the fully connected layer and activation function of the feed-forward neural network; perform residual connection on the fused modeling feature representation and the non-linear transformation output to obtain a residual result; perform layer normalization on the residual result to obtain a normalized feature vector.
[0133] S5: Decode the normalized feature vector to obtain a generated instruction set, construct a loss function by comparing the syntactic tree structure difference between the generated instruction set and the standard instruction, and obtain a loss value to drive the backpropagation optimization of the model parameters.
[0134] S6: Repeat steps S2 to S5 until the loss value is less than the preset value to obtain a large language model for architecture fine-tuned with professional Q&A corpus in the field of architecture.
[0135] In one embodiment, the training method of the large language model fine-tuned with professional Q&A corpus in the large language model fine-tuning module 22 may further include the following steps:
[0136] S1.1: Sample combinations of different building parameters according to the Latin hypercube orthogonal sampling strategy to generate a parameter combination sample set in the multi-dimensional parameter space of building modeling. The parameter combination sample set includes the combination of a standardized modeling instruction set and corresponding building parameters, which is used to indicate the corresponding building model descriptions for different parameter settings.
[0137] S1.2: Establish a connection between the standardized modeling instruction set and the natural language description based on the parameter combination sample set to obtain a fine-tuning data set.
[0138] Preferably, the system may further include a robustness enhancement module 24, and the robustness enhancement module 24 includes the following units:
[0139] Hierarchical requirement acquisition unit, which is used to acquire a set of modeling requirement parameters at different levels, and the levels are at least divided into two levels; among them, the set of modeling requirement parameters at the first level includes the geometric shape parameters of the building foundation; the set of modeling requirement parameters at the second level includes the attributes and detail parameters of the first level; the detail parameters include at least one of window position, internal load, enclosure structure, equipment system parameters, and dynamic control parameters.
[0140] Integrity check unit, which is used to perform integrity check based on the modeling requirement parameters and requirement descriptions corresponding to the levels. If the requirement description cannot cover the modeling requirement parameters corresponding to the levels, a first prompt message is generated, and the first prompt message is used to instruct the user to input the missing modeling requirement parameters.
[0141] Furthermore, the system may further include a robustness enhancement module 24, and the robustness enhancement module 24 includes the following units:
[0142] Noise identification unit, which is used to perform lexical-semantic joint analysis on the natural language description input by the user to identify noise and classify the noise types; the noise types include spelling mistakes, omissions, and redundancies.
[0143] Data correction unit, which is used to perform differential noise processing according to the noise types to obtain corrected data.
[0144] Requirement description generation unit, which is used to generate requirement descriptions based on the corrected data.
[0145] Further, the system may further include a robustness enhancement module 24, and the robustness enhancement module 24 includes the following units:
[0146] An undefined format processing unit, configured to extract implicit building semantic elements from the requirement description with undefined format input by the user side, and generate a structured semantic element set.
[0147] An error feedback unit, configured to generate a candidate modeling instruction set based on the semantic element set, and call the syntax verification interface of the simulation engine to detect the feedback signal of the instruction set; the feedback signal includes logical conflicts and format errors.
[0148] An adaptive adjustment unit, configured to dynamically adjust the weight parameters of the model decoder according to the feedback signal returned by the syntax verification interface to obtain a corrected instruction; store the corrected instruction and the corresponding prompt format feature into a fine-tuning data set to form an extensible format-rule mapping relationship, and the format-rule mapping relationship is used to process the requirement description with undefined format.
[0149] Further, the simulation engine interface module 23 may further include:
[0150] A visualization unit, configured to obtain visualization requirements and obtain visualization results based on a multimodal visualization mapping strategy; the multimodal visualization mapping strategy includes at least one of time series evolution, spatial distribution, and correlation analysis.
[0151] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of a method for automated building energy consumption modeling based on a large language model as described above are implemented.
[0152] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0153] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiments described above are only illustrative. The components described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present disclosure solution. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0154] The above-described embodiments merely represent several implementation manners of the embodiments of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent for the embodiments of the application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the embodiments of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the embodiments of the present application.
Claims
1. An automated building energy consumption modeling method based on large language models, characterized in that, The method includes: Obtaining a natural language requirement description input by a client, and extracting modeling parameters from the requirement description through domain semantic analysis based on a natural language model; the requirement description includes building space attributes; Inputting the modeling parameters into a building large language model to generate a standardized modeling instruction set that conforms to the syntax specification of a target building energy consumption simulation engine; wherein, the building large language model is obtained by fine-tuning a pre-trained large language model with building domain professional Q&A corpora; Invoking an interface of the target building energy consumption simulation engine to generate a simulation instruction, and the simulation instruction is used to instruct the target building energy consumption simulation engine to output a simulation result based on the standardized modeling instruction set; the simulation result includes a building model file and key indicators of the building model file; Among them, the fine-tuning of the pre-trained large language model with building domain professional Q&A corpora includes the following steps: S1: Obtaining a fine-tuning data set, and the fine-tuning data set includes natural language description statements and the standardized modeling instruction set; S2: Mapping the byte pair encoding vectors of the fine-tuning data set into matrices, performing matrix operations on the fine-tuning data set using the following formula, and obtaining an attention feature matrix using the softmax function: ; Among them, is the query matrix, is the key-value matrix, is the value matrix, is the dimension of the said query matrix and the said key-value matrix; S3: Splitting the query matrix, the key-value matrix, and the value matrix along the feature dimension into multiple independent subspaces, performing multi-head attention parallel calculations on the multiple independent subspaces to obtain a feature tensor including multi-dimensional building modeling features; concatenating the feature tensors output by each independent subspace, and projecting to obtain a fused modeling feature representation of the attention layer; wherein, each independent subspace is used to learn different modeling dimension features; S4: Inputting the fused modeling feature representation into a feed-forward neural network, obtaining a non-linear transformation output through the fully-connected layer and activation function of the feed-forward neural network; performing residual connection on the fused modeling feature representation and the non-linear transformation output to obtain a residual result; performing layer normalization on the residual result to obtain a normalized feature vector; S5: Decoding the normalized feature vector to obtain a generated instruction set, constructing a loss function by comparing the syntactic tree structure difference between the generated instruction set and the standard instruction, and obtaining a loss value, and driving the backpropagation optimization of model parameters; S6: Repeating steps S2 to S5 until the loss value is less than a preset value, and obtaining the building large language model fine-tuned with building domain professional Q&A corpora.
2. The method according to claim 1, wherein The method further includes the following steps: S1.1: Sampling combinations of different building parameters according to the Latin hypercube orthogonal sampling strategy, and generating a parameter combination sample set in the building modeling multi-dimensional parameter space, and the parameter combination sample set includes the combination of the standardized modeling instruction set and the corresponding building parameters, and is used to indicate the corresponding building model descriptions with different parameter settings; S1.2: Establishing a connection between the standardized modeling instruction set and the natural language description based on the parameter combination sample set to obtain the fine-tuning data set.
3. The method according to claim 1, wherein Before extracting the modeling parameters from the requirement description through domain semantic analysis based on the natural language model, it further includes: Obtain the set of modeling requirement parameters for the hierarchy, where the hierarchy is at least divided into two levels; among them, the set of modeling requirement parameters for the first level includes the geometric shape parameters of the building base; the set of modeling requirement parameters for the second level includes the attributes and detail parameters of the first level; the detail parameters include at least one of window position, internal load, enclosure structure, equipment system parameters, and dynamic control parameters. Based on the modeling requirement parameters corresponding to the hierarchy and the requirement description, perform integrity checking. If the requirement description cannot cover the modeling requirement parameters corresponding to the hierarchy, generate a first prompt message, which is used to instruct the user to input the missing modeling requirement parameters.
4. The method according to claim 1, characterized in that, Before performing domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters, it also includes: Perform lexical-semantic joint analysis on the natural language description input by the user to identify noise and classify the noise type; the noise types include spelling mistakes, omissions, and redundancies. Execute differential noise processing according to the noise type to obtain corrected data. Generate the requirement description based on the corrected data.
5. The method according to claim 1, characterized in that The building large language model processes the undefined requirement description through an adaptive learning mechanism, including: Extract the implicit building semantic elements from the undefined format requirement description input by the user side to generate a structured set of semantic elements. Generate a candidate modeling instruction set based on the set of semantic elements, and call the syntax verification interface of the simulation engine to detect the feedback signal of the instruction set; the feedback signal includes logical conflicts and format errors. According to the feedback signal returned by the syntax verification interface, dynamically adjust the weight parameters of the model decoder to obtain a corrected instruction; store the corrected instruction and the corresponding prompt format features in the fine-tuning data set to form an extensible format-rule mapping relationship, which is used to process the undefined format requirement description.
6. The method according to claim 1, wherein After calling the interface of the target building energy consumption simulation engine to generate a simulation instruction, it also includes: Obtain the visualization requirement and obtain the visualization result based on the multi-modal visualization mapping strategy; the multi-modal visualization mapping strategy includes at least one of time series evolution, spatial distribution, and correlation analysis.
7. An automated building energy consumption modeling system based on a large language model, characterized in that, The system includes: A natural language processing module, which is used to obtain the natural language requirement description input by the user side; perform domain semantic analysis on the requirement description based on the natural language model to extract modeling parameters; the requirement description includes building space attributes. A large language model fine-tuning module, which is used to input the modeling parameters into the building large language model to generate a standardized modeling instruction set that conforms to the syntax specification of the target building energy consumption simulation engine; among them, the building large language model is obtained by fine-tuning the pre-trained large language model with building domain professional Q&A corpora. A simulation engine interface module, which is used to call the interface of the target building energy consumption simulation engine to generate a simulation instruction, and the simulation instruction is used to instruct the target building energy consumption simulation engine to output a simulation result based on the standardized modeling instruction set; the simulation result includes a building model file and the key indicators of the building model file. Among them, the fine-tuning of the pre-trained large language model in the large language model fine-tuning module with the professional Q&A corpus in the construction field includes the following steps: S1: Obtain a fine-tuning data set, where the fine-tuning data set includes natural language description statements and the standardized modeling instruction set; S2: Map the byte pair encoding vectors of the fine-tuning data set into matrices, perform matrix operations on the fine-tuning data set using the following formula, and obtain an attention feature matrix using the softmax function: ; Among them, is the query matrix, is the key-value matrix, is the value matrix, is the dimension of the said query matrix and the said key-value matrix; S3: Split the query matrix, the key-value matrix, and the value matrix along the feature dimension into multiple independent subspaces, perform multi-head attention parallel calculations on the multiple independent subspaces to obtain a feature tensor including multi-dimensional building modeling features; concatenate the feature tensors output by each independent subspace and project to obtain a fused modeling feature representation of the attention layer; among them, each independent subspace is used to learn different modeling dimension features; S4: Input the fused modeling feature representation into a feed-forward neural network, and obtain a non-linear transformation output through the fully connected layer and activation function of the feed-forward neural network; perform residual connection on the fused modeling feature representation and the non-linear transformation output to obtain a residual result; perform layer normalization on the residual result to obtain a normalized feature vector; S5: Decode the normalized feature vector to obtain a generated instruction set, construct a loss function by comparing the syntactic tree structure difference between the generated instruction set and the standard instruction, and obtain a loss value to drive the backpropagation optimization of model parameters; S6: Repeat steps S2 to S5 until the loss value is less than a preset value to obtain the building large language model fine-tuned with the professional Q&A corpus in the construction field.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Auxiliary hospital space design method and device based on building energy consumption model
CN119783208A