Carbon emission analysis method, device and equipment for low-carbon building and storage medium
Hyperspectral images are obtained through greenhouse gas monitoring components, and the boundary extraction algorithm and machine learning technology are used, differential image processing is used to construct carbon emission incremental functions and find the derivatives, which solves the automation and accuracy problems of carbon emission analysis in low-carbon buildings and provides data support for large-scale carbon emission research.
Patent Information
- Application Number
- CN202510218509.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-08
AI Technical Summary
The carbon emission analysis of low-carbon buildings in the existing technology is difficult, the statistics are difficult, the data is missing, the manual calculation is cumbersome and the error is large, making it difficult to accurately analyze the carbon emission habits of buildings.
Hyperspectral images are obtained through greenhouse gas monitoring components, and boundary extraction algorithms and machine learning technology are used to process differential image, construct carbon emission incremental functions and lead to realize automated carbon emission analysis.
It realizes automated and accurate analysis of carbon emissions in low-carbon buildings, reduces manual participation, avoids subjective errors, and provides data support for large-scale carbon emission research.
Smart Images

Figure CN120279404A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic digital data processing, and particularly relates to a carbon emission analysis method, device, equipment and storage medium for low-carbon buildings. Background Art
[0002] A low-carbon building refers to a low-carbon building that can significantly reduce carbon emissions and energy consumption during the entire life cycle of a low-carbon building (including stages such as material production, construction, operation and maintenance) compared with traditional low-carbon buildings.
[0003] Low-carbon buildings usually achieve the goal of energy conservation and emission reduction by adopting energy-saving designs, using low-carbon materials and low-carbon construction technologies, implementing low-carbon operation and maintenance management, etc. Specifically, low-carbon buildings may adopt technical means such as high-efficiency thermal insulation materials, energy-saving doors and windows, renewable energy utilization systems (such as solar photovoltaic panels, wind power generation devices, etc.), and intelligent control systems to reduce the energy consumption and carbon emissions of low-carbon buildings.
[0004] In addition, low-carbon buildings also pay attention to the overall planning and design of low-carbon buildings to make full use of natural resources and environmental advantages and reduce the negative impact of low-carbon buildings on the environment. For example, through reasonable layout and orientation design of low-carbon buildings, natural light and ventilation can be fully utilized to reduce the dependence on lighting and air-conditioning systems.
[0005] Currently, for the carbon emission statistics of buildings, it is usually mainly based on the monitoring of energy consumption data during the operation stage of current public buildings. Smart meters can directly upload data to the cloud platform, and other energy consumption data are usually recorded in the form of manual meter reading. The statistical difficulty is large and there are many missing data, which cannot guarantee the accuracy of the carbon emission measurement results. Moreover, carbon emission accounting reports are all manually compiled, the accounting process is cumbersome, it is difficult for general personnel to complete, and the professional quality requirements for the compiling personnel in carbon accounting are high, resulting in a large waste of manpower and material resources.
[0006] Furthermore, on the premise that carbon emission statistics are difficult to collect and have manual subjective experience errors, it is difficult to further analyze the carbon emission habits of buildings, making the subsequent carbon emission analysis for a larger scale more challenging. Summary of the Invention
[0007] The main purpose of the present application is to provide a carbon emission analysis method, device, equipment and storage medium for low-carbon buildings to solve the problem of difficult carbon emission analysis of low-carbon buildings in the prior art.
[0008] To achieve the above purpose, the present application provides the following technical solutions:
[0009] A carbon emission analysis method for low-carbon buildings, where the low-carbon buildings are several and all located in high-altitude and cold regions. Greenhouse gas monitoring components are installed in the high-altitude and cold regions and are oriented towards all low-carbon buildings. The carbon emission analysis method includes:
[0010] Step S1, obtaining hyperspectral images of all low-carbon buildings at preset time intervals through the greenhouse gas detection components;
[0011] Step S2, obtaining the color block boundaries in all hyperspectral images through a boundary extraction algorithm;
[0012] Step S3, obtaining the RGB values on both sides of all color block boundaries based on the current hyperspectral image, deleting the color blocks on the side with a lower R value in the RGB values, and defining the remaining image as a greenhouse gas image;
[0013] Step S4, successively differentiating the current greenhouse gas image and the previous greenhouse gas image according to the time process of all preset time intervals, and obtaining a differential image based on two adjacent greenhouse gas images;
[0014] Step S5, obtaining the color block boundaries in all differential images through the boundary extraction algorithm and defining them as greenhouse gas increment boundaries;
[0015] Step S6, obtaining the pixel coordinates of all greenhouse gas increment boundaries in the current differential image based on the resolution of the current differential image;
[0016] Step S7, learning and training the pixel coordinates of all differential images through a machine learning algorithm, and predicting several future greenhouse gas increment boundaries based on several preset prediction steps;
[0017] Step S8, linearly fitting the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary in a rectangular coordinate system to obtain a carbon emission increment function;
[0018] Step S9, taking the derivative of the carbon emission increment function to obtain a slope change function, which is defined as the carbon emission habit of the low-carbon building.
[0019] As a further improvement of the present application, in step S5, after obtaining the color block boundaries in all differential images through the boundary extraction algorithm and defining them as greenhouse gas increment boundaries, it includes:
[0020] Step S10, respectively obtaining the enclosed area of each greenhouse gas increment boundary, and obtaining an enclosed area based on a preset time interval;
[0021] Step S20, obtaining the operating duration of each electrical equipment in the low-carbon building based on several preset time intervals;
[0022] Step S30: Define the enclosed area within the same preset time period as a dependent variable, and define the activation durations of all electrical devices as a set of independent variables;
[0023] Step S40: Define the linear regression relationship between all dependent variables and all independent variables through a multiple linear regression model;
[0024] Step S50: Solve the linear regression relationship and define the solution result as the electricity consumption and carbon emission relationship of the low-carbon building.
[0025] As a further improvement of this application, in step S50, after solving the linear regression relationship and defining the solution result as the electricity consumption and carbon emission relationship of the low-carbon building, it includes:
[0026] Step S100: Send the electricity consumption and carbon emission relationship to an external monitoring terminal.
[0027] As a further improvement of this application, in step S9, after taking the derivative of the carbon emission increment function to obtain a slope change function and defining it as the carbon emission habit of the low-carbon building, it includes:
[0028] Step S1000: Send the hyperspectral image, the greenhouse gas image, the difference image, and the greenhouse gas increment boundary to an external visual monitoring terminal and display them in split screens;
[0029] Step S2000: Send the carbon emission increment function and the slope change function to an external coordinate axis display terminal and display them in split screens.
[0030] As a further improvement of this application, in step S2, to obtain the color block boundaries in all hyperspectral images through a boundary extraction algorithm, it includes:
[0031] Step S21: Use the cv2.cvtColor() function in the OpenCV environment to convert each hyperspectral image into a grayscale image respectively;
[0032] Step S22: Use the Canny edge detection operator to obtain all the color block edges of the current grayscale image;
[0033] Step S23: Define a corrosion structuring element with a preset pixel size;
[0034] Step S24: Traverse all the color block edges with the center of the corrosion structuring element;
[0035] Step S25: Delete all the paths traversed by the corrosion structuring element to obtain the corrosion image of the current grayscale image;
[0036] Step S26: Take the difference between the current grayscale image and the current corrosion image to obtain the color block boundary.
[0037] As a further improvement of this application, in step S7, a machine learning machine learns and trains the pixel coordinates of all differential images, and predicts several future greenhouse gas increment boundaries based on several preset prediction steps, including:
[0038] In step S71, integrate all pixel coordinates of a differential image into a pixel data set;
[0039] In step S72, perform standard normalization processing on all pixel data sets, and obtain a normalized data set based on a pixel data set;
[0040] In step S73, divide a normalized data set into a training set and a validation set according to a preset ratio;
[0041] In step S74, define a neural network model with signal connections in sequence of an input layer, a hidden layer, and an output layer;
[0042] In step S75, input all training sets into the input layer in sequence, and perform several times of training through the neural network model;
[0043] In step S76, respectively obtain the root mean square error of the training results corresponding to the current validation set and the current training set based on each training;
[0044] In step S77, obtain the minimum error among all root mean square errors;
[0045] In step S78, obtain the training result corresponding to the minimum error as the future greenhouse gas increment boundary prediction model;
[0046] In step S79, predict several future greenhouse gas increment boundaries based on several preset prediction steps through the future greenhouse gas increment boundary prediction model.
[0047] To achieve the above object, this application also provides the following technical solutions:
[0048] A carbon emission analysis device for a low-carbon building, the carbon emission analysis device is applied to the carbon emission analysis method as described above, and the carbon emission analysis device includes:
[0049] A hyperspectral image acquisition module, configured to acquire hyperspectral images of all low-carbon buildings at preset time intervals through the greenhouse gas monitoring component;
[0050] A hyperspectral image color block boundary extraction module, configured to obtain the color block boundaries in all hyperspectral images through a boundary extraction algorithm;
[0051] A greenhouse gas image acquisition module, which is used to obtain the RGB values on both sides of the boundaries of all color patches based on the current hyperspectral image, delete the color patches on the side with a lower R value in the RGB values, and define the remaining image as the greenhouse gas image;
[0052] A greenhouse gas image difference module, which is used to sequentially difference the current greenhouse gas image and the previous greenhouse gas image according to the time processes of all preset time periods, and obtain a difference image based on two adjacent greenhouse gas images;
[0053] A greenhouse gas increment boundary definition module, which is used to obtain the color patch boundaries in all difference images through the boundary extraction algorithm and define them as greenhouse gas increment boundaries;
[0054] A boundary pixel coordinate acquisition module, which is used to obtain the pixel coordinates of all greenhouse gas increment boundaries in the current difference image based on the resolution of the current difference image;
[0055] A future greenhouse gas increment boundary prediction module, which is used to learn and train the pixel coordinates of all difference images through machine learning, and predict several future greenhouse gas increment boundaries based on several preset prediction steps;
[0056] A carbon emission increment function fitting module, which is used to linearly fit the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary into a carbon emission increment function through a rectangular coordinate system;
[0057] A carbon emission habit definition module, which is used to take the derivative of the carbon emission increment function to obtain a slope change function, and define it as the carbon emission habit of the low-carbon building.
[0058] To achieve the above object, the present application also provides the following technical solutions:
[0059] An electronic device, including a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the carbon emission analysis method as described above is implemented.
[0060] To achieve the above object, the present application also provides the following technical solutions:
[0061] A storage medium, the storage medium stores program instructions, and when the program instructions are executed by a processor, the carbon emission analysis method as described above can be implemented.
[0062] This application obtains hyperspectral images of all low-carbon buildings at preset time intervals through greenhouse gas monitoring components; obtains the color patch boundaries in all hyperspectral images through a boundary extraction algorithm; obtains the RGB values on both sides of all color patch boundaries based on the current hyperspectral image, and deletes the color patches on the side with a lower R value in the RGB values, and defines the remaining image as a greenhouse gas image; successively differentiates the current greenhouse gas image and the previous greenhouse gas image according to the time process of all preset time intervals, and obtains a differential image based on two adjacent greenhouse gas images; obtains the color patch boundaries in all differential images through a boundary extraction algorithm and defines them as greenhouse gas increment boundaries; obtains the pixel coordinates of all greenhouse gas increment boundaries in the current differential image based on the resolution of the current differential image; learns and trains the pixel coordinates of all differential images through a machine learning algorithm, and predicts several future greenhouse gas increment boundaries based on several preset prediction steps; linearly fits the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary in a plane rectangular coordinate system into a carbon emission increment function; takes the derivative of the carbon emission increment function to obtain a slope change function, which is defined as the carbon emission habit of the low-carbon building. This application utilizes the characteristic that greenhouse gases can be directly detected and obtained by existing detection instruments (such as hyperspectral cameras and imaging spectrometers), starts from the visualized greenhouse gas images directly obtained by the detection instruments for a series of subsequent carbon emission analyses, obtains the greenhouse gas increment at a moment by differentiating the images at adjacent moments, then realizes the prediction function of carbon emissions by machine learning the greenhouse gas increments at each moment, and finally constructs a function of the real-time increment and the future increment and takes the derivative to obtain a relevant function for analyzing carbon emissions, providing necessary data support for subsequent large-scale carbon emission research and other fields. Moreover, the data acquisition in this application is simple and intuitive, and the calculation process does not involve human participation, avoiding artificial subjective errors in the results. Description of the Drawings
[0063] Figure 1 It is a schematic flowchart of the steps of an embodiment of the carbon emission analysis method for the low-carbon building of this application;
[0064] Figure 2 It is a schematic diagram of the functional modules of an embodiment of the carbon emission analysis device for the low-carbon building of this application;
[0065] Figure 3 It is a schematic structural diagram of an embodiment of the electronic device of this application;
[0066] Figure 4 It is a schematic structural diagram of an embodiment of the storage medium of this application. Detailed Embodiments
[0067] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0068] The terms "first", "second", and "third" in the present application are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second", and "third" may explicitly or implicitly include at least one of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0069] Referring to "embodiments" herein means that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0070] As Figure 1 shown, this embodiment provides an embodiment of the carbon emission analysis method for low-carbon buildings. In this embodiment, the low-carbon buildings are several and are all located in high-altitude and cold regions, and greenhouse gas monitoring components are installed in the high-altitude and cold regions and are oriented towards all low-carbon buildings.
[0071] Preferably, a low-carbon building refers to a low-carbon building that can significantly reduce carbon emissions and energy consumption during the entire life cycle of the low-carbon building (including stages such as material production, construction, operation, and maintenance) compared to traditional low-carbon buildings. Low-carbon buildings usually achieve the goal of energy conservation and emission reduction by adopting energy-efficient designs, using low-carbon materials and low-carbon construction technologies, implementing low-carbon operation and maintenance management, etc. Specifically, low-carbon buildings may adopt technical means such as high-performance thermal insulation materials, energy-efficient doors and windows, renewable energy utilization systems (such as solar photovoltaic panels, wind power generation devices, etc.), and intelligent control systems to reduce the energy consumption and carbon emissions of low-carbon buildings. In addition, low-carbon buildings also pay attention to the overall planning and design of low-carbon buildings to make full use of natural resources and environmental advantages and reduce the negative impact of low-carbon buildings on the environment. For example, through reasonable layout and orientation design of low-carbon buildings, natural light and ventilation can be fully utilized, reducing the dependence on lighting and air-conditioning systems.
[0072] Preferably, the image capture of greenhouse gases mainly relies on hyperspectral cameras and imaging spectrometers of various models (i.e., the above-mentioned greenhouse gas monitoring components). The instrument identifies and measures the intuitive image and concentration of greenhouse gases by detecting the infrared spectral characteristics of greenhouse gases (such as methane and carbon dioxide).
[0073] Among them, the hyperspectral camera can detect the infrared fingerprints of greenhouse gases. By analyzing the sunlight reflected from the Earth's surface, it can identify the presence of greenhouse gases such as methane and carbon dioxide in the atmosphere. The hyperspectral camera uses the method of spectral analysis. By measuring the absorption characteristics of gas molecules on the solar spectrum, it can deduce the concentration changes of components such as carbon dioxide and methane in the atmosphere; the imaging spectrometer can accurately locate and measure the sources of greenhouse gases in space. It helps scientists determine the emission sources and emission amounts by monitoring the infrared radiation characteristics of greenhouse gases. The application of the imaging spectrometer in space makes remote monitoring and measurement more accurate and efficient.
[0074] Specifically, the carbon emission analysis method includes the following steps:
[0075] Step S1, obtaining hyperspectral images of all low-carbon buildings at preset time intervals through the greenhouse gas monitoring component.
[0076] Preferably, a hyperspectral image (HSI) is an image with continuous and high-density spectral information. Different from ordinary color images, a hyperspectral image captures the spectral reflection or radiation information of an object in a large number of narrow wavelength ranges. Each pixel contains not only basic color channels such as red, green, and blue but also information on dozens or even hundreds of spectral bands, which can cover ranges such as visible light, infrared, and ultraviolet. Therefore, hyperspectral images have a more sensitive detection ability for the materials, chemical compositions, and other fine features of objects.
[0077] Preferably, since the gas escapes relatively quickly, the preset time period and the preset prediction steps in this embodiment can be set to the same stride, such as one second, ten seconds, thirty seconds, etc.
[0078] Step S2: Obtain the color patch boundaries in all hyperspectral images through a boundary extraction algorithm.
[0079] Preferably, the first step of boundary extraction is usually edge detection. Edges are the places where the image brightness changes significantly and are the boundaries between objects and the background or different objects. Edge detection algorithms find edges by identifying the brightness gradients in the image. Commonly used edge detection operators include Sobel, Prewitt, Roberts, and Canny, etc.
[0080] Among them, Sobel operator, Prewitt operator, Roberts operator: The aforementioned operators detect edges by calculating the gradient amplitude of each pixel point in the image and estimate the gradient through filters in the horizontal and vertical directions. Canny edge detector: The Canny algorithm is a more complex edge detection method, aiming to capture the edges in the image as accurately as possible and minimize false detections and missed detections. The Canny detector first uses a Gaussian filter to smooth the image to reduce noise, then calculates the gradient amplitude and direction of each point in the image, then applies non-maximum suppression (NMS) to refine the edges, and finally uses a double-threshold method and edge connection technology to detect and connect the edges.
[0081] Step S3: Based on the current hyperspectral image, obtain the RGB values on both sides of all color patch boundaries, delete the color patches on the side with a lower R value in the RGB values, and define the remaining image as the greenhouse gas image.
[0082] Preferably, the RGB value range of the hyperspectral image of greenhouse gases is the same as that of a normal RGB image, i.e., [0, 255]. However, it should be clear that the hyperspectral image itself does not directly provide RGB values but is a grayscale image containing multiple spectral bands. To obtain an RGB image from a hyperspectral image, specific processing is usually required, such as selecting the bands corresponding to red, green, and blue in the hyperspectral image and performing operations such as normalization or linear combination. A hyperspectral image is a special three-dimensional image composed of multiple grayscale images, and each grayscale image represents a specific spectral band. For the hyperspectral imaging of greenhouse gases, the bands it contains may correspond to the absorption or emission spectral characteristics of greenhouse gases. However, these bands are usually not within the visible light range (red, green, and blue bands), so the distribution or concentration information of greenhouse gases cannot be seen directly by observing the hyperspectral image. To convert the hyperspectral image into an RGB image for visualization, it is necessary to select the RGB values corresponding to certain specific bands in the hyperspectral image. This process may involve complex image processing algorithms and spectral analysis techniques to ensure that the converted RGB image can accurately reflect the information of greenhouse gases in the hyperspectral image.
[0083] Step S4, successively difference the current greenhouse gas image and the previous greenhouse gas image according to the time processes of all preset time periods, and obtain a difference image based on two adjacent greenhouse gas images.
[0084] Preferably, image differencing refers to subtracting the corresponding pixel values of two images to weaken the similar parts of the images or eliminate the identical parts of the images.
[0085] Step S5, obtain the boundaries of the color blocks in all difference images through a boundary extraction algorithm and define them as greenhouse gas increment boundaries.
[0086] Step S6, obtain the pixel coordinates of all greenhouse gas increment boundaries of the current difference image based on the resolution of the current difference image.
[0087] Step S7, learn and train the pixel coordinates of all difference images through a machine learning algorithm, and predict several future greenhouse gas increment boundaries based on several preset prediction steps.
[0088] Step S8, linearly fit the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary in a rectangular coordinate system into a carbon emission increment function.
[0089] Step S9, take the derivative of the carbon emission increment function to obtain a slope change function, which is defined as the carbon emission habit of a low-carbon building.
[0090] Further, in step S5, the boundaries of color patches in all difference images are obtained through a boundary extraction algorithm and defined as greenhouse gas increment boundaries. After that, it includes:
[0091] Step S10, obtain the enclosed area of each greenhouse gas increment boundary respectively, and obtain an enclosed area based on a preset time period.
[0092] Step S20, obtain the on - time of each electrical device in a low - carbon building based on several preset time periods.
[0093] Step S30, define the enclosed area in the same preset time period as a dependent variable, and define the on - times of all electrical devices as a set of independent variables.
[0094] Step S40, define the linear regression relationship between all dependent variables and all independent variables through a multiple linear regression model.
[0095] Preferably, Multiple Linear Regression is a statistical method used to study the linear relationship between a dependent variable and multiple independent variables.
[0096] In multiple linear regression, we assume that the change in the dependent variable Y can be explained by a linear combination of multiple independent variables X1, X2,..., X k Its general form can be expressed as:
[0097] Y = β0 + β1X1 + β2X2 +... + β k X k + μ
[0098] Where Y is the dependent variable, X1, X2,..., X k are independent variables, β0 is the constant term, β1, β2,..., β k are the regression coefficients of their respective independent variables, and μ is the random error term.
[0099] It should be noted that the symbol meanings described in the above principle explanation are not interoperable with the symbol meanings in other places.
[0100] The basic principle and basic calculation process of multiple linear regression are similar to those of simple linear regression. However, due to the large number of independent variables, the calculation is relatively complex and usually requires the assistance of statistical software. In practical applications, the multiple linear regression model can help us understand which independent variables have a significant impact on the dependent variable, as well as the magnitude and direction of these impacts.
[0101] When establishing a multiple linear regression model, the following points need to be noted:
[0102] Selection of independent variables: The independent variables must have a significant impact on the dependent variable and show a strong linear correlation. At the same time, there should be a certain degree of mutual exclusivity among the independent variables, that is, the correlation degree among the independent variables should not be higher than the correlation degree between the independent variables and the dependent variable.
[0103] Model testing and evaluation: After constructing the model, it is necessary to conduct a significance test on the overall model to determine whether the model is effective. Further, it is also necessary to conduct a significance test on the regression coefficients of each independent variable and evaluate the goodness of fit of the model using indicators such as R-squared or adjusted R-squared.
[0104] Preferably, the significance test of the regression equation usually uses the F-test to evaluate whether the entire regression model is significant, that is, whether at least one independent variable has a significant impact on the dependent variable. The null hypothesis of the F-test is that the regression coefficients of all independent variables in the regression equation are 0. If the p-value of the F-test is less than 0.05, the null hypothesis is rejected, and it is considered that the model is significant, that is, at least one independent variable has a statistically significant impact on the dependent variable; conversely, if the p-value is greater than 0.05, the null hypothesis is not rejected, and it is considered that the model is not significant.
[0105] Preferably, on the basis that the overall regression equation is significant, if you want to further determine which regression coefficients of the independent variables are significant, then a t-test is required. The t-test is used to test whether a single regression coefficient is significantly different from 0, that is, whether the independent variable has a significant impact on the dependent variable. If the p-value of the t-test of the regression coefficient is less than a certain significance level (such as 0.05), then the regression coefficient is considered significant.
[0106] In addition, the significance test of multiple linear regression may also include the evaluation of the goodness of fit of the regression model, which is usually through the coefficient of determination R 2 or the adjusted R 2 to evaluate. R 2 close to 1 indicates that the regression model has a good goodness of fit and can better explain the variation of the dependent variable; R 2 close to 0 indicates that the regression model has a poor goodness of fit and a weak explanatory power for the dependent variable.
[0107] Step S50, solve the linear regression relationship and define the solution result as the relationship between electricity consumption and carbon emissions of low-carbon buildings.
[0108] Further, in step S50, solve the linear regression relationship and define the solution result as the relationship between electricity consumption and carbon emissions of low-carbon buildings. After that, it includes:
[0109] Step S100, send the relationship between electricity consumption and carbon emissions to the external monitoring terminal.
[0110] Further, in step S9, take the derivative of the carbon emission increment function to obtain the slope change function, and define it as the carbon emission habit of low-carbon buildings. After that, it includes:
[0111] Step S1000: Send the hyperspectral image, greenhouse gas image, differential image, and greenhouse gas increment boundary to an external visual monitoring terminal and display them in a split screen.
[0112] Step S2000: Send the carbon emission increment function and slope change function to an external coordinate axis display terminal and display them in a split screen.
[0113] Preferably, the visual digital model of the low-carbon building can also be output to an external visual monitoring terminal, which can be achieved through digital twin technology. Digital twin technology can be implemented using a variety of software, such as apriori, SAP Leonardo IoT, Predix, Ansys Twin Builder, NetObjex, iLens of Knowledge Lens, Cohesion, Akselos, IOTIFY, Autodesk Forge.
[0114] Furthermore, in step S2, the color block boundaries in all hyperspectral images are obtained through a boundary extraction algorithm, including:
[0115] Step S21: Use the cv2.cvtColor() function in the OpenCV environment to convert each hyperspectral image into a grayscale image respectively.
[0116] Step S22: Use the Canny edge detection operator to obtain all the color block boundaries of the current grayscale image.
[0117] Preferably, the main detection process of the Canny edge detection operator is as follows:
[0118] Noise reduction processing: First, perform Gaussian smoothing on the original image to reduce the impact of noise on edge detection. This step is achieved by convolving the original image with a Gaussian smoothing template, and the resulting image will be slightly blurred.
[0119] Calculate gradients: Then, the algorithm calculates the gradient magnitude and direction of each point in the image. Edges in horizontal, vertical, and diagonal directions can be detected.
[0120] Non-maximum suppression: To refine the edges, the algorithm performs a non-maximum suppression step, that is, only retains the local maximum values in the gradient direction and removes non-boundary points. This can make the edges more precise.
[0121] Double-threshold screening: Finally, the algorithm uses a double-threshold technique to determine the final edges. Two thresholds are set, one high threshold and one low threshold. Points above the high threshold are considered strong edges, and points below the low threshold are discarded. Points between the two, if connected to a strong edge, are considered edges, otherwise they are discarded.
[0122] Step S23: Define a corrosion structuring element with a preset pixel size.
[0123] Preferably, the pixel size of the corrosion structuring element can be set according to the resolution of the image data. Generally, it can be set to 3×3 pixels. Traversing once can corrode one layer of pixel points. If the resolution is higher, the preset pixel size can be selected as odd numbers such as 5×5, 7×7, 9×9, etc.
[0124] Step S24: Traverse all the edges of the color blocks with the center of the corrosion structuring element.
[0125] Step S25: Delete all the paths traversed by the corrosion structuring element to obtain the corrosion image of the current grayscale image.
[0126] Step S26: Differentiate the current grayscale image and the current corrosion image to obtain the color block boundary.
[0127] Preferably, this embodiment utilizes the characteristic that the color temperature of greenhouse gases is higher than other parts of the image in hyperspectral imaging to obtain the boundary.
[0128] Furthermore, in step S7, the pixel coordinates of all differential images are learned and trained by a machine learning machine, and several future greenhouse gas increment boundaries are predicted based on several preset prediction steps, including:
[0129] Step S71: Integrate all the pixel coordinates of a differential image into a pixel data set.
[0130] Step S72: Perform standard normalization processing on all the pixel data sets to obtain a normalized data set based on a pixel data set.
[0131] Preferably, in this embodiment, a zero-mean normalization (Z-score normalization) method is preferably used. This method normalizes data based on the mean and standard deviation of the original data, and the processed data conforms to the standard normal distribution, that is, the mean is 0 and the standard deviation is 1. For the normalization method, batch normalization can also be used in this embodiment. Compared with simple normalization in previous neural network training, only the data of the input layer was normalized, but no normalization was performed in the middle layer. Although the dataset of the input nodes was normalized, the data distribution after matrix multiplication of the input data was likely to change greatly, and as the number of network layers in the hidden layer deepened, the change in data distribution would become larger and larger. Therefore, the batch normalization performed in the middle layer of the neural network makes the training effect better.
[0132] Step S73: Divide a normalized dataset into a training set and a validation set according to a preset ratio.
[0133] Preferably, the preset ratio can be set to 8:2 to divide the normalized dataset into a training set and a sample set in the ratio of 8:2.
[0134] Step S74: Define a neural network model with the input layer, hidden layer, and output layer connected in sequence by signals.
[0135] Preferably, the neural network model is represented by the following formula:
[0136]
[0137] where y is the neural network model; x n is the nth input node of the input layer, and each input node corresponds to a data in the training set. is the weight from the mth input node of the input layer to the nth input node of the hidden layer. is the bias connected to the nth input node of the hidden layer. is the bias of the output layer; tansig(·) is the activation function; the number in the parentheses of the symbol subscript is the layer number, subscript (1) is the first layer, that is, the input layer, and subscript (1, 2) is from the first layer to the second layer, that is, from the input layer to the hidden layer.
[0138] It should be noted that the above formula and formula symbols are only for principle explanation, and their meanings are not interoperable with those in other positions.
[0139] Step S75: Input all training sets into the input layer in sequence and perform several trainings through the neural network model.
[0140] Step S76: Obtain the root mean square error of the training results corresponding to the current validation set and the current training set respectively for each training.
[0141] Step S77: Obtain the minimum error among all the root mean square errors.
[0142] Step S78: Obtain the training result corresponding to the minimum error as the future greenhouse gas increment boundary prediction model.
[0143] Step S79: Predict several future greenhouse gas increment boundaries based on the future greenhouse gas increment boundary prediction model for several preset prediction steps.
[0144] Preferably, training a neural network usually requires providing a large amount of data, that is, a dataset; the dataset is generally divided into three categories, namely the above-mentioned training set, validation set, and test set.
[0145] Among them, one epoch is equal to the process of training once using all the samples in the training set. By training once, it means performing one forward pass and one back pass; when the number of samples in one epoch (i.e., the training set) is too large, training once may consume too much time, and it is not entirely necessary to use all the data in the training set for each training. Then, the entire training set needs to be divided into multiple small pieces, that is, divided into multiple batches for training; one epoch consists of one or more batches. A batch is a part of the training set, and only a part of the data, that is, one batch, is used in each training process. The process of training one batch is one iteration.
[0146] Preferably, the neural network training specifically includes the Perceptron. The Perceptron consists of two layers of neurons. The input layer receives external input signals and then transmits them to the output layer. The output layer is an M-P neuron, and the step function is y j = f(∑ i w i ·x i -θ i ).
[0147] Preferably, given the training dataset, the weights w i (i = 1, 2,..., n) and the training bias θ i can be obtained through learning. θ i can be understood as the weight w corresponding to a fixed value with fixed inputs of -1 and 0 i+1 .
[0148] It should be noted that the step function here does not have the same symbolic meaning as the other formulas in the embodiments. This step function is only for principle explanation and does not participate in the calculation of other formulas.
[0149] Preferably, the number of neural network training times in this embodiment can be set to 10,000 times.
[0150] Preferably, the learning rate for the 1st to 5000th epochs can be set to 0.01, the learning rate for the 5001st to 7500th epochs can be set to 0.001, and the learning rate for the 7501st to 10000th epochs can be set to 0.0001.
[0151] It can be understood that the neural network training in this embodiment mainly includes the following ideas:
[0152] ① Initialize the weights and bias terms in the network.
[0153] Initialize the parameter values (the weights and bias terms of the output units and the weights and bias terms of the hidden units are all parameters of the model) to activate the forward propagation, obtain the output values of each layer of elements, and then obtain the value of the loss function.
[0154] ② Activate the forward propagation to obtain the output values of each layer and the expected values of the loss functions of each layer.
[0155] ③ Calculate the error terms of the output units and the error terms of the hidden units according to the loss function.
[0156] Calculate each error, calculate the gradient of the parameter with respect to the loss function or calculate the partial derivative according to the calculus chain rule. For the partial derivative of a vector or matrix in a composite function, the partial derivative of the inner function of the composite function always chooses left multiplication; for the partial derivative of a scalar in a composite function, the partial derivative of the inner function of the composite function can choose either left multiplication or right multiplication.
[0157] ④ Update the weights and bias terms in the neural network.
[0158] ⑤ Repeat ② to ④ until the loss function is less than the preset bias or the number of iterations is used up, and output the parameters at this time as the current best parameters.
[0159] In this embodiment, a hyperspectral image of all low-carbon buildings is obtained by a greenhouse gas monitoring device at preset time intervals; the color block boundaries in all hyperspectral images are obtained by a boundary extraction algorithm; the RGB values on both sides of all color block boundaries are obtained based on the current hyperspectral image, and the color blocks on the side with a lower R value in the RGB values are deleted, and the remaining image is defined as a greenhouse gas image; the current greenhouse gas image and the previous greenhouse gas image are successively differentiated according to the time process of all preset time intervals, and a differential image is obtained based on two adjacent greenhouse gas images; the color block boundaries in all differential images are obtained by a boundary extraction algorithm and defined as greenhouse gas increment boundaries; the pixel coordinates of all greenhouse gas increment boundaries of the current differential image are obtained based on the resolution of the current differential image; all pixel coordinates of the differential images are learned and trained by a machine learning algorithm, and several future greenhouse gas increment boundaries are predicted based on several preset prediction steps; the linear fitting of the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary in a plane rectangular coordinate system is used to obtain a carbon emission increment function; the derivative of the carbon emission increment function is obtained to obtain a slope change function, which is defined as the carbon emission habit of the low-carbon building. This embodiment utilizes the characteristic that greenhouse gases can be directly detected and obtained by existing detection instruments (such as hyperspectral cameras, imaging spectrometers), starts from the visualized greenhouse gas image directly obtained by the detection instrument for a series of subsequent carbon emission analyses, obtains the greenhouse gas increment at a certain moment by differentiating the images at adjacent moments, and then realizes the prediction function of carbon emissions by machine learning the greenhouse gas increments at each moment. Finally, by constructing a function of the real-time increment and the future increment and taking the derivative, a relevant function for analyzing carbon emissions can be obtained, providing necessary data support for subsequent large-scale carbon emission research and other fields. Moreover, the data acquisition in this embodiment is simple and intuitive, and the calculation process does not involve manual participation, avoiding artificial subjective errors in the results.
[0160] As Figure 2 shown, this embodiment provides an embodiment of a carbon emission analysis device for low-carbon buildings. In this embodiment, the carbon emission analysis device is applied to the carbon emission analysis method in the above-mentioned embodiment.
[0161] Specifically, the carbon emission analysis device includes a hyperspectral image acquisition module 1, a hyperspectral image color block boundary extraction module 2, a greenhouse gas image acquisition module 3, a greenhouse gas image differentiation module 4, a greenhouse gas increment boundary definition module 5, a boundary pixel coordinate acquisition module 6, a future greenhouse gas increment boundary prediction module 7, a carbon emission increment function fitting module 8, and a carbon emission habit definition module 9, which are electrically connected in sequence.
[0162] Among them, the hyperspectral image acquisition module 1 is used to acquire hyperspectral images of all low-carbon buildings at preset time intervals through the greenhouse gas monitoring component; the hyperspectral image color block boundary extraction module 2 is used to obtain the color block boundaries in all hyperspectral images through the boundary extraction algorithm; the greenhouse gas image acquisition module 3 is used to obtain the RGB values on both sides of all color block boundaries based on the current hyperspectral image, and delete the color blocks on the side with a lower R value in the RGB values, and define the remaining image as the greenhouse gas image; the greenhouse gas image difference module 4 is used to sequentially difference the current greenhouse gas image and the previous greenhouse gas image according to the time process of all preset time intervals, and obtain a difference image based on two adjacent greenhouse gas images; the greenhouse gas increment boundary definition module 5 is used to obtain the color block boundaries in all difference images through the boundary extraction algorithm and define them as greenhouse gas increment boundaries; the boundary pixel coordinate acquisition module 6 is used to obtain the pixel coordinates of all greenhouse gas increment boundaries of the current difference image based on the resolution of the current difference image; the future greenhouse gas increment boundary prediction module 7 is used to learn and train the pixel coordinates of all difference images through machine learning, and predict several future greenhouse gas increment boundaries based on several preset prediction steps; the carbon emission increment function fitting module 8 is used to linearly fit the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary in the plane rectangular coordinate system into a carbon emission increment function; the carbon emission habit definition module 9 is used to take the derivative of the carbon emission increment function to obtain a slope change function, and define it as the carbon emission habit of the low-carbon building.
[0163] Furthermore, the carbon emission analysis device further includes a boundary enclosed area acquisition module, an electrical equipment startup duration acquisition module, a variable definition module, a linear regression relationship definition module, and a linear regression relationship solving module that are electrically connected in sequence; the boundary enclosed area acquisition module is electrically connected to the greenhouse gas increment boundary definition module 5.
[0164] Among them, the boundary enclosed area acquisition module is used to respectively obtain the enclosed areas of each greenhouse gas increment boundary, and obtain an enclosed area based on a preset time interval; the electrical equipment startup duration acquisition module is used to obtain the startup duration of each electrical equipment in the low-carbon building based on several preset time intervals; the variable definition module is used to define the enclosed area of the same preset time interval as a dependent variable and the startup durations of all electrical equipment as a set of independent variables; the linear regression relationship definition module is used to define the linear regression relationship between all dependent variables and all independent variables through a multiple linear regression model; the linear regression relationship solving module is used to solve the linear regression relationship and define the solution result as the electricity consumption and carbon emission relationship of the low-carbon building.
[0165] Further, the carbon emission analysis device further includes a power consumption and carbon emission relationship sending module electrically connected to the linear regression relationship solving module, and this module is used to send the power consumption and carbon emission relationship to an external monitoring end.
[0166] Further, the carbon emission analysis device further includes an image sending module and a function sending module that are electrically connected in sequence; the image sending module is electrically connected to the carbon emission habit definition module 9.
[0167] Among them, the image sending module is used to send the hyperspectral image, greenhouse gas image, differential image, and greenhouse gas increment boundary to an external visual monitoring terminal and perform split-screen display. The data sending module is used to send the carbon emission increment function and slope change function to an external coordinate axis display end and perform split-screen display.
[0168] Further, the hyperspectral image color block boundary extraction module 2 specifically includes a first hyperspectral image color block boundary extraction unit, a second hyperspectral image color block boundary extraction unit, a third hyperspectral image color block boundary extraction unit, a fourth hyperspectral image color block boundary extraction unit, a fifth hyperspectral image color block boundary extraction unit, and a sixth hyperspectral image color block boundary extraction unit that are electrically connected in sequence; the first hyperspectral image color block boundary extraction unit is electrically connected to the hyperspectral image acquisition module 1 that is electrically connected in sequence, and the sixth hyperspectral image color block boundary extraction unit is electrically connected to the greenhouse gas image acquisition module 3.
[0169] Among them, the first hyperspectral image color block boundary extraction unit is used to convert each hyperspectral image into a grayscale image respectively through the cv2.cvtColor() function in the OpenCV environment; the second hyperspectral image color block boundary extraction unit is used to obtain all the color block edges of the current grayscale image through the Canny edge detection operator; the third hyperspectral image color block boundary extraction unit is used to define a corrosion structuring element with a preset pixel size; the fourth hyperspectral image color block boundary extraction unit is used to traverse all the color block edges with the center of the corrosion structuring element; the fifth hyperspectral image color block boundary extraction unit is used to delete all the paths traversed by the corrosion structuring element to obtain the corrosion image of the current grayscale image; the sixth hyperspectral image color block boundary extraction unit is used to differentiate the current grayscale image and the current corrosion image to obtain the color block boundary.
[0170] Furthermore, the future greenhouse gas increment boundary prediction module 7 specifically includes a first future greenhouse gas increment boundary prediction unit, a second future greenhouse gas increment boundary prediction unit, a third future greenhouse gas increment boundary prediction unit, a fourth future greenhouse gas increment boundary prediction unit, a fifth future greenhouse gas increment boundary prediction unit, a sixth future greenhouse gas increment boundary prediction unit, a seventh future greenhouse gas increment boundary prediction unit, an eighth future greenhouse gas increment boundary prediction unit, and a ninth future greenhouse gas increment boundary prediction unit that are electrically connected in sequence; the first future greenhouse gas increment boundary prediction unit is electrically connected to the boundary pixel coordinate acquisition module 6, and the ninth future greenhouse gas increment boundary prediction unit is electrically connected to the carbon emission increment function fitting module 8.
[0171] Among them, the first future greenhouse gas increment boundary prediction unit is used to integrate all pixel coordinates of a difference image into a pixel data set; the second future greenhouse gas increment boundary prediction unit is used to perform standard normalization processing on all pixel data sets to obtain a normalized data set based on a pixel data set; the third future greenhouse gas increment boundary prediction unit is used to divide a normalized data set into a training set and a validation set according to a preset ratio; the fourth future greenhouse gas increment boundary prediction unit is used to define a neural network model with signal connections between the input layer, the hidden layer, and the output layer in sequence; the fifth future greenhouse gas increment boundary prediction unit is used to sequentially input all training sets into the input layer and perform several trainings through the neural network model; the sixth future greenhouse gas increment boundary prediction unit is used to respectively obtain the root mean square error of the training results corresponding to the current validation set and the current training set for each training; the seventh future greenhouse gas increment boundary prediction unit is used to obtain the minimum error among all root mean square errors; the eighth future greenhouse gas increment boundary prediction unit is used to obtain the training result corresponding to the minimum error as the future greenhouse gas increment boundary prediction model; the ninth future greenhouse gas increment boundary prediction unit is used to predict several future greenhouse gas increment boundaries based on several preset prediction steps through the future greenhouse gas increment boundary prediction model.
[0172] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For the preferred, extended, limited, exemplified, and principle description parts of this embodiment, please refer to the above embodiment, and this embodiment will not be elaborated here.
[0173] In this embodiment, a hyperspectral image of all low-carbon buildings is obtained at preset time intervals through a greenhouse gas monitoring component; the boundaries of color patches in all hyperspectral images are obtained through a boundary extraction algorithm; the RGB values on both sides of all color patch boundaries are obtained based on the current hyperspectral image, and the color patches on the side with a lower R value in the RGB values are deleted, and the remaining image is defined as a greenhouse gas image; the current greenhouse gas image and the previous greenhouse gas image are successively differentiated according to the time process of all preset time intervals, and a difference image is obtained based on two adjacent greenhouse gas images; the boundaries of color patches in all difference images are obtained through a boundary extraction algorithm and defined as greenhouse gas increment boundaries; the pixel coordinates of all greenhouse gas increment boundaries of the current difference image are obtained based on the resolution of the current difference image; all pixel coordinates of the difference images are learned and trained through a machine learning algorithm, and several future greenhouse gas increment boundaries are predicted based on several preset prediction steps; the linear fitting of the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary in a rectangular coordinate system is a carbon emission increment function; the derivative of the carbon emission increment function is obtained to obtain a slope change function, which is defined as the carbon emission habit of the low-carbon building. This embodiment utilizes the characteristic that greenhouse gases can be directly detected and obtained by existing detection instruments (such as hyperspectral cameras, imaging spectrometers), starts from the visualized image of greenhouse gases directly obtained by the detection instrument for a series of subsequent carbon emission analyses, obtains the greenhouse gas increment at a certain moment by differentiating the images at adjacent moments, then realizes the prediction function of carbon emissions by machine learning the greenhouse gas increments at each moment, and finally constructs a function of the real-time increment and the future increment and takes the derivative to obtain a relevant function for analyzing carbon emissions, providing necessary data support for subsequent large-scale carbon emission research and other fields. Moreover, the data acquisition in this embodiment is simple and intuitive, and the calculation process does not involve manual participation, avoiding artificial subjective errors in the results.
[0174] Figure 3 An embodiment of the electronic device of the present application is shown. Refer to Figure 3 In this embodiment, the electronic device 10 includes a processor 101 and a memory 102 coupled to the processor 101.
[0175] The memory 102 stores program instructions for implementing the carbon emission analysis method of the low-carbon building in any of the above embodiments.
[0176] The processor 101 is configured to execute the program instructions stored in the memory 102 to perform carbon emission analysis of the low-carbon building.
[0177] Among them, the processor 101 can also be referred to as a CPU (Central Processing Unit). The processor 101 may be an integrated circuit chip with signal processing capabilities. The processor 101 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0178] Furthermore, Figure 4 is a schematic structural diagram of a storage medium according to an embodiment of the present application. Refer to Figure 4 , the storage medium 11 of the embodiment of the present application stores program instructions 111 that can implement all of the above methods. Among them, the program instructions 111 can be stored in the above storage medium in the form of a software product, including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes such as USB flash drives, external hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, or terminal devices such as computers, servers, mobile phones, and tablets.
[0179] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling, or communication connection can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in an electrical, mechanical, or other form.
[0180] In addition, in each embodiment of the present application, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. The above is only the implementation manner of the present application and does not limit the patent scope of the present application. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall similarly be included in the patent protection scope of the present application.
[0181] The specific implementation manners of the present application have been described in detail above, but they are only examples, and the present application is not limited to the specific implementation manners described above. For those skilled in the art, any equivalent modification or substitution to the invention is also within the scope of the present application. Therefore, all equal transformations, modifications, improvements, etc. made without departing from the spirit and principle of the present application should be covered within the scope of the present application.
Claims
1. A carbon emission analysis method for a low-carbon building, where there are several low-carbon buildings all located in the high-altitude and cold regions, and greenhouse gas monitoring components are installed in the high-altitude and cold regions facing all the low-carbon buildings, characterized in that, The carbon emission analysis method includes: Step S1: Obtain the hyperspectral images of all low-carbon buildings at preset time intervals through the greenhouse gas detector; Step S2: Obtain the color block boundaries in all hyperspectral images through the boundary extraction algorithm; Step S3: Based on the current hyperspectral image, obtain the RGB values on both sides of all color block boundaries, and delete the color blocks on the side with a lower R value in the RGB values. Define the remaining image as the greenhouse gas image; Step S4: Differentiate the current greenhouse gas image and the previous greenhouse gas image in sequence according to the time process of all preset time intervals, and obtain a differential image based on two adjacent greenhouse gas images; Step S5: Obtain the color block boundaries in all differential images through the boundary extraction algorithm and define them as greenhouse gas increment boundaries; Step S6: Obtain the pixel coordinates of all greenhouse gas increment boundaries in the current differential image based on the resolution of the current differential image; Step S7: Learn and train the pixel coordinates of all differential images through a machine learning algorithm, and predict several future greenhouse gas increment boundaries based on several preset prediction steps; Step S8: Linearly fit the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary in a rectangular coordinate system into a carbon emission increment function; Step S9: Take the derivative of the carbon emission increment function to obtain a slope change function, and define it as the carbon emission habit of the low-carbon building.
2. The carbon emission analysis method according to claim 1, characterized in that Step S5: Obtain the color block boundaries in all differential images through the boundary extraction algorithm and define them as greenhouse gas increment boundaries. After that, it includes: Step S10: Respectively obtain the enclosed area of each greenhouse gas increment boundary, and obtain an enclosed area based on a preset time interval; Step S20: Obtain the opening duration of each electrical device in the low-carbon building based on several preset time intervals; Step S30: Define the enclosed area in the same preset time interval as a dependent variable, and define the opening durations of all electrical devices as a set of independent variables; Step S40: Define the linear regression relationship between all dependent variables and all independent variables through a multiple linear regression model; Step S50: Solve the linear regression relationship and define the solution result as the relationship between electricity consumption and carbon emission of the low-carbon building.
3. The carbon emission analysis method according to claim 2, characterized in that, Step S50: Solve the linear regression relationship and define the solution result as the relationship between electricity consumption and carbon emission of the low-carbon building. After that, it includes: Step S100: Send the relationship between electricity consumption and carbon emission to an external monitoring terminal.
4. The carbon emission analysis method according to claim 1, wherein Step S9: Take the derivative of the carbon emission increment function to obtain a slope change function, and define it as the carbon emission habit of the low-carbon building. After that, it includes: Step S1000: Send the hyperspectral image, the greenhouse gas image, the differential image, and the greenhouse gas increment boundary to an external visual monitoring terminal and display them in split screens; Step S2000: Send the carbon emission increment function and the slope change function to an external coordinate axis display terminal and display them in split screens.
5. The carbon emission analysis method according to claim 1, characterized in that Step S2: Obtain the color block boundaries in all hyperspectral images through the boundary extraction algorithm, including: Step S21: Convert each hyperspectral image into a grayscale image respectively through the cv2.cvtColor() function in the OpenCV environment; Step S22: Obtain all the color patch edges of the current grayscale image through the Canny edge detection operator; Step S23: Define a corrosion structuring element with a preset pixel size; Step S24: Traverse all the color patch edges with the center of the corrosion structuring element; Step S25: Delete all the paths traversed by the corrosion structuring element to obtain the corrosion image of the current grayscale image; Step S26: Differentiate the current grayscale image and the current corrosion image to obtain the color patch boundary; 6. The carbon emission analysis method according to claim 1, wherein Step S7: Learn and train the pixel coordinates of all the differential images through a machine learning algorithm, and predict several future greenhouse gas increment boundaries based on several preset prediction steps, including: Step S71: Integrate all the pixel coordinates of a differential image into a pixel data set; Step S72: Perform standard normalization processing on all the pixel data sets to obtain a normalized data set based on a pixel data set; Step S73: Divide a normalized data set into a training set and a validation set according to a preset ratio; Step S74: Define a neural network model with signal connections in sequence for the input layer, hidden layer, and output layer; Step S75: Input all the training sets into the input layer in sequence and perform several trainings through the neural network model; Step S76: Obtain the root mean square error of the training results corresponding to the current validation set and the current training set respectively based on each training; Step S77: Obtain the minimum error among all the root mean square errors; Step S78: Obtain the training result corresponding to the minimum error as the future greenhouse gas increment boundary prediction model; Step S79: Predict several future greenhouse gas increment boundaries based on several preset prediction steps through the future greenhouse gas increment boundary prediction model; 7. An apparatus for analyzing carbon emissions of a low-carbon building, the carbon emission analysis apparatus being applied to the carbon emission analysis method according to any one of claims 1 to 6, characterized in that, The carbon emission analysis device includes: A hyperspectral image acquisition module, which is used to acquire hyperspectral images of all low-carbon buildings at preset time intervals through the greenhouse gas detection component; A hyperspectral image color patch boundary extraction module, which is used to obtain the color patch boundaries in all hyperspectral images through a boundary extraction algorithm; A greenhouse gas image acquisition module, which is used to obtain the RGB values on both sides of all the color patch boundaries based on the current hyperspectral image, delete the color patches on the side with a lower R value in the RGB values, and define the remaining image as the greenhouse gas image; A greenhouse gas image difference module, which is used to sequentially differentiate the current greenhouse gas image and the previous greenhouse gas image according to the time process of all preset time intervals, and obtain a differential image based on two adjacent greenhouse gas images; A greenhouse gas increment boundary definition module, which is used to obtain the color patch boundaries in all differential images through the boundary extraction algorithm and define them as greenhouse gas increment boundaries; A boundary pixel coordinate acquisition module, which is used to obtain the pixel coordinates of all greenhouse gas increment boundaries of the current differential image based on the resolution of the current differential image; A future greenhouse gas increment boundary prediction module, which is used to learn and train the pixel coordinates of all differential images through machine learning, and predict a number of future greenhouse gas increment boundaries based on a number of preset prediction steps; A carbon emission increment function fitting module, which is used to linearly fit the enclosed area of the greenhouse gas increment boundary and the enclosed area of the future greenhouse gas increment boundary into a carbon emission increment function through a rectangular coordinate system; A carbon emission habit definition module, which is used to derive the slope change function from the carbon emission increment function and define it as the carbon emission habit of the low-carbon building.
8. An electronic device, characterized in that, It includes a processor and a memory coupled to the processor, and the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the carbon emission analysis method according to any one of claims 1 to 6.
9. A storage medium, characterized in that, Program instructions are stored in the storage medium, and when the program instructions are executed by a processor, they can implement the carbon emission analysis method according to any one of claims 1 to 6.