Carbon emission evaluation method and system based on digital twinning

By introducing improved LSTM network and whale optimization algorithms into the building digital twin model, combined with sliding windows and attention mechanisms, the problem of inaccurate assessment of building energy consumption and carbon emissions in the existing technology is solved, and high-precision energy consumption prediction and real-time carbon emission monitoring are achieved.

CN120087624AInactive Publication Date: 2025-06-03CHINA RAILWAY CONSTR GROUP CO LTD +1

Patent Information

Application Number
CN202510562096.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-06-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing digital twin technology of buildings cannot comprehensively and accurately reflect the actual operating status and carbon emissions of buildings, resulting in poor timely acquisition of energy consumption data and inaccurate carbon emission forecasting and assessment.

Method used

The energy consumption behavior model based on the improved LSTM network is adopted, combined with the improved whale optimization algorithm to optimize hyperparameters, a digital twin model containing the energy consumption behavior model is constructed, and the timing data is processed through the sliding window slicing method, building operation, environment and household behavior data are obtained for feature extraction and fusion, and important features are screened using the attention mechanism, and finally carbon emission energy consumption level is evaluated through the MLP grading model.

Benefits of technology

It realizes a comprehensive and accurate reflection of the energy consumption behavior and status of the building, improves the accuracy and reliability of energy consumption prediction, can reflect the operating status and carbon emissions of the building in real time, and improves management efficiency and effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087624A_ABST
    Figure CN120087624A_ABST
Patent Text Reader

Abstract

The invention is suitable for the field of carbon emission assessment, and particularly provides a digital twinning-based carbon emission assessment method and system, and the method comprises the steps: constructing a digital twinning model comprising an energy consumption behavior model; respectively taking the building operation data, the environment data and the resident behavior data as input of an energy consumption behavior model LSTM network, performing feature extraction to obtain feature vectors, and splicing and fusing the feature vectors to obtain fused feature vectors; performing feature screening on the fusion feature vector based on an attention mechanism, inputting the screened attention feature vector as the input of an MLP grading model, and obtaining the carbon emission energy consumption grade of the target building; and performing carbon emission evaluation on the digital twinborn model of the current target building based on the carbon emission energy consumption level. According to the invention, through the evaluation of the carbon emission energy consumption grade, the carbon emission condition of the building can be comprehensively and accurately known, and the digital twinborn model can reflect the operation state and the carbon emission condition of the building in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of carbon emission assessment, and in particular to a carbon emission assessment method and system based on digital twin. Background Art

[0002] Existing digital twin technology uses sensors and network technology to obtain real-time data, continuously updates the state of the digital twin, and ensures the consistency between the digital twin and the physical world. The digital twin is a virtual digital model constructed through real-time data, simulation models, and sensor technology, corresponding one-to-one with the real physical system, and can reflect the state and changes of the physical system in real time, providing high-precision data support and dynamic monitoring capabilities for carbon emission management.

[0003] Therefore, in the assessment and management of carbon emissions, digital twin technology can help comprehensively understand the carbon emissions of buildings. However, the existing building digital twin technology has the following deficiencies: the structure of the traditional digital twin model is single, and it can only simply reflect the mapping relationship between the entity and the twin. The energy consumption data of carbon emissions only relies on data upload. On the one hand, the timeliness of obtaining energy consumption data is poor. On the other hand, accurate prediction and assessment of carbon emissions cannot be carried out, resulting in the existing model being unable to comprehensively and accurately reflect the actual operation state and carbon emissions of buildings. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a carbon emission assessment method and system based on digital twin, aiming to solve the technical problem that the existing model cannot comprehensively and accurately reflect the actual operation state and carbon emissions of buildings.

[0005] To achieve the above purpose, the present invention provides the following technical solutions.

[0006] An embodiment of the present invention provides a carbon emission assessment method based on digital twin. The assessment method includes the following steps: S1. Based on the items to be mapped of the target building, construct a mapping relationship, and based on the mapping relationship, construct a digital twin model including an energy consumption behavior model, where the energy consumption behavior model is a prediction model built based on an improved LSTM network; S2. Determine the time series data matching the digital twin model, and process the time series data by the sliding window slicing method to obtain an input-output data group; S3. Use the input-output data group to train the prediction model; during training, use an improved whale optimization algorithm to optimize the hyperparameters of the prediction model to obtain a prediction model with optimized parameters; S4. Obtain the real-time data of the current time window, where the real-time data includes building operation data, environmental data, and household behavior data; respectively use the building operation data, environmental data, and household behavior data as the inputs of the LSTM network for feature extraction to obtain feature vectors H 1 , H 2 and H 3 , and splice and fuse the feature vectors H 1 , H 2 and H 3 to obtain a fused feature vector H; S5. Based on the attention mechanism, perform feature screening on the fused feature vector H, and use the screened attention feature vector H Att as the input of the MLP classification model. The MLP classification model maps the screened features to the corresponding energy consumption levels to obtain the carbon emission energy consumption level of the target building; S5. Based on the carbon emission energy consumption level, conduct a carbon emission assessment on the digital twin model of the current target building.

