CN117235508A - Vehicle fuel consumption prediction method and system based on big data - Google Patents
Vehicle fuel consumption prediction method and system based on big data Download PDFInfo
- Publication number
- CN117235508A CN117235508A CN202311516069.5A CN202311516069A CN117235508A CN 117235508 A CN117235508 A CN 117235508A CN 202311516069 A CN202311516069 A CN 202311516069A CN 117235508 A CN117235508 A CN 117235508A
- Authority
- CN
- China
- Prior art keywords
- vehicle
- data
- fuel consumption
- time sequence
- predicted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 239000000446 fuel Substances 0.000 title claims abstract description 141
- 238000000034 method Methods 0.000 title claims abstract description 40
- 239000011159 matrix material Substances 0.000 claims description 101
- 238000012549 training Methods 0.000 claims description 59
- 239000013598 vector Substances 0.000 claims description 41
- 238000010586 diagram Methods 0.000 claims description 31
- 238000000605 extraction Methods 0.000 claims description 31
- 238000012545 processing Methods 0.000 claims description 31
- 238000004088 simulation Methods 0.000 claims description 29
- 230000007246 mechanism Effects 0.000 claims description 22
- 230000004927 fusion Effects 0.000 claims description 16
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 230000002068 genetic effect Effects 0.000 claims description 12
- 230000001537 neural effect Effects 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 5
- 210000005036 nerve Anatomy 0.000 claims description 5
- 238000005728 strengthening Methods 0.000 claims description 5
- 230000004913 activation Effects 0.000 claims description 4
- 238000013528 artificial neural network Methods 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 8
- 238000007405 data analysis Methods 0.000 abstract description 2
- 230000008859 change Effects 0.000 description 3
- 230000007774 longterm Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000035772 mutation Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 108090000623 proteins and genes Proteins 0.000 description 2
- 238000005215 recombination Methods 0.000 description 2
- 230000006798 recombination Effects 0.000 description 2
- 239000012634 fragment Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000010008 shearing Methods 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to the field of big data analysis, in particular to a method and a system for predicting vehicle fuel consumption based on big data. A big data based vehicle fuel consumption prediction system, comprising: the system comprises a vehicle model data acquisition module, a vehicle running state data acquisition module, a vehicle time sequence data set to be predicted establishment module, a vehicle fuel consumption prediction model management module and a vehicle fuel consumption prediction module. According to the invention, the vehicle running state data from the sensors at the positions of the vehicle are obtained, and the global time sequence characteristics and the local time sequence characteristics among the vehicle running state data are learned through the vehicle oil consumption prediction model, so that the oil consumption at the next moment is predicted, and the global time sequence characteristics and the local time sequence characteristics are considered in the prediction process, so that the high prediction accuracy is achieved.
Description
Technical Field
The invention relates to the field of big data analysis, in particular to a method and a system for predicting vehicle fuel consumption based on big data.
Background
For the current traffic field, the fuel consumption of the automobile is still the dominant, so how to reduce the fuel consumption of the automobile is an important research direction. One of the ideas is to predict fuel consumption of the vehicle and provide reference comments for reducing fuel consumption based on the predicted fuel consumption. A common fuel consumption prediction method is to predict a specific route in combination with map navigation, and this method lacks consideration of running parameters of the vehicle itself, so that prediction accuracy is low under the condition of increasing factors such as operation habits of a driver.
Disclosure of Invention
The invention provides a vehicle fuel consumption prediction method and a vehicle fuel consumption prediction system based on big data.
A vehicle fuel consumption prediction method based on big data comprises the following steps:
acquiring vehicle model data of a vehicle;
acquiring current vehicle running state data, and forming a time sequence data set T of the vehicle to be predicted with the vehicle running state data acquired N-1 times before, wherein T= { X 1 ,X 2 …X n …X N (wherein X is n For the nth vehicle operating condition data in the vehicle time series data set T to be predicted, n=1, 2,3, N is the total number of the vehicle running state data in the time sequence data set T of the vehicle to be predicted, and the vehicle running state data X N The vehicle running state data is obtained currently; vehicle operation state data X n Is thatWherein->For vehicle operating state data X n The vehicle running state data value corresponding to the D-th influencing factor, d=1, 2,3 · the contents of the components are as follows, D is the total number of influencing factors; satisfy->The fuel consumption is a vehicle running state data value corresponding to the fuel consumption;
sending the time sequence data set T of the vehicle to be predicted and the vehicle model data of the vehicle into a trained vehicle fuel consumption prediction model for processing to obtain the fuel consumption of the vehicle at the next moment;
the vehicle fuel consumption prediction model comprises a data unifying block, a global time sequence feature extraction block, a local time sequence feature extraction block, a feature fusion block, an attention mechanical block and a prediction block; the data unification block is used for unifying the data of the running state of the vehicle; the global time sequence feature extraction block is used for extracting global time sequence features in the time sequence data set of the vehicle to be predicted; the local time sequence feature extraction block is used for extracting local time sequence features in the time sequence data set of the vehicle to be predicted; the feature fusion block is used for fusing the global time sequence feature and the local time sequence feature in the time sequence data set of the vehicle to be predicted; the attention mechanism block is used for strengthening the relation among all influence factors in the vehicle running state data; the prediction block comprises a full-connection layer and a prediction layer and is used for outputting the fuel consumption of the vehicle at the next moment.
As one preferable mode of the invention, the data unified block in the vehicle fuel consumption prediction model is established based on a BP neural network and comprises an input layer, an hidden layer and an output layer, wherein the number of the neural nodes of the input layer is D+1, the number of the neural nodes of the output layer is D, and the number of the neural nodes of the hidden layer isWherein ε is a random number between 1 and 10;
the data unification of the vehicle running state data through the data unification block in the vehicle fuel consumption prediction model specifically comprises the following steps: individually selecting vehicle operation state data X from a time series data set T of a vehicle to be predicted n For selected vehicle operating state data X n The vehicle model data and the selected vehicle running state data X n Splicing, inputting to D+1 nerve nodes in the input layer, sequentially processing the input layer, hidden layer and output layer to obtain D-dimensional vehicle running state data X n Realizing the running state data X of the vehicle n Is updated according to the update of (a); when all the vehicle running state data X in the time series data set T of the vehicle to be predicted n After all are updated, all the updated vehicle running state data X n And splicing to construct a D multiplied by D fuel consumption to-be-predicted matrix.
As one preferable choice of the invention, the global time sequence feature extraction block in the vehicle oil consumption prediction model comprises a matrix reconstruction layer to be predicted and 6 Encoder layers, wherein the 6 Encoder layers are respectively marked as a first Encoder layer, a second Encoder layer, a third Encoder layer, a fourth Encoder layer, a fifth Encoder layer and a sixth Encoder layer, the matrix reconstruction layer to be predicted is used for reconstructing the matrix to be predicted, and the 6 Encoder layers are established by referring to a Transfomer model;
extracting global time sequence features in a time sequence data set of a vehicle to be predicted through a global time sequence feature extraction block, specifically comprising the following steps: and carrying out matrix multiplication on the fuel consumption to-be-predicted matrix and a reconstruction matrix in a reconstruction layer of the to-be-predicted matrix, reconstructing the fuel consumption to-be-predicted matrix to obtain a reconstructed fuel consumption to-be-predicted matrix, and processing the reconstructed fuel consumption to-be-predicted matrix through a first Encoder layer, a second Encoder layer, a third Encoder layer, a fourth Encoder layer, a fifth Encoder layer and a sixth Encoder layer in sequence to obtain a first feature map, wherein the first feature map is a global time sequence feature in a time sequence data set of the vehicle to be predicted.
As one preferable aspect of the present invention, the size of the reconstruction matrix is d×d, and the reconstruction matrix is established based on a weight vector of 1×d in the following manner: the weight vector of 1 xD is marked as a base vector, the last k data values of the base vector are sheared, and the sheared k data values are spliced in front of the sheared base vector in the reverse direction order to construct a sequence vector alpha k The method comprises the steps of carrying out a first treatment on the surface of the Changing k from 1 to D-1, generating D-1 order vectorsα k D-1 order vectors alpha k And (3) arranging the reconstruction matrix below the base vectors according to the order from k to k, and splicing the reconstruction matrix with the base vectors.
As one preferable mode of the invention, a local time sequence feature extraction block in the vehicle oil consumption prediction model is established by referring to a GRU model, and the method comprises a GRU layer, wherein the number of nodes of a hidden layer in the GRU layer is set as D;
extracting the local time sequence characteristics in the time sequence data set of the vehicle to be predicted by a local time sequence characteristic extraction block in the vehicle oil consumption prediction model, and specifically comprising the following steps: the vehicle running state data X in the time series data set T of the vehicle to be predicted n Sequentially sending the vehicle running vectors into GRU layers to respectively obtain vehicle running vectors F n And vehicle operation vector F n Is 1 x D in size; all vehicle operation vectors F n And (3) arranging and splicing the vehicle time sequence data from top to bottom according to the sequence from the small n to the large n to obtain a second characteristic diagram, wherein the second characteristic diagram is the local time sequence characteristic in the time sequence data set of the vehicle to be predicted.
As one preferable mode of the invention, the feature fusion block in the vehicle fuel consumption prediction model is used for fusing the global time sequence feature and the local time sequence feature in the time sequence data set of the vehicle to be predicted, and the method specifically comprises the following steps: and splicing the first characteristic diagram and the second characteristic diagram according to the channel, and obtaining a third characteristic diagram through one-time convolution operation, wherein the size of the third characteristic diagram is D multiplied by D.
As one preferable aspect of the present invention, the attention mechanism block in the vehicle fuel consumption prediction model includes an influence matrix, and the size of the influence matrix is d×d;
the relationship among all influencing factors in the vehicle running state data is strengthened through an attention mechanism block in the vehicle oil consumption prediction model, and the method specifically comprises the following steps of: performing matrix multiplication on the third feature map and the influence matrix, and then performing processing through an activation function to obtain an attention weight matrix; performing dot multiplication on the third feature map and the attention weight matrix to obtain a fourth feature map; and adding the fourth characteristic diagram and the third characteristic diagram, and executing normalization operation to obtain a fifth characteristic diagram.
As one preferable aspect of the present invention, the method for processing the time series data set T of the vehicle to be predicted and the vehicle model data of the vehicle by the trained vehicle fuel consumption prediction model specifically includes the steps of: sending the predicted vehicle time sequence data set T and vehicle model data of the vehicle into a data unified block for processing to obtain a fuel consumption to-be-predicted matrix; then sending the fuel consumption to-be-predicted matrix into a global time sequence feature extraction block for processing to obtain a first feature map; sending the time sequence data set T of the vehicle to be predicted into a local time sequence feature extraction block for processing to obtain a second feature map; fusing the first feature map and the second feature map through a feature fusion block to obtain a third feature map; processing the third feature map through an attention mechanism block to obtain a fifth feature map; and sending the fifth characteristic diagram into a prediction block for processing to obtain the fuel consumption of the vehicle at the next moment.
As one preferable aspect of the present invention, training the vehicle fuel consumption prediction model specifically includes the steps of: acquiring vehicle running data of a history record, establishing a first training sample by combining vehicle model data, and forming a first sample training set by all the acquired first training samples; the first sample training set is sent into a data unified block of initialization parameters to train, a fuel consumption output layer is newly added to the data unified block during the period, the number of nerve nodes of the fuel consumption output layer is 1, the output layer in the data unified block is also used as an implicit layer, the fuel consumption corresponding to each first training sample is used as a target to be output, a first loss value is calculated, if the first loss value is in a first preset range, training of the data unified block is completed, and the data unified block is output; otherwise, continuing iterative training;
acquiring vehicle operation data of the histories, traversing all the vehicle operation data of the histories by a sliding window with the length of N, and selecting the fuel consumption in the vehicle operation data of the first N-1 histories and the vehicle operation data of the nth histories in the sliding window to construct a second training sample; forming a second training sample set from all constructed second training samples; the second training sample set is sent to a vehicle oil consumption prediction model with initialization parameters for training, the parameters of the data unified block are unchanged during the training, the attention mechanical block is disabled, namely the feature fusion block is directly connected with the prediction block, the oil consumption at the tail of the second training sample set is taken as a target to be output, a second loss value is calculated, if the second loss value is in a second preset range, the training of the vehicle oil consumption prediction model of the data unified block and the attention mechanical block is completed, and the vehicle oil consumption prediction model of the data unified block and the attention mechanical block is output; otherwise, continuing iterative training;
the parameters of the vehicle fuel consumption prediction model of the attention removing mechanical block are fixed, the second training sample set is sent into the vehicle fuel consumption prediction model of the attention removing mechanical block to be predicted, the parameters corresponding to the influence matrix in the attention removing mechanical block are simulated and calculated through a genetic algorithm, and the prediction accuracy of the vehicle fuel consumption prediction model is taken as fitness; and stopping performing simulation calculation through the genetic algorithm when the target condition is reached or the iteration number reaches the maximum iteration number when the genetic algorithm is executed, and outputting a trained vehicle fuel consumption prediction model.
A big data based vehicle fuel consumption prediction system, comprising:
the vehicle model data acquisition module is used for acquiring vehicle model data of the vehicle;
the vehicle running state data acquisition module is used for acquiring vehicle running state data;
the vehicle time sequence data set to be predicted is established by the module, and is used for forming a vehicle time sequence data set to be predicted by the current vehicle running state data and the vehicle running state data acquired for the previous N-1 times;
the vehicle fuel consumption prediction model management module is used for training and storing a vehicle fuel consumption prediction model;
the vehicle fuel consumption prediction module is used for predicting the fuel consumption of the vehicle at the next moment according to the time sequence data set T of the vehicle to be predicted, the vehicle model data of the vehicle and the vehicle fuel consumption prediction model.
The invention has the following advantages:
1. according to the invention, the vehicle running state data from the sensors at the positions of the vehicle are obtained, and the global time sequence characteristics and the local time sequence characteristics among the vehicle running state data are learned through the vehicle oil consumption prediction model, so that the oil consumption at the next moment is predicted, and the global time sequence characteristics and the local time sequence characteristics are considered in the prediction process, so that the high prediction accuracy is achieved.
2. According to the invention, the data unification is carried out on the vehicle running state data, so that the influence of factors such as different vehicle models and manufacturers is eliminated, and the applicability is increased.
3. According to the invention, by combining the relation among all influence factors in the vehicle running state data and strengthening the characteristics in the vehicle running state data, the actual fuel consumption change situation can be more fitted, and the accuracy of the prediction of the vehicle fuel consumption prediction model is improved.
4. According to the invention, the influence matrix in the attention mechanism block is subjected to simulation calculation through the genetic algorithm, so that the influence matrix in the attention mechanism block is fitted in the direction of the highest prediction accuracy in the continuous optimization process, the mutual influence relationship of different influence factors in the vehicle running process can be more met, and the prediction accuracy of the vehicle fuel consumption prediction model is further improved.
Drawings
Fig. 1 is a schematic structural diagram of a vehicle fuel consumption prediction system based on big data according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a fuel consumption prediction model of a vehicle according to an embodiment of the present invention.
Detailed Description
In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Example 1
A vehicle fuel consumption prediction method based on big data comprises the following steps:
acquiring vehicle model data of a vehicle, wherein the vehicle model data refers to information such as a model and a manufacturer corresponding to the vehicle, for example, biedizine plus DM-i, and the vehicle model data can be stored in a binary code so as to be convenient for subsequent processing;
acquiring current vehicle running state data from sensors at the vehicle, and forming a time sequence data set T of the vehicle to be predicted with the vehicle running state data acquired N-1 times before, wherein T= { X 1 ,X 2 …X n …X N (wherein X is n For the nth vehicle operation state data in the time sequence data set T of the vehicle to be predicted, namely, the n+1-N times of the forward number from the current moment, the vehicle operation state data are acquired, n=1, 2,3·······n, N is the total number of vehicle operation state data in the vehicle time series data set T to be predicted, and vehicle running state data X N The vehicle running state data is obtained currently; vehicle operation state data X n Is thatWherein->For vehicle operating state data X n The vehicle running state data value corresponding to the D-th influencing factor, d=1, 2,3 · the contents of the components are as follows, D is the total number of influencing factors; the influencing factors come from sensors of the vehicle, such as the running torque and the fuel consumption of the vehicle, and satisfy +.>The fuel consumption is a vehicle running state data value corresponding to the fuel consumption;
sending the time sequence data set T of the vehicle to be predicted and the vehicle model data of the vehicle into a trained vehicle fuel consumption prediction model for processing to obtain the fuel consumption of the vehicle at the next moment;
as shown in fig. 2, the vehicle fuel consumption prediction model includes a data unifying block, a global time sequence feature extraction block, a local time sequence feature extraction block, a feature fusion block, an attention mechanism block and a prediction block; the data unifying block is used for unifying the data of the running state of the vehicle so as to eliminate the influence of factors such as different vehicle models and manufacturers; the global time sequence feature extraction block is used for extracting global time sequence features in a time sequence data set of a vehicle to be predicted, namely long-term influence factors received by the vehicle in the running process, such as self parameters of an engine of the vehicle; the local time sequence feature extraction block is used for extracting local time sequence features in a time sequence data set of a vehicle to be predicted, such as oil consumption change caused by the driving habit of an individual user; the feature fusion block is used for fusing the global time sequence feature and the local time sequence feature in the time sequence data set of the vehicle to be predicted; the attention mechanism block is used for strengthening the relation among all influence factors in the vehicle running state data; the prediction block comprises a full-connection layer and a prediction layer and is used for outputting the fuel consumption of the vehicle at the next moment.
According to the invention, the vehicle running state data from the sensors at the positions of the vehicle are obtained, and the global time sequence characteristics and the local time sequence characteristics among the vehicle running state data are learned through the vehicle oil consumption prediction model, so that the oil consumption at the next moment is predicted, and the global time sequence characteristics and the local time sequence characteristics are considered in the prediction process, so that the high prediction accuracy is achieved.
The data unified block in the vehicle fuel consumption prediction model is established based on a BP neural network and comprises an input layer, an hidden layer and an output layer, wherein the number of the neural nodes of the input layer is D+1, the number of the neural nodes of the output layer is D, and the number of the neural nodes of the hidden layer isWherein ε is a random number between 1 and 10;
the data unification of the vehicle running state data through the data unification block in the vehicle fuel consumption prediction model specifically comprises the following steps: individually selecting vehicle operation state data X from a time series data set T of a vehicle to be predicted n For selected vehicle operating state data X n The vehicle model data and the selected vehicle running state data X n Splicing, inputting to D+1 nerve nodes in the input layer, sequentially processing the input layer, hidden layer and output layer to obtain D-dimensional vehicle running state data X n Realizing the running state data X of the vehicle n Is updated according to the update of (a); when all the vehicle running state data X in the time series data set T of the vehicle to be predicted n All vehicles after being updatedOperating state data X n Splicing to construct a DxD fuel consumption to-be-predicted matrix, namely unifying the vehicle running state data, wherein the weights in an input layer, an hidden layer and an output layer are obtained through training; because vehicles of different models are different in production process and internal components are different, corresponding oil consumption amounts are different in the same vehicle running state, and therefore, the invention eliminates the influence of factors such as different vehicle models and manufacturers and the like by unifying the data of the vehicle running state data, and increases applicability.
The global time sequence feature extraction block in the vehicle fuel consumption prediction model comprises a matrix to be predicted reconstruction layer and 6 Encoder layers, wherein the 6 Encoder layers are respectively marked as a first Encoder layer, a second Encoder layer, a third Encoder layer, a fourth Encoder layer, a fifth Encoder layer and a sixth Encoder layer, the matrix to be predicted reconstruction layer is used for reconstructing the matrix to be predicted, the 6 Encoder layers are established by referring to a Transfomer model, namely, the internal structures and parameters of the 6 Encoder layers are consistent with those of the traditional Transfomer model; the self-attention mechanism is arranged in the Encoder layer, so that the dependency relationship between different positions in the sequence can be directly captured, the problem of gradient propagation is avoided, and the extraction of long-term dependency features is realized;
extracting global time sequence features in a time sequence data set of a vehicle to be predicted through a global time sequence feature extraction block, specifically comprising the following steps: performing matrix multiplication on the fuel consumption to-be-predicted matrix and a reconstruction matrix in a reconstruction layer of the to-be-predicted matrix, reconstructing the fuel consumption to-be-predicted matrix to obtain a reconstructed fuel consumption to-be-predicted matrix, and processing the reconstructed fuel consumption to-be-predicted matrix through a first Encoder layer, a second Encoder layer, a third Encoder layer, a fourth Encoder layer, a fifth Encoder layer and a sixth Encoder layer in sequence to obtain a first feature map, wherein the first feature map is a global time sequence feature in a time sequence data set of a vehicle to be predicted;
the size of the reconstruction matrix is D×D, and the reconstruction matrix is built based on a weight vector of 1×D in the following manner: the weight vector of 1 xD is marked as a base vector, the last k data values of the base vector are sheared, and the sheared k data are processedThe values are spliced in the front of the base vector subjected to shearing according to the reverse direction order to construct a sequence vector alpha k The method comprises the steps of carrying out a first treatment on the surface of the Changing k from 1 to D-1, generating D-1 order vectors α k D-1 order vectors alpha k The method comprises the steps of arranging the oil consumption to-be-predicted matrixes below a base vector according to the sequence from small to large of k, splicing the oil consumption to-be-predicted matrixes with the base vector, constructing a reconstruction matrix, enabling the reconstruction oil consumption to have time sequence characteristics through processing of the reconstruction matrix, and extracting the time sequence characteristics;
the method comprises the steps that a local time sequence feature extraction block in a vehicle oil consumption prediction model is established by referring to a GRU model, wherein the GRU model comprises a GRU layer, and the number of nodes of a hidden layer in the GRU layer is set to be D; it should be noted that, setting the number of nodes of the hidden layer in the GRU layer to D can avoid the unchanged dimension of the local time sequence feature extracted later, so as to facilitate the fusion with the global time sequence feature;
extracting the local time sequence characteristics in the time sequence data set of the vehicle to be predicted by a local time sequence characteristic extraction block in the vehicle oil consumption prediction model, and specifically comprising the following steps: the vehicle running state data X in the time series data set T of the vehicle to be predicted n Sequentially sending the vehicle running vectors into GRU layers to respectively obtain vehicle running vectors F n And vehicle operation vector F n Is 1 x D in size; all vehicle operation vectors F n Performing arrangement and splicing from top to bottom according to the sequence from the small n to the large n to obtain a second characteristic diagram, wherein the second characteristic diagram is a local time sequence characteristic in a time sequence data set of the vehicle to be predicted;
the method comprises the following steps of fusing global time sequence features and local time sequence features in a time sequence data set of a vehicle to be predicted through a feature fusion block in a vehicle fuel consumption prediction model: splicing the first characteristic diagram and the second characteristic diagram according to the channel, and obtaining a third characteristic diagram with the size of D multiplied by D through one-time convolution operation, wherein the convolution kernel size is 1 multiplied by 1; the accuracy of subsequent prediction can be improved by fusing the global time sequence characteristics and the local time sequence characteristics in the time sequence data set of the vehicle to be predicted;
the attention mechanism block in the vehicle fuel consumption prediction model internally comprises an influence matrix, wherein the size of the influence matrix is D multiplied by D, and the influence matrix represents the correlation among different influence factors in the vehicle running state data;
the relationship among all influencing factors in the vehicle running state data is strengthened through an attention mechanism block in the vehicle oil consumption prediction model, and the method specifically comprises the following steps of: performing matrix multiplication on the third feature map and the influence matrix, and then processing through an activation function to obtain an attention weight matrix, wherein the activation function adopts softmax; performing dot multiplication on the third feature map and the attention weight matrix to obtain a fourth feature map; and adding the fourth characteristic diagram and the third characteristic diagram, and executing normalization operation to obtain a fifth characteristic diagram.
According to the invention, by combining the relation among all influence factors in the vehicle running state data and strengthening the characteristics in the vehicle running state data, the actual fuel consumption change situation can be more fitted, and the accuracy of the prediction of the vehicle fuel consumption prediction model is improved.
The method comprises the following steps of processing a time sequence data set T of a vehicle to be predicted and vehicle model data of the vehicle through a trained vehicle oil consumption prediction model, and specifically comprises the following steps: sending the predicted vehicle time sequence data set T and vehicle model data of the vehicle into a data unified block for processing to obtain a fuel consumption to-be-predicted matrix; then sending the fuel consumption to-be-predicted matrix into a global time sequence feature extraction block for processing to obtain a first feature map; sending the time sequence data set T of the vehicle to be predicted into a local time sequence feature extraction block for processing to obtain a second feature map; fusing the first feature map and the second feature map through a feature fusion block to obtain a third feature map; processing the third feature map through an attention mechanism block to obtain a fifth feature map; and sending the fifth characteristic diagram into a prediction block for processing to obtain the fuel consumption of the vehicle at the next moment.
Training a vehicle fuel consumption prediction model, which specifically comprises the following steps: acquiring vehicle running data of a history record, establishing a first training sample by combining vehicle model data, and forming a first sample training set by all the acquired first training samples; the first sample training set is sent into a data unified block of initialization parameters to train, a fuel consumption output layer is newly added to the data unified block during the period, the number of the neural nodes of the fuel consumption output layer is 1, the output layer in the data unified block is also used as an implicit layer, the fuel consumption corresponding to each first training sample is used as a target to be output, a first loss value is calculated, if the first loss value is in a first preset range, the first preset range is set by people, training of the data unified block is completed, and the data unified block is output; otherwise, continuing iterative training;
acquiring vehicle operation data of the histories, traversing all the vehicle operation data of the histories by a sliding window with the length of N, and selecting the fuel consumption in the vehicle operation data of the first N-1 histories and the vehicle operation data of the nth histories in the sliding window to construct a second training sample; forming a second training sample set from all constructed second training samples; the second training sample set is sent into a vehicle oil consumption prediction model with initialization parameters for training, the parameters of the data unified block are unchanged during the training, the attention mechanical block is disabled, namely the feature fusion block is directly connected with the prediction block, the oil consumption at the tail of the second training sample set is taken as a target to be output, a second loss value is calculated, if the second loss value is in a second preset range, the second preset range is set by people, the training of the vehicle oil consumption prediction model of the data unified block and the attention mechanical block is completed, and the vehicle oil consumption prediction model of the data unified block and the attention mechanical block is output; otherwise, continuing iterative training;
the parameters of the vehicle fuel consumption prediction model of the attention removing mechanical block are fixed, the second training sample set is sent into the vehicle fuel consumption prediction model of the attention removing mechanical block to be predicted, the parameters corresponding to the influence matrix in the attention removing mechanical block are simulated and calculated through a genetic algorithm, and the prediction accuracy of the vehicle fuel consumption prediction model is taken as fitness; and stopping performing simulation calculation through the genetic algorithm when the target condition is reached or the iteration number reaches the maximum iteration number when the genetic algorithm is executed, and outputting a trained vehicle fuel consumption prediction model.
According to the invention, the influence matrix in the attention mechanism block is subjected to simulation calculation through the genetic algorithm, so that the influence matrix in the attention mechanism block is fitted in the direction of the highest prediction accuracy in the continuous optimization process, the mutual influence relationship of different influence factors in the vehicle running process can be more met, and the prediction accuracy of the vehicle fuel consumption prediction model is further improved.
The simulation operation on the influence matrix inside the attention mechanism block through the genetic algorithm can comprise the following contents:
s1: establishing a population set, wherein the population set internally comprises a simulation influence matrix H m M=1, 2,3 · the contents of which are M, M is the total number of simulation influence matrices, the simulation influence matrix H m Setting the maximum iteration number G for a D multiplied by D two-dimensional matrix;
the establishment of the population set specifically comprises the following steps:
s1.1: creating a blank simulation matrix, wherein the size of the simulation matrix is D multiplied by D, and the data value of the ith row and the jth column in the simulation matrix is recorded as R ij I=1, 2,3·d, j=1, 2,3·d; traversing the simulation matrix and comparing the data value R ij Randomly assigning a value of 1 or 0, wherein if the value is a data value R ij A value of 1 indicates that the ith influence factor and the jth influence factor have an interaction relation; if it is the data value R ij A value of 0 is assigned, which indicates that the ith influence factor and the jth influence factor have no mutual influence relation; after the simulation matrix is completely filled, the simulation matrix is marked as a simulation influence matrix;
s1.2: repeating the step S1.1 for M times to generate M simulation influence matrixes and forming a population set;
s2: let g=1, g be used to record the number of iterations;
s3: sequentially calculating M simulation influence matrixes H in population set m Corresponding fitness delta m Storing the simulation influence matrix corresponding to the highest adaptability into a simulation influence matrix library to be selected;
calculating M simulation influence matrixes H in population collection m Corresponding fitness delta m The method comprises the following steps: selecting a simulation influence matrix H m And simulate the influence matrix H m As an influence matrix of the attention mechanism block in the vehicle fuel consumption prediction model, through a secondThe training sample set predicts a vehicle fuel consumption prediction model without disabling the attention mechanism block, and the prediction accuracy is taken as a simulation influence matrix H m Fitness delta m ;
S4: based on simulation influence matrix H m Corresponding fitness delta m Matrix H is influenced on M simulation in group set m Performing operations such as selection, cross recombination, mutation and the like;
in the case of performing cross recombination and mutation on the simulation influence matrix, a gene fragment may be used as a basic unit, and one gene unit may be a sub-matrix of the simulation influence matrix having a size of 2×2.
S5: and judging whether the target condition is reached or the iteration number reaches the maximum iteration number, if so, outputting a simulation influence matrix with the maximum fitness as an influence matrix in the attention mechanism block, otherwise, continuing to perform iterative simulation.
Example 2
A big data based vehicle fuel consumption prediction system, see fig. 1, comprising:
the vehicle model data acquisition module is used for acquiring vehicle model data of a vehicle, wherein the vehicle model data can be stored in the internet of vehicles, and can be directly acquired when the vehicle uploads the data;
the vehicle running state data acquisition module is used for acquiring vehicle running state data;
the vehicle time sequence data set to be predicted is established by the module, and is used for forming a vehicle time sequence data set to be predicted by the current vehicle running state data from the sensors of the vehicle and the vehicle running state data acquired N-1 times before;
the vehicle fuel consumption prediction model management module is used for training and storing a vehicle fuel consumption prediction model;
the vehicle fuel consumption prediction module is used for predicting the fuel consumption of the vehicle at the next moment according to the time sequence data set T of the vehicle to be predicted, the vehicle model data of the vehicle and the vehicle fuel consumption prediction model.
It will be understood that modifications and variations will be apparent to those skilled in the art from the foregoing description, and it is intended that all such modifications and variations be included within the scope of the following claims. Parts of the specification not described in detail belong to the prior art known to those skilled in the art.
Claims (10)
1. The vehicle fuel consumption prediction method based on big data is characterized by comprising the following steps of:
acquiring vehicle model data of a vehicle;
acquiring current vehicle running state data, and forming a time sequence data set T of the vehicle to be predicted with the vehicle running state data acquired N-1 times before, wherein T= { X 1 ,X 2 …X n …X N (wherein X is n For the nth vehicle operating condition data in the vehicle time series data set T to be predicted, n=1, 2,3, N is the total number of the vehicle running state data in the time sequence data set T of the vehicle to be predicted, and the vehicle running state data X N The vehicle running state data is obtained currently; vehicle operation state data X n Is thatWherein->For vehicle operating state data X n The vehicle running state data value corresponding to the D-th influencing factor, d=1, 2,3 · the contents of the components are as follows, D is the total number of influencing factors; satisfy->The fuel consumption is a vehicle running state data value corresponding to the fuel consumption;
sending the time sequence data set T of the vehicle to be predicted and the vehicle model data of the vehicle into a trained vehicle fuel consumption prediction model for processing to obtain the fuel consumption of the vehicle at the next moment;
the vehicle fuel consumption prediction model comprises a data unifying block, a global time sequence feature extraction block, a local time sequence feature extraction block, a feature fusion block, an attention mechanical block and a prediction block; the data unification block is used for unifying the data of the running state of the vehicle; the global time sequence feature extraction block is used for extracting global time sequence features in the time sequence data set of the vehicle to be predicted; the local time sequence feature extraction block is used for extracting local time sequence features in the time sequence data set of the vehicle to be predicted; the feature fusion block is used for fusing the global time sequence feature and the local time sequence feature in the time sequence data set of the vehicle to be predicted; the attention mechanism block is used for strengthening the relation among all influence factors in the vehicle running state data; the prediction block comprises a full-connection layer and a prediction layer and is used for outputting the fuel consumption of the vehicle at the next moment.
2. The vehicle fuel consumption prediction method based on big data according to claim 1, wherein the data unified block in the vehicle fuel consumption prediction model is built based on a BP neural network and comprises an input layer, an hidden layer and an output layer, wherein the number of the neural nodes of the input layer is D+1, the number of the neural nodes of the output layer is D, and the number of the neural nodes of the hidden layer isWherein ε is a random number between 1 and 10;
the data unification of the vehicle running state data through the data unification block in the vehicle fuel consumption prediction model specifically comprises the following steps: individually selecting vehicle operation state data X from a time series data set T of a vehicle to be predicted n For selected vehicle operating state data X n The vehicle model data and the selected vehicle running state data X n Splicing, inputting to D+1 nerve nodes in the input layer, sequentially processing the input layer, hidden layer and output layer to obtain D-dimensional vehicle running state data X n Realizing the running state data X of the vehicle n Is updated according to the update of (a); when all the vehicle running state data X in the time series data set T of the vehicle to be predicted n After all are updated, all the updated vehicle running state data X n And splicing to construct a D multiplied by D fuel consumption to-be-predicted matrix.
3. The vehicle fuel consumption prediction method based on big data according to claim 2, wherein the global time sequence feature extraction block in the vehicle fuel consumption prediction model comprises a matrix to be predicted reconstruction layer and 6 Encoder layers, the 6 Encoder layers are respectively marked as a first Encoder layer, a second Encoder layer, a third Encoder layer, a fourth Encoder layer, a fifth Encoder layer and a sixth Encoder layer, wherein the matrix to be predicted reconstruction layer is used for reconstructing a matrix to be predicted, and the 6 Encoder layers are established by referring to a fransfomer model;
extracting global time sequence features in a time sequence data set of a vehicle to be predicted through a global time sequence feature extraction block, specifically comprising the following steps: and carrying out matrix multiplication on the fuel consumption to-be-predicted matrix and a reconstruction matrix in a reconstruction layer of the to-be-predicted matrix, reconstructing the fuel consumption to-be-predicted matrix to obtain a reconstructed fuel consumption to-be-predicted matrix, and processing the reconstructed fuel consumption to-be-predicted matrix through a first Encoder layer, a second Encoder layer, a third Encoder layer, a fourth Encoder layer, a fifth Encoder layer and a sixth Encoder layer in sequence to obtain a first feature map, wherein the first feature map is a global time sequence feature in a time sequence data set of the vehicle to be predicted.
4. The vehicle fuel consumption prediction method based on big data according to claim 3, wherein the size of the reconstruction matrix is d×d, and the reconstruction matrix is established based on a weight vector of 1×d in the following manner: the weight vector of 1 xD is marked as a base vector, the last k data values of the base vector are sheared, and the sheared k data values are spliced in front of the sheared base vector in the reverse direction order to construct a sequence vector alpha k The method comprises the steps of carrying out a first treatment on the surface of the Changing k from 1 to D-1, generating D-1 order vectors α k D-1 order vectors alpha k And (3) arranging the reconstruction matrix below the base vectors according to the order from k to k, and splicing the reconstruction matrix with the base vectors.
5. The vehicle fuel consumption prediction method based on big data according to claim 4, wherein the local time sequence feature extraction block in the vehicle fuel consumption prediction model is established with reference to the GRU model, and comprises a GRU layer, and the number of nodes of a hidden layer in the GRU layer is set to D;
extracting the local time sequence characteristics in the time sequence data set of the vehicle to be predicted by a local time sequence characteristic extraction block in the vehicle oil consumption prediction model, and specifically comprising the following steps: the vehicle running state data X in the time series data set T of the vehicle to be predicted n Sequentially sending the vehicle running vectors into GRU layers to respectively obtain vehicle running vectors F n And vehicle operation vector F n Is 1 x D in size; all vehicle operation vectors F n And (3) arranging and splicing the vehicle time sequence data from top to bottom according to the sequence from the small n to the large n to obtain a second characteristic diagram, wherein the second characteristic diagram is the local time sequence characteristic in the time sequence data set of the vehicle to be predicted.
6. The vehicle fuel consumption prediction method based on big data according to claim 5, wherein the feature fusion block in the vehicle fuel consumption prediction model fuses the global time sequence feature and the local time sequence feature in the time sequence data set of the vehicle to be predicted, and specifically comprises the following steps: and splicing the first characteristic diagram and the second characteristic diagram according to the channel, and obtaining a third characteristic diagram through one-time convolution operation, wherein the size of the third characteristic diagram is D multiplied by D.
7. The vehicle fuel consumption prediction method based on big data according to claim 6, wherein the attention mechanism block in the vehicle fuel consumption prediction model comprises an influence matrix, and the size of the influence matrix is D x D;
the relationship among all influencing factors in the vehicle running state data is strengthened through an attention mechanism block in the vehicle oil consumption prediction model, and the method specifically comprises the following steps of: performing matrix multiplication on the third feature map and the influence matrix, and then performing processing through an activation function to obtain an attention weight matrix; performing dot multiplication on the third feature map and the attention weight matrix to obtain a fourth feature map; and adding the fourth characteristic diagram and the third characteristic diagram, and executing normalization operation to obtain a fifth characteristic diagram.
8. The vehicle fuel consumption prediction method based on big data according to claim 7, wherein the vehicle time series data set T to be predicted and the vehicle model data of the vehicle are processed through the trained vehicle fuel consumption prediction model, specifically comprising the following steps: sending the predicted vehicle time sequence data set T and vehicle model data of the vehicle into a data unified block for processing to obtain a fuel consumption to-be-predicted matrix; then sending the fuel consumption to-be-predicted matrix into a global time sequence feature extraction block for processing to obtain a first feature map; sending the time sequence data set T of the vehicle to be predicted into a local time sequence feature extraction block for processing to obtain a second feature map; fusing the first feature map and the second feature map through a feature fusion block to obtain a third feature map; processing the third feature map through an attention mechanism block to obtain a fifth feature map; and sending the fifth characteristic diagram into a prediction block for processing to obtain the fuel consumption of the vehicle at the next moment.
9. The vehicle fuel consumption prediction method based on big data according to claim 8, wherein the training of the vehicle fuel consumption prediction model specifically comprises the following steps: acquiring vehicle running data of a history record, establishing a first training sample by combining vehicle model data, and forming a first sample training set by all the acquired first training samples; the first sample training set is sent into a data unified block of initialization parameters to train, a fuel consumption output layer is newly added to the data unified block during the period, the number of nerve nodes of the fuel consumption output layer is 1, the output layer in the data unified block is also used as an implicit layer, the fuel consumption corresponding to each first training sample is used as a target to be output, a first loss value is calculated, if the first loss value is in a first preset range, training of the data unified block is completed, and the data unified block is output; otherwise, continuing iterative training;
acquiring vehicle operation data of the histories, traversing all the vehicle operation data of the histories by a sliding window with the length of N, and selecting the fuel consumption in the vehicle operation data of the first N-1 histories and the vehicle operation data of the nth histories in the sliding window to construct a second training sample; forming a second training sample set from all constructed second training samples; the second training sample set is sent to a vehicle oil consumption prediction model with initialization parameters for training, the parameters of the data unified block are unchanged during the training, the attention mechanical block is disabled, namely the feature fusion block is directly connected with the prediction block, the oil consumption at the tail of the second training sample set is taken as a target to be output, a second loss value is calculated, if the second loss value is in a second preset range, the training of the vehicle oil consumption prediction model of the data unified block and the attention mechanical block is completed, and the vehicle oil consumption prediction model of the data unified block and the attention mechanical block is output; otherwise, continuing iterative training;
the parameters of the vehicle fuel consumption prediction model of the attention removing mechanical block are fixed, the second training sample set is sent into the vehicle fuel consumption prediction model of the attention removing mechanical block to be predicted, the parameters corresponding to the influence matrix in the attention removing mechanical block are simulated and calculated through a genetic algorithm, and the prediction accuracy of the vehicle fuel consumption prediction model is taken as fitness; and stopping performing simulation calculation through the genetic algorithm when the target condition is reached or the iteration number reaches the maximum iteration number when the genetic algorithm is executed, and outputting a trained vehicle fuel consumption prediction model.
10. A vehicle fuel consumption prediction system based on big data, characterized by comprising:
the vehicle model data acquisition module is used for acquiring vehicle model data of the vehicle;
the vehicle running state data acquisition module is used for acquiring vehicle running state data;
the vehicle time sequence data set to be predicted is established by the module, and is used for forming a vehicle time sequence data set to be predicted by the current vehicle running state data and the vehicle running state data acquired for the previous N-1 times;
the vehicle fuel consumption prediction model management module is used for training and storing a vehicle fuel consumption prediction model;
the vehicle fuel consumption prediction module is used for predicting the fuel consumption of the vehicle at the next moment according to the time sequence data set T of the vehicle to be predicted, the vehicle model data of the vehicle and the vehicle fuel consumption prediction model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311516069.5A CN117235508B (en) | 2023-11-15 | 2023-11-15 | Vehicle fuel consumption prediction method and system based on big data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311516069.5A CN117235508B (en) | 2023-11-15 | 2023-11-15 | Vehicle fuel consumption prediction method and system based on big data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117235508A true CN117235508A (en) | 2023-12-15 |
CN117235508B CN117235508B (en) | 2024-01-30 |
Family
ID=89086530
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311516069.5A Active CN117235508B (en) | 2023-11-15 | 2023-11-15 | Vehicle fuel consumption prediction method and system based on big data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117235508B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112700047A (en) * | 2020-12-31 | 2021-04-23 | 杭州电子科技大学 | Oil quantity loss prediction method based on BP neural network |
CN113435666A (en) * | 2021-07-20 | 2021-09-24 | 山东大学 | Commercial vehicle oil consumption prediction method and system based on vehicle running state |
CN114781698A (en) * | 2022-03-31 | 2022-07-22 | 山东大学 | Vehicle oil consumption prediction method and system based on spatio-temporal attention mechanism chart convolution network |
CN115438570A (en) * | 2022-08-02 | 2022-12-06 | 桂林电子科技大学 | GA-BP neural network-based vehicle dynamic fuel consumption prediction model method |
US20230154250A1 (en) * | 2021-11-15 | 2023-05-18 | Zhejiang Feidi Motors Co., Ltd | Vehicle Fuel Economy Evaluation Method Based on Data Analysis |
CN116644865A (en) * | 2023-07-27 | 2023-08-25 | 中汽信息科技(天津)有限公司 | Commercial vehicle fuel consumption prediction method, electronic equipment and storage medium |
-
2023
- 2023-11-15 CN CN202311516069.5A patent/CN117235508B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112700047A (en) * | 2020-12-31 | 2021-04-23 | 杭州电子科技大学 | Oil quantity loss prediction method based on BP neural network |
CN113435666A (en) * | 2021-07-20 | 2021-09-24 | 山东大学 | Commercial vehicle oil consumption prediction method and system based on vehicle running state |
US20230154250A1 (en) * | 2021-11-15 | 2023-05-18 | Zhejiang Feidi Motors Co., Ltd | Vehicle Fuel Economy Evaluation Method Based on Data Analysis |
CN114781698A (en) * | 2022-03-31 | 2022-07-22 | 山东大学 | Vehicle oil consumption prediction method and system based on spatio-temporal attention mechanism chart convolution network |
CN115438570A (en) * | 2022-08-02 | 2022-12-06 | 桂林电子科技大学 | GA-BP neural network-based vehicle dynamic fuel consumption prediction model method |
CN116644865A (en) * | 2023-07-27 | 2023-08-25 | 中汽信息科技(天津)有限公司 | Commercial vehicle fuel consumption prediction method, electronic equipment and storage medium |
Non-Patent Citations (3)
Title |
---|
JAKOV TOPI´C 等: "Neural Network-Based Prediction of Vehicle Fuel Consumption Based on Driving Cycle Data", 《SUSTAINABILITY 2022, 14, 744. HTTPS://DOI.ORG/10.3390/SU14020744》, pages 1 - 12 * |
曲培元等: "基于多元线性回归分析方法的汽车油耗(MPG) 预测模型", 《统计学与应用》, pages 206 - 215 * |
风间琉璃•: "汽车油耗预测实战", 《HTTPS://BLOG.CSDN.NET/QQ_53144843/ARTICLE/DETAILS/122884293》, pages 1 - 11 * |
Also Published As
Publication number | Publication date |
---|---|
CN117235508B (en) | 2024-01-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108427985B (en) | Plug-in hybrid vehicle energy management method based on deep reinforcement learning | |
CN115062710A (en) | Federal learning classification model training method based on depth certainty strategy gradient | |
CN114861890B (en) | Method and device for constructing neural network, computing equipment and storage medium | |
CN113780470B (en) | Graph classification method based on self-adaptive multichannel cross graph convolutional network | |
CN113537580B (en) | Public transportation passenger flow prediction method and system based on self-adaptive graph learning | |
CN108961460B (en) | Fault prediction method and device based on sparse ESGP (Enterprise service gateway) and multi-objective optimization | |
CN111353644A (en) | Prediction model generation method of intelligent network cloud platform based on reinforcement learning | |
CN114463727A (en) | Subway driver behavior identification method | |
CN113435666A (en) | Commercial vehicle oil consumption prediction method and system based on vehicle running state | |
CN117235508B (en) | Vehicle fuel consumption prediction method and system based on big data | |
CN113705402A (en) | Video behavior prediction method, system, electronic device and storage medium | |
KR20200023695A (en) | Learning system to reduce computation volume | |
CN116935128A (en) | Zero sample abnormal image detection method based on learning prompt | |
CN114399901B (en) | Method and equipment for controlling traffic system | |
CN113077849B (en) | Escherichia coli beta-lactam acquired drug resistance phenotype prediction composite method | |
CN112950933B (en) | Traffic flow prediction method based on novel space-time characteristics | |
CN112668797B (en) | Long-short-period traffic prediction method | |
CN116861962A (en) | Data processing method and device | |
CN114819325A (en) | Score prediction method, system, device and storage medium based on graph neural network | |
CN115034500B (en) | Vehicle speed prediction method and system based on dual-attention mechanism network and vehicle | |
JP2023512307A (en) | Systems and methods for learning to produce chemical compounds with desired properties | |
CN113095328A (en) | Self-training-based semantic segmentation method guided by Gini index | |
US20240143975A1 (en) | Neural network feature extractor for actor-critic reinforcement learning models | |
CN117835329B (en) | Service migration method based on mobility prediction in vehicle-mounted edge calculation | |
CN114780739B (en) | Time sequence knowledge graph completion method and system based on time graph convolution network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |