Method, device and equipment for calculating carbon emission of low-carbon building and storage medium

Through machine learning and linear regression analysis, the current balance indicators of low-carbon buildings and the carbon emissions are calculated, which solves the problem of lack of carbon emission calculation in the operation stage of low-carbon buildings and realizes accurate carbon emission calculations.

CN120106351APending Publication Date: 2025-06-06POWER CHINA KUNMING ENG CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510155584.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art has not yet been clarified for the calculation of carbon emissions of low-carbon buildings in the operation stage, and there is a lack of effective calculation methods.

Method used

Provide a method for calculating carbon emissions in low-carbon buildings, obtain photovoltaic power generation through machine learning, analyze power consumption in combination with linear regression, calculate the current balance indicator, and judge carbon emissions through integrals.

Benefits of technology

The accurate calculation of carbon emissions in the operation stage of low-carbon buildings has been achieved, and a reasonable and accurate calculation method is provided, which makes up for the gap in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106351A_ABST
    Figure CN120106351A_ABST
Patent Text Reader

Abstract

The invention discloses a carbon emission calculation method, device and equipment for a low-carbon building and a storage medium, and relates to the technical field of electric digital data processing. According to the method, non-collinear characteristic prediction is carried out through machine learning and linear regression from two lines of power consumption prediction and power generation prediction of a low-carbon building, and a definite integral of future power generation and a definite integral of future power consumption are intuitively embodied at a prediction result through an expression form of a balance index function. And finally, judging whether the last remaining part is redundant or deficient through a mutual offset mode to calculate the carbon emission, if the power generation quantity is redundant, indicating that the low-carbon building is self-produced and self-sold and shows a good sustainable development state, and if the power consumption quantity is redundant, then calculating the carbon emission. The invention provides a reasonable and accurate calculation method with predictive perspectiveness for the carbon emission calculation of the low-carbon building, and makes up for the vacancy of the carbon emission calculation of the low-carbon building in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic digital data processing, and in particular to a method, device, equipment and storage medium for calculating carbon emissions of a low-carbon building. Background Art

[0002] Low-carbon buildings refer to low-carbon buildings that can significantly reduce carbon emissions and energy consumption throughout their entire life cycle (including material production, construction, operation and maintenance) compared to traditional low-carbon buildings.

[0003] Low-carbon buildings usually achieve the goal of energy conservation and emission reduction by adopting energy-saving design, using low-carbon materials and low-carbon construction technology, and implementing low-carbon operation and maintenance management. Specifically, low-carbon buildings may use efficient thermal insulation materials, energy-saving doors and windows, renewable energy utilization systems (such as solar photovoltaic panels, wind power generation devices, etc.), intelligent control systems and other technical means to reduce the energy consumption and carbon emissions of low-carbon buildings.

[0004] In addition, low-carbon buildings will also focus on 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 low-carbon building layout and orientation design, full use can be made of natural light and ventilation, reducing dependence on lighting and air-conditioning systems.

[0005] At present, the calculation of carbon emissions during the operation phase of low-carbon buildings is still blank or in the experimental stage, and there is no clear method for calculating carbon emissions during the operation phase of low-carbon buildings. Summary of the invention

[0006] The main purpose of this application is to provide a method, device, equipment and storage medium for calculating the carbon emissions of low-carbon buildings, so as to solve the problem that the carbon emission calculation of low-carbon buildings in the operation stage is still blank or in the experimental stage in the prior art, and there is no clear method for calculating the carbon emissions of low-carbon buildings in the operation stage.

[0007] In order to achieve the above objectives, this application provides the following technical solutions:

[0008] A method for calculating carbon emissions of a low-carbon building, wherein the low-carbon building has a photovoltaic power generation function, and the method for calculating carbon emissions comprises:

[0009] Step S1, obtaining a number of future photovoltaic power generation amounts of the photovoltaic power generation function based on a number of preset prediction steps through a machine learning machine, wherein one future photovoltaic power generation amount is obtained for one preset prediction step;

[0010] Step S2, analyzing the future total power consumption of the low-carbon building through linear regression;

[0011] Step S3, defining the signs of all future photovoltaic power generation as positive, and defining the signs of all future power generation of all factors as negative;

[0012] Step S4, obtaining the sum of the future photovoltaic power generation and the future power consumption of all factors based on the same preset prediction step number;

[0013] Step S5, defining the sum of the future photovoltaic power generation and the future total power consumption as the power consumption balance index of the low-carbon building;

[0014] Step S6, generating a plane rectangular coordinate system with the natural time process as the horizontal axis and the power value as the vertical axis;

[0015] Step S7, converting all power balance indicators and all corresponding preset prediction steps into coordinate points based on the plane rectangular coordinate system;

[0016] Step S8, linearly fitting all coordinate points to obtain the power balance index function;

[0017] Step S9, determining the sum of positive and negative definite integrals based on the vertical axis of the electricity balance index function, and calculating the carbon emissions according to the absolute value of the sum of positive and negative definite integrals when the sum of positive and negative definite integrals is negative.

[0018] As a further improvement of the present application, in step S1, a plurality of future photovoltaic power generation amounts of the photovoltaic power generation function based on a plurality of preset prediction steps are obtained by a machine learning machine, and a future photovoltaic power generation amount is obtained by a preset prediction step, including:

[0019] Step S11, acquiring a number of historical power generation data of the photovoltaic power generation function based on a number of preset time periods;

[0020] Step S12, performing standard normalization processing on all historical power generation data to obtain a normalized data set;

[0021] Step S13, dividing the normalized data set into a training set and a validation set according to a preset ratio;

[0022] Step S14, defining a neural network model in which the input layer, the hidden layer, and the output layer are sequentially connected;

[0023] Step S15, inputting the training set into the input layer, and performing several trainings through the neural network model;

[0024] Step S16, obtaining a root mean square error between the verification set and the current training result based on each training;

[0025] Step S17, obtaining the minimum value of all root mean square errors;

[0026] Step S18, obtaining a training result corresponding to the minimum value as a power generation prediction model;

[0027] Step S19, predicting a number of future photovoltaic power generation based on a number of preset prediction steps by using the power generation prediction model, wherein a future photovoltaic power generation is obtained by one preset prediction step.

[0028] As a further improvement of the present application, step S2, analyzing the future electricity consumption of all factors of the low-carbon building through linear regression, includes:

[0029] Step S21, obtaining a plurality of start-up durations of each electrical device of the low-carbon building based on a preset time period, and obtaining a set of start-up durations of all electrical devices in one preset time period;

[0030] Step S22, defining a set of opening durations of the current preset time period as a set of independent variables;