[0007] Further, in step S1, the steps of constructing the mapping relationship and constructing the digital twin model including the energy consumption behavior model based on the mapping relationship include: For each item to be mapped of the target building, use the status data of the item to be mapped and the digitalized data of the item to be mapped as the inputs of the preset data recognition model to obtain the data recognition result of the item to be mapped; For each item to be mapped, according to the recognition result of the item to be mapped, when it is determined that the recognition result is used to represent the association relationship between the status data and the digitalized data of the item to be mapped, generate a mapping relationship according to the association relationship; According to the mapping relationship, generate the digital twin model of the target building and build an energy consumption behavior model in the digital twin model.

[0008] Further, in step S2, the steps of processing the time series data by the sliding window slicing method to obtain the input-output data group include: Use a sliding window to slide on the time series data and slice the time series data according to the sliding window; Based on the window length, use the position of the data corresponding to the end of the sliding window as the slicing position; Based on the slicing position, perform slicing in time series to obtain the corresponding sliced data group, where each sliced data group contains input data and output data. The input data is used to characterize the status data of the target building, and the output data is used to characterize the energy consumption data of the target building.

[0009] Further, in step S3, the steps of using the improved whale optimization algorithm to optimize the hyperparameters of the prediction model include: S31. Determine the optimization objective and hyperparameter space of the LSTM network prediction model; S32. Set the parameters of the whale optimization algorithm, including the population size, the maximum number of iterations, and the initial positions of whale individuals. Among them, the positions of whales are initialized based on the chaotic mapping switching strategy; S33. Initialize the whale population; S34. Introduce an adaptive weight and a random value, and determine the way to optimize and update the population based on the comparison result of the adaptive weight and the random value; S35. Calculate the fitness of each whale individual in the whale population, and take the whale individual with the highest fitness as the current optimal solution; S36. Start iterative optimization until the maximum number of iterations is reached or the preset conditions are met to obtain the final optimal solution; S37. Output the hyperparameters corresponding to the final optimal solution.

[0010] Further, in step S32, the step of initializing the positions of whales based on the chaotic mapping switching strategy includes: Set a threshold for the fitness change rate used to judge whether the fitness stagnates; In each iteration, calculate the difference between the current optimal solution and the previous optimal solution, and divide it by the value of the previous optimal solution to obtain the fitness change rate; Compare the change rate with the threshold. If the fitness change rate is less than the threshold, it means that the current chaotic mapping may fall into a local optimum, and an operation of switching the chaotic mapping is performed.

[0011] Further, in step S34, the step of introducing an adaptive weight and a random value, and determining the way to optimize and update the population based on the comparison result of the adaptive weight and the random value includes: The adaptive weight is a quantity negatively correlated with the number of iterations, and the random value is a random number between 0 and 1; When the adaptive weight is not less than the random value, the encircling prey method or the random search method is used to optimize and update the whale population; When the adaptive weight is greater than the random value, the spiral movement method is used to optimize and update the whale population.

[0012] Further, in step S5, the step of performing feature screening on the fused feature vector H MLP includes: Define three matrices W Q , W K and W V according to the requirement criteria for linear transformation of the input features. The dimension of each matrix is n l ×nl ; Take the fused feature vector H MLP as the input of the attention mechanism, and use the matrix W Q to perform a linear transformation on the feature H MLP to generate a query vector h Q , expressed as: h Q = W Q ·H MLP ; Use the matrix W K to perform a linear transformation on the feature H MLP to generate a key vector h K , expressed as: h K = W K ·H MLP ; Use the matrix W V to perform a linear transformation on the feature H MLP to generate a value vector h V , expressed as: h V = W V ·H MLP ; Perform a dot product operation on the query vector h Q and the key vector h K to obtain a new feature matrix M, expressed as: ; Use the feature matrix M and the value vector h V to perform matrix multiplication to obtain the attention feature vector H Att , expressed as: H Att = Mh V .

