Urban logistics carbon emission prediction method and system based on ARIMA model
By dividing cities into grids and combining EMD and TSVD processing, the ARIMA model is used to predict urban logistics carbon emissions, which solves the problem of inaccurate carbon emission prediction results in the existing technology, and achieves real-time and fine-grained carbon emission prediction.
Patent Information
- Application Number
- CN202411415079.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-03
AI Technical Summary
The carbon emission forecast results in the prior art are inaccurate, lack real-time and fine-grainedness, and cannot reflect the emissions in each specific location of the city.
The city is divided into disjoint and uniform grids, calculate the time series of carbon emission data of each grid based on urban big data, extract multiple spatiotemporal features, and merge the feature matrix as input to the ARIMA model through EMD decomposition and TSVD noise reduction processing. , predict the urban logistics carbon emission matrix at the next moment.
Real-time and fine-grained logistics carbon emission forecasts for multi-regions of cities have been achieved, which improves the accuracy and comprehensiveness of the forecasts, and can understand the carbon emission status of urban logistics in a more fine-grained manner.
Smart Images

Figure CN119250296A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of carbon emission prediction, and in particular to a method, system, storage medium and electronic device for predicting carbon emissions from urban logistics based on an ARIMA model. Background Art
[0002] Logistics carbon emissions have become the main source of greenhouse gases (GHG). To formulate effective carbon reduction strategies, decision makers must obtain real-time and fine-grained carbon emission information based on local conditions, which has not been fully considered in current research.
[0003] In related technologies, traditional methods rely on fossil fuel consumption data provided by the transportation sector to estimate carbon emissions. However, these data are often obtained based on macro statistics and cannot reflect the real-time fuel consumption in actual logistics, resulting in a lack of accuracy and real-time nature in the prediction results. At the same time, traditional methods usually make predictions based on average data from large regions or specific transportation networks, and cannot provide fine-grained carbon emission information for different regions or roads. This low-resolution analysis may result in prediction results that cannot accurately reflect the emissions of specific locations in the city. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the deficiencies in the prior art, the present invention provides a method, system, storage medium and electronic device for predicting urban logistics carbon emissions based on the ARIMA model, which solves the technical problem of inaccurate carbon emission prediction results.
[0006] (II) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0008] A method for predicting carbon emissions from urban logistics based on the ARIMA model, including:
[0009] Divide the city into a number of non-intersecting and uniform grids, and calculate the carbon emission data time series of each grid based on the city's big data;
[0010] Based on the urban big data, extracting multivariate spatiotemporal features of each of the grids;
[0011] Decomposing each of the carbon emission data time series by EMD, and performing noise reduction processing by TSVD to obtain the corresponding denoised carbon emission matrix;
[0012] On the same time scale, the multivariate spatiotemporal features of all grids are merged with the denoised carbon emission matrix to obtain a merged feature matrix;
[0013] The combined feature matrix is used as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment.
[0014] Preferably, the city big data includes fuel consumption data; the carbon emission data time series of each grid is calculated based on the city big data; expressed as:
[0015]
[0016] Where W t is the carbon emission data time series in any grid at time t∈(1,2...D), where D is the total number of time moments;
[0017] K i,j is the CO2 emission coefficient of the jth fuel consumed by the i-th vehicle type;
[0018] n t,i,j is the number of logistics vehicles of type i using type j fuel at time t;
[0019] s i,j is the transportation mileage of the i-th vehicle using the j-th fuel at time t;
[0020] e i,j The average consumption intensity per unit mileage of the i-th vehicle using the j-th fuel.
[0021] Preferably, the city big data further includes traffic data, satellite remote sensing data and meteorological data, wherein the satellite remote sensing data includes map data and road structure data; the extracting multivariate spatiotemporal features of each grid based on the city big data includes:
[0022] Based on the traffic data, extracting traffic characteristics of any grid; wherein the traffic characteristics include one or a combination of any of the following: number of start operations, speed expectation, speed standard deviation, number of vehicles and trip length;
[0023] Based on the map data, extract the POI features of any grid; wherein the POI categories include one or a combination of any of vehicle services, catering, shopping services, life services, sports and leisure services, health care services, hotels and residences, tourist attractions, culture and education, infrastructure services, financial services and enterprises;
[0024] Based on the road structure data, extracting the road network features of any grid; wherein the road network features include one or a combination of any of the total length of expressways and the total length of other types of roads;
[0025] Based on the meteorological data, the meteorological characteristics of any grid are extracted; wherein the meteorological characteristics include one or a combination of any several of weather and temperature.
[0026] Preferably, the step of decomposing each of the carbon emission data time series by EMD comprises:
[0027] S311, identify the carbon emission data time series W of any grid t The local extreme value of constructs the upper envelope u(t) and the lower envelope l(t); calculates the average envelope m 1 (t):
[0028]
[0029] S312, the carbon emission data time series W t Subtract the mean envelope m 1 (t) becomes a new function:
[0030] f 1 (t) = W t -m 1 (t)
[0031] S313, check f 1 (s) Whether the conditions of the intrinsic mode function are met;
[0032] S314, if f 1 (t) satisfies the condition, then the first IMF is obtained, otherwise f 1 (t) as a time series W t Input for subsequent iterations; steps 31 to 33 are repeated j times until the first When these two conditions are met, the first IMF is obtained, as shown in the formula:
[0033] f 2 (t) = f 1 (t)-m 2 (t)
[0034]
[0035] In the formula, f 2 (t) is the new function formed after one repetition, m 2 (t) is f 1 (t) average envelope; is the first IMF formed after repeating j times, m j+1 (t) is f j (t) average envelope;
[0036] S315, according to the stop criterion, determine the number of IMFs generated during the screening process; after the first IMF is screened out, the remaining components R 1 (t) Then repeat steps 31 to 34 to find the next IMF until the residual term R n Stop when (t) is a monotonic function or a constant, and finally determine W t There are n IMFs:
[0037]
[0038]
[0039] S316, carbon emission data time series W t Reconstruction is performed and expressed as the sum of the intrinsic mode function and the final residual term:
[0040]
[0041] Preferably, the denoising process is performed using TSVD to obtain the corresponding denoised carbon emission matrix; comprising:
[0042] S321. Merge all carbon emission data time series to obtain the carbon emission matrix W at time t t,g :
[0043] W t,g = {W t,g1 ,W t,g2 ,...,W t,gd}
[0044] Where W t,gi is the carbon emission data time series of the i-th grid g;
[0045] S322, carbon emission matrix W t,g Perform SVD decomposition:
[0046] W t,g =UΣV T
[0047] Where U is the left singular vector matrix, Σ is the diagonal matrix, V T is the right singular vector matrix;
[0048] S323, select the first r largest singular values in the matrix Σ, ignore the remaining smaller singular values, and select a truncation value r to obtain the truncated matrix Σ r :
[0049] W t,g,r =U r Σ r V r T
[0050] Where W t,g,r is the denoised carbon emission matrix at time t; U r 、V r T are the left and right singular vector matrices after truncation, respectively.
[0051] Preferably, on the same time scale, the multivariate spatiotemporal features of all grids are merged with the denoised carbon emission matrix to obtain a merged feature matrix; expressed as:
[0052] S t = {W t,g,r ,F T,t ,F P,t ,F R,t ,F M,t}
[0053] In the formula, S t is the merged feature matrix within time t; W t,g,r is the denoised carbon emission matrix at time t; F T,t ,F P,t ,F R,t ,F M,t Represents multivariate spatiotemporal characteristics, which refer to the traffic characteristics, POI characteristics, road network characteristics, and meteorological characteristics of all grids at time t.
[0054] Preferably, the method uses the combined feature matrix as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment; including:
[0055] S51, build ARIMA model; merge feature matrix S t Perform d-order differences to make it a stationary series Δ d S t Applied to the ARIMA model:
[0056]
[0057] In the formula, δ m and λ n are the parameters of AR and MA, ρ t is the prediction error at time t; ρ t-n is the random error in the past; m and n are the indexes of lagged values in the AR model and lagged errors in the MA model, respectively;
[0058] Let the error ρ t The minimum is zero, and this is taken as the optimization goal, and the final objective function F object (V,Δ d S t ,δ m ,λn ,ρ t-n ) is formalized as shown in the formula:
[0059]
[0060] In the formula, the first term F1 processes the matrix data Δ after TSVD denoising and merging d S t , the second term F2 deals with the prediction error of the ARIMA model; Min is the minimization function, is the two-norm, V is the right singular vector V T The transpose of , h = p + d + q is the time minimum, p represents the count of lagged observations, d represents the difference level required for data stability, and q represents the number of lagged forecast errors;
[0061] The augmented Lagrangian method is used to make the objective function F object (V,Δ d S t ,δ m ,λ n ,ρ t-n ) minimum; including:
[0062] Consider V, δ m , n and ρ t-n is a constant, and calculate Δ d S t The partial derivative of , and then equal it to zero; then Δ d S t Updated as follows:
[0063]
[0064] Therefore, F1 is interpreted as an orthogonal projection problem, and its global optimal solution is AB T , where A and B represent Left and right singular vectors after singular value decomposition:
[0065]
[0066] In the ARIMA model, the Yule-Walker method is used to calculate the parameter δ m and λ n Estimate, and then the error term ρ t-n Update, calculate its partial derivative and set it to zero, as shown in the formula:
[0067]
[0068] In the formula, h+1-D represents the time span, (h+1-D)λ nAs the denominator, it represents the normalization of the accumulated error;
[0069] S52, predict the carbon emission value Δ at the next moment D+1 d S D+1 :
[0070]
[0071] By the matrix Δ d S D+1 Perform inverse d-order difference and inverse EMD to obtain the prediction matrix S D+1 ;include:
[0072] Δ d S D+1 Perform inverse d-order difference to obtain
[0073]
[0074] After the reverse difference, Perform inverse EMD to obtain the urban logistics carbon emission matrix S at the next moment D+1 :
[0075]
[0076] An urban logistics carbon emission prediction system based on ARIMA model, including:
[0077] The division and calculation module is used to divide the city into a number of non-intersecting and uniform grids, and calculate the carbon emission data time series of each grid based on the city's big data;
[0078] An extraction module, used for extracting multivariate spatiotemporal features of each of the grids based on the urban big data;
[0079] A decomposition and denoising module, used to decompose each of the carbon emission data time series by EMD, and perform denoising processing by TSVD to obtain a corresponding denoised carbon emission matrix;
[0080] The merging module is used to merge the multivariate spatiotemporal features of all grids with the denoised carbon emission matrix on the same time scale to obtain a merged feature matrix;
[0081] The prediction module is used to use the combined feature matrix as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment.
[0082] A storage medium stores a computer program for predicting urban logistics carbon emissions based on the ARIMA model, wherein the computer program enables a computer to execute the urban logistics carbon emissions prediction method based on the ARIMA model as described above.
[0083] An electronic device, comprising:
[0084] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the urban logistics carbon emission prediction method based on the ARIMA model as described above.
[0085] (III) Beneficial effects
[0086] The present invention provides a method, system, storage medium and electronic device for predicting carbon emissions from urban logistics based on the ARIMA model. Compared with the prior art, the method has the following beneficial effects:
[0087] In the present invention, the city is first divided into several non-intersecting and uniform grids, and the carbon emission data time series of each grid is calculated based on the city big data; secondly, based on the city big data, the multivariate spatiotemporal characteristics of each grid are extracted; again, each carbon emission data time series is decomposed by EMD, and TSVD is used for noise reduction to obtain the corresponding denoised carbon emission matrix; then, on the same time scale, the multivariate spatiotemporal characteristics of all grids and the denoised carbon emission matrix are merged to obtain a merged feature matrix; finally, the merged feature matrix is used as the input of the ARIMA model to predict the city logistics carbon emission matrix at the next moment. The present invention combines urban big data and a time series analysis hybrid prediction method to achieve real-time, fine-grained logistics carbon emission prediction for multiple regions in the city. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0089] Figure 1 A technical roadmap for a method for predicting urban logistics carbon emissions based on an ARIMA model provided in an embodiment of the present invention;
[0090] Figure 2 A block diagram of a method for predicting urban logistics carbon emissions based on an ARIMA model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0091] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0092] The embodiments of the present application solve the technical problem of inaccurate carbon emission prediction results by providing a method, system, storage medium and electronic device for predicting urban logistics carbon emissions based on the ARIMA model.
[0093] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:
[0094] The problem addressed by the embodiments of the present invention is to measure carbon emissions by taking into account the fine-grained spatiotemporal multivariate characteristics of urban areas. The proposed solution takes into account that in the same city, logistics carbon emissions are different in different places and depend on multiple factors. Therefore, the embodiments of the present invention no longer rely on a single type of data (such as traffic flow or fuel consumption), but make full use of the fusion of multi-source heterogeneous data such as meteorological data, road conditions and road network structure to improve the comprehensiveness and accuracy of the prediction. Specifically, based on Figure 1 According to the technical roadmap shown, the embodiment of the present invention has at least the following technical improvements:
[0095] (1) By combining the multivariate spatiotemporal features extracted from big data with the measured carbon emission features, the defects of the single carbon emission sequence are overcome, making the prediction more realistic.
[0096] (2) Taking into account the characteristics of multi-regional urban logistics and transportation, carbon emissions are predicted for different regions, which can provide a more detailed understanding of the carbon emission status of urban logistics.
[0097] (3) A hybrid forecasting method based on empirical mode decomposition (EMD) and autoregressive integrated moving average model (ARIMA) was used to improve the forecasting accuracy and achieve accurate forecasting of real-time regional carbon emissions.
[0098] (4) Taking into account various types of urban characteristics (i.e., multi-temporal and spatial characteristics), it meets the demand-side modeling of multiple scenarios and can be applied to other carbon emission issues, with strong adaptability.
[0099] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0100] Embodiment 1:
[0101] like Figure 2 As shown, the embodiment of the present invention provides a method for predicting carbon emissions of urban logistics based on the ARIMA model, including:
[0102] S1. Divide the city into a number of non-intersecting and uniform grids, and calculate the carbon emission data time series of each grid based on the city big data;
[0103] S2. Extracting multivariate spatiotemporal features of each of the grids based on the urban big data;
[0104] S3, decomposing each of the carbon emission data time series by EMD, and performing noise reduction processing by TSVD to obtain a corresponding denoised carbon emission matrix;
[0105] S4. On the same time scale, merge the multivariate spatiotemporal features of all grids with the denoised carbon emission matrix to obtain a merged feature matrix;
[0106] S5. Use the combined feature matrix as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment.
[0107] The embodiment of the present invention combines urban big data and a time series analysis hybrid prediction method to achieve real-time, fine-grained logistics carbon emission prediction for multiple areas in a city.
[0108] It should be noted that the embodiment of the present invention divides the city into ideal grid areas, calculates carbon emissions through the data of each grid, and finally forms a carbon emission matrix of all grids as the input of the model, and combines the characteristics of urban big data to make predictions at the next moment. Urban big data includes government-issued data such as fuel consumption, meteorological data, traffic data (road sensors, etc.), satellite remote sensing data such as road structure, map data, etc.
[0109] Next, we will introduce the steps of the above scheme in detail:
[0110] In step S1, the city is divided into a number of non-intersecting and uniform grids, and the carbon emission data time series of each grid is calculated based on the city big data;
[0111] In the relevant technology, there are two main methods for estimating global greenhouse gas emissions, namely the "top-down" and "bottom-up" models proposed by the IPCC: (1) The "top-down" method first calculates the total carbon emissions of the total fuel consumption of the city, and then allocates the total carbon emissions to each economic sector. (2) The "bottom-up" method directly calculates the fuel consumption of each economic sector. Then, the carbon emissions are calculated based on the carbon emission parameters of the fuel.
[0112] However, both models have many uncertainties. These uncertainties mainly come from empirical assumptions and uncertainties in key data: fuel consumption, carbon content, and oxidation factors. Additional uncertainties are always introduced when total carbon emissions are allocated to various sectors. And because carbon emissions vary nonlinearly in different regions, the model cannot accurately estimate carbon emissions based on local conditions. Multiple local data sources are used to improve the reliability of input data and calculate accurate carbon emissions from urban logistics.
[0113] In this context, this step combines the IPCC "top-down" method and urban big data to calculate logistics carbon emissions as follows:
[0114]
[0115] Where W t is the carbon emission data time series in any grid at time t∈(1,2...D), where D is the total number of time moments;
[0116] K i,j is the CO2 emission coefficient of the jth fuel consumed by the i-th vehicle type;
[0117] n t,i,j is the number of logistics vehicles of type i using type j fuel at time t;
[0118] s i,j is the transportation mileage of the i-th vehicle using the j-th fuel at time t;
[0119] e i,j The average consumption intensity per unit mileage of the i-th vehicle using the j-th fuel.
[0120] It should be noted that the urban big data here specifically refers to fuel consumption data.
[0121] In step S2, based on the urban big data, the multivariate spatiotemporal features of each of the grids are extracted.
[0122] In addition to the fuel consumption data mentioned in the previous step, the urban big data in the embodiment of the present invention also includes traffic data, satellite remote sensing data and meteorological data, wherein the satellite remote sensing data includes map data and road structure data. Accordingly, the multivariate spatiotemporal features here at least include traffic features, point of interest (POI) features, road network features and meteorological features.
[0123] On this basis, this step specifically includes:
[0124] S21. Extracting traffic characteristics of any grid based on the traffic data; wherein the traffic characteristics include one or a combination of any of the following: number of start operations, speed expectation, speed standard deviation, number of vehicles and trip length.
[0125] To expand:
[0126] Traffic Characteristics F T It is the main feature for inferring logistics carbon emissions. Gasoline vehicles usually have three operating conditions: cold start, hot start and thermal stability. Under different operating conditions, there are significant differences in the emission rates of vehicles. Vehicle speed and mileage are also important features for logistics carbon emission research. Five relative features are selected for each grid, namely the number of start operations, speed expectation, speed standard deviation, number of vehicles and trip length. These features are extracted from the GPS trajectories generated by logistics vehicles that have crossed the grid in the past hour.
[0127] (1) Number of start operations: Given the spatial trajectory of a vehicle (the spatial trajectory T is the sequence of GPS points of the logistics vehicle, which are spatial points in time order, T: p1→p2→...→p n Each GPS point p i Consists of longitude, latitude and timestamp. ), retrieve all trajectory points that fall within the influence area of each grid, and the points contained in the trajectory are strictly increasing over time. Check two adjacent points. If the previous point p i The velocity of the next point p is equal to zero. i+1 If the velocity is not equal to zero, it is considered that there is a start event.
[0128] (2) Speed expectation: Retrieve the trajectory points that fall within the influence area of each grid. Since the sampling data of the GPS device is discrete, the speed expectation is used to represent the speed of all vehicles passing through gR. First, a formula is designed to calculate the distance between two consecutive points, and then the total driving distance and driving time are calculated. Finally, the speed expectation is calculated:
[0129]
[0130]
[0131] (3) Speed standard deviation: Since uneven driving has a significant impact on vehicle carbon emissions, the standard deviation is used to represent the speed dispersion of vehicles traveling within gR in the past hour:
[0132]
[0133] (4) Number of vehicles: The number of vehicles entering the grid is calculated by retrieving the vehicle's driving trajectory. If some trajectory points fall within the influence area of the grid, the vehicle is considered to have entered the grid. The same vehicle can visit the road network multiple times in the past hour, and the number of vehicles in the road network only increases by one.
[0134] (5) Stroke length: Len. According to the distance between two points, all distances between two consecutive points are summed to calculate the total stroke length of all trajectories in the grid g, such as:
[0135] Len=∑Dist(p i ,p i+1 ),p i .l,p i+1 .l∈gR
[0136] S22. Based on the map data, extract the POI features of any grid; wherein the POI categories include one or a combination of any of vehicle services, catering, shopping services, life services, sports and leisure services, health care services, hotels and residences, tourist attractions, culture and education, infrastructure services, financial services and enterprises.
[0137] To expand:
[0138] For POI feature F P , the classification and density of POIs tend to hint at the popularity and regional functions of the area. For example, an area with a large number of life service POIs is likely to be a residential area. Combined with the characteristics of traffic flow, we can also understand the frequency of communication between different functional areas. Therefore, this information will be very helpful in inferring carbon emissions from logistics and transportation. Urban POIs can be divided into 12 categories: C1: vehicle services (sales, maintenance); C2: catering; C3: shopping services; C4: life services; C5: sports and leisure services; C6: health care services; C7: hotels and residences;
[0139] C8: tourist attractions; C9: cultural education; C10: infrastructure services; C11: financial services; C12: enterprises. In the impact area R of grid g, category C i The POI density can be expressed as:
[0140] ρ(C i )=|{I:I∈C i ,I.loc∈gR}|
[0141] Where I.loc is the location of the i-th category POI. This formula calculates the ratio of the number of POIs belonging to a certain category in the grid to the total number of POIs in the impact area R. This ratio can be used to measure the density of each POI in the grid, thereby reflecting the functional characteristics and popularity of the area. In further analysis, this density information will help understand the traffic patterns of different regions and their relationship with carbon emissions.
[0142] S23. Extracting the road network features of any grid based on the road structure data; wherein the road network features include one or a combination of any several of the total length of expressways and the total length of other types of roads.
[0143] To expand:
[0144] For the road network feature F R , the road network is very important for road traffic in various regions, and it also has a great impact on logistics and transportation. For each grid g, the following two relevant features are selected, namely the total length of highways and other roads. Logistics carbon emissions are generated by vehicles that have passed through the grid in the past hour. The carbon emissions of each grid are strongly correlated with the road. The longer the road, the more carbon emissions from transportation. On the surface, logistics carbon emissions have little to do with highways. Obviously, roads and highways have very different relationships with carbon emissions. This is also one of the reasons why they need to be separated.
[0145] f highway =∑len(r highway ),r highway ∈gR
[0146] f road =∑len(r other ),r other ∈gR
[0147] In the formula, len(r highway ) and len(r other ) are highway r highway and other roads other Length.
[0148] S24. Extracting meteorological features of any grid based on the meteorological data; wherein the meteorological features include one or a combination of any several of weather and temperature.
[0149] For meteorological characteristics F M , weather may affect transportation planning, which will indirectly affect logistics carbon emissions. The purpose is to determine what useful information in meteorology can help analyze transportation carbon emissions. Two characteristics of each grid are selected: weather f weaand temperature f temp According to big data analysis, logistics carbon emissions are lower under moderate to heavy rain conditions compared to sunny days. Although the impact of temperature is not obvious, bad weather always affects vehicle transportation. In short, these features are highly discriminative in carbon emission inference. Weather f wea and temperature f temp It can be expressed as:
[0150] f wea =weather,weather∈M
[0151] f temp =temp,temp∈Z
[0152] Where weather is the weather in grid g, M is the set of weather types, temp is the temperature in grid g, and Z is the set of temperature ranges.
[0153] In step S3, each of the carbon emission data time series is decomposed by EMD, and TSVD is used to perform noise reduction processing to obtain a corresponding denoised carbon emission matrix.
[0154] The embodiment of the present invention proposes a hybrid prediction method based on time series analysis. This step involves empirical mode decomposition (EMD) and truncated singular value decomposition (TSVD) denoising to obtain a denoised carbon emission matrix:
[0155] Step S31: Empirical Mode Decomposition (EMD)
[0156] Empirical Mode Decomposition (EMD) is an effective tool for processing time-frequency domain signals, and is particularly good at processing non-stationary and nonlinear data (air quality data, carbon emission data). Its core mechanism is to adaptively decompose the original signal into several intrinsic mode functions (IMF, also known as intrinsic mode function) and a residual component without selecting a suitable basis function for the signal. IMF needs to meet specific conditions: (1) In the entire data range, the number of local extreme points and zero crossings must be equal, or the difference is at most 1. (2) At any time, the average value of the envelope of the local maximum value (upper envelope) and the envelope of the local minimum value (lower envelope) must be zero to ensure the accuracy of the analysis. Specifically include:
[0157] S311, identify the carbon emission data time series W of any grid t The local extreme value of constructs the upper envelope u(t) and the lower envelope l(t); calculates the average envelope m 1 (t):
[0158]
[0159] S312, the carbon emission data time series W t Subtract the mean envelope m 1 (t) becomes a new function:
[0160] f 1 (t) = W t -m 1 (t)
[0161] S313, check f 1 (s) Whether the conditions of the intrinsic mode function are met;
[0162] S314, if f 1 (t) satisfies the condition, then the first IMF is obtained, otherwise f 1 (t) as a time series W t Input for subsequent iterations; steps 31 to 33 are repeated j times until the first When these two conditions are met, the first IMF is obtained, as shown in the formula:
[0163] f 2 (t) = f 1 (t)-m 2 (t)
[0164]
[0165] In the formula, f 2 (t) is the new function formed after one repetition, m 2 (t) is f 1 (t) average envelope; is the first IMF formed after repeating j times, m j+1 (t) is f j (t) average envelope;
[0166] S315, according to the stop criterion, determine the number of IMFs generated during the screening process; after the first IMF is screened out, the remaining components R 1 (t) Then repeat steps 31 to 34 to find the next IMF until the residual term R n Stop when (t) is a monotonic function or a constant, and finally determine W t There are n IMFs:
[0167]
[0168]
[0169] S316, carbon emission data time series Wt Reconstruction is performed and expressed as the sum of the intrinsic mode function and the final residual term:
[0170]
[0171] In the above decomposition process, it is noted that the number of IMFs obtained through EMD is different due to the different characteristics and distribution of each data series. This leads to inconsistent sizes of matrix sequences, which affects the subsequent prediction work. To solve this problem, the number of decompositions in the process is limited, and for the case where only one sequence is decomposed due to not meeting the initial conditions of EMD, a zero sequence is added for padding. For example, it is decided to stop after three decompositions to ensure that all decomposed matrices remain the same size, expanding all decomposed matrices to three times the initial size. For matrices that are less than 3 times, a zero sequence is added for padding to ensure that each data sequence passing through EMD meets the requirements.
[0172] Step S32: Truncated Singular Value Decomposition (TSVD) Denoising
[0173] TSVD provides the best low-rank matrix approximation for the original matrix, which can be used to reduce the dimension of the matrix, extract the main features of the data, and eliminate data noise. Based on the above steps, although the new carbon emission sequence W can be obtained t,g = {W t,g1 ,W t,g2 ,...,W t,gd}. However, since some sequence matrices do not meet the initial conditions of EMD, they are filled with zeros, which introduces noise to a certain extent, and the original data itself also has a lot of noise. TSVD can accurately solve this problem and retain the main features of the original matrix. Using TSVD to compress W t,g Sequence matrix, including:
[0174] S321. Merge all carbon emission data time series to obtain the carbon emission matrix W at time t t,g :
[0175] W t,g = {W t,g1 ,W t,g2 ,...,W t,gd}
[0176] Where W t,gi is the carbon emission data time series of the i-th grid g;
[0177] S322, carbon emission matrix W t,g Perform SVD decomposition:
[0178] W t,g =UΣV T
[0179] Where U is the left singular vector matrix, Σ is the diagonal matrix, V T is the right singular vector matrix;
[0180] S323, select the first r largest singular values in the matrix Σ, ignore the remaining smaller singular values, and select a truncation value r to obtain the truncated matrix Σ r :
[0181]
[0182] Where W t,g,r is the denoised carbon emission matrix at time t; U r , are the left and right singular vector matrices after truncation, respectively.
[0183] In step S4, on the same time scale, the multivariate spatiotemporal features of all grids are merged with the denoised carbon emission matrix to obtain a merged feature matrix.
[0184] After denoising, this step merges different types of features. Specifically, the IMFs and traffic features after EMD decomposition are spliced in the feature vector dimension and corresponded in the time scale. In this way, a feature matrix containing denoised time series features and traffic features is constructed. The merged matrix is used as the final input. This feature matrix integrates the dynamic change information of carbon emission data and the static characteristics of traffic behavior, providing rich input information for the model, expressed as:
[0185] S t = {W t,g,r ,F T,t ,F P,t ,F R,t ,F M,t}
[0186] In the formula, S t is the merged feature matrix within time t; W t,g,r is the denoised carbon emission matrix at time t; F T,t ,F P,t ,F R,t ,F M,t Represents multivariate spatiotemporal characteristics, which refer to the traffic characteristics, POI characteristics, road network characteristics, and meteorological characteristics of all grids at time t.
[0187] In step S5, the combined feature matrix is used as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment.
[0188] It should be noted that the ARIMA model proposed in the embodiment of the present invention aims to predict future values by utilizing the linear correlation of historical data. It integrates three main components: autoregression (AR), integration (I) and moving average (MA). It is controlled by three parameters, denoted as p, d and q. p represents the count of lagged observations, called the AR term, d represents the difference level required for data stability, and q represents the number of lagged prediction errors, also called the MA term.
[0189] This step specifically includes:
[0190] S51, build ARIMA model; merge feature matrix S t Perform d-order differences to make it a stationary series Δ d S t Applied to the ARIMA model:
[0191]
[0192] In the formula, δ m and λ n are the parameters of AR and MA, ρ t is the prediction error at time t; ρ t-n is the random error in the past; m and n are the indexes of lagged values in the AR model and lagged errors in the MA model, respectively;
[0193] Let the error ρ t The minimum is zero, and this is taken as the optimization goal, and the final objective function F object (V,Δ d S t ,δ m ,λ n ,ρ t-n ) is formalized as shown in the formula:
[0194]
[0195] In the formula, the first term F1 processes the matrix data Δ after TSVD denoising and merging d S t , the second term F2 deals with the prediction error of the ARIMA model; Min is the minimization function, is the two-norm, V is the right singular vector V T The transpose of , h = p + d + q is the time minimum, p represents the count of lagged observations, d represents the difference level required for data stability, and q represents the number of lagged prediction errors; for the function F1(V,Δ d S t ) and F2(δ m ,λ n ,ρ t-n), they are considered to be of equal importance and are therefore given equal weight here.
[0196] The augmented Lagrangian method, one of the most widely used methods for solving optimization problems, is used to make the objective function F object (V,Δ d S t ,δ m ,λ n ,ρ t-n ) minimum; including:
[0197] Consider V, δ m , n and ρ t-n is a constant, and calculate Δ d S t The partial derivative of , and then equal it to zero; then Δ d S t Updated as follows:
[0198]
[0199] Therefore, F1 is interpreted as an orthogonal projection problem, and its global optimal solution is AB T , where A and B represent Left and right singular vectors after singular value decomposition:
[0200]
[0201] In the ARIMA model, the Yule-Walker method is used to calculate the parameter δ m and λ n Estimate, and then the error term ρ t-n Update, calculate its partial derivative and set it to zero, as shown in the formula:
[0202]
[0203] In the formula, h+1-D represents the time span, (h+1-D)λ n The denominator represents the normalization of the accumulated error.
[0204] S52, predict the carbon emission value Δ at the next moment D+1 d S D+1 :
[0205]
[0206] At this time, since the original carbon emission matrix has undergone EMD and d-order difference, although Δ d S D+1 The shape is the same as the original matrix, but the representation is different. d SD+1 Perform inverse d-order difference and inverse EMD to obtain the prediction matrix S with the same representation as the original matrix D+1 ;include:
[0207] Δ d S D+1 Perform inverse d-order difference to obtain
[0208]
[0209] After the reverse difference, Perform inverse EMD to obtain the urban logistics carbon emission matrix S at the next moment D+1 :
[0210]
[0211] So far, the embodiment of the present invention has completed the entire process of the urban logistics carbon emission prediction method based on the ARIMA model.
[0212] Embodiment 2:
[0213] The embodiment of the present invention provides a city logistics carbon emission prediction system based on the ARIMA model, including:
[0214] The division and calculation module is used to divide the city into a number of non-intersecting and uniform grids, and calculate the carbon emission data time series of each grid based on the city's big data;
[0215] An extraction module, used for extracting multivariate spatiotemporal features of each of the grids based on the urban big data;
[0216] A decomposition and denoising module, used to decompose each of the carbon emission data time series by EMD, and perform denoising processing by TSVD to obtain a corresponding denoised carbon emission matrix;
[0217] The merging module is used to merge the multivariate spatiotemporal features of all grids with the denoised carbon emission matrix on the same time scale to obtain a merged feature matrix;
[0218] The prediction module is used to use the combined feature matrix as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment.
[0219] Embodiment 3:
[0220] An embodiment of the present invention provides a storage medium storing a computer program for predicting urban logistics carbon emissions based on the ARIMA model, wherein the computer program enables a computer to execute the method for predicting urban logistics carbon emissions based on the ARIMA model as described in Example 1.
[0221] Embodiment 4:
[0222] An embodiment of the present invention provides an electronic device, including:
[0223] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the urban logistics carbon emission prediction method based on the ARIMA model as described in Example 1.
[0224] It can be understood that the urban logistics carbon emission prediction system, storage medium and electronic device based on the ARIMA model provided in the embodiment of the present invention correspond to the urban logistics carbon emission prediction method based on the ARIMA model provided in the embodiment of the present invention. The explanations, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the urban logistics carbon emission prediction method, and will not be repeated here.
[0225] In summary, compared with the prior art, the present invention has the following beneficial effects:
[0226] 1. The embodiment of the present invention combines urban big data and time series analysis hybrid prediction method to predict logistics carbon emissions in real time and fine-grained manner in multiple areas of a city.
[0227] 2. The embodiment of the present invention takes into account the multivariate spatiotemporal features extracted based on urban big data. Adding these features can give full play to the advantages of urban big data, highlight key information, and further achieve accurate prediction of carbon emissions.
[0228] 3. The embodiment of the present invention adopts the EMD model to stabilize the urban logistics carbon emission data, improves the ability of the ARIMA model to capture the inherent nonlinear relationship in the daily carbon dioxide emission data, and improves its ability to handle the non-stationarity of the carbon emission data series.
[0229] 4. The embodiment of the present invention uses the TSVD model to condense the feature matrix of daily carbon dioxide emission data from different industries, ensuring that the inherent data features are retained in the processed matrix and improving the operating efficiency of the ARIMA model.
[0230] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0231] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting carbon emissions from urban logistics based on the ARIMA model, characterized in that: include: Divide the city into a number of non-intersecting and uniform grids, and calculate the carbon emission data time series of each grid based on the city's big data; Based on the urban big data, extracting multivariate spatiotemporal features of each of the grids; Decomposing each of the carbon emission data time series by EMD, and performing noise reduction processing by TSVD to obtain the corresponding denoised carbon emission matrix; On the same time scale, the multivariate spatiotemporal features of all grids are merged with the denoised carbon emission matrix to obtain a merged feature matrix; The combined feature matrix is used as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment.
2. The urban logistics carbon emission prediction method according to claim 1, characterized in that: The city big data includes fuel consumption data; the carbon emission data time series of each grid is calculated based on the city big data; it is expressed as: Where W t is the carbon emission data time series in any grid at time t∈(1,2...D), where D is the total number of time moments; K i,j is the CO2 emission coefficient of the jth fuel consumed by the i-th vehicle type; n t,i,j is the number of logistics vehicles of type i using type j fuel at time t; s i,j is the transportation mileage of the i-th vehicle using the j-th fuel at time t; e i,j The average consumption intensity per unit mileage of the i-th vehicle using the j-th fuel.
3. The urban logistics carbon emission prediction method according to claim 1, characterized in that: The urban big data also includes traffic data, satellite remote sensing data and meteorological data, wherein the satellite remote sensing data includes map data and road structure data; based on the urban big data, extracting the multivariate spatiotemporal features of each grid; including: Based on the traffic data, extracting traffic characteristics of any grid; wherein the traffic characteristics include one or a combination of any of the following: number of start operations, speed expectation, speed standard deviation, number of vehicles and trip length; Based on the map data, extract the POI features of any grid; wherein the POI categories include one or a combination of any of vehicle services, catering, shopping services, life services, sports and leisure services, health care services, hotels and residences, tourist attractions, culture and education, infrastructure services, financial services and enterprises; Based on the road structure data, extracting the road network features of any grid; wherein the road network features include one or a combination of any of the total length of expressways and the total length of other types of roads; Based on the meteorological data, the meteorological characteristics of any grid are extracted; wherein the meteorological characteristics include one or a combination of any several of weather and temperature.
4. The urban logistics carbon emission prediction method according to claim 1, characterized in that: Decomposing each carbon emission data time series by EMD includes: S311, identify the carbon emission data time series W of any grid t The local extreme value of constructs the upper envelope u(t) and the lower envelope l(t); calculates the average envelope m 1 (t): S312, the carbon emission data time series W t Subtract the mean envelope m 1 (t) becomes a new function: f 1 (t)=W t -m 1 (t) S313, check f 1 (s) Whether the conditions of the intrinsic mode function are met; S314, if f 1 (t) satisfies the condition, then the first IMF is obtained, otherwise f 1 (t) is used as the input of the subsequent iteration of the time series Wt; steps 31 to 33 are repeated j times until the first When these two conditions are met, the first IMF is obtained, as shown in the formula: f 2 (t)=f 1 (t)-m 2 (t) In the formula, f 2 (t) is the new function formed after one repetition, m 2 (t) is f 1 (t) average envelope; is the first IMF formed after repeating j times, m j+1 (t) is f j (t) average envelope; S315, according to the stop criterion, determine the number of IMFs generated during the screening process; after the first IMF is screened out, the remaining components R 1 (t) Then repeat steps 31 to 34 to find the next IMF until the residual term R n Stop when (t) is a monotonic function or a constant, and finally determine W t There are n IMFs: S316, carbon emission data time series W t Reconstruction is performed and expressed as the sum of the intrinsic mode function and the final residual term:
5. The urban logistics carbon emission prediction method according to claim 1, characterized in that: The method adopts TSVD to perform noise reduction processing to obtain the corresponding denoised carbon emission matrix; including: S321. Merge all carbon emission data time series to obtain the carbon emission matrix W at time t t,g : IN t,g ={W t,g1 ,IN t,g2 ,...,IN t,gd } Where W t,gi is the carbon emission data time series of the i-th grid g; S322, carbon emission matrix W t,g Perform SVD decomposition: W t,g =UΣV T Where U is the left singular vector matrix, Σ is the diagonal matrix, V T is the right singular vector matrix; S323, select the first r largest singular values in the matrix Σ, ignore the remaining smaller singular values, and select a truncation value r to obtain the truncated matrix Σ r : W t,g,r =U r S r V r T Where W t,g,r is the denoised carbon emission matrix at time t; U r 、V r T are the left and right singular vector matrices after truncation, respectively.
6. The urban logistics carbon emission prediction method according to claim 1, characterized in that: On the same time scale, the multivariate spatiotemporal features of all grids are merged with the denoised carbon emission matrix to obtain a merged feature matrix; it is expressed as: S t ={W t,g,r ,F T,t ,F P,t ,F R,t ,F M,t } In the formula, S t is the merged feature matrix within time t; W t,g,r is the denoised carbon emission matrix at time t; F T,t ,F P,t ,F R,t ,F M,t Represents multivariate spatiotemporal characteristics, which refer to the traffic characteristics, POI characteristics, road network characteristics, and meteorological characteristics of all grids at time t.
7. The urban logistics carbon emission prediction method according to claim 1, characterized in that: The method uses the combined feature matrix as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment; including: S51, build ARIMA model; merge feature matrix S t Perform d-order differences to make it a stationary series Δ d S t Applied to the ARIMA model: In the formula, δ m and λ n are the parameters of AR and MA, ρ t is the prediction error at time t; ρ t-n is the random error in the past; m and n are the indexes of lagged values in the AR model and lagged errors in the MA model, respectively; Let the error ρ t The minimum is zero, and this is taken as the optimization goal, and the final objective function F object (V,Δ d S t ,δ m ,λ n ,ρ t-n ) is formalized as shown in the formula: In the formula, the first term F1 processes the matrix data Δ after TSVD denoising and merging d S t , the second term F2 deals with the prediction error of the ARIMA model; Min is the minimization function, is the two-norm, V is the right singular vector V T The transpose of , h = p + d + q is the time minimum, p represents the count of lagged observations, d represents the difference level required for data stability, and q represents the number of lagged forecast errors; The augmented Lagrangian method is used to make the objective function F object (V,Δ d S t ,δ m ,λ n ,ρ t-n ) minimum; including: Consider V, δ m , n and ρ t-n is a constant, and calculate Δ d S t The partial derivative of , and then equal it to zero; then Δ d S t Updated as follows: Therefore, F1 is interpreted as an orthogonal projection problem, and its global optimal solution is AB T , where A and B represent Left and right singular vectors after singular value decomposition: In the ARIMA model, the Yule-Walker method is used to calculate the parameter δ m and λ n Estimate the error term ρ t-n Update, calculate its partial derivative and set it to zero, as shown in the formula: In the formula, h+1-D represents the time span, (h+1-D)λ n As the denominator, it represents the normalization of the accumulated error; S52, predict the carbon emission value Δ at the next moment D+1 d S D+1 : By the matrix Δ d S D+1 Perform inverse d-order difference and inverse EMD to obtain the prediction matrix S D+1 ;include: Δ d S D+1 Perform inverse d-order difference to obtain After the reverse difference, Perform inverse EMD to obtain the urban logistics carbon emission matrix S at the next moment D+1 :
8. An urban logistics carbon emission prediction system based on the ARIMA model, characterized in that: include: The division and calculation module is used to divide the city into a number of non-intersecting and uniform grids, and calculate the carbon emission data time series of each grid based on the city's big data; An extraction module, used for extracting multivariate spatiotemporal features of each of the grids based on the urban big data; A decomposition and denoising module, used to decompose each of the carbon emission data time series by EMD, and perform denoising processing by TSVD to obtain a corresponding denoised carbon emission matrix; The merging module is used to merge the multivariate spatiotemporal features of all grids with the denoised carbon emission matrix on the same time scale to obtain a merged feature matrix; The prediction module is used to use the combined feature matrix as the input of the ARIMA model to predict the urban logistics carbon emission matrix at the next moment.
9. A storage medium, characterized in that: It stores a computer program for predicting carbon emissions from urban logistics based on the ARIMA model, wherein the computer program enables the computer to execute the method for predicting carbon emissions from urban logistics based on the ARIMA model as described in any one of claims 1 to 7.
10. An electronic device, characterized in that: include: one or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include programs for executing the urban logistics carbon emission prediction method based on the ARIMA model as described in any one of claims 1 to 7.