[0031] Step S23, defining the total power consumption of the current preset time period as a dependent variable;

[0032] Step S24, defining the linear regression relationship between all dependent variables and all independent variables of all preset time periods through the multivariate linear regression model;

[0033] Step S25, solving all linear regression coefficients of the multivariate linear regression model by least square method;

[0034] Step S26, substituting all the regression coefficients obtained by solving into the multivariate linear regression model to obtain a prediction model;

[0035] Step S27, predicting a total factor future electricity consumption through the multivariate linear regression model based on a preset prediction step number.

[0036] As a further improvement of the present application, step S25, solving all linear regression coefficients of the multivariate linear regression model by least square method, then comprising:

[0037] Step S10, constructing a regression coefficient interval with zero as the interval minimum value and the maximum value of all linear regression coefficients as the interval maximum value;

[0038] Step S20, dividing the regression coefficient interval into a plurality of continuous regression coefficient sub-intervals;

[0039] Step S30, defining a weight value based on each regression coefficient sub-interval, and all weight values ​​increase as the value of the regression coefficient sub-interval increases;

[0040] Step S40, defining a load level that increases accordingly for each weight value in order from small to large based on all weight values;

[0041] Step S50, respectively obtaining the weight value corresponding to each regression coefficient;

[0042] Step S60, calculating the overall weight value based on the weighted average of the weight values ​​corresponding to each regression coefficient;

[0043] Step S70, obtaining the load level corresponding to the overall weight value, that is, the load level of the low-carbon building.

[0044] As a further improvement of the present application, step S9, determining the sum of the positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculating the carbon emissions according to the absolute value of the sum of the positive and negative definite integrals when the sum of the positive and negative definite integrals is negative, includes:

[0045] Step S91, obtaining the positive definite integral of the power balance index function located in the positive direction of the y-axis, and the negative definite integral of the power balance index function located in the negative direction of the y-axis, wherein the sign of the positive definite integral is positive, and the sign of the negative definite integral is negative;

[0046] Step S92, obtaining the sum of the positive definite integral and the negative definite integral;

[0047] Step S93, defining the sum of the positive definite integral and the negative definite integral as the electric quantity difference;

[0048] Step S94, determining whether the sign of the power difference is positive or negative, if it is negative, executing step S95;

[0049] Step S95, obtaining the absolute value of the power difference and multiplying it by a preset carbon emission coefficient to obtain the carbon emission of the low-carbon building based on all preset predicted steps.

[0050] As a further improvement of the present application, step S9, determining the sum of the positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculating the carbon emissions according to the absolute value of the sum of the positive and negative definite integrals when the sum of the positive and negative definite integrals is negative, and then comprising:

[0051] Step S100, sending the electricity balance index function and the carbon emissions to an external visual monitoring terminal.

[0052] In order to achieve the above objectives, this application also provides the following technical solutions:

[0053] A carbon emission calculation device for a low-carbon building, the carbon emission calculation device is applied to the carbon emission calculation method as described above, and the carbon emission calculation device comprises:

[0054] A future photovoltaic power generation prediction module, used for obtaining a number of future photovoltaic power generation of the photovoltaic power generation function based on a number of preset prediction steps through a machine learning machine, where one future photovoltaic power generation is obtained for one preset prediction step;

[0055] A total factor future electricity consumption prediction module, used for analyzing the total factor future electricity consumption of the low-carbon building through linear regression;

[0056] The module for defining the sign of future power generation and consumption is used to define the signs of all future photovoltaic power generation as positive and the signs of all future power generation of all factors as negative;

[0057] A future power generation and consumption sign summing module, used for obtaining the sum of the future photovoltaic power generation and the future power consumption of all factors based on the same preset prediction step number;

[0058] An electricity balance index definition module, used to define the sum of the future photovoltaic power generation and the future electricity consumption of all factors as the electricity balance index of the low-carbon building;

[0059] A plane rectangular coordinate system generation module is used to generate a plane rectangular coordinate system with the natural time process as the horizontal axis and the electric quantity value as the vertical axis;

[0060] An electricity balance index conversion module, used to convert all electricity balance indexes and all corresponding preset prediction steps into coordinate points based on the plane rectangular coordinate system;

[0061] The power balance index function acquisition module is used to linearly fit all coordinate points to obtain the power balance index function;

[0062] The carbon emission calculation module is used to determine the sum of the positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculate the carbon emission according to the absolute value of the sum of the positive and negative definite integrals when the sum of the positive and negative definite integrals is negative.

[0063] In order to achieve the above objectives, this application also provides the following technical solutions:

[0064] An electronic device comprises a processor and a memory coupled to the processor, wherein the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the carbon emission calculation method of a low-carbon building as described above is implemented.

[0065] In order to achieve the above objectives, this application also provides the following technical solutions:

[0066] A storage medium stores program instructions, which, when executed by a processor, can implement the above-mentioned method for calculating carbon emissions of a low-carbon building.

[0067] The present application obtains several future photovoltaic power generation based on several preset prediction steps of the photovoltaic power generation function through a machine learning machine, and obtains one future photovoltaic power generation for one preset prediction step; analyzes the future electricity consumption of all factors of low-carbon buildings through linear regression; defines the signs of all future photovoltaic power generation as positive, and the signs of all future power generation as negative; obtains the sum of future photovoltaic power generation and future electricity consumption of all factors based on the same preset prediction step; defines the sum of future photovoltaic power generation and future electricity consumption of all factors as the electricity balance index of low-carbon buildings; generates a plane rectangular coordinate system with natural time process as the horizontal axis and the value of electricity size as the vertical axis; converts all electricity balance indicators and all corresponding preset prediction steps into coordinate points based on the plane rectangular coordinate system; linearly fits all coordinate points to obtain the electricity balance index function; determines the sum of positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculates carbon emissions according to the absolute value of the sum of positive and negative definite integrals when the sum of positive and negative definite integrals is negative. This application starts from the two lines of electricity consumption prediction and power generation prediction of low-carbon buildings, and predicts non-collinear characteristics through machine learning and linear regression. The definite integral of future power generation and the definite integral of future power consumption are intuitively reflected in the prediction results through the expression of the balance index function. Finally, the carbon emissions are calculated by judging whether the remaining part is redundant or insufficient by offsetting each other. If the power generation is redundant, it means that the low-carbon building produces and sells itself, which is a good sustainable development state. There is no need to calculate the carbon emissions generated by external electricity. If the power consumption is redundant, the carbon emissions are calculated again. This application provides a reasonable, accurate, and predictive calculation method for carbon emissions calculation of low-carbon buildings, which fills the gap in carbon emission calculation for low-carbon buildings in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 A schematic diagram of the process steps of an embodiment of a method for calculating carbon emissions of a low-carbon building of the present application;

