Generation method of road traffic carbon emission prediction model and carbon emission prediction method

By constructing a road traffic carbon emission mechanism model and data-driven model and carrying out weighted fusion, the problem of difficult to take into account the prediction accuracy and interpretability of road traffic carbon emissions in the existing technology is solved, and high-precision and high-interpretational carbon emission prediction are achieved.

CN119918579AInactive Publication Date: 2025-05-02WUHAN UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411988532.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing road traffic carbon emission prediction methods cannot ensure the interpretability of the algorithm while improving the prediction accuracy.

Method used

By obtaining the correlation heat map of road traffic flow, building a road traffic carbon emission mechanism model and a data-driven model, combining the mechanism and data dual-driven model, weighted fusion is carried out to obtain the final carbon emission prediction model.

Benefits of technology

It has achieved the improvement of the accuracy of road traffic carbon emission prediction while maintaining the interpretability of the algorithm, and can more comprehensively evaluate the overall trend of road traffic carbon emissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918579A_ABST
    Figure CN119918579A_ABST
Patent Text Reader

Abstract

The invention provides a generation method of a road traffic carbon emission prediction model and a carbon emission prediction method. The method comprises the following steps: acquiring a correlation heat map of road traffic flow; respectively modeling the carbon emission corresponding to the traffic flow and the on-road parking to obtain a road traffic carbon emission mechanism model; constructing a road traffic carbon emission data driving model; the road traffic carbon emission data driving model comprises an input characteristic variable selection network, a convolutional network, a connection layer and a space-time fusion layer which are connected in sequence, the input characteristic variable selection network obtains the weight of an input characteristic variable based on a gating residual network and a normalized exponential function; constructing an initial road traffic carbon emission prediction model based on the road traffic carbon emission mechanism model and the road traffic carbon emission data driving model; and training a road traffic carbon emission prediction model based on the heat map. The method can solve the problem that an existing road traffic carbon emission prediction method cannot guarantee the interpretability of the algorithm while improving the prediction precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of carbon emission prediction, and in particular to a method for generating a road traffic carbon emission prediction model and a carbon emission prediction method. Background Art

[0002] Climate change caused by greenhouse gas emissions is a major challenge facing mankind today. With the continuous increase in the number of motor vehicles, carbon emissions in the transportation industry are increasing year by year. Therefore, studying the method of calculating road traffic carbon emissions is of great significance for the transportation sector to implement precise emission reduction and source control.

[0003] Road traffic carbon emissions are affected by many factors. The traditional method of measuring traffic flow carbon emissions uses a mechanism model. The mechanism model can accurately measure the overall trend of road traffic carbon emissions, but it is difficult to measure the disturbances caused by minor influencing factors. The data-driven model can capture these disturbances in detail, but it lacks interpretability when used for overall trend measurement.

[0004] Deep learning methods can automatically learn the characteristics of complex high-dimensional nonlinear data. The current mainstream GCN network uses a static graph structure, which cannot describe the dynamic spatial relationship between nodes in the actual road network, resulting in low prediction accuracy.

[0005] In summary, the existing road traffic carbon emission prediction methods cannot improve the prediction accuracy while ensuring the interpretability of the algorithm. Summary of the invention

[0006] In view of this, it is necessary to provide a method for generating a road traffic carbon emission prediction model and a carbon emission prediction method to solve the technical problem that the existing road traffic carbon emission prediction method cannot ensure the interpretability of the algorithm while improving the prediction accuracy.

[0007] In order to solve the above problems, on the one hand, the present invention provides a method for generating a road traffic carbon emission prediction model, comprising: Get the correlation heat map of road traffic flow; The carbon emissions corresponding to traffic flow and on-street parking are modeled separately to obtain the road traffic carbon emission mechanism model; Constructing a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; an input feature variable selection network, used to obtain the weight of the input feature variable based on a gated residual network and a normalized exponential function, and to perform weighted assignment on the feature variable after mapping transformation based on the weight, so as to realize the selection of input features; Based on the road traffic carbon emission mechanism model and the road traffic carbon emission data-driven model, an initial road traffic carbon emission prediction model is constructed; The road traffic carbon emission prediction model is trained based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

[0008] In a possible implementation, the convolutional network includes: a graph convolutional network and a temporal convolutional network.

[0009] In a possible implementation, obtaining a correlation heat map of road traffic flow includes: Traffic flow curve graphs at different time scales are obtained, and a traffic flow correlation heat map is drawn based on the traffic flow curve graphs.

[0010] In one possible implementation, the carbon emissions corresponding to traffic flow and on-street parking are modeled separately to obtain a road traffic carbon emission mechanism model, including: Based on the speed of the vehicle and the relationship model between carbon emissions and vehicle speed, determine the direct carbon emissions generated by vehicle driving; Construct a road resistance function model, and perform linear reduction on the road resistance function model to obtain a reduced model; Based on the road resistance function model and the reduced model, as well as the relationship model between carbon emissions and vehicle speed, the indirect carbon emissions from on-street parking are determined; Based on the direct carbon emissions generated by vehicle driving and the indirect carbon emissions from on-road parking, the road traffic carbon emission mechanism model is determined.