[0013] Furthermore, in step S5, the step of the MLP classification model mapping the selected features to the corresponding energy consumption levels to obtain the carbon emission energy consumption level of the target building includes: In the input layer of the MLP classification model, pass the received attention feature vector H Att to the first fully connected layer. The first fully connected layer maps the vector H Att to the hidden layer space, expressed as: h 1 = W 1 H Att + b 1 , where W 1 is the weight matrix of the first layer, b 1 is the bias term, and h 1 represents the feature after the feature vector H Att undergoes a linear transformation; Introduce non-linearity using the activation function ReLU: , set the negative ReLU values to 0 and retain the positive values; Pass the output of the first layer to the second fully connected layer for processing, and the number of neurons in the hidden layer is h 2 , and the calculation formula is expressed as: ; where, W 2 is the weight matrix of the second layer, and b 2 is the bias term; Perform a non-linear transformation on the output of the second layer through the ReLU activation function: ; In the output layer of the MLP classification model, output the results of multiple transformations to obtain the original energy consumption score z, which is expressed as: , where, W 3 represents the weight matrix of the output layer; b 3 represents the bias term of the output layer; Convert the energy consumption score z of the output layer into a probability distribution through the Softmax activation function, and determine the energy consumption level of the current output layer data based on the probability distribution.

[0014] Another embodiment of the present invention provides a carbon emission assessment system based on digital twin, including the following modules: Digital twin module, used to build a mapping relationship based on the items to be mapped of the target building, and build a digital twin model including an energy consumption behavior model based on the mapping relationship, where the energy consumption behavior model is a prediction model built based on an improved LSTM network; Data processing module, used to determine the time series data matching the digital twin model, and process the time series data through the sliding window slicing method to obtain input-output data groups; Model training module, used to train the prediction model using the input-output data groups; during training, use the improved whale optimization algorithm to optimize the hyperparameters of the prediction model to obtain a prediction model with optimized parameters; Feature fusion module, used to obtain real-time data of the current time window, and the real-time data includes building operation data, environmental data and resident behavior data; respectively use the building operation data, environmental data and resident behavior data as the input of the LSTM network for feature extraction to obtain feature vectors H 1 , H 2 and H 3 , and splice and fuse the feature vectors H 1 , H 2 and H 3 to obtain a fused feature vector H; Energy consumption prediction module, used to perform feature screening on the fused feature vector H based on the attention mechanism, and use the screened attention feature vector H AttThe input serves as the input to the MLP classification model, which maps the screened features to the corresponding energy consumption levels to obtain the carbon emission energy consumption level of the target building. An energy consumption assessment module for performing carbon emission assessment on the digital twin model of the current target building based on the carbon emission energy consumption level.

[0015] Compared with the prior art, the beneficial effects of the carbon emission assessment method and system based on digital twin of the present invention are as follows: First, the present invention constructs a mapping relationship based on the items to be mapped of the target building, and constructs a digital twin model including an energy consumption behavior model based on the mapping relationship, wherein the energy consumption behavior model is a prediction model built based on an improved LSTM network; by constructing the mapping relationship and the digital twin model, the present invention can comprehensively and accurately reflect the energy consumption behavior and status of the building, and the improved LSTM network can capture complex long-term dependencies, improving the accuracy and reliability of energy consumption prediction. Second, through training and hyperparameter optimization, the present invention can obtain a prediction model with better performance; among them, the improved whale optimization algorithm of the present invention can quickly find the optimal hyperparameter combination, improving the performance of the model. Third, the present invention obtains real-time data of the current time window, and the real-time data includes building operation data, environmental data and household behavior data; the building operation data, environmental data and household behavior data are respectively used as the input of the LSTM network for feature extraction and finally a fused feature vector is obtained. Further, the attention mechanism can effectively screen out important features, improving the model's attention to key features; in addition, using the MLP classification model can map the features to the energy consumption levels, facilitating subsequent decision-making and management.

[0016] In summary, through the assessment of the carbon emission energy consumption level, the present invention can comprehensively and accurately understand the carbon emission situation of the building, and the digital twin model can reflect the operation status and carbon emission situation of the building in real time, improving the management efficiency and effect. Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0018] Figure 1 It is a flowchart for implementing a carbon emission assessment method based on digital twin of the present invention. Figure 2 It is a sub-flowchart of a carbon emission assessment method based on digital twin of the present invention. Figure 3This is another sub - flow chart of a carbon emission assessment method based on digital twin according to the present invention; Figure 4 This is yet another sub - flow chart of a carbon emission assessment method based on digital twin according to the present invention; Figure 5 This is a structural block diagram of a carbon emission assessment system based on digital twin according to the present invention; Figure 6 This is a structural block diagram of a computer device that can execute the carbon emission assessment method based on digital twin provided by the present invention. Detailed implementation manners

[0019] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0020] The following describes the specific implementation of the present invention in detail with reference to specific embodiments.