[0069] Figure 2 A schematic diagram of functional modules of an embodiment of a device for calculating carbon emissions of low-carbon buildings of the present application;

[0070] Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of the present application;

[0071] Figure 4 This is a schematic diagram of the structure of an embodiment of the storage medium of the present application. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0073] The terms "first", "second" and "third" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second" and "third" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications in the embodiments of the present application (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. 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 also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0074] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0075] like Figure 1 As shown, this embodiment provides an embodiment of a method for calculating carbon emissions of a low-carbon building. In this embodiment, the low-carbon building has a photovoltaic power generation function.

[0076] Preferably, low-carbon buildings refer to low-carbon buildings that can significantly reduce carbon emissions and energy consumption during the entire life cycle of low-carbon buildings (including material production, construction, operation and maintenance, etc.) compared to traditional low-carbon buildings. Low-carbon buildings usually achieve the goal of energy conservation and emission reduction by adopting energy-saving design, using low-carbon materials and low-carbon construction technology, and implementing low-carbon operation and maintenance management. Specifically, low-carbon buildings may adopt technical means such as efficient 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. In addition, low-carbon buildings will also focus on 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 low-carbon building layout and orientation design, natural light and ventilation can be fully utilized to reduce dependence on lighting and air-conditioning systems.

[0077] Specifically, the carbon emissions calculation method includes the following steps:

[0078] Step S1, obtaining a plurality of future photovoltaic power generation amounts based on a plurality of preset prediction steps of the photovoltaic power generation function through a machine learning machine, wherein one preset prediction step number obtains one future photovoltaic power generation amount.

[0079] Preferably, in this embodiment, BP neural network can be selected as the machine learning machine.

[0080] Preferably, the preset prediction step number of this embodiment and the preset time period described below can be set to the same step length, such as one natural hour or one natural day.

[0081] Step S2, analyzing the future total electricity consumption of low-carbon buildings through linear regression.

[0082] Preferably, in this embodiment, LASSO linear regression can be selected as the linear regression analysis.

[0083] Step S3, defining the signs of all future photovoltaic power generation as positive, and defining the signs of all future power generation of all factors as negative.

[0084] Step S4, obtaining the sum of future photovoltaic power generation and future electricity consumption of all factors based on the same preset prediction step number.

[0085] Preferably, a positive sum indicates that the low-carbon building's own power generation can cover its own electricity consumption, achieving the goal of self-production and self-sales.

[0086] Step S5, the sum of future photovoltaic power generation and future electricity consumption of all factors is defined as the electricity balance index of the low-carbon building.

[0087] Step S6, generating a plane rectangular coordinate system with the natural time process as the horizontal axis and the power value as the vertical axis.

[0088] Step S7: convert all power consumption balance indicators and all corresponding preset prediction steps into coordinate points based on a plane rectangular coordinate system.

[0089] Step S8: Linearly fit all coordinate points to obtain the power balance index function.

[0090] Generally speaking, the power balance index function is a function that vibrates along the horizontal axis and has several zero value points.

[0091] Step S9, determining the sum of positive and negative definite integrals based on the vertical axis of the electricity balance index function, and calculating the carbon emissions according to the absolute value of the sum of positive and negative definite integrals when the sum of positive and negative definite integrals is negative.

[0092] Preferably, a definite integral can be intercepted by two adjacent zero value points.

[0093] Further, in step S1, a photovoltaic power generation function is obtained through a machine learning machine based on a plurality of preset prediction steps for a plurality of future photovoltaic power generation, and a preset prediction step is used to obtain a future photovoltaic power generation, including:

[0094] Step S11, obtaining a plurality of historical power generation data of the photovoltaic power generation function based on a plurality of preset time periods.

[0095] Preferably, the historical power generation data can be directly queried and obtained.

[0096] Step S12: performing standard normalization processing on all historical power generation data to obtain a normalized data set.

[0097] Preferably, this embodiment prefers the normalization method of zero-mean normalization (Z-score normalization), which gives the mean and standard deviation of the original data to standardize the 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, this embodiment can also use batch normalization. Compared with simple normalization, in the previous neural network training, only the input layer data is normalized, but not normalized in the middle layer. Although the data set of the input node is normalized, the data distribution of the input data after matrix multiplication is likely to change greatly, and as the number of hidden layer network layers continues to deepen, the change in data distribution will become greater and greater. Therefore, the normalization processing performed by batch normalization in the middle layer of the neural network makes the training effect better.

[0098] Step S13, dividing the normalized data set into a training set and a validation set according to a preset ratio.

[0099] Preferably, the preset ratio can be set to 8:2, so as to divide the normalized data set into a training set and a sample set in a ratio of 8:2.

[0100] Step S14, defining a neural network model in which the input layer, the hidden layer, and the output layer are sequentially signal-connected.

[0101] Preferably, the neural network model is characterized by the following formula:

[0102]

[0103] Among them, y is the neural network model; x n is the nth input node of the input layer, each input node corresponds to a normalized data set 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 of the nth input node connected to the hidden layer; is the bias of the output layer; tansig(·) is the activation function; the numbers in the brackets of the symbol subscripts are the number of layers, the subscript (1) is the first layer, that is, the input layer, and the subscript (1, 2) is the first layer to the second layer, that is, the input layer to the hidden layer.

[0104] It should be noted that the above formulas and formula symbols are only used to illustrate the principles, and their meanings are not interchangeable with those in other locations.

[0105] Step S15, input the training set to the input layer, and perform several trainings through the neural network model.

[0106] Step S16, based on each training, obtain the root mean square error between the verification set and the current training result.

[0107] Step S17, obtaining the minimum value of all root mean square errors.

[0108] Step S18, obtaining the training result corresponding to the minimum value as a power generation prediction model.

[0109] Step S19, predicting a number of future photovoltaic power generation based on a number of preset prediction steps through the power generation prediction model, and obtaining a future photovoltaic power generation for each preset prediction step.

[0110] Preferably, the training model training a neural network usually requires providing a large amount of data, namely a data set; the data set is generally divided into three categories, namely the above-mentioned training set (training set), validation set (validation set) and test set (test set).

[0111] Among them, one epoch is the process of training once with all the samples in the training set. The so-called training once refers to one forward pass and one back pass. When the number of samples in an epoch (i.e., training set) is too large, training once may consume too much time, and it is not necessary to use all the data in the training set for each training. In this case, the entire training set needs to be divided into multiple small blocks, that is, divided into multiple batches for training. An epoch consists of one or more batches, where a batch is a part of the training set. Each training process only uses a part of the data, i.e., a batch. The process of training a batch is an iteration.