[0011] In a possible implementation, the relationship model between carbon emissions and vehicle speed is:

[0012] in, E represents carbon emissions, v is the vehicle speed, κ、λ as well as γ These are all set model parameters.

[0013] In a possible implementation, the road resistance function model is:

[0014] The reduced model is:

[0015] in, is the vehicle speed, v 0 is the road clear speed, α , β and c are model parameters,q is the flow rate on the road segment, R is the spatial obstruction rate, R is the time obstacle rate, k 1 and k 2 represents the slope corresponding to the linear reduction.

[0016] On the other hand, the present invention also provides a road traffic carbon emission prediction method, comprising: Obtain a correlation heat map of the road traffic flow to be predicted; The correlation heat map of the road traffic flow to be predicted is input into the road traffic carbon emission prediction model obtained by any of the above methods to obtain the road traffic carbon emission prediction result.

[0017] On the other hand, the present invention also provides a device for generating a road traffic carbon emission prediction model, comprising: A heat map acquisition module is used to obtain a correlation heat map of road traffic flow; The first model building module is used to model the carbon emissions corresponding to traffic flow and on-street parking respectively, and obtain a road traffic carbon emission mechanism model; The second model construction module is used to construct a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; the input feature variable selection network is used to obtain the weight of the input feature variable based on the gated residual network and the normalized exponential function, and to perform weighted assignment on the feature variable after mapping transformation based on the weight to achieve input feature selection; The third model building module is used to build an initial road traffic carbon emission prediction model based on the road traffic carbon emission mechanism model and the road traffic carbon emission data driven model; The model training module is used to train the road traffic carbon emission prediction model based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

[0018] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of the method for generating a road traffic carbon emission prediction model as described in any one of the above items, or to implement the steps of the road traffic carbon emission prediction method as described above.

[0019] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps of a method for generating a road traffic carbon emission prediction model as described in any one of the above items, or implements the steps of a road traffic carbon emission prediction method as described above.

[0020] The beneficial effects of adopting the above-mentioned implementation method are: the generation method of the road traffic carbon emission prediction model and the carbon emission prediction method provided by the present invention respectively model the carbon emissions corresponding to traffic flow and on-street parking to obtain a road traffic carbon emission mechanism model; construct a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer and a spatiotemporal fusion layer connected in sequence; an input feature variable selection network, which is used to obtain the weight of the input feature variable based on a gated residual network and a normalized exponential function, and weightedly assign values ​​to the feature variables that have been mapped and transformed based on the weights to achieve input feature selection; based on the road traffic carbon emission mechanism model and the road traffic carbon emission data-driven model, an initial road traffic carbon emission prediction model is constructed; based on the correlation heat map of road traffic flow, the road traffic carbon emission prediction model is trained to obtain a fully trained road traffic carbon emission prediction model.

[0021] By modeling traffic flow and on-street parking separately, carbon emission data is calculated based on the input road and berth information. It not only takes into account the carbon emissions of conventional traffic flow, but also conducts a detailed analysis of parking behavior and its interference with traffic flow, which helps to more comprehensively evaluate the overall trend of road traffic carbon emissions and has good interpretability. The data-driven model uses a convolutional network to form a hybrid model, and obtains carbon emission data by mining the information fitting of road traffic data. It makes full use of the feature extraction advantages of deep learning networks for nonlinear and non-stationary data, and can better measure the disturbance of road traffic carbon emissions. In addition, the introduction of feature enhancement strategies automatically learns the importance of each feature to the measurement of carbon emission disturbances, suppresses the feature variables that have a negative impact, and can enhance the model's learning ability for input features. The introduction of spatiotemporal correlation adaptive strategies can more comprehensively capture the dynamic spatiotemporal correlation of road traffic data, and can improve the accuracy of carbon emission disturbance measurement. Finally, in order to improve the prediction accuracy while ensuring the interpretability of the algorithm, the calculation results of the mechanism model and the data-driven model are weighted and fused to obtain the final carbon emissions. Therefore, the present invention can solve the technical problem that the existing road traffic carbon emission prediction method cannot ensure the interpretability of the algorithm while improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A flow chart of an embodiment of a method for generating a road traffic carbon emission prediction model provided by the present invention; Figure 2 A schematic diagram of the structure of the road traffic carbon emission prediction model provided by the present invention; Figure 3 A schematic diagram of the 24-hour traffic flow on a working day provided by the present invention; Figure 4 A schematic diagram of traffic flow on the first day of three consecutive weeks provided by the present invention; Figure 5 A schematic diagram of traffic flow for 24 hours on non-working days provided by the present invention; Figure 6 A schematic diagram of the correlation of traffic flow for seven days a week provided by the present invention; Figure 7 A schematic diagram of traffic flow volatility analysis provided by the present invention; Figure 8 A schematic diagram of traffic flow on a five-day working day provided by the present invention; Fig. 9 A schematic diagram of traffic flow on two non-working days provided by the present invention; Fig.10 A schematic diagram of the data-driven model architecture provided by the present invention; Fig.11 A schematic diagram of the structure of a feature selection network module provided by the present invention; Fig.12 A schematic diagram of the structure of the multi-head attention mechanism provided by the present invention; Fig.13 A flow chart of an embodiment of a method for predicting carbon emissions from road traffic provided by the present invention; Fig.14 A principle block diagram of an embodiment of a device for generating a road traffic carbon emission prediction model provided by the present invention; Fig.15 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0025] In the description of the embodiments of the present application, unless otherwise specified, “plurality” means two or more than two.

[0026] The terms "including" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or equipment comprising a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products or equipment.

[0027] The naming or numbering of the steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0028] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places 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.

[0029] The present invention provides a method for generating a road traffic carbon emission prediction model and a carbon emission prediction method, which are respectively described below.

[0030] like Figure 1 As shown, the present invention provides a method for generating a road traffic carbon emission prediction model, comprising: S101, obtaining a correlation heat map of road traffic flow; S012. Model the carbon emissions corresponding to traffic flow and on-street parking respectively to obtain a road traffic carbon emission mechanism model; S103, constructing a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; the input feature variable selection network is used to obtain the weight of the input feature variable based on a gated residual network and a normalized exponential function, and to perform weighted assignment on the feature variable after mapping transformation based on the weight to achieve input feature selection; the convolutional network includes: a graph convolutional network and a temporal convolutional network; S104. Based on the road traffic carbon emission mechanism model and the road traffic carbon emission data-driven model, construct an initial road traffic carbon emission prediction model; S105. Training a road traffic carbon emission prediction model based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

[0031] It is understandable that the mechanism model can accurately measure the overall trend of road traffic carbon emissions, but it is difficult to measure the disturbances caused by secondary influencing factors. The data-driven model can capture these disturbances in detail, but lacks interpretability when used for overall trend measurement. The mechanism and data dual-driven model can well integrate the advantages of both.

[0032] The mechanism model calculates carbon emission data based on the input road and parking information by modeling traffic flow and on-street parking separately. It not only considers the carbon emissions of conventional traffic flow, but also conducts a detailed analysis of parking behavior and its interference with traffic flow, which helps to more comprehensively evaluate the overall trend of road traffic carbon emissions and has good interpretability. The data-driven model uses a hybrid model composed of a graph convolutional network and a temporal convolutional network to obtain carbon emission data by mining the information fitting of road traffic data. It makes full use of the feature extraction advantages of deep learning networks for nonlinear and non-stationary data, and can better measure the disturbance of road traffic carbon emissions. In addition, the introduction of feature enhancement strategies automatically learns the importance of each feature for carbon emission disturbance measurement, suppresses feature variables that have negative effects, and can enhance the model's learning ability for input features. The introduction of spatiotemporal correlation adaptive strategies can more comprehensively capture the dynamic spatiotemporal correlation of road traffic data, which can improve the accuracy of carbon emission disturbance measurement. Finally, in order to improve the prediction accuracy while ensuring the interpretability of the algorithm, the measurement results of the mechanism model and the data-driven model are weighted and fused to obtain the final carbon emissions.

[0033] In view of this, the present invention proposes a method for generating a road traffic carbon emission prediction model. The obtained road traffic carbon emission prediction model is a road traffic carbon emission prediction model based on a dual-drive model, which can be used to predict road traffic carbon emissions. The present invention has the following important improvements: 1) A road carbon emission estimation model based on dual mechanism and data drive is proposed to improve the accuracy while ensuring the interpretability of the algorithm.

[0034] 2) An input feature enhancement strategy based on residual connection is proposed to automatically learn the importance of each feature variable to the measurement of carbon emission disturbances, suppress feature variables that may have negative effects, and enhance the model's ability to learn input features.

[0035] 3) A spatiotemporal correlation adaptive strategy based on a multi-head attention mechanism is proposed. The spatiotemporal multi-head attention mechanism is used to fully capture the dynamic spatiotemporal correlation of road network nodes and improve the accuracy of carbon emission disturbance measurement.

[0036] In some embodiments, obtaining a correlation heat map of road traffic flow includes: Traffic flow curve graphs at different time scales are obtained, and a traffic flow correlation heat map is drawn based on the traffic flow curve graphs.

[0037] In some embodiments, the carbon emissions corresponding to traffic flow and on-street parking are modeled separately to obtain a road traffic carbon emission mechanism model, including: Based on the speed of the vehicle and the relationship model between carbon emissions and vehicle speed, the direct carbon emissions generated by vehicle driving are determined; the direct carbon emissions generated by vehicle driving are the carbon emissions corresponding to the traffic flow; Construct a road resistance function model, and perform linear reduction on the road resistance function model to obtain a reduced model; Based on the road resistance function model and the reduced model, as well as the relationship model between carbon emissions and vehicle speed, the indirect carbon emissions from on-street parking are determined; Based on the direct carbon emissions generated by vehicle driving and the indirect carbon emissions from on-road parking, the road traffic carbon emission mechanism model is determined.