[0021] Please refer to Figure 1 , in an embodiment of the present invention, a carbon emission assessment method based on digital twin is provided. The assessment method includes the following steps: S1. Based on the items to be mapped of the target building, construct a mapping relationship, and based on the mapping relationship, construct a digital twin model including an energy consumption behavior model, where the energy consumption behavior model is a prediction model built based on an improved LSTM network; In the embodiment of the present invention, the items to be mapped of the target building include features related to energy consumption behavior such as the physical structure of the building, energy - consuming equipment, and operating status. The present invention maps these feature items into the digital twin model for subsequent energy consumption behavior prediction and carbon emission assessment.

[0022] The physical structure features provided in the embodiment of the present invention may be the geometric shape, size, orientation, etc. of the building, as well as the material properties of the enclosure structure, such as heat insulation performance, light transmittance, etc.; The energy - consuming equipment features provided in the embodiment of the present invention include the operating parameters of air - conditioning systems, lighting systems, elevators, ventilation equipment, etc., as well as the power, operating time, energy consumption mode, etc. of the above - mentioned equipment. In addition, the operating status features provided in the embodiment of the present invention include the real - time operating data of the building, such as temperature, humidity, light intensity, and also include user behavior data, such as personnel activity time, equipment usage frequency, etc.

[0023] In addition, the items to be mapped provided in the embodiment of the present invention also include environmental features, such as meteorological data, environmental light intensity, and air quality, etc.; the meteorological data includes but is not limited to temperature, humidity, wind speed, precipitation; Based on the items to be mapped of the target building, the present invention constructs a mapping relationship and constructs a digital twin model including an energy consumption behavior model based on the mapping relationship, wherein the energy consumption behavior model is a prediction model built based on an improved LSTM network; by constructing the mapping relationship and the digital twin model, the present invention can comprehensively and accurately reflect the energy consumption behavior and state of the building, and the improved LSTM network can capture complex long-term dependencies, improving the accuracy and reliability of energy consumption prediction; S2. Determine the time series data matching the digital twin model, and process the time series data by the sliding window slicing method to obtain an input-output data group; Specifically, the steps of processing the time series data by the sliding window slicing method to obtain an input-output data group include: first, determine the parameters of the sliding window, including the window length and the step size, and the step size of each window slide is less than the window length to ensure that there is an overlapping part between the windows; use the sliding window to slide on the time series data, and slice the time series data according to the sliding window; based on the window length, take the position of the data corresponding to the end of the sliding window as the slicing position; perform slicing in time series based on the slicing position to obtain the corresponding sliced data group, where each sliced data group contains input data and output data, and the input data is used to represent the state data of the target building, and the output data is used to represent the energy consumption data of the target building.

[0024] S3. Use the input-output data group to train the prediction model; during the training, use the improved whale optimization algorithm to optimize the hyperparameters of the prediction model to obtain a prediction model with optimized parameters; S4. Obtain the real-time data of the current time window, and the real-time data includes building operation data, environmental data, and household behavior data; respectively use the building operation data, environmental data, and household behavior data as the input of the LSTM network for feature extraction to obtain feature vectors H 1 、H 2 and H 3 , and splice and fuse the feature vectors H 1 、H 2 and H 3 to obtain a fused feature vector H; S5. Based on the attention mechanism, perform feature screening on the fused feature vector H, and use the screened attention feature vector H Att input as the input of the MLP classification model, and the MLP classification model maps the screened features to the corresponding energy consumption levels to obtain the carbon emission energy consumption level of the target building; The present invention obtains real-time data of the current time window, and the real-time data includes building operation data, environmental data, and household behavior data; the building operation data, environmental data, and household behavior data are respectively used as the inputs of the LSTM network for feature extraction and finally a fused feature vector is obtained. Further, the attention mechanism can effectively screen out important features and improve the model's attention to key features; in addition, the MLP hierarchical model can map the features to the energy consumption level, facilitating subsequent decision-making and management. S5. Conduct a carbon emission assessment on the digital twin model of the current target building based on the carbon emission energy consumption level.

[0025] Through the assessment of the carbon emission energy consumption level, the present invention can comprehensively and accurately understand the carbon emission situation of the building, and the digital twin model can reflect the operation state and carbon emission situation of the building in real time, improving the management efficiency and effect.