[0112] Preferably, the neural network training specifically includes a perceptron, which is composed of two layers of neurons. The input layer receives external input signals and transmits them to the output layer. The output layer is MP neurons, and the step function is y j =f(∑ i w i ·x i -θ i ), the step function here is for principle explanation and is not interchangeable with other symbols.

[0113] Preferably, given a training data set, the weight w i (i=1,2,...,n) and training bias θ i It can be obtained through learning, θ i It can be understood as a weight w corresponding to a fixed value of -1,0. i+1 .

[0114] Preferably, in this embodiment, the number of neural network training times can be set to 10,000 times.

[0115] Preferably, the learning rate from the 1st to the 5000th epoch can be set to 0.01, the learning rate from the 5001st to the 7500th epoch can be set to 0.001, and the learning rate from the 7501st to the 10000th epoch can be set to 0.0001.

[0116] It can be understood that the neural network training of this embodiment mainly includes the following ideas:

[0117] ① Initialize the weights and bias items in the network.

[0118] Initializing parameter values ​​(output unit weights, bias terms and hidden unit weights, bias terms are all model parameters) is to activate forward propagation, obtain the output value of each layer element, and then obtain the value of the loss function.

[0119] ②Activate forward propagation to obtain the output value of each layer and the expected value of the loss function of each layer.

[0120] ③According to the loss function, calculate the error term of the output unit and the error term of the hidden unit.

[0121] Calculate various errors, calculate the gradient of the parameters with respect to the loss function, or calculate partial derivatives according to the chain rule of calculus. For partial derivatives of vectors or matrices in a composite function, the partial derivative of the function inside the composite function is always multiplied on the left; for partial derivatives of scalars in a composite function, the partial derivative of the function inside the composite function can be multiplied on the left or on the right.

[0122] ④Update the weights and bias items in the neural network.

[0123] ⑤ Repeat ② to ④ until the loss function is less than the preset bias or the number of iterations is used up, and the parameters output at this time are the current optimal parameters.

[0124] Furthermore, in step S2, the future electricity consumption of all factors of low-carbon buildings is analyzed by linear regression, including:

[0125] Step S21, obtaining a plurality of start-up durations of each electrical device of the low-carbon building based on a preset time period, and obtaining a set of start-up durations of all electrical devices in one preset time period.

[0126] Step S22, defining a set of opening durations of the current preset time period as a set of independent variables.

[0127] Step S23, defining the total power consumption of the current preset time period as a dependent variable.

[0128] Preferably, both the dependent variable and the independent variable can be normalized.

[0129] Step S24, defining the linear regression relationship between all dependent variables and all independent variables of all preset time periods through a multiple linear regression model.

[0130] Preferably, the multiple linear regression model is as follows:

[0131]

[0132] Among them, y i is the dependent variable of the i-th preset time period, n is the total number of all preset time periods, β 0 is the intercept of the linear regression relationship, β j is the linear regression coefficient of the jth independent variable, m is the total number of independent variables in a group of independent variables, x j,iis the jth independent variable of the ith preset time period, and δ is the random error of the linear regression relationship.

[0133] Step S25, solving all linear regression coefficients of the multivariate linear regression model by least square method.

[0134] Preferably, the least squares method is as follows:

[0135]

[0136] in, β j The estimated value of , j = 1, 2, ..., m, X is the matrix of all independent variables, X T is the transposed matrix of matrix X.

[0137] It should be noted that the above formulas and formula symbols are only used to illustrate the principles, and their meanings are not interchangeable with the meanings of symbols in other locations.

[0138] Step S26, substituting all the regression coefficients obtained by solving into the multivariate linear regression model to obtain a prediction model.

[0139] Preferably, the residual square of linear regression can be used to judge the fitting effect of the model by comparing its size. The residual sum of squares (RSS) is the sum of squares of the difference between the actual observed value and the value predicted by the regression equation, which is used to quantify the difference between the model predicted value and the actual value.

[0140] Preferably, the judgment criterion of the residual square is that the smaller the better, that is, the smaller the residual square sum is, the closer the model's predicted value is to the actual observed value, and the better the model fitting effect is; conversely, if the residual square sum is large, it indicates that there is a large deviation between the model's predicted value and the actual observed value, and the model fitting effect is poor.

[0141] Preferably, Multiple Linear Regression is a statistical method used to study the linear relationship between a dependent variable and multiple independent variables.

[0142] The basic principle and basic calculation process of multiple linear regression are similar to those of univariate linear regression, but due to the large number of independent variables, the calculation is relatively complex and usually requires the help 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 size and direction of these impacts.

[0143] When building a multiple linear regression model, you need to pay attention to the following points:

[0144] Selection of independent variables: The independent variables must have a significant impact on the dependent variable and be closely linearly correlated. At the same time, the independent variables should have a certain degree of mutual exclusivity, that is, the correlation between the independent variables should not be higher than the correlation between the independent variables and the dependent variable.

[0145] Model testing and evaluation: After building the model, it is necessary to conduct a significance test on the model as a whole to determine whether the model is effective. Furthermore, it is also necessary to conduct a significance test on the regression coefficients of each variable and use indicators such as R-square or adjusted R-square to evaluate the goodness of fit of the model.

[0146] 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 effect 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 the model is considered significant, that is, at least one independent variable has a statistically significant effect on the dependent variable; conversely, if the p value is greater than 0.05, the null hypothesis is not rejected and the model is considered insignificant.

[0147] Preferably, if you want to further determine which independent variables' regression coefficients are significant based on the overall significance of the regression equation, you need to perform a t-test. 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 effect on the dependent variable. If the t-test p value of the regression coefficient is less than a certain significance level (such as 0.05), the regression coefficient is considered significant.

[0148] 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 measured by the coefficient of determination R 2 or the adjusted R 2 To evaluate. 2 If it is close to 1, it means that the regression model has a good fit and can better explain the variation of the dependent variable; R 2 If it is close to 0, it means that the regression model has poor goodness of fit and its explanatory power for the dependent variable is weak.

[0149] Step S27, predicting the future electricity consumption of all factors through a multivariate linear regression model based on a preset prediction step number.

[0150] Further, step S25, all linear regression coefficients of the multivariate linear regression model are solved by the least square method, and then, the following steps are included:

[0151] Step S10, constructing a regression coefficient interval with zero as the interval minimum value and the maximum value of all linear regression coefficients as the interval maximum value.

[0152] Step S20: divide the regression coefficient interval into a number of continuous regression coefficient sub-intervals.

[0153] Step S30: defining a weight value based on each regression coefficient sub-interval, and all weight values ​​increase as the value of the regression coefficient sub-interval increases.