[0038] In some embodiments, the relationship model between carbon emissions and vehicle speed is:

[0039] in, E represents carbon emissions, v is the vehicle speed, κ、λ as well as γ These are all set model parameters.

[0040] In some embodiments, the road resistance function model is:

[0041] The reduced model is:

[0042] in, is the vehicle speed, v 0 is the road clear speed, α , β and c are model parameters, q is the flow rate on the road segment, R is the spatial obstruction rate, R is the time obstacle rate, k 1 and k 2 represents the slope corresponding to the linear reduction.

[0043] Aiming at nonlinear, multidimensional, and spatiotemporal road traffic data, in order to improve the accuracy of carbon emission calculation, this paper proposes a method for generating a road traffic carbon emission calculation model based on dual-driven mechanism and data, and a carbon emission prediction method. Figure 2 shown.

[0044] First, the spatiotemporal characteristics of road traffic flow are analyzed, and then a road traffic carbon emission mechanism model considering the impact of on-street parking is constructed. Based on the analysis of road traffic flow characteristics, a road traffic carbon emission data-driven model is constructed.

[0045] Step 1: Analysis of spatiotemporal characteristics of road traffic flow Traffic flow refers to the flow of vehicles on the road, which can be described by the number of vehicles passing through in a period of time. As traffic volume continues to increase, traffic carbon emissions also show an upward trend, and there is an obvious positive correlation between the two. To measure road traffic carbon emissions, it is necessary to analyze the characteristics of traffic flow data. Traffic flow data has spatiotemporal correlation characteristics, and traffic flow data at different sampling intervals show similar change patterns.

[0046] Traffic flow is related to multiple time scales, with similar daily variation patterns in consecutive working days and similar weekly variation patterns in consecutive weeks. In addition, there are obvious differences in the traffic flow variation trends between working days and non-working days.

[0047] The present invention selects the traffic flow data of the 14203 road sections to draw traffic flow curves of different time scales, and uses the Spearman correlation coefficient (refer to Formula 1) to draw a correlation heat map of the traffic flow in one week.

[0048] (1) In the formula, X and Y For two data series, n is the length of the sequence.

[0049] Depend on Figure 3 It can be seen that the traffic flow has similar changing trends in consecutive working days, with stable morning and evening peak periods; Figure 4It can be seen that the traffic flow change patterns on the first day of three consecutive weeks are highly similar. Figure 3 and Figure 5 There is a more obvious morning peak phenomenon on weekdays, while the traffic flow on non-weekday mornings is relatively stable, and the change trend is different from that on weekdays. Figure 6 It can be seen that the correlation coefficients of traffic flow on the five working days of the week are all greater than 0.7, and the correlation coefficients of traffic flow on non-working days and working days are all less than 0.55, indicating that the traffic flow change trends on working days are relatively similar, but there are differences with the change trends on non-working days.

[0050] Due to factors such as special weather and temporary road conditions, traffic flow may fluctuate irregularly in some areas.

[0051] The present invention selects the traffic flow data of section 14203, uses the STL time series decomposition method to filter out the trend and seasonal components of traffic flow, and draws a curve graph of its fluctuation component, such as Figure 7 As shown. Figure 7 It can be seen that traffic flow shows obvious irregular changes in some areas, that is, fluctuation characteristics. This random fluctuation makes the measurement more challenging.

[0052] Traffic flows on different roads in the road network affect each other, and there is spatial correlation between adjacent roads. For example, traffic flows on adjacent sections in the same direction are related to each other, and the status of downstream sections will be affected by upstream sections.

[0053] The present invention selects the traffic flow data of adjacent and connected sections 14201, 14202 and 14203 to draw a traffic flow curve diagram, such as Figure 7 As shown. Select the traffic flow data of sections 14201, 14202, 14203, 14204, 14205 and 14206, and use the Spearman correlation coefficient to calculate their correlation with section 14202. Analysis Figure 8 and Fig. 9 It can be seen that on working days and non-working days, the traffic flow data change trends between adjacent sections 14201, 14202 and 14203 in the same direction are very similar, indicating that there is a correlation between them. The correlation coefficients between 14202 and its adjacent sections are all greater than 0.8, which shows a strong correlation.

[0054] Step 2: Construct a road traffic carbon emission mechanism model taking into account on-street parking Construct a road traffic carbon emission mechanism model that takes into account the impact of on-street parking. By analyzing and modeling traffic flow carbon emissions and on-street parking carbon emissions, a theoretical explanation is provided for the accurate calculation of carbon emission trends.

[0055] Traffic flow carbon emissions are the carbon emissions generated by vehicles normally traveling on the road. Since road traffic data does not contain second-by-second operating speeds, only average speeds, MOVES can be used to calculate CO2 emission factors. MOVES is a database-driven software that provides flexibility in input and output during the emission estimation process.

[0056] The MOVES model calculates emission factors by determining the vehicle operating mode, which is based on speed, acceleration and vehicle specific power (VSP): (2) In the formula vt , at Indicates time t The speed and acceleration of m Indicates the mass of the vehicle, A, B, C They represent rolling resistance, rotational resistance and air resistance coefficient respectively.

