Urban complex carbon emission prediction method and system based on knowledge graph
Through the knowledge graph-based method, the carbon emission prediction model of urban complexes is constructed, and the accuracy and efficiency of urban carbon emission prediction are solved, and the simplification of carbon emission management and the timeliness of decision-making support are achieved. and reliability provide technical support for the construction of green and low-carbon cities.
Patent Information
- Application Number
- CN202410886993.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-11-15
AI Technical Summary
The accounting and monitoring of urban carbon emissions faces challenges such as incomplete and inaccurate data, spatial and temporal heterogeneity, multi-source and multi-level, and it is difficult to achieve accurate carbon emission forecasting and management, and support the formulation and implementation of carbon emission reduction policies.
Using a knowledge graph-based method, integrate diversified data of urban complexes, build a knowledge graph model, extract dynamic time series features and static spatial data features, establish a carbon emission prediction model through graph neural networks and advanced prediction algorithms, and perform data preprocessing. Splicing with features to achieve accurate prediction of carbon emissions.
It significantly improves the accuracy and efficiency of carbon emission forecasts in urban complexes, simplifies the complexity of carbon emission management, enhances the timeliness and reliability of decision-making support, and provides important technical guarantees for the construction of green and low-carbon cities.
Smart Images

Figure CN118966402A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the interdisciplinary field of environmental science and information technology, and in particular to a method and system for predicting carbon emissions of urban complexes based on a knowledge graph. Background Art
[0002] Cities are an important part of human society and one of the main sources of carbon emissions. According to statistics, cities consume about 70% of the world's energy and produce about 70% of greenhouse gas emissions. Therefore, exploring low-carbon development paths for cities, optimizing urban energy structure and spatial layout, and improving urban resource efficiency and environmental quality are important ways to address climate change. However, due to the complexity and diversity of cities, the accounting and monitoring of urban carbon emissions face many challenges, such as incomplete and inaccurate data, the spatiotemporal heterogeneity of carbon emissions, and the multi-source and multi-level nature of carbon emissions. Therefore, it is necessary to find ways to achieve accurate carbon emission prediction and management and support the formulation and implementation of carbon reduction policies. Summary of the invention
[0003] Based on the above background, the present invention proposes a carbon emission prediction method and system for urban complexes based on knowledge graphs. By efficiently integrating the diverse data of urban complexes, a knowledge graph model is constructed to achieve accurate carbon emission prediction and management, and support the formulation and implementation of carbon emission reduction policies.
[0004] To achieve this goal, the present invention adopts the following technical solutions:
[0005] The first aspect of the present invention provides a method for predicting carbon emissions of an urban complex based on a knowledge graph, comprising the following steps:
[0006] Collecting and summarizing the original data of the urban complex and performing data preprocessing, the original data at least includes construction information data, building image data, energy consumption activity data and traffic information data, and the preprocessing at least includes obtaining carbon emission data based on the energy consumption activity data;
[0007] Constructing a knowledge graph based on the preprocessed data, wherein the knowledge graph uses the building entities, energy consumption entities, and transportation mode entities contained in the data as nodes, and the relationship patterns between the entities as edges;
[0008] Extract dynamic time series features and static spatial data features based on the constructed knowledge graph, and perform feature splicing to form a comprehensive feature set, which includes dynamic traffic flow intensity features, static building features, spatial layout coordinates and corresponding carbon emission data;
[0009] A prediction model is established, the established prediction model is trained based on the comprehensive feature set, and carbon emissions are predicted based on the trained prediction model.
[0010] Furthermore, the data preprocessing includes:
[0011] Screen the collected construction data based on preset standards and count the missing data;
[0012] Extracting structured information from building image data through image processing and recognition technology to supplement the missing data;
[0013] The energy consumption data is synchronized in time series, outliers are removed, missing values are filled using linear interpolation, and the carbon emissions of various energy-consuming activities are determined using the emission factor method;
[0014] Classify and encode the transportation modes in the traffic information data, and map each type of transportation mode into a numerical label;
[0015] The traffic flow data in the traffic information data is subjected to equivalent quantization and smoothing processing.
[0016] Furthermore, building a knowledge graph based on preprocessed data includes:
[0017] Based on the preprocessed data, define all entity nodes involved in the knowledge graph and their corresponding attribute sets;
[0018] Based on the attribute sets corresponding to each entity, configure the relationship model between entity nodes and create edges between nodes;
[0019] The constructed knowledge graph is optimized based on the graph optimization algorithm.
[0020] Furthermore, all entities involved in the knowledge graph and their corresponding attribute sets are defined as follows:
[0021] Extract all entity information contained in the preprocessed data and divide it into three categories: building entity, energy consumption entity and transportation mode entity;
[0022] The predefined characteristic indicators contained in the entities of each category are obtained as the attribute set corresponding to the entity.
[0023] Furthermore, based on the attribute sets corresponding to each entity, the relationship model between the entities is configured to include:
[0024] According to the associated characteristic indicators in the attribute set corresponding to each entity, the relationship pattern between each entity is configured as one or more of the spatiotemporal dependency relationship, energy interaction relationship and traffic impact relationship;
[0025] The time-space dependency relationship at least includes the positional relationship, functional complementary relationship or temporal collaborative operation relationship between building entities;
[0026] The energy interaction relationship at least includes an energy supply relationship, an energy consumption relationship or an energy sharing relationship;
[0027] The traffic impact relationship at least includes a route provision relationship, a route use relationship, a route route relationship or a route arrival relationship.
[0028] Furthermore, the constructed knowledge graph is optimized based on the graph optimization algorithm, including:
[0029] The community detection algorithm is used to optimize the graph structure, intelligently divide the graph structure, identify closely connected node groups, and remove edges and nodes whose contribution to the community structure is below a preset threshold or are isolated.
[0030] Furthermore, based on the constructed knowledge graph, dynamic time series features and static spatial data features are extracted, and feature splicing is performed to form a comprehensive feature set including:
[0031] A graph attention network model is used to extract static spatial data features of the knowledge graph, where the static spatial data features are used to characterize static architectural features and spatial layout coordinates of the building entity;
[0032] The time graph network model is used to extract the time series dynamic features of the knowledge graph, and the time series dynamic features are used to characterize the dynamic traffic flow intensity characteristics and the corresponding carbon emission change rules in different time periods;
[0033] The extracted static spatial data features are concatenated with the time series dynamic features to form a comprehensive feature set.
[0034] Further, establishing a prediction model, and training the established prediction model based on the comprehensive feature set includes:
[0035] A basic model for carbon emission prediction is built based on the XGBoost model. The input of the model is comprehensive features, and the output is carbon emissions.
[0036] Setting key parameters of the basic model, finding the optimal parameter combination, using the found optimal parameter combination as the parameters of the basic model, and constructing an emission prediction model;
[0037] The comprehensive feature set is divided into a training set and a test set, and the carbon emission prediction model is trained based on the carbon emissions corresponding to each feature.
[0038] Furthermore, the carbon emission prediction based on the trained prediction model includes:
[0039] Obtain the urban complex data to be predicted and perform data preprocessing;
[0040] Based on the preprocessed data, the knowledge graph is updated and dynamic time series features and static spatial data features are re-extracted to form comprehensive features;
[0041] The comprehensive features are input into the trained carbon emission prediction model, and the model outputs the predicted carbon emissions.
[0042] The second aspect of the present invention also provides a system for predicting carbon emissions of urban complexes based on a knowledge graph, comprising:
[0043] A data collection module, which is used to collect and summarize the original data of the urban complex and perform data preprocessing, wherein the original data at least includes construction information data, building image data, energy consumption activity data and traffic information data;
[0044] A graph construction module, which is used to construct a knowledge graph based on the preprocessed data, wherein the knowledge graph uses the building entities, energy consumption entities and transportation mode entities contained in the data as nodes and the relationship patterns between the entities as edges;
[0045] The feature extraction module is used to extract dynamic time series features and static spatial data features based on the constructed knowledge graph, and perform feature splicing to form a comprehensive feature set;
[0046] The emission prediction module is used to establish a prediction model, train the established prediction model based on the comprehensive feature set, and predict carbon emissions based on the trained prediction model.
[0047] The beneficial effects of the present invention are:
[0048] The urban complex carbon emission prediction method and system based on knowledge graph of the present invention significantly improves the accuracy and efficiency of urban complex carbon emission prediction by constructing a comprehensive knowledge graph and deeply integrating multi-source heterogeneous data. At the same time, the present invention not only covers the whole process from data preprocessing, knowledge graph construction to carbon emission prediction, but also emphasizes the deep integration of spatiotemporal data analysis, the in-depth application of graph neural network and the optimized configuration of advanced prediction algorithms, thereby significantly improving the comprehensive performance of carbon emission prediction.
[0049] The method and system of the present invention not only simplifies the complexity of carbon emission management, but also enhances the timeliness and reliability of decision support, providing important technical guarantee for promoting the construction of green and low-carbon cities. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of the intelligent prediction method of carbon emissions of urban complexes based on knowledge graph provided in an embodiment of the present invention.
[0051] Figure 2It is a structural diagram of a knowledge graph example provided by an embodiment of the present invention.
[0052] Figure 3 It is a schematic diagram of the module composition of the urban complex carbon emission intelligent prediction system based on the knowledge graph provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to further illustrate the technical solution of the present invention and clearly demonstrate its application in actual operation, a specific embodiment will be introduced in detail below. Combined with the drawings in the specification, the specific operation process and technical details of the intelligent prediction method of carbon emissions of urban complexes based on knowledge graph will be deeply analyzed.
[0054] Before specifically introducing the embodiments of the present invention, some of the terms used therein are explained as follows:
[0055] Urban complex: refers to a highly comprehensive area in urban planning and construction, a diversified group of buildings that integrates commercial, office, residential, entertainment, transportation, cultural and other functions, forming a "city within a city". Its complex and efficient use of resources and energy consumption characteristics provide rich scenarios for research.
[0056] Knowledge Graph: A structured data organization consisting of nodes (representing entities) and edges (representing relationships) used to depict the relationship between entities. In this invention, it is used to integrate information such as buildings, energy consumption, and transportation to form a comprehensive model to reveal the relationship between carbon emissions.
[0057] Canny edge detection algorithm: A multi-level threshold filter used to find clear boundaries in an image, suitable for preliminary identification of object outlines. In this invention, it is used to identify the outline of a building and estimate its approximate floor space.
[0058] VGG16 Convolutional Neural Network: A deep learning model that belongs to one of the architectures of Convolutional Neural Network (CNN). In the present invention, the VGG16 model is used to automatically predict and extract features such as building height and building materials from images of buildings.
[0059] One-hot encoding technology: a feature encoding algorithm that is mainly used to convert categorical variables into a form that is easy to process by machine learning algorithms. In this invention, it is used to classify and encode the traffic modes in traffic information data, effectively distinguishing and processing different traffic types.
[0060] Louvain community detection algorithm: A community discovery algorithm that operates on the principle of modularity maximization, aiming to identify and strengthen groups of entities that are intrinsically closely connected in the network while streamlining non-essential elements. In this invention, the Louvain algorithm is applied to the optimization and purification of the graph network structure.
[0061] Hierarchical clustering algorithm: An algorithm for clustering data by building a multi-level cluster tree. It starts with each data point at the bottom layer as a separate cluster, and then gradually merges the closest clusters until the required number of clusters or a certain stopping condition is reached. In the present invention, the hierarchical clustering algorithm is used to automatically identify geographically close building groups based on the location coordinates and category labels of the building entities, and then reveal their collaborative operation patterns in time.
[0062] Apriori algorithm: an association rule learning algorithm used to mine frequent item sets in data and generate association rules based on them. The name of the algorithm comes from Latin: "previous things", which means that the algorithm discovers new rules based on prior knowledge of frequent item sets. In the present invention, the Apriori algorithm is applied to energy consumption data to identify energy supply relationships and energy consumption relationships between building entities, as well as to explore energy sharing relationships.
[0063] Shortest path algorithm: An algorithm used in graph theory to find the shortest path between two nodes. It can find a path from one vertex to another in a weighted graph, where the weight of the edge can represent distance, time or other metrics. In this invention, the shortest path algorithm is used to evaluate the path efficiency of the transportation network and identify key nodes and routes.
[0064] Graph Attention Network (GAT): A graph neural network model that captures neighbor information in a graph through a self-attention mechanism and is suitable for processing static graph structure data. In the present invention, it can effectively extract the spatial features of nodes in the graph. Specifically, the GAT model can highlight the spatial pattern features between building entities, such as the location layout and functional zoning of buildings.
[0065] Temporal Graph Network (TGN): A graph neural network model used to process dynamic graph data. It can capture the historical information and interaction patterns of nodes in the graph, and save the historical states of nodes by introducing memory units, so as to better understand and predict the behavior in the dynamic graph. In the application scenario of the present invention, TGN is specifically used to extract the characteristics of knowledge graphs that change over time, such as energy consumption patterns and traffic flow fluctuations in different time periods.
[0066] Extreme Gradient Boosting (XGBoost): An ensemble learning method that builds a strong prediction model by iteratively combining weak learners (such as decision trees), with each round of iteration focusing on the errors of the previous round. In the present invention, XGBoost is used to establish a basic model for carbon emission prediction, and the prediction accuracy can be improved through iterative optimization.
[0067] The embodiment of the present invention proposes a method for predicting carbon emissions of urban complexes based on knowledge graphs, which considers the building, energy consumption and traffic data of urban complexes, establishes a knowledge graph, extracts spatiotemporal characteristics, and realizes accurate prediction of carbon emissions. Figure 1 , the implementation of the method mainly includes the steps of:
[0068] S1. Collect and summarize the original data of the urban complex and perform data preprocessing. The original data at least includes construction information data, building image data, energy consumption activity data and traffic information data. The preprocessing at least includes obtaining carbon emission data based on the energy consumption activity data.
[0069] In this embodiment, collecting and aggregating the original data of the urban complex includes collecting the original data on buildings, energy consumption and transportation involved in the target urban complex from different data sources, including building construction data for the past five years, high-definition images of building appearances, historical records of energy activities, classified records of transportation modes, and statistical data on traffic flow, etc.
[0070] In this embodiment, data preprocessing includes:
[0071] The collected construction data are screened based on preset standards and missing data are counted. For existing construction data, communication can be conducted with relevant departments to verify the accuracy and completeness of the data, including key information such as the building's floor area, height, materials used, and specific address, and missing data are counted.
[0072] Through image processing and recognition technology, structured information is extracted from architectural image data to supplement the missing data.
[0073] Specifically, for high-rise buildings that lack detailed data support, advanced image processing and recognition technology is used to extract structured information of great value to the prediction model from high-definition images of the building's exterior. The specific steps include:
[0074] 1) Use OpenCV software to grayscale the high-definition image to remove color interference and focus on the shape and structural features of the building;
[0075] 2) The image is compressed, cropped, and adjusted to a standard resolution of 1024*1024 pixels. At the same time, pixel value normalization technology is used to standardize the pixel intensity range of the image to [0,1] to enhance the comparability and consistency of the image data;
[0076] 3) Apply the Canny edge detection algorithm to analyze the grayscale and preprocessed images, identify the outline of the building, and estimate the approximate area based on it;
[0077] 4) Predict building height, building materials and other features with the help of the pre-trained VGG16 convolutional neural network model.
[0078] The energy consumption data is synchronized in time series, outliers are removed, missing values are filled using linear interpolation, and the carbon emissions of various energy-consuming activities are determined using the emission factor method;
[0079] Specifically, in the face of inconsistent timestamps, missing data and outliers that may exist in energy consumption history records, we first use Python's pandas library to align the time series to ensure that the data is sorted according to a unified time base; then use the standard score (Z-score) method to eliminate outliers that significantly deviate from the normal range; then use linear interpolation technology to fill in the missing data points to maintain the continuity and integrity of the data series.
[0080] Finally, based on industry and regional standards, the emission factor method is applied to establish a quantitative relationship between energy consumption and carbon emissions. By multiplying the consumption of each type of energy by the corresponding carbon emission factor, the carbon emissions of each energy-consuming activity are calculated simultaneously.
[0081] Specifically, assuming that the main energy consumption type of a building is electricity, its daily average consumption is 1,200 kWh. According to data provided by the National Bureau of Statistics of China and the International Energy Agency (IEA), the average carbon dioxide emission factor of China's power grid is 0.785 kg of carbon dioxide per kWh. Based on this, the average daily carbon emissions of the building can be calculated as follows:
[0082] 1200kWh / day×0.785kg CO2 / kWh=942kg CO2 / day
[0083] Similarly, if a bus route consumes 500 liters of diesel per day, considering that the average CO2 emission factor of diesel is 2.68 kg CO2 per liter, the average daily carbon emissions of the bus route are:
[0084] 500L / day×2.68kg CO2 / L=1340kg CO2 / day.
[0085] Classify and encode the transportation modes in the traffic information data, and map each type of transportation mode into a numerical label.
[0086] Specifically, we first counted the usage distribution of each mode of transportation in different time periods to identify the peak and trough periods of travel. Then, we applied the unique hot encoding technology to convert the classification information of the transportation mode into a binary vector as the numerical label of each transportation mode, ensuring that the unique impact of each transportation mode on carbon emissions can be effectively distinguished.
[0087] The traffic flow data in the traffic information data is subjected to equivalent quantization and smoothing processing.
[0088] Specifically, we first implement equivalent quantization processing to eliminate the differences in data magnitude between different modes of transportation and ensure that the weights of data of various modes of transportation are balanced in the model analysis. Furthermore, we apply the sliding average filtering strategy to smooth the traffic data, effectively reduce the interference caused by short-term fluctuations, and reveal the long-term traffic flow trend characteristics.
[0089] S2. Construct a knowledge graph based on the preprocessed data. The knowledge graph uses the building entities, energy consumption entities, and transportation mode entities contained in the data as nodes, and the relationship patterns between the entities as edges.
[0090] In this embodiment, constructing a knowledge graph based on preprocessed data includes:
[0091] Based on the preprocessed data, define all entity nodes involved in the knowledge graph and their corresponding attribute sets;
[0092] Based on the attribute sets corresponding to each entity, configure the relationship model between entity nodes and create edges between nodes;
[0093] The constructed knowledge graph is optimized based on the graph optimization algorithm.
[0094] Below Figure 2 Take this as an example for further explanation.
[0095] As a preferred implementation scheme, in this embodiment, all entities involved in the knowledge graph and their corresponding attribute sets are defined as follows:
[0096] All entity information contained in the preprocessed data is extracted and divided into three categories: building entities, energy consumption entities, and transportation mode entities.
[0097] See also Figure 2The building entities shown include energy supplier A entity, transportation hub entity, financial building entity and science and technology park entity; the energy consumption entities include transportation hub energy consumption entity, financial building energy consumption entity, science and technology park energy consumption entity, subway energy consumption entity and bus energy consumption entity; the transportation mode entities include subway line entity and bus line entity.
[0098] The predefined characteristic indicators contained in the entities of each category are obtained as the attribute set corresponding to the entity.
[0099] See also Figure 2 The characteristic indicators of the transportation hub entity shown include the entity number ID, location and number of service routes; the financial building entity includes the entity number ID, address, total area and opening hours; the characteristic indicators of the financial building energy consumption entity include energy consumption type, energy consumption, energy efficiency, carbon emission factor and carbon emissions; the characteristic indicators of the bus energy consumption entity include line number, operating range and average operating time.
[0100] As a preferred implementation scheme, in this embodiment, based on the attribute sets corresponding to each entity, configuring the relationship model between entities includes:
[0101] According to the associated characteristic indicators in the attribute set corresponding to each entity, the relationship pattern between each entity is configured as one or more of the spatiotemporal dependency relationship, energy interaction relationship and traffic impact relationship;
[0102] The time-space dependency relationship at least includes the positional relationship, functional complementary relationship or temporal collaborative operation relationship between building entities;
[0103] The energy interaction relationship at least includes an energy supply relationship, an energy consumption relationship or an energy sharing relationship;
[0104] The traffic impact relationship at least includes a route provision relationship, a route use relationship, a route route relationship or a route arrival relationship.
[0105] As a preferred implementation scheme, in this embodiment, the relationship model configuration method between each entity includes:
[0106] Using the hierarchical clustering algorithm, we analyze the address attributes of building entities such as the financial building based on their location coordinates and category labels, and identify buildings with similar geographical locations. We further combine time series analysis to examine the opening hours of the building, reveal the temporal collaborative operation model of the financial building and surrounding commercial facilities, and realize the automatic identification of geographical proximity and temporal collaborative operation relationships.
[0107] The Apriori algorithm is used to analyze frequent item sets in energy consumption data, determine the energy supply relationship between building entities such as the financial building and energy supplier A, and identify the "energy consumption relationship" between buildings. Furthermore, by analyzing the frequent item sets of energy consumption data, "energy sharing relationships" such as multiple buildings sharing solar power generation facilities are discovered.
[0108] When constructing traffic impact relationships, the shortest path algorithm is used to evaluate the path efficiency of the traffic network and identify key nodes and routes. Taking bus route 101 as an example, its operating range and time are analyzed to establish the route usage relationship with the Financial Building and the Science and Technology Park. At the same time, through network flow analysis, the Financial Building is determined as the arrival point of Metro Line 1, showing the accessibility of traffic routes and their potential impact on building entities.
[0109] As a preferred implementation scheme, in this embodiment, optimizing the constructed knowledge graph based on the graph optimization algorithm includes:
[0110] The community detection algorithm is used to optimize the graph structure, intelligently divide the graph structure, identify closely connected node groups, and remove those edges and nodes that do not contribute much to the community structure (below the threshold) or are isolated.
[0111] Specifically, the Louvain community detection algorithm is used to structurally purify the graph. The algorithm starts by treating each node as an independent community, and through iterative merging, it seeks the optimal community division to improve modularity. In this process, the algorithm identifies and removes edges and isolated nodes that contribute less to community cohesion, optimizes the graph structure, and enhances the accuracy and efficiency of information expression. For example, the Louvain algorithm strengthens the close community connection between the financial building and the science and technology park due to high-frequency bus and subway connections. At the same time, for temporary connections with low frequency of use, such as holiday special lines or night buses, the algorithm evaluates their impact on normal traffic patterns and recommends adjustments or deletions when necessary to ensure that the graph focuses on reflecting the core and stability of urban transportation. This optimization enables the graph to more accurately map the actual operation of urban transportation and provides solid data support for the formulation of transportation strategies.
[0112] After the optimization is completed, the knowledge graph is output in a standardized and easy-to-integrate form to support subsequent system integration and function expansion. Specifically, the graph data is encapsulated through the RESTful API interface or structured JSON document format to facilitate subsequent system integration and achieve accurate prediction of carbon emissions.
[0113] S3. Extract dynamic time series features and static spatial data features based on the constructed knowledge graph, and perform feature splicing to form a comprehensive feature set, which includes dynamic traffic flow intensity features, static building features, spatial layout coordinates and corresponding carbon emission data.
[0114] In some embodiments, extracting dynamic time series features and static spatial data features based on the constructed knowledge graph and performing feature splicing to form a comprehensive feature set includes:
[0115] A graph attention network model is used to extract static spatial data features of the knowledge graph, where the static spatial data features are used to characterize static architectural features and spatial layout coordinates of the building entity;
[0116] The time graph network model is used to extract the time series dynamic features of the knowledge graph, and the time series dynamic features are used to characterize the dynamic traffic flow intensity characteristics and the corresponding carbon emission change rules in different time periods;
[0117] The extracted static spatial data features are concatenated with the time series dynamic features to form a comprehensive feature set.
[0118] In an example, the graph attention network model GAT is used to extract static spatial data features of the knowledge graph, including static architectural features and spatial layout coordinates of building entities, in the following way:
[0119] First, based on the knowledge graph, a GAT layer is constructed to equip each node with an initial feature vector, usually based on the embedding representation of its inherent attributes; then, in the GAT layer, a personalized attention coefficient α is defined for the edges between nodes. ij , which quantifies the influence of neighbor nodes on the feature learning of the central node and is dynamically adjusted through the attention mechanism function during training; then, according to the attention coefficient α ij , perform weighted aggregation on the features of neighboring nodes to form an updated feature representation of the node. Through the iteration of multiple layers of GAT, the static feature representation of the node is gradually refined; ultimately, each node obtains a high-level feature vector that integrates its own attributes and neighbor relationships as the representation of its static features.
[0120] In an example, the time graph network model TGN is used to extract the time series dynamic features of the knowledge graph, including the dynamic traffic flow intensity characteristics in different time periods and the corresponding carbon emission change rules. The specific method is as follows:
[0121] Firstly, the time series data of the knowledge graph are interconnected through timestamps, and the Transformer time coding technology is used to convert the timestamps into vectors to capture the periodicity and trend of the time series; then, the dynamic message passing mechanism of TGN is designed so that the nodes receive and integrate the neighbor information with time coding at each time step and adjust the information weight; then, the memory module is introduced to store the historical interaction information of the nodes, so that the model can dynamically optimize the node feature representation based on the historical behavior pattern and accurately capture the feature changes that evolve over time; finally, the dynamic behavior feature vectors obtained by each node at different time points are combined with the static features to provide comprehensive input data for the carbon emission prediction model.
[0122] In an example shown, the dynamic features of the time series extracted by the TGN model and the static features of the spatial data extracted by the GAT model are integrated by direct splicing to form a high-dimensional comprehensive feature vector, which comprehensively reflects the spatiotemporal characteristics of the urban complex, including dynamic traffic flow intensity, static building characteristics, spatial layout coordinates and corresponding carbon emission data and other feature descriptions.
[0123] S4. Establishing a prediction model, training the established prediction model based on the comprehensive feature set, and predicting carbon emissions based on the trained prediction model.
[0124] In some embodiments, establishing a prediction model includes:
[0125] A basic model for carbon emission prediction is built based on the XGBoost model. The input of the model is comprehensive features, and the output is carbon emissions.
[0126] Set the key parameters of the basic model, including learning rate, maximum tree depth, number of iterations, etc. Use automated parameter adjustment tools such as Hyperopt to find the optimal parameter combination based on cross-validation results, use the found optimal parameter combination as the parameters of the basic model, and build an emission prediction model to improve the prediction performance of the model.
[0127] In some embodiments, training the established prediction model based on the comprehensive feature set includes:
[0128] The comprehensive feature set is divided into a training set and a test set, and the carbon emission prediction model is trained based on the carbon emissions corresponding to each feature.
[0129] Specifically, the training set and test set are divided into 80 / 20 ratios. The XGBoost model is trained using the feature vectors in the historical data and their corresponding carbon emission labels. During the training process, the model uses a gradient boosting strategy to gradually add decision trees to minimize the prediction error.
[0130] Finally, the model performance was evaluated on an independent test set. The mean square error (MSE), coefficient of determination R 2 And mean absolute error (MAE) to verify the generalization ability and anti-overfitting performance of the model.
[0131] In some embodiments, predicting carbon emissions based on the trained prediction model includes:
[0132] Obtain the urban complex data to be predicted and perform data preprocessing;
[0133] Based on the preprocessed data, the knowledge graph is updated and dynamic time series features and static spatial data features are re-extracted to form comprehensive features;
[0134] The comprehensive features are input into the trained carbon emission prediction model, and the model outputs the predicted carbon emissions.
[0135] Specifically, for new urban complex data, repeat the steps of data preprocessing, knowledge graph updating, and feature extraction to obtain new dynamic and static feature vectors. Even in the absence of direct energy consumption data, effective predictions can be made by relying on other relevant features such as traffic flow and building characteristics. The feature vectors of the new data are input into the trained XGBoost model, and the model will output the predicted carbon emissions.
[0136] Another embodiment of the present invention also provides a system for predicting carbon emissions of urban complexes based on knowledge graphs, see Figure 3 , which includes:
[0137] A data collection module, which is used to collect and summarize the original data of the urban complex and perform data preprocessing, wherein the original data at least includes construction information data, building image data, energy consumption activity data and traffic information data;
[0138] A graph construction module, which is used to construct a knowledge graph based on the preprocessed data, wherein the knowledge graph uses the building entities, energy consumption entities and transportation mode entities contained in the data as nodes and the relationship patterns between the entities as edges;
[0139] The feature extraction module is used to extract dynamic time series features and static spatial data features based on the constructed knowledge graph, and perform feature splicing to form a comprehensive feature set;
[0140] The emission prediction module is used to establish a prediction model, train the established prediction model based on the comprehensive feature set, and predict carbon emissions based on the trained prediction model.
[0141] It should be noted that the above system is used to implement the urban complex carbon emission prediction method based on knowledge graph in the above embodiment. The implementation of the functions of each module in the system can refer to the steps of the method in the above embodiment, which will not be repeated here.
[0142] After the implementation of the present invention, the prediction accuracy of carbon emissions of the urban complex has increased by about 20% compared with traditional methods, and the prediction efficiency has also been significantly improved. The method and system of the present invention can not only monitor the carbon emission status in real time, but also warn of possible emission peaks in advance, providing a scientific decision-making basis for management. Through continuous performance evaluation and optimization, the system effectively supports the policy formulation and energy management practices of governments and enterprises in energy conservation and emission reduction, and plays a key technical support role in promoting the construction of green and low-carbon cities.
[0143] In the embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary, for example, the division of the units can be a logical function division, and there can be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0144] Through the description of the above embodiments, it is easy for those skilled in the art to understand that all or part of the processes in the above embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be an electrical connection of one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical memory, a magnetic memory, or any suitable combination thereof.
[0145] The computer program code for executing the disclosed embodiments may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages, such as JAVA, C++, and may also include conventional procedural programming languages, such as C. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network or a wide area network, or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0146] The above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for predicting carbon emissions of urban complexes based on knowledge graph, characterized in that: The following steps are involved: Collecting and summarizing the original data of the urban complex and performing data preprocessing, wherein the original data at least includes construction information data, building image data, energy consumption activity data and traffic information data, and the preprocessing at least includes obtaining carbon emission data based on the energy consumption activity data; Constructing a knowledge graph based on the preprocessed data, wherein the knowledge graph uses the building entities, energy consumption entities, and transportation mode entities contained in the data as nodes, and the relationship patterns between the entities as edges; Extract dynamic time series features and static spatial data features based on the constructed knowledge graph, and perform feature splicing to form a comprehensive feature set, which includes dynamic traffic flow intensity features, static building features, spatial layout coordinates and corresponding carbon emission data; A prediction model is established, the established prediction model is trained based on the comprehensive feature set, and carbon emissions are predicted based on the trained prediction model.
2. The urban complex carbon emission prediction method based on knowledge graph according to claim 1 is characterized in that: The data preprocessing comprises: Screen the collected construction data based on preset standards and count the missing data; Extracting structured information from building image data through image processing and recognition technology to supplement the missing data; The energy consumption data is synchronized in time series, outliers are removed, missing values are filled using linear interpolation, and the carbon emissions of various energy-consuming activities are determined using the emission factor method; Classify and encode the transportation modes in the traffic information data, and map each type of transportation mode into a numerical label; The traffic flow data in the traffic information data is subjected to equivalent quantization and smoothing processing.
3. The urban complex carbon emission prediction method based on knowledge graph according to claim 1 is characterized in that: Building a knowledge graph based on preprocessed data includes: Based on the preprocessed data, define all entity nodes involved in the knowledge graph and their corresponding attribute sets; Based on the attribute sets corresponding to each entity, configure the relationship model between entity nodes and create edges between nodes; The constructed knowledge graph is optimized based on the graph optimization algorithm.
4. The urban complex carbon emission prediction method based on knowledge graph according to claim 3 is characterized in that: The definition of all entities involved in the knowledge graph and their corresponding attribute sets include: Extract all entity information contained in the preprocessed data and divide it into three categories: building entity, energy consumption entity and transportation mode entity; The predefined characteristic indicators contained in the entities of each category are obtained as the attribute set corresponding to the entity.
5. The urban complex carbon emission prediction method based on knowledge graph according to claim 4 is characterized in that: Based on the attribute sets corresponding to each entity, the relationship model between configuration entities includes: According to the associated characteristic indicators in the attribute set corresponding to each entity, the relationship pattern between each entity is configured as one or more of the spatiotemporal dependency relationship, energy interaction relationship and traffic impact relationship; The time-space dependency relationship at least includes the positional relationship, functional complementary relationship or temporal collaborative operation relationship between building entities; The energy interaction relationship at least includes an energy supply relationship, an energy consumption relationship or an energy sharing relationship; The traffic impact relationship at least includes a route provision relationship, a route use relationship, a route route relationship or a route arrival relationship.
6. The urban complex carbon emission prediction method based on knowledge graph according to claim 5 is characterized in that: The optimization of the constructed knowledge graph based on the graph optimization algorithm includes: The community detection algorithm is used to optimize the graph structure, intelligently divide the graph structure, identify closely connected node groups, and remove edges and nodes whose contribution to the community structure is below a preset threshold or are isolated.
7. The urban complex carbon emission prediction method based on knowledge graph according to claim 1 is characterized in that: Based on the constructed knowledge graph, dynamic time series features and static spatial data features are extracted, and feature splicing is performed to form a comprehensive feature set including: A graph attention network model is used to extract static spatial data features of the knowledge graph, where the static spatial data features are used to characterize static architectural features and spatial layout coordinates of the building entity; The time graph network model is used to extract the time series dynamic features of the knowledge graph, and the time series dynamic features are used to characterize the dynamic traffic flow intensity characteristics and the corresponding carbon emission change rules in different time periods; The extracted static spatial data features are concatenated with the time series dynamic features to form a comprehensive feature set.
8. The urban complex carbon emission prediction method based on knowledge graph according to claim 1 is characterized in that: Establishing a prediction model, and training the established prediction model based on the comprehensive feature set includes: A basic model for carbon emission prediction is built based on the XGBoost model. The input of the model is comprehensive features, and the output is carbon emissions. Setting key parameters of the basic model, finding the optimal parameter combination, using the found optimal parameter combination as the parameters of the basic model, and constructing an emission prediction model; The comprehensive feature set is divided into a training set and a test set, and the carbon emission prediction model is trained based on the carbon emissions corresponding to each feature.
9. The urban complex carbon emission prediction method based on knowledge graph according to claim 1 is characterized in that: Carbon emissions prediction based on the trained prediction model includes: Obtain the urban complex data to be predicted and perform data preprocessing; Based on the preprocessed data, the knowledge graph is updated and dynamic time series features and static spatial data features are re-extracted to form comprehensive features; The comprehensive features are input into the trained carbon emission prediction model, and the model outputs the predicted carbon emissions.
10. A knowledge graph-based urban complex carbon emission prediction system, characterized in that: include: A data collection module, which is used to collect and summarize the original data of the urban complex and perform data preprocessing, wherein the original data at least includes construction information data, building image data, energy consumption activity data and traffic information data; A graph construction module, which is used to construct a knowledge graph based on the preprocessed data, wherein the knowledge graph uses the building entities, energy consumption entities and transportation mode entities contained in the data as nodes and the relationship patterns between the entities as edges; The feature extraction module is used to extract dynamic time series features and static spatial data features based on the constructed knowledge graph, and perform feature splicing to form a comprehensive feature set; The emission prediction module is used to establish a prediction model, train the established prediction model based on the comprehensive feature set, and predict carbon emissions based on the trained prediction model.
Citation Information
Cited By
Knowledge graph-based customer demand response method and system
CN119941300A
Carbon emission monitoring management method and system for transformer substation
CN120338260A
Adaptive AI control system for building carbon nerve center
CN120722750A
Building engineering green low-carbon construction evaluation and decision support system
CN121212849A
Carbon-source-sink spatio-temporal dynamic knowledge graph construction method and system, terminal and storage medium
CN121351978A