[0026] In an implementation manner of the present invention, in step S1, please refer to Figure 2 , the steps of constructing a mapping relationship and constructing a digital twin model including an energy consumption behavior model based on the mapping relationship include: S21. For each item to be mapped of the target building, the state data of the item to be mapped and the digital data of the item to be mapped are used as the inputs of a preset data recognition model to obtain the data recognition result of the item to be mapped. Exemplarily, taking the temperature change as an example, the state data of the item to be mapped is the actual temperature change situation inside the building, and the digital data is the temperature monitoring point information corresponding to the state data in the digital twin model, including the location, number, etc. of the monitoring point; through the mapping relationship, the actual temperature data is associated with the temperature monitoring points in the digital twin model, enabling the model to display the temperature change situation in the monitoring area in real time. S22. For each item to be mapped, according to the recognition result of the item to be mapped, when it is determined that the recognition result is used to represent the association relationship between the state data and the digital data of the item to be mapped, a mapping relationship is generated according to the association relationship. S23. According to the mapping relationship, generate the digital twin model of the target building and build an energy consumption behavior model in the digital twin model. In the embodiment of the present invention, based on the mapping relationship, data such as the physical structure, equipment information, and operation state of the building are integrated into a virtual model to generate a digital twin model. In the digital twin model, an energy consumption behavior model is built to predict the energy consumption behavior of the building. The energy consumption behavior model can be based on an improved LSTM network and trained with historical data to predict future energy consumption situations.

[0027] Preferably, in an embodiment of the present invention, the provided LSTM network includes an input layer, an output layer, and a hidden layer, wherein the internal state c t and the external state h t are respectively expressed as: ; ; ; In the formula, , , represent the path vectors for the transmission of different gate control information at time t; represents the vector product, represents the memory cell vector at time t - 1; represents the vector under the candidate state; , , represent the weight matrices of the self - feedback of the hidden layer; And LSTM introduces three gating methods, including an input gate, a forget gate, and an output gate, where: The input gate is expressed as: ; The forget gate is expressed as: ; The output gate is expressed as: ; In the formula, represents the activation function, which is the Sigmoid function; represents the input gate; represents the output gate; represents the forget gate; represents the hidden layer state at the previous moment; represents the model input data at time t; , respectively represent the weight matrix and bias of the input gate; , respectively represent the weight matrix and bias of the forget gate; , respectively represent the weight matrix and bias of the output gate.

[0028] Furthermore, as Figure 3 shown, in step S3, the steps of optimizing the hyperparameters of the prediction model by using the improved whale optimization algorithm include: S31. Determine the optimization objective and hyperparameter space of the LSTM network prediction model; Among them, the optimization objective is to minimize the prediction error, which is measured by the mean square error (MSE) to improve the prediction accuracy of the LSTM. In the hyperparameter space, the hyperparameters to be optimized include the hidden layer size, learning rate, batch size, time step, etc. S32. Set the parameters of the whale optimization algorithm, including the population size, the maximum number of iterations, and the initial positions of the whale individuals. Among them, the positions of the whales are initialized based on the chaotic mapping switching strategy. In the embodiment of the present invention, in the chaotic mapping switching strategy, it includes the Tent mapping, the Logistic mapping, and the Sine mapping. For example, first use the Tent mapping to generate the initial positions, and then switch to the Logistic mapping or the Sine mapping according to the number of iterations or the change in fitness. S33. Initialize the whale population. Specifically, according to the parameters set in step S32 and the chaotic mapping switching strategy, generate the initial positions of the whale population. S34. Introduce an adaptive weight and a random value, and based on the comparison result of the adaptive weight and the random value, determine the way to optimize and update the population. S35. Calculate the fitness of each whale individual in the whale population, and take the whale individual with the highest fitness as the current optimal solution. S36. Start iterative optimization until the maximum number of iterations is reached or a preset condition is satisfied, obtain the final optimal solution, and output the hyperparameters corresponding to the final optimal solution.

[0029] Further, as Figure 4 shown, in step S32, the step of initializing the positions of the whales based on the chaotic mapping switching strategy includes: S321. Set a threshold for the fitness change rate used to judge whether the fitness has stagnated. S322. In each iteration, calculate the difference between the current optimal solution and the previous optimal solution, and divide it by the value of the previous optimal solution to obtain the fitness change rate. S323. Compare the change rate with the threshold. If the fitness change rate is less than the threshold, it means that the current chaotic mapping may fall into a local optimum, and perform the operation of switching the chaotic mapping.

[0030] Further, in step S34, the step of introducing an adaptive weight and a random value, and based on the comparison result of the adaptive weight and the random value, determining the way to optimize and update the population includes: The adaptive weight is a quantity negatively correlated with the number of iterations, and the random value is a random number between 0 and 1. When the adaptive weight is not less than the random value, the whale population is optimized and updated by using the encircling prey method or the random search method; when the adaptive weight is greater than the random value, the spiral movement method is used to optimize and update the whale population. Preferably, when using the spiral movement method to optimize and update the whale population, an adaptive weight is introduced. The adaptive weight decreases non-linearly with the increase of the iteration times. The original spiral movement method in the whale algorithm is weighted according to the adaptive weight, and the weighted spiral movement method is used to update and optimize the population.