[0057] By providing the average driving speed and road characteristics, a default driving cycle that best fits the given data can be assigned, and an emission factor associated with the average driving speed distribution can be provided. The total emissions are then calculated by multiplying the emission factor by the vehicle kilometers traveled. In addition, MOVES requires other input data, such as energy type, vehicle model information, date, and weather.

[0058] On-street parking carbon emissions include direct and indirect carbon emissions. Direct on-street parking carbon emissions are carbon emissions generated when vehicles park in or leave parking spaces on the road. The time consumed and direct carbon emissions generated by each parking mode can be estimated based on the statistical results of field surveys, as shown in Table 1. Then, combined with the number of vehicles parked in and out of parking spaces in the parking space occupancy data, direct on-street parking carbon emissions can be directly calculated.

[0059] Table 1: Direct carbon emissions from on-street parking for different parking methods

[0060] Indirect carbon emissions from on-street parking are the excess carbon emissions caused by the disturbance of parking on the normal road. This paper uses the Bureau of Public Roads (BPR) model widely used in the transportation field to study the functional relationship between vehicle speed and flow under the influence of on-street parking, and is used to calculate indirect carbon emissions from on-street parking. The expression of the BPR model based on speed parameters is: (3) In the formula, v ( q , v0 , c ) is the flow rate on the road section q When the traffic capacity isc The speed of the vehicle, v 0 is the road clear speed, c is the maximum actual capacity of the road. α , β is a model parameter, and its possible values ​​are 0.15 and 4.0.

[0061] This model only reflects the impact of traffic load on running speed, while on-street parking will occupy road space, causing friction and blocking effects on normal traffic flow. The friction effect can be expressed as the spatial obstacle rate. R In addition to the type of parking spaces, the impact of the number of parking spaces occupied on traffic flow must also be considered. The spatial obstacle rate is corrected according to the number of parking spaces occupied, and the formula is: (4) In the formula, b is the berth width, B is the road width (excluding sidewalks), n is the number of occupied berths, N It is the total number of berths on the road section.

[0062] The vehicle speed and the spatial obstacle rate are negatively correlated linearly. Formula 3 is linearly reduced to the following expression: (5) Time barrier rate R To describe it, the more vehicles parked and leaving in a period of time, the longer the blocking effect on the vehicles on the road. The time obstacle rate calculation formula is: (6) (7) In the formula, is the accumulated parking blockage time within a period of time. T is the duration of the statistical time period, is the number of vehicles parked in the parking space; The average blocking time of the road by parked vehicles; is the number of vehicles leaving the parking space; It is the average blocking time of the road by the leaving vehicles.

[0063] There is a negatively correlated quadratic function relationship between the vehicle running speed and the time obstacle rate. Formula 5 is reduced again and the expression is: (8) The carbon emissions of a vehicle during driving are quadratic in relationship to its speed, and the simplified formula is: E = κ 2- λv+ γ (9) In the formula, E represents carbon emissions, v is the running speed of the vehicle, κ , λ , γ is the model parameter.

[0064] According to investigation and research, most of the on-street parking spaces are parallel, so the present invention only considers the parallel parking scenario. The existing data includes speed, flow, berth occupancy data and basic berth information. The present invention uses statistical methods to calculate the average blocking impact time of 19.28 seconds every five minutes, and the average time obstacle rate is 0.064. Use the fitting function of OriginPro data processing software to set Formula 8 as a custom function. Enter the traffic flow data of a parallel parking section into the software, and set the value of the free-flowing speed. The function fitting result is R 2 is 0.806, the variance analysis results are shown in Table 2, and the fitting formula is: (10) Table 2: Analysis of variance of fitting results

[0065] As shown in Table 2, the significance F is less than 0.05, which can pass the significant level test, proving that the model is effective. After using the mechanism model to reduce the speed, the direct carbon emissions are calculated according to Formula 9. The difference in carbon emissions before and after the reduction is the indirect carbon emissions of on-street parking. R The value of 2 is only 0.806, and the fitting accuracy is not high. This is because the mechanism model cannot take into account the impact of factors such as weather and holidays on traffic flow. There is an error between the fitting result and the true value, which will lead to a large error in the final carbon emission calculation.

[0066] Step 3: Build a graph-based road traffic carbon emission data-driven model The data-driven model uses graph convolutional networks to mine spatial correlations between nodes and uses temporal convolutional networks to mine temporal correlations. Its overall structure is as follows: Fig.10 As shown. The graph convolutional network consists of GCN and GNN. GCN uses the input adjacency matrix To capture spatial features, GNN uses an adaptive adjacency matrix Capturing hidden spatial features. The adaptive adjacency matrix is ​​constructed by randomly initializing the learnable parameters of the two nodes. , N is the number of nodes, F is the number of features for each node, first by E 1, E2 to obtain the adaptive spatial dependency, then use the nonlinear activation function ReLU to eliminate the quadratic dependency, and finally use the softmax function to obtain the adaptive adjacency matrix , the calculation formula is: (11) Graph neural networks can effectively represent nodes by aggregating neighbor information. Increasing the number of network layers can theoretically aggregate high-order neighbor information, but nodes are prone to over-smoothing, that is, the features of nodes and their neighbors are evenly mixed, resulting in the indistinguishability of the features of different nodes, causing network performance to degrade. The adaptive graph gating mechanism allows each layer of the network to selectively update and forget the hidden spatial attributes between nodes when merging the results of the previous layer, so that each node obtains more sufficient and reasonable high-dimensional features. Use fusion factors Indicates how much information the next layer has updated. Indicates how much information the next layer has forgotten.