[0154] Step S40, defining a load level that increases accordingly for each weight value in order from small to large based on all weight values.

[0155] Step S50, respectively obtaining the weight value corresponding to each regression coefficient.

[0156] Step S60, calculating the overall weight value based on the weighted average of the weight values ​​corresponding to each regression coefficient.

[0157] Step S70, obtaining the load level corresponding to the overall weight value, which is the load level of the low-carbon building.

[0158] Preferably, the design intention of step S10 to step S70 is to analyze the load level of the low-carbon building through the regression coefficient to quantify the operation habits of the low-carbon building.

[0159] Further, step S9, determining the sum of positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculating the carbon emissions according to the absolute value of the sum of positive and negative definite integrals when the sum of positive and negative definite integrals is negative, includes:

[0160] Step S91, obtaining the positive definite integral of the power balance index function located on the positive direction of the y-axis, and the negative definite integral of the power balance index function located on the negative direction of the y-axis, the sign of the positive definite integral is positive, and the sign of the negative definite integral is negative.

[0161] Step S92, obtaining the sum of the positive definite integral and the negative definite integral.

[0162] Step S93, defining the sum of the positive definite integral and the negative definite integral as the electric quantity difference.

[0163] Step S94, determine whether the sign of the power difference is positive or negative, if it is negative, execute step S95.

[0164] Preferably, if it is positive, it means that the low-carbon building is self-produced and self-sold.

[0165] Step S95, obtaining the absolute value of the power difference and multiplying it by a preset carbon emission coefficient to obtain the carbon emission of the low-carbon building based on all preset predicted steps.

[0166] Among them, AD is the amount of production or consumption activities that lead to greenhouse gas emissions, such as the consumption of each fossil fuel, the consumption of limestone raw materials, the net amount of electricity purchased, the net amount of steam purchased, etc. EF is the coefficient corresponding to the activity level data, including the carbon content per unit calorific value or elemental carbon content, oxidation rate, etc., which characterizes the greenhouse gas emission coefficient per unit of production or consumption activity. EF can be directly based on known data (i.e. default values) provided by the IPCC (Intergovernmental Panel on Climate Change), the U.S. Environmental Protection Agency, the European Environment Agency, etc., or it can be determined based on representative measurement data.

[0167] The emission factor method is suitable for most enterprises with relatively simple energy consumption structures and relatively standardized production processes. For example, some small manufacturing enterprises, whose main energy consumption is electricity and coal, and whose production processes do not change much, can calculate carbon emissions more conveniently using the emission factor method. The advantage of this method is that the calculation process is relatively simple and the required data is easy to obtain. Enterprises only need to master their own energy consumption data and query the corresponding emission factors to perform calculations. However, its disadvantage is that its accuracy is relatively limited, because emission factors are usually determined based on the industry average and may not accurately reflect the actual emissions of individual enterprises.

[0168] Preferably, carbon emissions can also be calculated by the mass balance method, which is very commonly used in industrial production processes, and is particularly suitable for calculating carbon emissions in complex processes such as petrochemicals or chemicals. The basic idea of ​​this method is to determine carbon emissions by measuring and calculating the difference between the amount of carbon input and the amount of carbon output during the production process. The specific calculation formula is: Carbon dioxide (CO2) emissions = (raw material input × raw material carbon content - product output × product carbon content - waste output × waste carbon content) × 44 / 12. Among them, "44 / 12" is the conversion coefficient of carbon to carbon dioxide.

[0169] In practical applications, in order to improve the accuracy of carbon emission calculations, the following points should be noted:

[0170] Ensure the accuracy of activity data: Activity data is the basis for calculating carbon emissions, and its accuracy and completeness directly affect the reliability of the calculation results. Therefore, when collecting activity data, accurate and reliable measurement methods and means should be used as much as possible.

[0171] Select appropriate emission factors: Emission factors are key parameters that describe the amount of greenhouse gases produced per unit of activity data. When selecting emission factors, the specific conditions and characteristics of the emission sources, such as technical conditions, operating methods, equipment conditions, etc., should be fully considered to ensure the accuracy of the calculation results.

[0172] Considering global warming potential (GWP): For some non-CO2 greenhouse gases, such as methane and nitrous oxide, their global warming potential (GWP) needs to be considered, that is, their contribution to the greenhouse effect of the earth. When calculating the carbon emissions of these gases, they need to be converted into equivalent CO2 emissions.

[0173] Alternatively, if you have done some back-of-the-envelope calculations to get an approximate value, you can simply multiply it by 0.785.

[0174] Further, step S9, determining the sum of positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculating the carbon emissions according to the absolute value of the sum of positive and negative definite integrals when the sum of positive and negative definite integrals is negative, and then comprising:

[0175] Step S100: sending the electricity balance index function and carbon emissions to an external visual monitoring terminal.

[0176] Preferably, the visualized digital model of the low-carbon building can also be output to an external visualized monitoring terminal.

[0177] Preferably, the visualized digital model can be implemented through digital twin technology, which can be implemented using a variety of software, such as apriori, SAP Leonardo IoT, Predix, Ansys Twin Builder, NetObjex, Knowledge Lens' iLens, Cohesion, Akselos, IOTIFY, and Autodesk Forge.

[0178] In this embodiment, a photovoltaic power generation function obtains several future photovoltaic power generation amounts based on several preset prediction steps through a machine learning machine, and one preset prediction step obtains one future photovoltaic power generation amount; the total future electricity consumption of low-carbon buildings is analyzed through linear regression; the signs of all future photovoltaic power generation amounts are defined as positive, and the signs of all future power generation amounts are defined as negative; the sum of future photovoltaic power generation amounts and total future electricity consumption amounts is obtained based on the same preset prediction step number; the sum of future photovoltaic power generation amounts and total future electricity consumption amounts is defined as the electricity balance index of low-carbon buildings; a plane rectangular coordinate system is generated with the natural time process as the horizontal axis and the electricity quantity value as the vertical axis; all electricity balance indicators and all corresponding preset prediction steps are converted into coordinate points based on the plane rectangular coordinate system; all coordinate points are linearly fitted to obtain the electricity balance index function; the sum of positive and negative definite integrals of the electricity balance index function based on the vertical axis is determined, and when the sum of the positive and negative definite integrals is negative, the carbon emissions are calculated according to the absolute value of the sum of the positive and negative definite integrals. This embodiment starts from the two lines of electricity consumption prediction and power generation prediction of low-carbon buildings, and predicts non-collinear characteristics through machine learning and linear regression. The definite integral of future power generation and the definite integral of future power consumption are intuitively reflected in the prediction results through the expression of the balance index function. Finally, the carbon emissions are calculated by judging whether the remaining part is redundant or insufficient by offsetting each other. If the power generation is redundant, it means that the low-carbon building produces and sells itself, which is a good sustainable development state. There is no need to calculate the carbon emissions generated by external electricity. If the power consumption is redundant, the carbon emissions are calculated again. This embodiment provides a reasonable, accurate, and predictive calculation method for carbon emissions calculation of low-carbon buildings, which fills the gap in carbon emission calculation for low-carbon buildings in the prior art.