[0031] Further, in step S5, the step of performing feature screening on the fused feature vector H MLP includes: Define three matrices W Q , W K and W V according to the requirement criteria for linear transformation of the input features. The dimension of each matrix is n l ×n l ; Take the fused feature vector H MLP as the input of the attention mechanism. Use the matrix W Q to perform a linear transformation on the feature H MLP to generate a query vector h Q , expressed as: h Q =W Q ·H MLP ; Use the matrix W K to perform a linear transformation on the feature H MLP to generate a key vector h K , expressed as: h K =W K ·H MLP ; Use the matrix W V to perform a linear transformation on the feature H MLP to generate a value vector h V , expressed as: h V =W V ·H MLP ; Perform a dot product operation on the query vector h Q and the key vector h K to obtain a new feature matrix M, expressed as: , where T represents the transpose operation and n l represents the dimension; Use the feature matrix M and the value vector h V to perform matrix multiplication to obtain the attention feature vector H Att , expressed as: H Att =Mh V .

[0032] Through training and hyperparameter optimization, the present invention can obtain a prediction model with better performance. Among them, the improved whale optimization algorithm of the present invention can quickly find the optimal hyperparameter combination and improve the performance of the model.

[0033] Further, in step S5, the step of the MLP classification model mapping the screened features to the corresponding energy consumption levels to obtain the carbon emission energy consumption level of the target building includes: In the input layer of the MLP classification model, the received attention feature vector H Att is passed to the first fully connected layer, and the first fully connected layer maps the vector H Att to the hidden layer space, denoted as: h 1 =W 1 H Att +b 1 , where W 1 is the weight matrix of the first layer, b 1 is the bias term, and h 1 represents the feature after the linear transformation of the feature vector H Att ; The activation function ReLU is used to introduce nonlinearity: , setting the negative ReLU values to 0 and keeping the positive values; the output of the first layer is passed to the second fully connected layer for processing, and the number of neurons in the hidden layer is h 2 , and the calculation formula is expressed as: ; where W 2 is the weight matrix of the second layer, b 2 is the bias term; The output of the second layer is nonlinearly transformed through the ReLU activation function: ; In the output layer of the MLP classification model, the results of multiple transformations are output, and the original energy consumption score z can be obtained, denoted as: , where W 3 represents the weight matrix of the output layer; b 3 represents the bias term of the output layer; The energy consumption score z of the output layer is converted into a probability distribution through the Softmax activation function, and the energy consumption level of the current output layer data is determined based on the probability distribution.

[0034] Further, please refer to Figure 5 , another embodiment of the present invention provides a carbon emission assessment system based on digital twins, including the following modules: The digital twin module 61 is used to construct a mapping relationship based on the items to be mapped of the target building, and construct a digital twin model including an energy consumption behavior model based on the mapping relationship, where the energy consumption behavior model is a prediction model built based on an improved LSTM network; The data processing module 62 is used to determine the time-series data matching the digital twin model, and process the time-series data by the sliding window slicing method to obtain an input-output data group; The model training module 63 is used to train the prediction model using the input-output data group; during training, the improved whale optimization algorithm is used to optimize the hyperparameters of the prediction model to obtain a prediction model with optimized parameters; The feature fusion module 64 is used to obtain the real-time data of the current time window, and the real-time data includes building operation data, environmental data and household behavior data; the building operation data, environmental data and household behavior data are respectively used as the input of the LSTM network for feature extraction to obtain feature vectors H 1 、H 2 and H 3 , and the feature vectors H 1 、H 2 and H 3 are concatenated and fused to obtain a fused feature vector H; The energy consumption prediction module 65 is used to perform feature screening on the fused feature vector H based on the attention mechanism, and use the screened attention feature vector H Att as the input of the MLP classification model, and the MLP classification model maps the screened features to the corresponding energy consumption levels to obtain the carbon emission energy consumption level of the target building; The energy consumption evaluation module 66 is used to perform carbon emission evaluation on the digital twin model of the current target building based on the carbon emission energy consumption level.

[0035] Figure 6 FIG. shows the internal structure diagram of a computer device in an embodiment.

[0036] As Figure 6 shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and can also store a computer program. When the computer program is executed by the processor, the processor can implement the carbon emission evaluation method based on digital twins. The internal memory can also store a computer program. When the computer program is executed by the processor, the processor can execute the carbon emission evaluation method based on digital twins.

[0037] Those skilled in the art can understand, Figure 6The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0038] In one embodiment, the digital-twin-based carbon emission assessment system provided by this application can be implemented in the form of a computer program, and the computer program can run on a computer device as shown in Figure 6 the figure. Each program module that makes up the digital-twin-based carbon emission assessment system can be stored in the memory of the computer device. For example, Figure 5 the digital twin module, data processing module, model training module, feature fusion module, energy consumption prediction module, and energy consumption assessment module shown in the figure. The computer program composed of each program module enables the processor to execute the steps in the digital-twin-based carbon emission assessment method of each embodiment of this application described in this specification.