[0067] (12) In the formula, X For input data, M is the adaptive graph convolution parameter matrix, σ is the sigmoid activation function.

[0068] Output of the l+1th layer of the gated graph convolutional network The calculation formula is: (13) In the formula, e is the Hadamard product.

[0069] The temporal convolutional network uses dilated causal convolution (DCC) and residuals to capture the temporal trend of nodes, enabling it to extract features and achieve predictions from large sample time series, and can effectively solve the performance degradation problem of deep networks during network training. Dilated causal convolution maintains the causal relationship of the time series by padding the input with zeros, ensuring that only historical information is used when predicting the current time step. TCN improves the receptive field by stacking causal convolution layers with different dilation factors without significantly increasing the computational cost. DCC is a convolution operation that skips the input sequence. Given a one-dimensional input sequence and a filter, the first t The expression of the dilated causal convolution operation is: (14) In the formula, K represents the core length, d is the expansion factor.

[0070] Road traffic data is a typical time series data. TCN can mine the time trend of data by stacking many convolutional layers, but it may lead to over-smoothing, gradient vanishing and gradient explosion. Here, a gating mechanism is used to solve the problem, which reduces unnecessary information transmission while retaining long-term information. The input of the gated time convolutional network is X , No. l +1 layer output The calculation formula is: (15) In the formula M 1, M 2, b and c are model parameters, g is the activation function.

[0071] The application of existing data-driven models in the measurement of road traffic carbon emissions still has two shortcomings: First, there are many factors that affect road traffic carbon emissions, from which a large number of features related to carbon emissions can be extracted. When faced with many features, the model is easily disturbed by noise data or irrelevant features, resulting in a decrease in model performance. Second, the adaptive gated graph convolutional network and the gated temporal convolutional network can capture the hidden dependencies between close nodes in the road network topology graph, but the spatial dependencies between nodes that are far apart and the multi-time scale correlation of traffic flow data are not fully considered. The specific improvement strategies are as follows: A. Input feature enhancement strategy based on residual connection The input data of the data-driven model is of high dimension and has different correlations with carbon emissions. An input feature variable selection network is established to automatically learn the importance of each feature variable to the measurement results in a data-driven way, suppress feature variables that may have a negative impact, and enhance the quality of model input. Its structure is as follows: Fig.11 shown.

[0072] The feature selection network first obtains the weight of the input feature variable through the gated residual network (GRN) and the softmax function, and then assigns weighted values ​​to the feature variables after the mapping transformation, thereby realizing the selection of the input features. t The output of the feature selection network at this moment is: (16) (17) In the formula, for t The input feature vector of the network at time t.

[0073] GRN is the key module of the feature selection network. The calculation process of the module is: (18) (19) (20) In the formula, LayerNorm is the normalization function, GLU is the gated linear unit; ELU is a linear non-saturated activation function; is the learnable weight parameter; is the bias parameter.

[0074] GLU adjusts the input of the model through its gating mechanism, thereby enhancing the flexibility and adaptability of the model. The calculation method of GLU is: (twenty one) In the formula, x is the input of the gating layer; is the learnable weight parameter; is the bias parameter.

[0075] B. Spatiotemporal Correlation Adaptive Strategy Based on Multi-Head Attention Mechanism In the spatial dimension, there is spatial correlation between road traffic flows at different nodes, and this correlation changes dynamically over time; in the temporal dimension, there is temporal correlation between traffic flows at different times, and this correlation changes nonlinearly with the increase of the time step. The present invention integrates the spatial multi-head attention mechanism into GCN to dynamically adjust the spatial correlation between nodes; integrates the temporal multi-head attention mechanism into TCN to dynamically adjust the temporal correlation of data at different times, thereby extracting the global spatiotemporal correlation information in the data and improving the calculation accuracy of the model. Fig.12 shown.

[0076] The formula of the multi-head spatial attention mechanism is: (twenty two) (twenty three) (twenty four) The formula of the multi-head temporal attention mechanism is: (25) (26) (27) In the formula, N is the number of nodes, F is the number of channels of input data, t is the length of the time series. are learnable parameters. His the number of attention heads. The spatiotemporal matrix SAT , TAt It is calculated dynamically based on the current input. Represented as a spatial attention matrix SAT In the node i With Node j The strength of the dependence between them. Represented as the attention matrix at time TAt In, time i With time j The strength of the dependence between them.

