Freight carbon emission prediction modeling method based on weighted regression
Through the weighted regression model, combined with nonlinear and linear regression techniques, key independent variables and weights are selected to construct a regional development index, which solves the data limitations and cross-scenario adaptability problems of freight carbon emission prediction and achieves accurate carbon emission prediction and low-carbon optimization.
Patent Information
- Application Number
- CN202510755874.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-07
- Publication Date
- 2025-09-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing freight carbon emission prediction technologies have data limitations, weak model generalization capabilities, and poor cross-scenario adaptability. They fail to effectively integrate the differentiated emission characteristics of multiple modes of transportation, resulting in blind spots in the assessment of carbon emissions across the entire chain.
A prediction modeling method based on weighted regression is adopted. By combining nonlinear regression and weighted linear regression, independent variables such as road freight volume, road mileage, railway freight volume, regional GDP and population are selected to construct a regional development index. Combined with the weights of independent variables, the linear relationship of freight carbon emissions is fitted to achieve the prediction of future carbon emissions.
It improves the accuracy and business guidance value of freight carbon emission forecasts, provides trend analysis of freight carbon emissions in the next 10 years, and supports low-carbon optimization of freight structure and efficient allocation of resources.
Smart Images

Figure CN120671897A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of transportation and energy technology, and in particular to a method for predicting carbon emissions from freight transport based on weighted regression. Background Art
[0002] With energy transition and social development, freight carbon emissions are increasing year by year. However, current freight carbon emission prediction technologies generally have the following flaws: data limitations. Traditional methods rely on a single model or a single data source, resulting in insufficient prediction accuracy. Model generalization is weak. Existing algorithms do not fully consider the differentiated emission characteristics of multiple modes of transportation (road / rail / sea transportation), and have poor cross-scenario adaptability. Insufficient global perspective: Existing solutions often focus on a single transportation link and fail to integrate upstream and downstream data from the supply chain (resulting in blind spots in the full-chain carbon emission assessment).
[0003] Therefore, there is an urgent need for a freight carbon emissions prediction solution that can integrate multiple model calculation methods to improve prediction accuracy and business guidance value. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of the existing technology and propose a prediction modeling method for freight carbon emissions based on weighted regression. By using known independent variables and their corresponding weights, combined with the theory and data processing technology of nonlinear regression and weighted linear regression, the low-carbon freight structure can be optimized and resources can be efficiently allocated and utilized, thereby realizing the prediction of freight carbon emissions.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A method for predicting freight carbon emissions based on weighted regression includes the following steps:
[0007] Step 1: Select appropriate independent variables for freight carbon emissions prediction and obtain the weights of the corresponding independent variables. The independent variables in this model include five: highway freight volume, highway mileage, railway freight volume, regional GDP, and population;
[0008] Step 2: Based on nonlinear regression, we can obtain the changing trend of different independent variables over the years and fit their curves;
[0009] Step 3: Combine the independent variables and their corresponding weights to form a new independent variable, which is the regional development index in this model;
[0010] Step 4: Fit the weighted linear regression curve based on the constructed regional development index;
[0011] Step 5: Combine the changes in the regional development index over time with the weighted linear regression in step 4 to construct a curve between year and freight carbon emissions, thereby predicting freight carbon emissions.
[0012] Preferably, in step 2, nonlinear regression is a mathematical model used to describe the nonlinear relationship between dependent variables and independent variables, and its form is:
[0013] y=f(x,α)+ε (1)
[0014] Where f(x,α) is a nonlinear function, α is the parameter to be estimated, and ε is the random error term;
[0015] Make scatter plots of different independent variables according to the year and independent variable, observe which nonlinear curve fitting is suitable for the distribution of the scatter plot, and determine that the function to be fitted is a quadratic function, then convert it to a univariate polynomial regression, and its function expression is:
[0016] y=a1x m +a2x m-1 +…+a m x+a m+1 (2)
[0017] a1,a2,…,a m+1 is the coefficient of the independent variable of the corresponding degree. First, perform polynomial regression to determine the highest degree is 2, then determine the coefficient of the polynomial, use the polyfit command, and finally perform prediction to find the predicted value Y and the predicted value of the regression polynomial obtained by polyfit at x. Apply this method to the prediction of the independent variable changing with the year, perform nonlinear regression fitting on the five independent variables, and obtain five regression equations.
[0018] (1) Nonlinear regression equation corresponding to population:
[0019] y=-340361.9x 2 +170202.9x+120285.0 (3)
[0020] (2) Nonlinear regression equation corresponding to highway freight volume:
[0021] y=-81597644x 2 +38603161.5x-546653.3 (4)
[0022] (3) Nonlinear regression equation corresponding to highway mileage:
[0023] y=-6126.3x 2 +3114.9x+138.9 (5)
[0024] (4) Nonlinear regression equation corresponding to railway freight volume:
[0025] y=2805902.8x 2+296229.9x+277470.3 (6)
[0026] (5) Nonlinear regression equation corresponding to regional GDP:
[0027] y=9414463.4x 2 +3377103.8x-10996.4 (7)
[0028] Preferably, in step 3, based on the obtained data and with the help of random forest model to provide data importance analysis, the mathematical relationship between regional development index index and highway freight volume x1, highway mileage x2, railway freight volume x3, regional GDP x4, and population x5 is fitted as follows:
[0029]
[0030] Among them, ω i is the weight of the ith independent variable.
[0031] Preferably, in step 4, the traditional weighted linear regression objective function is expressed as:
[0032]
[0033] x i is the independent variable of the i-th sample, y i is the dependent variable of the i-th sample. Its weight ω i The influence of the prediction error of the i-th sample on the objective function can be controlled, and its general expression is:
[0034]
[0035] Among them, τ is the wavelength parameter. The larger τ is, the smaller the influence of long-distance samples on the algorithm will be. However, if τ is too large, the model will degenerate into an ordinary linear regression model.
[0036] This invention doesn't use traditional weighted linear regression, but rather improves upon it. Traditional weighted linear regression primarily assigns weights to each data point, which is impractical for predicting carbon emissions. We typically make predictions based on the importance of different independent variables to freight emissions.
[0037] This model is improved on this basis, and the weighted linear regression objective function used is:
[0038] y i =β0+β1x i1 +β2x i2 +…+β p x ip +ε i(11)
[0039] β i is the coefficient of the corresponding independent variable. Written in matrix form as y=Xβ+ε, where y is the n×1 dependent variable vector, X is the n×(p+1) independent variable matrix (the first column is all 1 to represent the intercept term), β is the (p+1)×1 coefficient vector, and ε is the n×1 error vector. The weights in this model come from the eigenvalue importance analysis of the random forest model. This model is based on the importance of unknown independent variables to freight carbon emissions. If the contribution of the independent variable to freight carbon emissions is known, there is no need to use random forest to solve this weight. The weight can be directly substituted into the formula as a constant. If it is unknown, it is also possible to use other methods to solve the weight. The key is to first obtain the weight corresponding to the independent variable. This improvement can make the model more in line with the actual situation and make the predicted data more accurate.
[0040] Preferably, in step 5, the freight carbon emission C model finally obtained is:
[0041] C = 4.78 × 10 12 ×index+2.15×10 16 (12)
[0042]
[0043] Among them, ω i represents the weight of the i-th independent variable, index represents the regional development index, x1 represents the road freight volume, x2 represents the road mileage, x3 represents the railway freight volume, x4 represents the regional GDP, and x5 represents the population.
[0044] By adopting the above technical solution, the present invention designs a freight carbon emissions prediction model using known independent variables and their corresponding weights. Nonlinear regression is used to fit the changes in the independent variables over time, and weighted linear regression is then used to fit the linear relationship between the independent variables and freight carbon emissions. Finally, based on the pattern of independent variables changing over time, a prediction model for freight carbon emissions that increases with time is developed, ultimately achieving a prediction of freight carbon emissions.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] 1. The present invention uses nonlinear regression and weighted linear regression models to establish a regression equation, calculates the eigenvalue data of the top five contributing values in the next 10 years, and uses these eigenvalue data as independent variables to establish a regression equation with freight carbon emissions as the dependent variable. Through programming, the data of freight carbon emissions in the next 10 years is calculated to achieve prediction and analysis.
[0047] 2. The present invention predicts freight carbon emissions by selecting the top five independent variables with the highest weights, and fits a new independent variable, the regional development index, to highway freight volume, highway mileage, railway freight volume, regional GDP, and population, and then uses weighted linear regression to make predictions, providing solid theoretical and technical support for the future trend of freight carbon emissions.
[0048] 3. The present invention uses known independent variables and their corresponding weights, combined with the theory and data processing technology of nonlinear regression and weighted linear regression, to achieve the optimization of low-carbon freight structure and efficient allocation and utilization of resources, thereby realizing the prediction of freight carbon emissions. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The trend graph of the national population changing with the year (unit: 10,000 people) fitted by the nonlinear regression of the present invention;
[0050] Figure 2 A trend analysis chart of freight carbon emissions with respect to regional development indexes according to the present invention;
[0051] Figure 3 This is the annual variation curve of national freight carbon emissions of the present invention;
[0052] Figure 4 Flowchart of the present invention. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings so that those skilled in the art can better understand the advantages and features of the present invention and thus more clearly define the scope of protection of the present invention. The embodiments described in the present invention are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative work shall fall within the scope of protection of the present invention.
[0054] Example
[0055] This embodiment provides a method for predicting freight carbon emissions based on weighted regression, including the following steps:
[0056] Step 1: Select the independent variable and obtain the weight of the independent variable.
[0057] 1. Highway freight volume:
[0058] Road freight volume is positively correlated with carbon emissions. Road transport is primarily powered by diesel trucks, resulting in high fuel consumption and emissions per unit of freight volume. As freight volume increases, vehicle operation frequency and load sizes increase, leading to higher gasoline and diesel consumption, which in turn drives up CO2 and other emissions. Road freight is highly flexible, carrying over 70% of my country's freight turnover. This expansion in demand has a significant impact on freight carbon emissions.
[0059] 2. Highway mileage:
[0060] Increased highway mileage indirectly exacerbates carbon emissions. As road networks become longer, the average freight transport radius expands, potentially increasing the rate of empty vehicles or the likelihood of circuitous routes. Even if freight volume remains constant, increased mileage increases engine operating time, leading to a linear increase in fuel consumption and emissions with mileage. The high proportion of low-grade highways and low traffic efficiency exacerbate the impact of increased mileage on emissions.
[0061] 3. Railway freight volume:
[0062] Railway freight volume is negatively correlated with carbon emissions. Railway transport is characterized by high capacity and low energy consumption. Electric locomotives account for over 60% of the total volume, and carbon emissions per unit of freight turnover are only 1 / 7-1 / 3 of those of road transport. Increased rail freight volume replaces high-carbon road transport with a low-carbon alternative. This, especially for large-volume freight transport, effectively reduces overall freight carbon emissions. The successful "road-to-rail" policy exemplifies this.
[0063] 4. Gross Regional Product (GDP):
[0064] GDP growth indirectly drives up carbon emissions through industrial and consumption upgrades. On the production side, the expansion of the secondary industry increases demand for the transportation of raw materials and finished goods. On the consumer side, the development of the tertiary industry drives emerging logistics demand, and freight turnover is strongly positively correlated with GDP. While technological progress can reduce emissions per unit of GDP, the "scale effect" of economic expansion still dominates, causing carbon emissions to increase with GDP growth.
[0065] 5. Population
[0066] Population growth impacts carbon emissions through both total demand and structural changes. Population expansion increases demand for the transportation of consumer goods, driving up freight frequency and volume. Rising urbanization rates also drive demand for long-distance transport. Rising per capita income stimulates the transport of high-end goods, further increasing carbon emissions pressure in the transportation sector. The impact of population growth on freight emissions is long-term and persistent.
[0067] Step 2: Construct a nonlinear regression function, use nonlinear regression to obtain the changing trends of different independent variables over the years, and fit the curve.
[0068] Nonlinear regression is a mathematical model used to describe the nonlinear relationship between dependent and independent variables. Its general form is:
[0069] y=f(x,α)+ε (13)
[0070] Where f(x,α) is a nonlinear function (such as an exponential function), α is the parameter to be estimated, and ε is the random error term.
[0071] Make scatter plots of different independent variables according to the year and independent variable, and observe which nonlinear curve the distribution of the scatter plot is suitable for fitting. If the function to be fitted is a quadratic function, it is converted to a univariate polynomial regression, and its function expression is:
[0072] y i =β0+β1x i1 +β2x i2 +…+β p x ip +ε i (14)
[0073] β i is the coefficient preceding the corresponding independent variable. Written in matrix form as y=Xβ+ε, where y is the n×1 dependent variable vector, X is the n×(p+1) independent variable matrix (the first column is all 1 to represent the intercept term), β is the (p+1)×1 coefficient vector, and ε is the n×1 error vector. First, perform polynomial regression and determine the highest degree to be 2. Then determine the coefficients of the polynomial and use the polyfit command. Finally, perform a prediction to find the predicted value Y and the predicted value of the regression polynomial obtained by polyfit at x. This method is applied to the prediction of independent variables changing with the year. The five independent variables are fitted with nonlinear regression to obtain five regression equations.
[0074] Step 3: Convert the independent variables into regional development index according to their corresponding weights:
[0075]
[0076] where ω i is the weight of the ith independent variable.
[0077] Step 4: Fit the weighted linear regression curve based on the constructed regional development index.
[0078] The traditional weighted linear regression objective function can be expressed as:
[0079]
[0080] x i is the independent variable of the i-th sample, y i is the dependent variable of the i-th sample. Its weight ωi The influence of the prediction error of the i-th sample on the objective function can be controlled. Its general expression is:
[0081]
[0082] Where τ is the wavelength parameter. The larger τ is, the less impact long-distance samples have on the algorithm. However, if τ is too large, the model degenerates into a common linear regression model.
[0083] This invention doesn't use traditional weighted linear regression, but rather improves upon it. Traditional weighted linear regression primarily assigns weights to each data point, which is impractical for predicting carbon emissions. We typically make predictions based on the importance of different independent variables to freight emissions.
[0084] The weighted linear regression objective function used in this model is:
[0085] y i =β0+β1x i1 +β2x i2 +…+β p x ip +ε i (18)
[0086] β i is the coefficient of the corresponding independent variable. Written in matrix form, it is y = Xβ + ε, where y is the n × 1 dependent variable vector, X is the n × (p + 1) independent variable matrix (the first column is all ones to represent the intercept term), β is the (p + 1) × 1 coefficient vector, and ε is the n × 1 error vector.
[0087] The regression coefficient β is determined by minimizing the sum of squared errors S(β), and the equation is as follows:
[0088]
[0089] Taking the partial derivative of S(β) with respect to β and setting it to 0, we can get the normal equation:
[0090] X T Xβ=X T y (20)
[0091] If X T Xβ=X T If y is reversible, the solution of the regression coefficient β is:
[0092] β=(X T X) -1 X T y (21)
[0093] The intercept is the first element of the solved β vector.
[0094] The solved function expression of freight carbon emission C is:
[0095] C = 4.78 × 10 12 ×index+2.15×10 16 (twenty two)
[0096]
[0097] Among them, ω i is the weight of the ith independent variable, index represents the regional development index, x1 represents the road freight volume, x2 represents the road mileage, x3 represents the railway freight volume, x4 represents the regional GDP, and x5 represents the population.
[0098] Step 5: Combine the changes in the regional development index over time with the weighted linear regression in step 4 to construct a curve between year and freight carbon emissions, thereby predicting freight carbon emissions.
[0099] In addition, the basic symbols in the embodiments of the present invention are explained as follows:
[0100]
[0101] In summary, the present invention can effectively and accurately predict freight carbon emissions through an innovative modeling scheme, providing theoretical support for low-carbon optimization of my country's freight structure.
[0102] The descriptions and practices disclosed in this invention are easy to understand and comprehend for those skilled in the art, and modifications and refinements may be made without departing from the principles of the invention. Therefore, modifications and improvements made without departing from the spirit of the invention should also be considered within the scope of protection of this invention.
Claims
1. A method for predicting freight carbon emissions based on weighted regression, characterized in that: The steps include: Step 1: Select appropriate independent variables for freight carbon emissions prediction and obtain the weights of the corresponding independent variables. The independent variables in this model include five: highway freight volume, highway mileage, railway freight volume, regional GDP, and population; Step 2: Based on nonlinear regression, we can obtain the changing trend of different independent variables over the years and fit their curves; Step 3: Combine the independent variables and their corresponding weights to form a new independent variable, which is the regional development index in this model; Step 4: Fit the weighted linear regression curve based on the constructed regional development index; Step 5: Combine the changes in the regional development index over time with the weighted linear regression in step 4 to construct a curve between year and freight carbon emissions, thereby predicting freight carbon emissions.
2. The method for predicting freight carbon emissions based on weighted regression according to claim 1, characterized in that: In step 2, nonlinear regression is a mathematical model used to describe the nonlinear relationship between dependent variables and independent variables. Its form is: y=f(x,α)+ε (1) Where f(x,α) is a nonlinear function, α is the parameter to be estimated, and ε is the random error term; Make scatter plots of different independent variables according to the year and independent variable, observe which nonlinear curve fitting is suitable for the distribution of the scatter plot, and determine that the function to be fitted is a quadratic function, then convert it to a univariate polynomial regression, and its function expression is: y=a1x m +a2x m-1 +…+a m x+a m+1 (2) a1,a2,…,a m+1 For the coefficients of the independent variables of corresponding degrees, first perform polynomial regression to determine that the highest degree is 2, then determine the coefficients of the polynomial, use the polyfit command, and finally perform predictions to find the predicted value Y and the predicted value of the regression polynomial obtained by polyfit at x; apply this method to the prediction of the independent variables changing with the year, perform nonlinear regression fitting on the five independent variables respectively, and obtain five regression equations; (1) Nonlinear regression equation corresponding to population: y=-340361.9x 2 +170202.9x+120285.0 (3) (2) Nonlinear regression equation corresponding to highway freight volume: <h2 style=";text-align:left;direction:ltr">y=-81597644x<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +38603161.5x-546653.3 (4) (3) Nonlinear regression equation corresponding to highway mileage: y=-6126.3x 2 +3114.9x+138.9 (5) (4) Nonlinear regression equation corresponding to railway freight volume: <h2 style=";text-align:left;direction:ltr">y=2805902.8x<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +296229.9x+277470.3 (6) (5) Nonlinear regression equation corresponding to regional GDP: y=9414463.4x 2 +3377103.8x-10996.4 (7).
3. The method for predicting freight carbon emissions based on weighted regression according to claim 1, characterized in that: In step 3, based on the obtained data and using the random forest model to provide data importance analysis, the mathematical relationship between the regional development index index and road freight volume x1, road mileage x2, railway freight volume x3, regional GDP x4, and population x5 is fitted as follows: Among them, ω i is the weight of the ith independent variable.
4. The method for predicting freight carbon emissions based on weighted regression according to claim 1, characterized in that: In step 4, the traditional weighted linear regression objective function is expressed as: The weight ω i Control the impact of the prediction error of the i-th sample on the objective function, x i is the independent variable of the i-th sample, y i is the dependent variable of the i-th sample, and its expression is: Among them, τ is the wavelength parameter. The larger τ is, the smaller the influence of long-distance samples on the algorithm will be. However, if τ is too large, the model will degenerate into an ordinary linear regression model. This model is improved on this basis, and the weighted linear regression objective function used is: y i =β0+β1x i1 +β2x i2 +…+b p x ip +e i (11) β i are the coefficients of the corresponding independent variables, written in matrix form as y = Xβ + ε, where y is the n×1 dependent variable vector, X is the n×(p+1) independent variable matrix, β is the (p+1)×1 coefficient vector, and ε is the n×1 error vector.
5. The method for predicting freight carbon emissions based on weighted regression according to claim 1, characterized in that: In step 5, the final freight carbon emission C model is: Among them, ω i represents the weight of the i-th independent variable, index represents the regional development index, x1 represents the road freight volume, x2 represents the road mileage, x3 represents the railway freight volume, x4 represents the regional GDP, and x5 represents the population.