[0039] In one embodiment, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the processor is enabled to execute the steps of the digital-twin-based carbon emission assessment method.

[0040] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

[0041] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0042] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0043] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.

[0044] The above is only the preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A carbon emission assessment method based on digital twins, characterized in that: The assessment method includes the following steps: S1. Based on the items to be mapped of the target building, a mapping relationship is constructed, and a digital twin model including an energy consumption behavior model is constructed based on the mapping relationship. The energy consumption behavior model is a prediction model built based on an improved LSTM network; S2. Determine the time series data that matches the digital twin model, process the time series data through the sliding window slicing method, and obtain the input and output data groups; S3. Using the input and output data sets to train the prediction model; during the training, using the improved whale optimization algorithm to optimize the hyperparameters of the prediction model, and obtaining the prediction model after parameter optimization; S4, obtaining real-time data of the current time window, the real-time data including building operation data, environmental data and resident behavior data; taking the building operation data, environmental data and resident behavior data as input of the LSTM network respectively, performing feature extraction to obtain feature vectors H1, H2 and H3, and concatenating and fusing the feature vectors H1, H2 and H3 to obtain a fused feature vector H; S5. Based on the attention mechanism, the fusion feature vector H is screened and the screened attention feature vector H is Att The input is used as the input of the MLP classification model. The MLP classification model maps the screened features to the corresponding energy consumption level to obtain the carbon emission energy consumption level of the target building; S5. Conduct carbon emission assessment on the digital twin model of the current target building based on the carbon emission energy consumption level.

2. The carbon emission assessment method based on digital twin according to claim 1 is characterized in that: In step S1, a mapping relationship is constructed, and a digital twin model including an energy consumption behavior model is constructed based on the mapping relationship, including: For each item to be mapped of the target building, the state data of the item to be mapped and the digitized data of the item to be mapped are used as inputs of a preset data recognition model to obtain a data recognition result of the item to be mapped; For each item to be mapped, according to the recognition result of the item to be mapped, when it is determined that the recognition result is used to indicate that there is an association relationship between the state data of the item to be mapped and the digitized data, a mapping relationship is generated according to the association relationship; According to the mapping relationship, a digital twin model of the target building is generated, and an energy consumption behavior model is built in the digital twin model.

3. The carbon emission assessment method based on digital twin according to claim 2 is characterized in that: In step S2, the step of processing the time series data by the sliding window slicing method to obtain the input and output data groups includes: Use a sliding window to slide on the time series data and slice the time series data according to the sliding window; Based on the window length, the position of the data corresponding to the end of the sliding window is used as the slice position; Based on the slice position, time-series slicing is performed to obtain corresponding slice data groups, wherein each slice data group includes input data and output data, the input data is used to characterize the state data of the target building, and the output data is used to characterize the energy consumption data of the target building.

4. The carbon emission assessment method based on digital twin according to claim 3 is characterized in that: In step S3, the step of optimizing the hyperparameters of the prediction model using the improved whale optimization algorithm includes: S31. Determine the optimization target and hyperparameter space of the LSTM network prediction model; S32, setting parameters of the whale optimization algorithm, including population size, maximum number of iterations, and initial positions of individual whales, wherein the whale positions are initialized based on a chaotic mapping switching strategy; S33, initializing the whale population; S34, introducing adaptive weights and random values, and determining a method for optimizing and updating the population based on a comparison result of the adaptive weights and the random values; S35, calculating the fitness of each individual whale in the whale population, and taking the individual whale with the highest fitness as the current optimal solution; S36, start iterative optimization until the maximum number of iterations is reached or the preset conditions are met, and the final optimal solution is obtained; S37. Output the hyperparameters corresponding to the final optimal solution.

5. The carbon emission assessment method based on digital twin according to claim 4 is characterized in that: In step S32, the step of initializing the whale position based on the chaotic mapping switching strategy includes: Set a threshold for the fitness change rate to determine whether the fitness is stagnant; In each iteration, the difference between the current optimal solution and the previous optimal solution is calculated and divided by the value of the previous optimal solution to obtain the fitness change rate; Compare the change rate with the threshold. If the fitness change rate is less than the threshold, it means that the current chaotic mapping may fall into the local optimum, and the operation of switching the chaotic mapping is performed.