[0077] The present invention has the following technical effects: This paper compares the mechanism model, the data-driven model and the dual-driven model proposed in the present invention to verify the effectiveness of the proposed dual-driven model, and compares the improved model in this paper with other mainstream spatiotemporal mining algorithms to verify its superiority.

[0078] In order to verify the effectiveness and adaptability of the dual-drive model proposed in this invention in different scenarios, four roads are selected, numbered 1, 2, 3, and 4, where 1 and 2 have on-street parking, and 3 and 4 do not have on-street parking, and their carbon emissions on working days and non-working days are calculated respectively, and the calculation results are shown in Table 3. As can be seen from Table 3, the evaluation indicators of the carbon emission calculation results under different roads and different time scenarios are maintained at a good level, which shows that the dual-drive model in this paper has good generalization performance and high calculation accuracy in the task of road traffic carbon emission calculation.

[0079] Table 3: Error indicators of the measurement results of four roads in different scenarios

[0080] like Fig.13 As shown, the present invention also provides a road traffic carbon emission prediction method, comprising: S1301, obtaining a correlation heat map of the road traffic flow to be predicted; S1302: Input the correlation heat map of the road traffic flow to be predicted into the road traffic carbon emission prediction model obtained by any of the above methods to obtain the road traffic carbon emission prediction result.

[0081] like Fig.14 As shown, the present invention also provides a device 1400 for generating a road traffic carbon emission prediction model, comprising: A heat map acquisition module 1401 is used to acquire a correlation heat map of road traffic flow; The first model building module 1402 is used to model the carbon emissions corresponding to traffic flow and on-street parking respectively, and obtain a road traffic carbon emission mechanism model; The second model construction module 1403 is used to construct a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; the input feature variable selection network is used to obtain the weight of the input feature variable based on the gated residual network and the normalized exponential function, and to perform weighted assignment on the feature variable after mapping transformation based on the weight to achieve input feature selection; The third model building module 1404 is used to build an initial road traffic carbon emission prediction model based on the road traffic carbon emission mechanism model and the road traffic carbon emission data driven model; The model training module 1405 is used to train the road traffic carbon emission prediction model based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

[0082] The device for generating a road traffic carbon emission prediction model provided in the above embodiment can implement the technical solution described in the above embodiment of the method for generating a road traffic carbon emission prediction model. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above embodiment of the method for generating a road traffic carbon emission prediction model, which will not be repeated here.

[0083] like Fig.15 As shown, the present invention also provides an electronic device 1500. The electronic device 1500 includes a processor 1501, a memory 1502 and a display 1503. Fig.15 Only some components of the electronic device 1500 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0084] In some embodiments, the memory 1502 may be an internal storage unit of the electronic device 1500, such as a hard disk or memory of the electronic device 1500. In other embodiments, the memory 1502 may also be an external storage device of the electronic device 1500, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 1500.

[0085] Furthermore, the memory 1502 may include both an internal storage unit of the electronic device 1500 and an external storage device. The memory 1502 is used to store application software installed in the electronic device 1500 and various data.

[0086] In some embodiments, processor 1501 can be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program code or process data stored in memory 1502, such as the method for generating a road traffic carbon emission prediction model or the road traffic carbon emission prediction method in the present invention.

[0087] In some embodiments, the display 1503 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 1503 is used to display information on the electronic device 1500 and to display a visual user interface. The components 1501-1503 of the electronic device 1500 communicate with each other via a system bus.

[0088] In some embodiments of the present invention, when the processor 1501 executes the generation program of the road traffic carbon emission prediction model in the memory 1502, the following steps may be implemented: Get the correlation heat map of road traffic flow; The carbon emissions corresponding to traffic flow and on-street parking are modeled separately to obtain the road traffic carbon emission mechanism model; Constructing a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; an input feature variable selection network, used to obtain the weight of the input feature variable based on a gated residual network and a normalized exponential function, and to perform weighted assignment on the feature variable after mapping transformation based on the weight, so as to realize the selection of input features; Based on the road traffic carbon emission mechanism model and the road traffic carbon emission data-driven model, an initial road traffic carbon emission prediction model is constructed; The road traffic carbon emission prediction model is trained based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

[0089] When the processor 1501 executes the road traffic carbon emission prediction program in the memory 1502, the following steps may be implemented: Obtain a correlation heat map of the road traffic flow to be predicted; The correlation heat map of the road traffic flow to be predicted is input into the road traffic carbon emission prediction model obtained by the above method to obtain the road traffic carbon emission prediction result.

[0090] It should be understood that when the processor 1501 executes the road traffic carbon emission prediction model generation program or the road traffic carbon emission prediction program in the memory 1502, in addition to the above functions, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.

[0091] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 1500 mentioned, and the electronic device 1500 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1500 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0092] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the method for generating a road traffic carbon emission prediction model provided by the above methods, the method comprising: Get the correlation heat map of road traffic flow; The carbon emissions corresponding to traffic flow and on-street parking are modeled separately to obtain the road traffic carbon emission mechanism model; Constructing a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; an input feature variable selection network, used to obtain the weight of the input feature variable based on a gated residual network and a normalized exponential function, and to perform weighted assignment on the feature variable after mapping transformation based on the weight, so as to realize the selection of input features; Based on the road traffic carbon emission mechanism model and the road traffic carbon emission data-driven model, an initial road traffic carbon emission prediction model is constructed; The road traffic carbon emission prediction model is trained based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