[0179] like Figure 1 As shown, this embodiment provides an embodiment of a carbon emission calculation device for a low-carbon building. In this embodiment, the carbon emission calculation device is applied to the carbon emission calculation method in the above embodiment.

[0180] Preferably, the carbon emission calculation device includes a future photovoltaic power generation prediction module 1, a full-factor future power consumption prediction module 2, a future power generation and consumption symbol definition module 3, a future power generation and consumption symbol addition module 4, a power balance index definition module 5, a plane rectangular coordinate system generation module 6, a power balance index conversion module 7, a power balance index function acquisition module 8, and a carbon emission calculation module 9, which are electrically connected in sequence.

[0181] Among them, the future photovoltaic power generation prediction module 1 is used to obtain several future photovoltaic power generation based on several preset prediction steps of the photovoltaic power generation function through a machine learning machine, and one preset prediction step obtains a future photovoltaic power generation; the total factor future electricity consumption prediction module 2 is used to analyze the total factor future electricity consumption of low-carbon buildings through linear regression; the future power generation and consumption symbol definition module 3 is used to define the signs of all future photovoltaic power generation as positive and the signs of all future total factor power generation as negative; the future power generation and consumption sign addition module 4 is used to obtain the sum of future photovoltaic power generation and total factor future electricity consumption based on the same preset prediction step; the power balance index definition module 5 is used to define the future photovoltaic power generation The sum of the electricity consumption and the future electricity consumption of all factors will be defined as the electricity balance index of the low-carbon building; the plane rectangular coordinate system generation module 6 is used to generate a plane rectangular coordinate system with the natural time process as the horizontal axis and the electricity value as the vertical axis; the electricity balance index conversion module 7 is used to convert all electricity balance indicators and all corresponding preset prediction steps into coordinate points based on the plane rectangular coordinate system; the electricity balance index function acquisition module 8 is used to linearly fit all coordinate points to obtain the electricity balance index function; the carbon emissions calculation module 9 is used to determine the sum of the positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculate the carbon emissions according to the absolute value of the sum of the positive and negative definite integrals when the sum of the positive and negative definite integrals is negative.

[0182] Furthermore, the future photovoltaic power generation prediction module 1 specifically includes a first future photovoltaic power generation prediction sub-module, a second future photovoltaic power generation prediction sub-module, a third future photovoltaic power generation prediction sub-module, a fourth future photovoltaic power generation prediction sub-module, a fifth future photovoltaic power generation prediction sub-module, a sixth future photovoltaic power generation prediction sub-module, a seventh future photovoltaic power generation prediction sub-module, an eighth future photovoltaic power generation prediction sub-module, and a ninth future photovoltaic power generation prediction sub-module, which are electrically connected in sequence; the ninth future photovoltaic power generation prediction sub-module is electrically connected to the full-factor future electricity consumption prediction module 2.

[0183] Among them, the first future photovoltaic power generation prediction submodule is used to obtain several historical power generation data of the photovoltaic power generation function based on several preset time periods; the second future photovoltaic power generation prediction submodule is used to perform standard normalization processing on all historical power generation data to obtain a normalized data set; the third future photovoltaic power generation prediction submodule is used to divide the normalized data set into a training set and a verification set according to a preset ratio; the fourth future photovoltaic power generation prediction submodule is used to define a neural network model in which the input layer, the hidden layer, and the output layer are connected in sequence; the fifth future photovoltaic power generation prediction submodule is used to input the training set into the input layer and perform several trainings through the neural network model; the sixth future photovoltaic power generation prediction submodule is used to obtain the root mean square error between the verification set and the current training result based on each training; the seventh future photovoltaic power generation prediction submodule is used to obtain the minimum value of all root mean square errors; the eighth future photovoltaic power generation prediction submodule is used to obtain the training result corresponding to the minimum value as a power generation prediction model; the ninth future photovoltaic power generation prediction submodule is used to predict several future photovoltaic power generation based on several preset prediction steps through the power generation prediction model, and one future photovoltaic power generation is obtained for one preset prediction step.

[0184] Furthermore, the full-factor future electricity consumption prediction module 2 specifically includes a first full-factor future electricity consumption prediction sub-module, a second full-factor future electricity consumption prediction sub-module, a third full-factor future electricity consumption prediction sub-module, a fourth full-factor future electricity consumption prediction sub-module, a fifth full-factor future electricity consumption prediction sub-module, a sixth full-factor future electricity consumption prediction sub-module, and a seventh full-factor future electricity consumption prediction sub-module, which are electrically connected in sequence; the first full-factor future electricity consumption prediction sub-module is electrically connected to the ninth future photovoltaic power generation prediction sub-module, and the seventh full-factor future electricity consumption prediction sub-module is electrically connected to the future power generation and consumption symbol definition module 3.

[0185] Among them, the first full-factor future electricity consumption prediction submodule is used to obtain several start-up time durations of each electrical equipment in a low-carbon building based on a preset time period, and a set of start-up time durations of all electrical equipment are obtained in one preset time period; the second full-factor future electricity consumption prediction submodule is used to define a set of start-up time durations of the current preset time period as a set of independent variables; the third full-factor future electricity consumption prediction submodule is used to define the total factor electricity consumption of the current preset time period as a dependent variable; the fourth full-factor future electricity consumption prediction submodule is used to define the linear regression relationship between all dependent variables and all independent variables of all preset time periods through a multivariate linear regression model; the fifth full-factor future electricity consumption prediction submodule is used to solve all linear regression coefficients of the multivariate linear regression model through the least squares method; the sixth full-factor future electricity consumption prediction submodule is used to substitute all the regression coefficients obtained by the solution into the multivariate linear regression model to obtain a prediction model; the seventh full-factor future electricity consumption prediction submodule is used to predict a total factor future electricity consumption through a multivariate linear regression model based on a preset prediction step number.

[0186] Furthermore, the carbon emission calculation device also includes a regression coefficient interval construction module, a regression coefficient interval equal division module, a weight value definition module, a load level definition module, a regression coefficient weight value acquisition module, an overall weight value calculation module, and a building load level acquisition module, which are electrically connected in sequence; the regression coefficient interval construction module is electrically connected to the fifth all-factor future electricity consumption prediction submodule.