6. The carbon emission assessment method based on digital twin according to claim 5 is characterized in that: In step S34, the step of introducing the adaptive weight and the random value, and determining the method of optimizing and updating the population based on the comparison result of the adaptive weight and the random value, includes: The adaptive weight is a quantity that is negatively correlated with the number of iterations, and the random value is a random number between 0 and 1; When the adaptive weight is not less than the random value, the whale population is optimized and updated by using the encirclement predation method or random search method; When the adaptive weight is greater than the random value, a spiral approach is used to optimize and update the whale population.

7. The carbon emission assessment method based on digital twin according to claim 6 is characterized in that: In step S5, the fusion feature vector H is analyzed based on the attention mechanism. MLP The steps for feature screening include: Define three matrices W according to the required standards Q , W K and W V , used to perform linear transformation on the input features, the dimension of each matrix is ​​n l ×n l ; The fused feature vector H MLP As the input of the attention mechanism, we use the matrix W Q For feature H MLP Perform linear transformation to generate query vector h Q , expressed as: h Q =W Q ·H MLP ; Use matrix W K For feature H MLP Perform linear transformation to generate key vector h K , expressed as: h K =W K ·H MLP ; Use matrix W V For feature H MLP Perform a linear transformation to generate a value vector h V, Expressed as: h V =W V ·H MLP ; The query vector h Q and key vector h K Perform a dot product operation to obtain a new feature matrix M, expressed as: ; Using the feature matrix M and the value vector h V Perform matrix multiplication to obtain the attention feature vector H Att , expressed as: H Att =Mh V .

8. The carbon emission assessment method based on digital twin according to claim 7 is characterized in that: In step S5, the MLP classification model maps the screened features to the corresponding energy consumption level to obtain the carbon emission energy consumption level of the target building, including: In the input layer of the MLP hierarchical model, the received attention feature vector H Att Passed to the first fully connected layer, the first fully connected layer converts the vector H Att Mapped to the hidden layer space, expressed as: h1=W1H Att +b1, where W1 is the weight matrix of the first layer, b1 is the bias term, and h1 represents the feature vector H Att Features after linear transformation; Use the activation function ReLU to introduce nonlinearity: , set negative ReLU values ​​to 0 and keep positive values; The output of the first layer is passed to the second fully connected layer for processing. The number of neurons in the hidden layer is h2, and the calculation formula is expressed as: ;W2 is the weight matrix of the second layer, and b2 is the bias term; The output of the second layer is nonlinearly transformed through the ReLU activation function: ; In the output layer of the MLP hierarchical model, the results of multiple transformations are output to obtain the original energy consumption score z, which is expressed as: , where W3 represents the weight matrix of the output layer; b3 represents the bias term of the output layer; The energy consumption score z of the output layer is converted into a probability distribution through the Softmax activation function, and the energy consumption level of the current output layer data is determined based on the probability distribution.

9. An assessment system for implementing the carbon emission assessment method based on digital twins as claimed in any one of claims 1 to 8, characterized in that: The evaluation system includes the following modules: A digital twin module is used to construct a mapping relationship based on the items to be mapped of the target building, and to construct a digital twin model including an energy consumption behavior model based on the mapping relationship, wherein the energy consumption behavior model is a prediction model based on an improved LSTM network; The data processing module is used to determine the time series data that matches the digital twin model, process the time series data through the sliding window slicing method, and obtain the input and output data groups; The model training module is used to train the prediction model using the input and output data sets. During the training, the hyperparameters of the prediction model are optimized using the improved whale optimization algorithm to obtain the prediction model after parameter optimization. The feature fusion module is used to obtain the real-time data of the current time window, which includes building operation data, environmental data and resident behavior data; the building operation data, environmental data and resident behavior data are respectively used as the input of the LSTM network to extract features and obtain feature vectors H1, H2 and H3, and the feature vectors H1, H2 and H3 are concatenated and fused to obtain the fused feature vector H; The energy consumption prediction module is used to perform feature screening on the fusion feature vector H based on the attention mechanism, and to filter the screened attention feature vector H Att The input is used as the input of the MLP classification model. The MLP classification model maps the screened features to the corresponding energy consumption level to obtain the carbon emission energy consumption level of the target building; The energy consumption assessment module is used to perform carbon emission assessment on the digital twin model of the current target building based on the carbon emission energy consumption level.

Citation Information

Patent Citations

  • Building energy consumption prediction method based on ICEEMDAN-IDBO-BILSTM

    CN117787746A

  • Digital intelligent substation parallel control management system based on artificial intelligence

    CN119093602A

  • Intelligent building management system and method based on digital twinning

    CN119417423A

  • Coal mine carbon emission prediction method and system based on digital twinning and LSTM

    CN119599257A

  • Building digital twin data processing method based on artificial intelligence

    CN119809467A

Cited By

  • Traffic infrastructure full life cycle carbon emission assessment method based on knowledge graph

    CN120258338A