[0093] Alternatively, when the computer program is executed by the processor, the method for predicting road traffic carbon emissions provided by the above methods is implemented, and the method includes: The correlation heat map of the road traffic flow to be predicted is input into the road traffic carbon emission prediction model obtained by the above method to obtain the road traffic carbon emission prediction result.

[0094] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0095] The above is a detailed introduction to the generation method of the road traffic carbon emission prediction model and the carbon emission prediction method provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for generating a road traffic carbon emission prediction model, characterized in that: include: Get the correlation heat map of road traffic flow; The carbon emissions corresponding to traffic flow and on-street parking are modeled separately to obtain the road traffic carbon emission mechanism model; Construct a data-driven model for carbon emissions from road traffic; the data-driven model for carbon emissions from road traffic includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; An input feature variable selection network is used to obtain the weight of the input feature variable based on the gated residual network and the normalized exponential function, and to perform weighted assignment on the feature variable after the mapping transformation based on the weight to achieve the selection of the input feature; Based on the road traffic carbon emission mechanism model and the road traffic carbon emission data-driven model, an initial road traffic carbon emission prediction model is constructed; The road traffic carbon emission prediction model is trained based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

2. The method for generating a road traffic carbon emission prediction model according to claim 1, characterized in that: The convolutional network includes: a graph convolutional network and a temporal convolutional network.

3. The method for generating a road traffic carbon emission prediction model according to claim 1, characterized in that: Get relevant heat maps of road traffic flow, including: Traffic flow curve graphs at different time scales are obtained, and a traffic flow correlation heat map is drawn based on the traffic flow curve graphs.

4. The method for generating a road traffic carbon emission prediction model according to claim 1, characterized in that: The carbon emissions corresponding to traffic flow and on-street parking are modeled separately to obtain the road traffic carbon emission mechanism model, including: Based on the speed of the vehicle and the relationship model between carbon emissions and vehicle speed, determine the direct carbon emissions generated by vehicle driving; Construct a road resistance function model, and perform linear reduction on the road resistance function model to obtain a reduced model; Based on the road resistance function model and the reduced model, as well as the relationship model between carbon emissions and vehicle speed, the indirect carbon emissions from on-street parking are determined; Based on the direct carbon emissions generated by vehicle driving and the indirect carbon emissions from on-road parking, the road traffic carbon emission mechanism model is determined.

5. The method for generating a road traffic carbon emission prediction model according to claim 4, characterized in that: The relationship model between carbon emissions and vehicle speed is: in, E represents carbon emissions, v is the vehicle speed, κ、λ as well as γ These are all set model parameters.

6. The method for generating a road traffic carbon emission prediction model according to claim 4, characterized in that: The road resistance function model is: The reduced model is: ; in, is the vehicle speed, v 0 is the road clear speed, α , β and c are model parameters, q is the flow rate on the road segment, R is the spatial obstruction rate, R is the time obstacle rate, k 1 and k 2 represents the slope corresponding to the linear reduction.

7. A road traffic carbon emission prediction method, characterized in that: include: Obtain a correlation heat map of the road traffic flow to be predicted; The correlation heat map of the road traffic flow to be predicted is input into the road traffic carbon emission prediction model obtained by the method according to any one of claims 1 to 6 to obtain the road traffic carbon emission prediction result.

8. A device for generating a road traffic carbon emission prediction model, characterized in that: include: A heat map acquisition module is used to obtain a correlation heat map of road traffic flow; The first model building module is used to model the carbon emissions corresponding to traffic flow and on-street parking respectively, and obtain a road traffic carbon emission mechanism model; The second model construction module is used to construct a road traffic carbon emission data-driven model; the road traffic carbon emission data-driven model includes: an input feature variable selection network, a convolutional network, a connection layer, and a spatiotemporal fusion layer connected in sequence; the input feature variable selection network is used to obtain the weight of the input feature variable based on the gated residual network and the normalized exponential function, and to perform weighted assignment on the feature variable after mapping transformation based on the weight to achieve input feature selection; The third model building module is used to build an initial road traffic carbon emission prediction model based on the road traffic carbon emission mechanism model and the road traffic carbon emission data driven model; The model training module is used to train the road traffic carbon emission prediction model based on the correlation heat map to obtain a fully trained road traffic carbon emission prediction model.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of the method for generating a road traffic carbon emission prediction model as described in any one of claims 1 to 6, or to implement the steps of the method for predicting road traffic carbon emissions as described in claim 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method for generating a road traffic carbon emission prediction model as described in any one of claims 1 to 6, or implements the steps of the method for predicting road traffic carbon emissions as described in claim 7.

Citation Information

Cited By

  • Highway service area carbon emission prediction method based on space-time diagram embedding

    CN121075136A