[0187] Among them, the regression coefficient interval construction module is used to construct the regression coefficient interval with zero as the minimum value of the interval and the maximum value of all linear regression coefficients as the maximum value of the interval; the regression coefficient interval equal division module is used to divide the regression coefficient interval into several continuous regression coefficient sub-intervals; the weight value definition module is used to define a weight value based on each regression coefficient sub-interval, and all weight values ​​increase as the numerical value of the regression coefficient sub-interval increases; the load level definition module is used to define the increasing load level for each weight value in sequence from small to large based on all weight values; the regression coefficient weight value acquisition module is used to obtain the weight value corresponding to each regression coefficient respectively; the overall weight value calculation module is used to calculate the overall weight value based on the weighted average of the weight values ​​corresponding to each regression coefficient; the low-carbon building load level acquisition module is used to obtain the load level corresponding to the overall weight value, which is the load level of the low-carbon building.

[0188] Furthermore, the carbon emission calculation module 9 specifically includes a first carbon emission calculation submodule, a second carbon emission calculation submodule, a third carbon emission calculation submodule, a fourth carbon emission calculation submodule, and a fifth carbon emission calculation submodule which are electrically connected in sequence; the first carbon emission calculation submodule is electrically connected to the electricity balance index function acquisition module 8.

[0189] Among them, the first carbon emission calculation submodule is used to obtain the positive definite integral of the electricity balance index function located in the positive direction of the y-axis, and the negative definite integral of the electricity balance index function located in the negative direction of the y-axis, the sign of the positive definite integral is positive, and the sign of the negative definite integral is negative; the second carbon emission calculation submodule is used to obtain the sum of the positive definite integral and the negative definite integral; the third carbon emission calculation submodule is used to define the sum of the positive definite integral and the negative definite integral as the electricity difference; the fourth carbon emission calculation submodule is used to determine whether the sign of the electricity difference is positive or negative; the fifth carbon emission calculation submodule is used to obtain the absolute value of the electricity difference and multiply it by the preset carbon emission coefficient if it is negative, to obtain the carbon emissions of the low-carbon building based on all preset prediction steps.

[0190] Furthermore, the carbon emission calculation device also includes a data sending module electrically connected to the fifth carbon emission calculation submodule, and the module is used to send the power balance index function and the carbon emission to an external visual monitoring terminal.

[0191] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. The optimization, expansion, limitation, example, and principle description of this embodiment can be referred to the above embodiment, and this embodiment will not be repeated.

[0192] In this embodiment, a photovoltaic power generation function obtains several future photovoltaic power generation amounts based on several preset prediction steps through a machine learning machine, and one preset prediction step obtains one future photovoltaic power generation amount; the total future electricity consumption of low-carbon buildings is analyzed through linear regression; the signs of all future photovoltaic power generation amounts are defined as positive, and the signs of all future power generation amounts are defined as negative; the sum of future photovoltaic power generation amounts and total future electricity consumption amounts is obtained based on the same preset prediction step number; the sum of future photovoltaic power generation amounts and total future electricity consumption amounts is defined as the electricity balance index of low-carbon buildings; a plane rectangular coordinate system is generated with the natural time process as the horizontal axis and the electricity quantity value as the vertical axis; all electricity balance indicators and all corresponding preset prediction steps are converted into coordinate points based on the plane rectangular coordinate system; all coordinate points are linearly fitted to obtain the electricity balance index function; the sum of positive and negative definite integrals of the electricity balance index function based on the vertical axis is determined, and when the sum of the positive and negative definite integrals is negative, the carbon emissions are calculated according to the absolute value of the sum of the positive and negative definite integrals. This embodiment starts from the two lines of electricity consumption prediction and power generation prediction of low-carbon buildings, and predicts non-collinear characteristics through machine learning and linear regression. The definite integral of future power generation and the definite integral of future power consumption are intuitively reflected in the prediction results through the expression of the balance index function. Finally, the carbon emissions are calculated by judging whether the remaining part is redundant or insufficient by offsetting each other. If the power generation is redundant, it means that the low-carbon building produces and sells itself, which is a good sustainable development state. There is no need to calculate the carbon emissions generated by external electricity. If the power consumption is redundant, the carbon emissions are calculated again. This embodiment provides a reasonable, accurate, and predictive calculation method for carbon emissions calculation of low-carbon buildings, which fills the gap in carbon emission calculation for low-carbon buildings in the prior art.

[0193] Figure 3 An embodiment of the electronic device of the present application is shown, see Figure 3 The electronic device 10 includes a processor 101 and a memory 102 coupled to the processor 101 .

[0194] The memory 102 stores program instructions for implementing the carbon emission calculation method for a low-carbon building according to any of the above embodiments.

[0195] The processor 101 is used to execute the program instructions stored in the memory 102 to calculate the carbon emissions of the low-carbon building.

[0196] The processor 101 may also be referred to as a CPU (Central Processing Unit). The processor 101 may be an integrated circuit chip having signal processing capabilities. The processor 101 may 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 may be a microprocessor or the processor may also be any conventional processor, etc.

[0197] Further, Figure 4 This is a schematic diagram of the structure of a storage medium according to an embodiment of the present application. Figure 4 The storage medium 11 of the embodiment of the present application stores program instructions 111 that can implement all the above methods, wherein the program instructions 111 can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.

[0198] In the several embodiments provided in 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 only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0199] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.

[0200] The specific implementation methods of the present application are described in detail above, but they are only examples, and the present application is not limited to the specific implementation methods described above. For those skilled in the art, any equivalent modification or substitution of the invention is also within the scope of the present application, and therefore, the equalization, modification, and improvement made without departing from the spirit and principle of the present application should be included in the scope of the present application.

Claims

1. A method for calculating carbon emissions of a low-carbon building, wherein the low-carbon building has a photovoltaic power generation function, characterized in that: The carbon emissions calculation method includes: Step S1, obtaining a number of future photovoltaic power generation amounts of the photovoltaic power generation function based on a number of preset prediction steps through a machine learning machine, wherein one future photovoltaic power generation amount is obtained for one preset prediction step; Step S2, analyzing the future total power consumption of the low-carbon building through linear regression; Step S3, defining the signs of all future photovoltaic power generation as positive, and defining the signs of all future power generation of all factors as negative; Step S4, obtaining the sum of the future photovoltaic power generation and the future power consumption of all factors based on the same preset prediction step number; Step S5, defining the sum of the future photovoltaic power generation and the future total power consumption as the power consumption balance index of the low-carbon building; Step S6, generating a plane rectangular coordinate system with the natural time process as the horizontal axis and the power value as the vertical axis; Step S7, converting all power balance indicators and all corresponding preset prediction steps into coordinate points based on the plane rectangular coordinate system; Step S8, linearly fitting all coordinate points to obtain the power balance index function; Step S9, determining the sum of positive and negative definite integrals based on the vertical axis of the electricity balance index function, and calculating the carbon emissions according to the absolute value of the sum of positive and negative definite integrals when the sum of positive and negative definite integrals is negative.

2. The carbon emission calculation method according to claim 1, characterized in that: Step S1, obtaining a plurality of future photovoltaic power generation amounts of the photovoltaic power generation function based on a plurality of preset prediction steps through a machine learning machine, wherein a preset prediction step number is used to obtain a future photovoltaic power generation amount, including: Step S11, acquiring a number of historical power generation data of the photovoltaic power generation function based on a number of preset time periods; Step S12, performing standard normalization processing on all historical power generation data to obtain a normalized data set; Step S13, dividing the normalized data set into a training set and a validation set according to a preset ratio; Step S14, defining a neural network model in which the input layer, the hidden layer, and the output layer are sequentially connected; Step S15, inputting the training set into the input layer, and performing several trainings through the neural network model; Step S16, obtaining a root mean square error between the verification set and the current training result based on each training; Step S17, obtaining the minimum value of all root mean square errors; Step S18, obtaining a training result corresponding to the minimum value as a power generation prediction model; Step S19, predicting a number of future photovoltaic power generation based on a number of preset prediction steps by using the power generation prediction model, wherein a future photovoltaic power generation is obtained by one preset prediction step.

3. The carbon emission calculation method according to claim 1, characterized in that: Step S2, analyzing the future electricity consumption of all factors of the low-carbon building through linear regression, including: Step S21, obtaining a plurality of start-up durations of each electrical device of the low-carbon building based on a preset time period, and obtaining a set of start-up durations of all electrical devices in one preset time period; Step S22, defining a set of opening durations of the current preset time period as a set of independent variables; Step S23, defining the total power consumption of the current preset time period as a dependent variable; Step S24, defining the linear regression relationship between all dependent variables and all independent variables of all preset time periods through the multivariate linear regression model; Step S25, solving all linear regression coefficients of the multivariate linear regression model by least square method; Step S26, substituting all the regression coefficients obtained by solving into the multivariate linear regression model to obtain a prediction model; Step S27, predicting a total factor future electricity consumption through the multivariate linear regression model based on a preset prediction step number.

4. The carbon emission calculation method according to claim 1, characterized in that: Step S25, solving all linear regression coefficients of the multivariate linear regression model by least square method, then comprising: Step S10, constructing a regression coefficient interval with zero as the interval minimum value and the maximum value of all linear regression coefficients as the interval maximum value; Step S20, dividing the regression coefficient interval into a plurality of continuous regression coefficient sub-intervals; Step S30, defining a weight value based on each regression coefficient sub-interval, and all weight values ​​increase as the value of the regression coefficient sub-interval increases; Step S40, defining a load level that increases accordingly for each weight value in order from small to large based on all weight values; Step S50, respectively obtaining the weight value corresponding to each regression coefficient; Step S60, calculating the overall weight value based on the weighted average of the weight values ​​corresponding to each regression coefficient; Step S70, obtaining the load level corresponding to the overall weight value, that is, the load level of the low-carbon building.

5. The carbon emission calculation method according to claim 1, characterized in that: Step S9, determining the sum of the positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculating the carbon emissions according to the absolute value of the sum of the positive and negative definite integrals when the sum of the positive and negative definite integrals is negative, including: Step S91, obtaining the positive definite integral of the power balance index function located in the positive direction of the y-axis, and the negative definite integral of the power balance index function located in the negative direction of the y-axis, wherein the sign of the positive definite integral is positive, and the sign of the negative definite integral is negative; Step S92, obtaining the sum of the positive definite integral and the negative definite integral; Step S93, defining the sum of the positive definite integral and the negative definite integral as the electric quantity difference; Step S94, determining whether the sign of the power difference is positive or negative, if it is negative, executing step S95; Step S95, obtaining the absolute value of the power difference and multiplying it by a preset carbon emission coefficient to obtain the carbon emission of the low-carbon building based on all preset predicted steps.

6. The carbon emission calculation method according to claim 1, characterized in that: Step S9, determining the sum of the positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculating the carbon emissions according to the absolute value of the sum of the positive and negative definite integrals when the sum of the positive and negative definite integrals is negative, and then comprising: Step S100, sending the electricity balance index function and the carbon emissions to an external visual monitoring terminal.

7. A carbon emission calculation device for a low-carbon building, the carbon emission calculation device being applied to the carbon emission calculation method according to any one of claims 1 to 6, characterized in that: The carbon emission calculation device comprises: A future photovoltaic power generation prediction module, used for obtaining a number of future photovoltaic power generation of the photovoltaic power generation function based on a number of preset prediction steps through a machine learning machine, where one future photovoltaic power generation is obtained for one preset prediction step; A total factor future electricity consumption prediction module, used for analyzing the total factor future electricity consumption of the low-carbon building through linear regression; The module for defining the sign of future power generation and consumption is used to define the signs of all future photovoltaic power generation as positive and the signs of all future power generation of all factors as negative; A future power generation and consumption sign summing module, used for obtaining the sum of the future photovoltaic power generation and the future power consumption of all factors based on the same preset prediction step number; An electricity balance index definition module, used to define the sum of the future photovoltaic power generation and the future total power consumption as the electricity balance index of the low-carbon building; A plane rectangular coordinate system generation module is used to generate a plane rectangular coordinate system with the natural time process as the horizontal axis and the electric quantity value as the vertical axis; An electricity balance index conversion module, used to convert all electricity balance indexes and all corresponding preset prediction steps into coordinate points based on the plane rectangular coordinate system; The power balance index function acquisition module is used to linearly fit all coordinate points to obtain the power balance index function; The carbon emission calculation module is used to determine the sum of the positive and negative definite integrals of the electricity balance index function based on the vertical axis, and calculate the carbon emission according to the absolute value of the sum of the positive and negative definite integrals when the sum of the positive and negative definite integrals is negative.

8. An electronic device, characterized in that: It comprises a processor and a memory coupled to the processor, wherein the memory stores program instructions executable by the processor; when the processor executes the program instructions stored in the memory, the method for calculating carbon emissions of a low-carbon building as described in any one of claims 1 to 6 is implemented.

9. A storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed by the processor, the method for calculating carbon emissions of a low-carbon building according to any one of claims 1 to 6 can be implemented.