Data-driven electric bus route energy consumption prediction method and system

By extracting and evaluating the description of high-dimensional energy consumption characteristics of electric bus routes and training large language models, the problem of weak generalization ability of energy consumption calculation algorithm models in the prior art is solved, and more accurate energy consumption prediction for complex working conditions is achieved.

CN120144959APending Publication Date: 2025-06-13BEIJING INST OF TECH XINYUAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510233076.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The generalization capability of the energy consumption calculation algorithm model in the prior art is weak, making it difficult to accurately predict energy consumption under complex road conditions.

Method used

By obtaining the feature data set of electric bus routes, including line geographical topology parameters and spatiotemporal correlation labels, the features are extracted and the importance evaluation is performed, and a high-dimensional energy consumption feature description is generated. Based on these features, a large language model is trained to obtain an energy consumption prediction model.

Benefits of technology

It improves the generalization ability of the energy consumption prediction model, can more accurately predict the energy consumption of the bus to be tested, and enhances the adaptability to complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144959A_ABST
    Figure CN120144959A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent traffic, and discloses a data-driven electric bus route energy consumption prediction method and system, and the method comprises the steps: obtaining a feature data set of a target route, the feature data set comprising a route geographic topological parameter and a time-space correlation tag; extracting features based on the feature data set, performing importance evaluation on the extracted features to generate high-dimensional energy consumption feature description, and training a large language model based on the high-dimensional energy consumption feature description to obtain an energy consumption prediction model; and inputting the feature vector of the to-be-tested bus into the energy consumption prediction model to generate an energy consumption prediction result of the to-be-tested bus. Through high-dimensional energy consumption feature description generated through importance evaluation, features having important influences on energy consumption prediction can be screened out, dependence of the model on a specific line can be reduced, the generalization ability of the model can be improved, and meanwhile, the accuracy of energy consumption prediction can be improved by utilizing the advantages of the large language model in the aspect of processing complex and high-dimensional data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent transportation, and particularly to a method and system for predicting the energy consumption of an electric bus route driven by data. Background Art

[0002] Currently, there are many research results on vehicle energy consumption calculation and feature analysis in the related technologies, and these research results are applied to the scenario of vehicle energy consumption management. The algorithm model adopted in the energy consumption calculation in the related technologies belongs to a shallow neural network. This algorithm model has a simple structure and is not very suitable for the accurate calculation of energy consumption in complex road conditions, and often shows weak generalization ability for complex road conditions. Summary of the Invention

[0003] In view of this, the present invention provides a method and system for predicting the energy consumption of an electric bus route driven by data to solve the problem of weak generalization ability of the energy consumption calculation algorithm model in the related technologies.

[0004] In a first aspect, the present invention provides a method for predicting the energy consumption of an electric bus route driven by data. The method includes: obtaining a feature data set of a target route, where the feature data set includes route geographical topology parameters and spatio-temporal association labels; extracting features based on the feature data set, evaluating the importance of the extracted features, generating a high-dimensional energy consumption feature description, training a large language model based on the high-dimensional energy consumption feature description to obtain an energy consumption prediction model; and inputting a feature vector of a bus to be measured into the energy consumption prediction model to generate an energy consumption prediction result of the bus to be measured.

[0005] In an optional implementation manner, the evaluating the importance of the extracted features and generating a high-dimensional energy consumption feature description includes: constructing a random forest regression model, and configuring the number of decision trees during the construction process; training the random forest regression model based on the sample data corresponding to the extracted features; after the random forest regression model is trained, calculating the variance reduction amount of a target feature in the extracted features in the decision tree, sorting the variance reduction amounts, and determining the sorting result of the extracted features; and determining a preset number of features in the sorting result as the high-dimensional energy consumption feature description.

[0006] In an alternative embodiment, training the large language model based on the high-dimensional energy consumption feature description to obtain an energy consumption prediction model includes: initializing a bidirectional transducer and loading the pre-trained weights of the bidirectional transducer; constructing a feature sequence based on concatenating the feature data in the feature dataset; performing encoding processing on the feature sequence to obtain feature vectors; inputting the feature vectors into the bidirectional transducer, and performing encoding and decoding through the bidirectional transducer to generate an energy consumption prediction result; calculating a loss value based on the energy consumption prediction result and the true label, and performing masking processing on the feature sequence to obtain the true label; calculating a gradient based on the loss value, and updating the pre-trained weights based on the gradient descent algorithm.

[0007] In an alternative embodiment, obtaining the feature dataset of the target line includes: obtaining the line geographic topology parameters of the target line, where the line geographic topology parameters include at least one of the following, the length of the target line, the number of stations in the target line, the positions of the stations in the target line, and the full load rate of the target line; obtaining the spatio-temporal correlation label, where the spatio-temporal correlation label is used to characterize the time when the line geographic topology parameters are obtained.

[0008] In an alternative embodiment, obtaining the feature dataset of the target line further includes at least one of the following: obtaining the driving behavior data of the driver driving the vehicle on the target line, where the driving behavior data includes the time when the driving behavior data is obtained, and the driving behavior data further includes at least one of the following, the driving state parameters of the vehicle and the active safety control parameters; obtaining the meteorological data of the target line, where the meteorological data includes the time when the meteorological data is obtained, and the meteorological data further includes at least one of the following, weather condition data, temperature data, and humidity data; obtaining the energy consumption data of the vehicle, where the energy consumption data includes the time when the energy consumption data is obtained, and the energy consumption data further includes at least one of the following, the energy loss of different vehicle models driving on different lines, the state data of the air conditioning system during vehicle driving, and the state data of the vehicle power steering pump.

[0009] In an alternative embodiment, the method further includes preprocessing the feature data of the target line to obtain the feature dataset of the target line: detecting missing values in the feature data, and supplementing the missing values or deleting the records containing the missing values based on the type of the feature data; detecting outliers in the feature data, and replacing or deleting the outliers based on the type of the feature data; performing normalization or standardization processing on the feature data; or performing encoding conversion on the non-numerical data in the feature data.

[0010] In an alternative embodiment, extracting features based on the feature dataset includes at least one of the following: performing a clustering analysis on the site locations to obtain an analysis result, and characterizing the site distribution features based on the analysis result; calculating a full load rate change rate based on the full load rate and the time when the full load rate is obtained, and characterizing the dynamic change features of the passenger flow based on the full load rate change rate; dividing energy consumption intervals based on a clustering algorithm, counting the interval proportion of the energy consumption data in each energy consumption interval, and characterizing the energy consumption distribution features based on the interval proportion.

[0011] In a second aspect, the present invention provides a data-driven energy consumption prediction for an electric bus route. The system includes: a feature acquisition module, configured to obtain a feature dataset of a target route, where the feature dataset includes route geographical topology parameters and spatio-temporal association tags; a model training module, configured to extract features based on the feature dataset, evaluate the importance of the extracted features, generate a high-dimensional energy consumption feature description, and train a large language model based on the high-dimensional energy consumption feature description to obtain an energy consumption prediction model; and an energy consumption prediction module, configured to input a feature vector of a bus to be measured into the energy consumption prediction model to generate an energy consumption prediction result of the bus to be measured.

[0012] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the data-driven energy consumption prediction method for an electric bus route according to the first aspect or any corresponding embodiment thereof.

[0013] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to execute the data-driven energy consumption prediction method for an electric bus route according to the first aspect or any corresponding embodiment thereof.

[0014] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the data-driven energy consumption prediction method for an electric bus route according to the first aspect or any corresponding embodiment thereof.

[0015] Obtain a feature dataset including line geographical topology parameters and spatio-temporal correlation tags, superimpose time and space information to perform high-dimensional transformation on energy consumption characteristics, and form rich high-dimensional energy consumption feature descriptions applicable to complex working conditions, which can capture various factors affecting the energy consumption of electric buses more comprehensively; the high-dimensional energy consumption feature descriptions generated through importance evaluation can screen out features that have important impacts on energy consumption prediction, reduce the model's dependence on specific lines, and improve the model's generalization ability; train a large language model based on the sample data of high-dimensional energy consumption feature descriptions to obtain an energy consumption prediction model, and further utilize the powerful generalization ability, multi-modal data processing, and context algorithm advantages of the large language model to accurately predict the energy consumption of the bus to be measured through the energy consumption performance of the known target line; at the same time, utilize the advantages of the large language model in processing complex and high-dimensional data to improve the accuracy of energy consumption prediction. Description of the Drawings

[0016] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the related art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0017] Figure 1 Shows a schematic flowchart of a data-driven method for predicting the energy consumption of electric bus routes according to an embodiment of the present invention;

[0018] Figure 2 Shows a schematic structural diagram of a data-driven system for predicting the energy consumption of electric bus routes;

[0019] Figure 3 Is a schematic hardware structure diagram of a computer device according to an embodiment of the present invention. Detailed Embodiments

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

[0021] Due to the complex road conditions of urban bus lines, in related technologies, in-depth research on the energy consumption prediction of urban bus lines has not been carried out. At the same time, for artificial intelligence algorithm models, the selection of model feature dimensions often determines the accuracy of model prediction results. The energy consumption models in related technologies usually use low-dimensional data to represent energy consumption characteristics, with single data and some data sources being difficult to obtain in actual applications.

[0022] According to an embodiment of the present invention, there is provided an embodiment of a data-driven energy consumption prediction method for electric bus routes. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0023] In this embodiment, a data-driven energy consumption prediction method for electric bus routes is provided, which can be used in terminals such as mobile phones, tablet computers, desktop computers, or servers, etc. Figure 1 The flowchart of the data-driven energy consumption prediction method for electric bus routes according to the embodiment of the present invention is shown, as Figure 1 shown, this process includes the following steps:

[0024] Step S101, obtain a feature data set of the target route, where the feature data set includes line geographical topology parameters and spatio-temporal correlation tags.

[0025] In this step, the target route is a known urban bus operation route. The line geographical topology parameters are used to characterize the road conditions of the target route, information related to stations in the target route, and passenger flow information at each station, etc. The spatio-temporal correlation tags are used to characterize the mutual connections and influences between different time points and spatial positions. For example, factors such as traffic congestion or weather conditions that change over time and space. The spatio-temporal correlation tags describe the correlation properties of things or events in the time dimension and space dimension, involving the mutual influence and dependence relationship between the passage of time and spatial positions. The spatio-temporal correlation tags are used to classify the basic data in the feature data set and construct the logical relationship between the data.

[0026] The feature data set includes target route data and the operation data of electric buses running on the target route.

[0027] Step S102, extract features based on the feature data set, evaluate the importance of the extracted features, generate a high-dimensional energy consumption feature description, and train a large language model based on the high-dimensional energy consumption feature description to obtain an energy consumption prediction model.

[0028] In this step, through feature extraction, features that have an impact on energy consumption prediction can be extracted from the feature dataset. Statistical methods or machine learning models can be used to evaluate the degree of influence of each feature on energy consumption prediction, and important features can be selected. In feature extraction and optimization, there are various methods to choose from, such as the filter method, the wrapper method, and the embedding method. The filter method usually selects features based on statistical tests or correlation analysis; the wrapper method evaluates the performance of feature subsets by constructing multiple models; the embedding method automatically selects features during the model training process, such as ensemble learning methods like decision trees, random forests, and gradient boosting trees.

[0029] Combine the selected important features to generate a high-dimensional energy consumption feature description, which is used to comprehensively describe the energy consumption characteristics of electric buses on specific routes. Train a large language model using the sample data corresponding to the high-dimensional energy consumption feature description, and utilize the advantages of the large language model to analyze the factors affecting energy consumption, creating an energy consumption prediction model for electric buses under complex working conditions, which can provide technical support for the field of bus energy consumption management.

[0030] Based on a large language model trained with a large amount of sample data, it has strong generalization ability for the data of buses to be measured or new tasks. Through the training of the large language model on the energy consumption of the target route, the problem of predicting the energy consumption of unknown buses to be measured can be solved.

[0031] Step S103: Input the feature vector of the bus to be measured into the energy consumption prediction model to generate the energy consumption prediction result of the bus to be measured.

[0032] In this step, for the bus to be measured that requires energy consumption prediction, first, extract the corresponding feature dataset of the bus to be measured, and then generate a high-dimensional feature vector. Input the feature vector of the bus to be measured into the trained energy consumption prediction model, and the energy consumption prediction result of the bus to be measured can be obtained.

[0033] The data-driven method for predicting the energy consumption of electric bus routes provided in this embodiment obtains a feature data set including line geographical topology parameters and spatio-temporal correlation tags, superimposes time and space information to perform high-dimensional transformation on energy consumption features, and forms rich high-dimensional energy consumption feature descriptions applicable to complex working conditions, which can capture various factors affecting the energy consumption of electric buses more comprehensively; the high-dimensional energy consumption feature descriptions generated through importance assessment can screen out features that have an important impact on energy consumption prediction, reduce the dependence of the model on specific routes, and improve the generalization ability of the model; training a large language model based on the sample data of the high-dimensional energy consumption feature descriptions to obtain an energy consumption prediction model can further utilize the powerful generalization ability, multi-modal data processing, and context algorithm advantages of the large language model, and achieve accurate prediction of the energy consumption of the bus to be measured through the energy consumption performance of the known target route; at the same time, using the advantages of the large language model in processing complex and high-dimensional features can improve the accuracy of energy consumption prediction.

[0034] After extracting features from the feature data set, the feature space may become very large and complex, and some of these features may contribute little to energy consumption prediction or even introduce noise. The complexity of the model can be reduced, the generalization ability of the model can be improved, and the computational cost can be reduced through the following feature selection and optimization.

[0035] In some alternative embodiments, importance assessment is performed on the extracted features to generate high-dimensional energy consumption feature descriptions, including: constructing a random forest regression model, and configuring the number of decision trees during the construction process; training the random forest regression model based on the extracted features; after the random forest regression model is trained, calculating the variance reduction amount of the target feature in the extracted features in the decision tree, sorting the variance reduction amounts, and determining the sorting result of the extracted features; determining a preset number of features in the sorting result as the high-dimensional energy consumption feature descriptions.

[0036] In this embodiment, the random forest algorithm can be selected to perform importance assessment on continuous variable energy consumption features as a method for important feature selection and optimization. Random forest is one of the above-mentioned ensemble learning methods, which improves the accuracy and stability of the model by constructing multiple decision trees and integrating their prediction results. In a random forest, each decision tree randomly selects a part of the features for splitting during training, which enables the random forest to effectively evaluate the importance of each feature.

[0037] In this embodiment, the principle of using random forest for feature importance evaluation is to evaluate the importance of each feature by calculating its contribution degree in the decision tree splitting process. Specifically, for each feature, we can calculate its average Gini impurity reduction (for classification problems) or average variance reduction (for regression problems) in all decision trees. The Gini impurity or variance reduction reflects the degree of improvement of the feature on the model performance when splitting nodes.

[0038] A random forest regression model can be constructed using the preprocessed and constructed feature dataset. During the construction process, parameters such as the number of decision trees, the maximum depth, and the minimum number of samples for splitting can be set. Based on the sample data corresponding to the extracted features, a training dataset is constructed. The random forest model is trained based on the training dataset to obtain the splitting rules and weights of each decision tree. After training, calculate the average Gini impurity reduction or variance reduction of each feature in all decision trees to obtain the importance ranking result of the features. In the ranking result, select the top N important features as the final feature subset, that is, the high-dimensional energy consumption feature description. The value of N can be adjusted according to actual needs. By adjusting N, the complexity and performance of the random forest regression model can also be balanced.

[0039] By evaluating the importance of the extracted features and generating a high-dimensional energy consumption feature description, the following results can be obtained: the importance ranking result of the features, the feature subset, and the improvement of the large language model performance. The importance ranking result of the features lists the importance rankings of all features, which helps to identify the features that have a significant impact on energy consumption prediction. According to the importance ranking result of the features, the top N important features are selected as the final feature subset. This feature subset will be used as the input data for the large language model training module. After retraining the large language model using the feature subset, an improvement in model performance can be observed, such as an increase in prediction accuracy and a reduction in computational cost.

[0040] After feature selection and optimization, a screened and optimized high-dimensional energy consumption feature description is generated. The high-dimensional energy consumption feature description will be used as the input data for the large language model training module to train the electric bus energy consumption prediction model. The high-dimensional energy consumption feature description also includes a feature description file. The feature description file includes the feature name, feature type, feature source, feature processing method, and the importance ranking result of the features, etc., which can facilitate subsequent model interpretation and tuning.

[0041] In this way, not only can the performance and interpretability of electric bus energy consumption prediction be significantly improved, but also the complexity of the model can be reduced, the generalization ability of the model can be improved, the features that have a significant impact on energy consumption can be identified, and a scientific basis can be provided for the energy conservation and consumption reduction of electric buses.

[0042] In some alternative embodiments, training a large language model based on high-dimensional energy consumption feature descriptions to obtain an energy consumption prediction model includes: initializing a bidirectional transformer and loading the pre-trained weights of the bidirectional transformer; constructing a feature sequence based on the feature data in the concatenated feature dataset; encoding the feature sequence to obtain feature vectors; inputting the feature vectors into the bidirectional transformer, and performing encoding and decoding through the bidirectional transformer to generate an energy consumption prediction result; calculating a loss value based on the energy consumption prediction result and the true label, and masking the feature sequence to obtain the true label; calculating the gradient based on the loss value, and updating the pre-trained weights based on the gradient descent algorithm.

[0043] In a data-driven electric bus energy consumption prediction system, the large language model module plays a crucial role. The Bidirectional Encoder Representations from Transformers (BERT) large language model can be selected and combined with the preprocessed and feature-engineered data for model training to achieve accurate prediction of the energy consumption of electric buses. The following will elaborate on the design concept and training process of the large language model training.

[0044] As a pre-trained deep bidirectional representation model, BERT has achieved remarkable results in the field of natural language processing. Its powerful language understanding and generation capabilities enable BERT to also exhibit excellent performance when processing structured data. Therefore, we select BERT as the core model for large language model training to capture the complex relationships in electric bus energy consumption prediction.

[0045] During the training process of the large language model, transfer learning and fine-tuning strategies can be adopted. First, initialize using the pre-trained weights of the BERT model, and then, combine the specific requirements of the electric bus energy consumption prediction task to fine-tune the model. This strategy can make full use of the prior knowledge of the BERT model and, at the same time, reduce the training time and computational resource consumption.

[0046] Initializing the bidirectional transformer and loading the pre-trained weights of the bidirectional transformer includes: selection of the BERT model version, loading the pre-trained weights, and configuring the model parameters, etc.

[0047] Among them, for the selection of the BERT model version, an appropriate BERT model version can be selected according to the specific task requirements and computational resource limitations. For example, for a smaller dataset or limited computational resources, a smaller BERT model (such as BERT-base) can be selected; for a larger dataset or higher accuracy requirements, a larger BERT model (such as BERT-large) can be selected. In this embodiment, the BERT-base model can be used.

[0048] Loading pre-trained weights: Before the start of training, it is necessary to load the pre-trained weights of the BERT model. These weights are trained on a large-scale text corpus and contain rich language knowledge and prior information. By loading these weights, the training process of the model can be accelerated and the performance of the model can be improved.

[0049] Configuring model parameters: Configure the model parameters according to the specific task requirements and data characteristics. For example, parameters such as the learning rate, batch size, and number of training epochs can be set to control the training process of the model; parameters such as the dimension of the embedding layer and the activation function can be set to affect the expressive ability of the model.

[0050] In the electric bus energy consumption prediction system, the construction of the input sequence is a crucial step. It not only affects the learning effect and prediction accuracy of the model but also is directly related to data preprocessing, feature extraction, and the choice of model architecture. A detailed discussion of the input sequence construction part is of great significance for building an efficient and accurate energy consumption prediction system. Therefore, before the start of large language model training, based on the feature data in the concatenated feature dataset, a feature sequence is constructed, and the feature sequence is encoded to obtain a feature vector, and the processed data can be converted into an input format that the BERT model can accept. This step includes constructing the input sequence and performing encoding processing.

[0051] Among them, to construct the input sequence, according to the input requirements of the BERT model, the processed data can be constructed into an input sequence. The textually represented features and numerical feature embeddings are concatenated together to form a complete input sequence. At the same time, special markers are added to indicate the start and end of the sequence. In the electric bus energy consumption prediction, the input sequence can include features such as route information, driver driving behavior, weather data, energy consumption data, and air conditioner on status.

[0052] After the input sequence is constructed, encoding processing can be performed. For textually represented features, each word or character in the input sequence can be converted into a corresponding word embedding vector; for numerical feature embeddings, each word or character in the input sequence can be converted into a corresponding numerical feature vector. These vectors will be used as the input of the BERT model for training. During the encoding process, the relative position relationship between the various features in the input sequence needs to be maintained so that the model can capture the dependencies between them.

[0053] After the construction and encoding of the input sequence are completed, the next step is to train and optimize the model. This step is the core link in the training process and aims to improve the prediction performance of the model by iteratively optimizing the model parameters. The training and optimization of the BERT model include forward propagation and loss calculation.

[0054] Among them, during the training process, first, forward propagation is performed. This involves inputting the input sequence into the BERT model, encoding and decoding through a multi-layer Transformer structure, and finally obtaining the prediction result. Then, the loss value is calculated based on the prediction result and the true label. In the task of predicting the energy consumption of electric buses, the mean square error (MSE) can effectively measure the difference between the predicted energy consumption and the actual energy consumption, thereby guiding the model training and making its prediction results more accurate.

[0055] Secondly, back propagation and weight update are performed. After calculating the loss value, back propagation is performed. This involves calculating the gradient according to the loss value and updating the weights of the model through the gradient descent algorithm. The Adam optimizer can be used. During the training process, parameters such as the learning rate can be checked and adjusted regularly to ensure that the model can stably converge to the optimal solution. At the same time, it is also necessary to prevent problems such as gradient explosion or disappearance.

[0056] Finally, the model is evaluated and verified.

[0057] During the training process, the model can be evaluated and validated regularly. The model effect can be evaluated by calculating the recall rate of the prediction results on the validation set. At the same time, the cross-validation method is used to evaluate the generalization ability of the model. By continuously adjusting and optimizing the model parameters and training strategies, the prediction performance of the model can be gradually improved. During the evaluation process, it is necessary to pay attention to maintaining the independence between the validation set and the training set to avoid problems such as overfitting or underfitting. At the same time, it is also necessary to pay attention to the robustness and stability of the model to ensure its reliability in practical applications.

[0058] This can be done through hyperparameter tuning. Hyperparameters are parameters that need to be manually set during model training, such as learning rate, batch size, number of layers, number of hidden units, etc. The choice of these parameters has a significant impact on model performance. Therefore, hyperparameter tuning is required during the training process. By constantly trying and adjusting the hyperparameter combination, the model configuration that best suits the task of predicting the energy consumption of electric buses can be found.

[0059] The energy consumption prediction model is evaluated and verified using the 10-fold cross-validation method. The model parameters are adjusted multiple times during the training process to obtain the optimal configuration. This can better estimate the actual performance of the model and avoid overfitting. A portion of the data is divided as an internal test set to evaluate the generalization ability of the model. The test set should reflect the distribution of the real world as much as possible to ensure the effectiveness of the evaluation.

[0060] Perform 10-fold cross-validation on the trained BERT model multiple times using the training set and the test set, and take the average of the energy consumption prediction results output multiple times as the final evaluation index. Select the optimal BERT model through comparison as the final energy consumption prediction model for predicting the energy consumption of the electric buses to be tested.

[0061] In this way, through the training of the large language model, an energy consumption prediction model is obtained, realizing the exploration of the large language model algorithm in the fields of automotive engineering and energy consumption applications, and enhancing the applicability of the large language model. At the same time, by superimposing time and space factors on features to extract higher-dimensional feature engineering, rich features can be provided for the energy consumption prediction model, which is beneficial to the test results of the energy consumption prediction model algorithm.

[0062] In some alternative embodiments, obtaining the feature data set of the target line includes: obtaining the line geographical topology parameters of the target line, where the line geographical topology parameters include at least one of the following: the length of the target line, the number of stations in the target line, the positions of the stations in the target line, and the full load rate of the target line; obtaining the spatio-temporal correlation label, which is used to characterize the time when the line geographical topology parameters are obtained.

[0063] In this embodiment, the length of the target line can be the total length of each bus line, in kilometers. The number of stations in the target line can be the total number of stations counted on the target line, and the number of stations can reflect the density of the line. The station positions are used to record the geographical coordinates of each station, and the geographical coordinates include longitude and latitude, which can facilitate subsequent spatial analysis and distance calculation. The full load rate can be calculated based on the data provided by the passenger counting system, and the average full load rate of each line at different times can be calculated, which can reflect the passenger flow situation of the line.

[0064] Obtaining the line information of the target line is crucial for evaluating the driving environment and passenger load of the bus, and can improve the accuracy and reliability of the energy consumption prediction model.

[0065] In some alternative embodiments, obtaining the feature data set of the target line further includes at least one of the following: obtaining the driving behavior data of the driver driving the vehicle on the target line, where the driving behavior data includes the time when the driving behavior data is obtained, and the driving behavior data further includes at least one of the following: the driving state parameters of the vehicle and the active safety control parameters; obtaining the meteorological data of the target line, where the meteorological data includes the time when the meteorological data is obtained, and the meteorological data further includes at least one of the following: weather condition data, temperature data, and humidity data; obtaining the energy consumption data of the vehicle, where the energy consumption data includes the time when the energy consumption data is obtained, and the energy consumption data further includes at least one of the following: the energy loss of different vehicle models driving on different lines, the state data of the air conditioning system during vehicle driving, and the state data of the vehicle power steering pump.

[0066] In this embodiment, the vehicle driving state parameters include the average speed of the vehicle, the average acceleration of the vehicle, the average deceleration of the vehicle, etc. The active safety control parameters include the number of braking operations, the number of acceleration operations, the number of emergency braking operations, the number of emergency deceleration operations, the number of deep braking pedal operations, and the number of deep acceleration pedal operations, etc.

[0067] Among them, the average speed can be obtained by calculating the average driving speed of the vehicle during driving, and the unit is kilometers per hour. The average acceleration value during the vehicle acceleration process can be measured to obtain the average acceleration, and the unit is meters per second squared. The average deceleration value during the vehicle deceleration process can be measured to obtain the average deceleration, and the unit is meters per second squared. Based on the number of braking operations, record the number of braking operations of the vehicle during operation. Based on the number of acceleration operations, record the number of acceleration operations of the vehicle during operation. Based on the number of emergency braking operations, record the number of times of rapid deceleration of the vehicle in a short time, reflecting the driver's emergency braking behavior. The number of emergency deceleration operations is similar to emergency braking, but focuses more on the degree of sharpness of deceleration. Based on the number of deep braking pedal operations, record the number of times the driver deeply presses the braking pedal, which is usually related to emergency braking. Based on the number of deep acceleration pedal operations, record the number of times the driver deeply presses the acceleration pedal, reflecting the driver's aggressive driving behavior.

[0068] The driver's driving behavior can reflect the driver's driving habits and styles. The acquisition of the driver's driving behavior data makes the collected data more comprehensive and can further improve the accuracy of energy consumption prediction.

[0069] Meteorological conditions have a direct impact on the energy consumption of electric buses. For example, rainy days may increase the resistance of the vehicle body, and high-temperature weather may lead to a decrease in battery efficiency. By obtaining meteorological data, the accuracy of energy consumption prediction can be further improved. Weather condition data is used to describe the weather type of the day, such as sunny, cloudy, rainy, or snowy, etc. Temperature data is used to record the temperature value of the day, and the unit is degrees Celsius. Humidity data is used to record the air humidity value of the day, and the unit is percentage. The time of obtaining meteorological data is used to record the specific time point or time period of meteorological data collection, which can be used for subsequent time series analysis.

[0070] Energy consumption data is the basis for the training and verification of large language models. It can include the vehicle's energy consumption per 100 kilometers, and the energy consumption per 100 kilometers of different vehicle models driving on different routes can be recorded, with the unit of kilowatt-hours (kWh / 100km). In addition to the energy consumption during normal driving, the overall vehicle energy consumption also includes large components with high energy consumption. Examples are as follows: The operation of the air conditioning system will significantly increase energy consumption, so it is included in the scope of the feature dataset obtained. Record the on / off state of the air conditioning system during the vehicle operation, including the on time, off time, and set temperature, etc. The on and off of the power steering pump are also important factors affecting the energy consumption of electric buses, etc.

[0071] In this way, the feature dataset covers all factors that may affect the energy consumption of electric buses, which can improve the accuracy of prediction results.

[0072] In some alternative embodiments, the aforementioned data-driven method for predicting the energy consumption of electric bus routes further includes preprocessing the feature data of the target route to obtain a feature dataset of the target route: detecting missing values in the feature data, and based on the type of the feature data, supplementing the missing values or deleting the records containing the missing values; detecting outliers in the feature data, and based on the type of the feature data, replacing or deleting the outliers; performing normalization or standardization processing on the feature data; or performing encoding conversion on the non-numerical data in the feature data.

[0073] In this embodiment, missing values in the feature data are detected, and based on the type of the feature data, the missing values are supplemented or the records containing the missing values are deleted. Missing values refer to the non-existence of values of certain records or features in the dataset. Missing values may be caused by various reasons, such as sensor failures, data transmission errors, or human negligence, etc. Processing missing values is an important part of data cleaning, and the missing values can be processed by interpolation or deletion methods.

[0074] For time series data, interpolation methods can be used, and linear interpolation or polynomial interpolation can be performed according to the values of the previous and subsequent data points. For example, for the feature of average speed, if the data at a certain moment is missing, the average speeds of the previous and subsequent moments can be used for interpolation. The formula for linear interpolation is:

[0075]

[0076] where v missing is used to represent the missing value, v previous is used to represent the speed value at the moment before the missing value, and v next is used to represent the speed value at the moment after the missing value.

[0077] For non-time series data, the deletion method can be used, and the records containing the missing values can be directly deleted. For example, if the data of some stations on a certain route is missing, the data of the whole route can be deleted. This method is simple and direct, but may lose a large amount of information. Therefore, in practical applications, the advantages and disadvantages need to be weighed.

[0078] Outliers in the feature data are detected, and based on the type of the feature data, the outliers are replaced or deleted. Outliers refer to the observed values in the dataset that deviate significantly from other data points. The existence of outliers will affect the training effect and prediction accuracy of the model.

[0079] The Z-score statistical method can be used to detect outliers. The Z-score method determines whether a data point is an outlier by calculating the standard deviation between each data point and the mean. For example, for the feature of temperature, the Z-score method can be used to detect outliers:

[0080]

[0081] Among them, x is used to represent the value of the data point, μ is used to represent the mean, σ is used to represent the standard deviation. In the case of ∣Z∣>3, the data point corresponding to Z is an outlier. Methods for dealing with outliers include deletion, replacement with the mean or median, etc. For example, for the feature of temperature, if a data point is considered an outlier, it can be replaced with the mean or median of this feature.

[0082] It is also possible to delete multiple identical or similar duplicate data existing in the feature dataset.

[0083] For data from different sources with different formats and units, unified conversion can be performed to facilitate subsequent processing. For example, the date format can be unified to YYYY-MM-DD. The time format can be unified to YYYY-MM-DD hh:mm:ss. Numerical data can be converted to floating-point numbers, and floating-point numbers can be used to represent the values after the decimal point, which can be applied to most numerical features.

[0084] Since there may be differences in dimensions between numerical features, standardization or normalization processing can be performed to eliminate such differences. Standardization processing converts the feature values into a distribution with a mean of 0 and a standard deviation of 1; normalization processing scales the feature values into the interval [0, 1].

[0085] The Z-score method can be used for standardization processing. The Z-score method determines its relative position by calculating the standard deviation between each data point and the mean. The formula for standardization processing is:

[0086]

[0087] Among them, E ′ is used to represent the standardized feature value, E is used to represent the original feature value, μ is used to represent the mean, and σ is used to represent the standard deviation.

[0088] The Min-Max Scaling method can be used for normalization processing. This method scales the feature values by calculating the minimum and maximum values of each data point. The formula for normalization processing is:

[0089]

[0090] Among them, r ′is used to represent the normalized eigenvalue, r is used to represent the original eigenvalue, r min is used to represent the minimum value, r max is used to represent the maximum value. For the convenience of calculation, features such as the average speed, average acceleration, average deceleration, number of braking times, number of acceleration times, number of emergency braking times, number of emergency deceleration times, number of deep brake pedal times, and number of deep acceleration pedal times of the driver's driving behavior can be normalized.

[0091] Encoding conversion of non-numerical data in the feature data can facilitate the energy consumption prediction model to process this data. The encoding methods include one-hot encoding and label encoding. In the embodiments of the present invention, one-hot encoding is taken as an example for illustration.

[0092] One-hot encoding: Convert categorical variables into binary vectors. One-hot encoding is suitable for unordered categorical features. The principle of one-hot encoding is to create a binary bit for each category. When the category appears, the corresponding binary bit is 1, otherwise it is 0.

[0093] For the feature of air conditioner turning on, it can be converted into two binary bits: air conditioner on (1, 0), air conditioner off (0, 1).

[0094] For the feature of weather, assuming that the weather feature has four possible values: cloudy, sunny, rainy, snowy, the one-hot encoding is shown in Table 1:

[0095] Table 1 Example of one-hot encoding representation of weather features

[0096] Cloudy day Sunny day Rainy day Snowy day 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

[0097] In this way, cleaning the feature data through the foregoing preprocessing method can ensure the quality and consistency of the data. The improvement of data quality can improve the performance and prediction accuracy of the energy consumption prediction model.

[0098] In some alternative embodiments, extracting features based on the feature dataset includes at least one of the following: performing cluster analysis on the site location to obtain an analysis result, and characterizing the site distribution feature based on the analysis result; calculating the full load rate change rate based on the full load rate and the time of obtaining the full load rate, and characterizing the dynamic change feature of the passenger flow based on the full load rate change rate; dividing the energy consumption interval based on the clustering algorithm, counting the interval proportion of the energy consumption data in each energy consumption interval, and characterizing the energy consumption distribution feature based on the interval proportion.

[0099] In this embodiment, for the line length, the original feature is the line length, with the unit of kilometers. No feature processing is required and it can be directly used as an input feature. The line length is used to represent the total distance traveled by the bus and is one of the basic parameters for energy consumption prediction.

[0100] Regarding the number of stops on a route, the original feature is the number of stops, with the unit being "number". Feature processing may not be necessary, and it can be directly used as an input feature. The number of stops affects the starting and stopping times of buses, and thus affects energy consumption. Alternatively, the average distance between stops can be further calculated as a derived feature.

[0101] Regarding the location of stops, the original feature is the longitude and latitude coordinates of the stops, with the unit being "degree". The following feature extraction can be performed: By calculating the distance between adjacent stops, the stop density can be obtained, and then the stop density of the entire route can be obtained; or, the K-means clustering algorithm can be used to cluster the stops to analyze the distribution of stops in the geographical space and obtain the stop distribution feature.

[0102] Regarding the full-load rate of a route, the original feature is the full-load rate, with the unit being "%". The following feature extraction can be performed: Calculate the average full-load rate of the entire route; calculate the full-load rate during different time periods, such as during the morning and evening rush hours, to obtain the peak-hour full-load rate feature; or calculate the change rate of the full-load rate during different time periods to reflect the dynamic change of passenger flow.

[0103] Features are extracted based on the driver's driving behavior, including: Regarding the average speed, the original feature is the average speed, with the unit being "km / h". No feature processing is required, and it can be directly used as an input feature. The average speed reflects the driving speed of the bus and is an important factor affecting energy consumption; regarding the average acceleration, the original feature is the average acceleration, with the unit being "m / s" 2 , feature extraction is performed. Calculate the standard deviation of acceleration, which can characterize the degree of dispersion of acceleration. Based on the standard deviation of acceleration, the smoothness of the driver's driving can be reflected. Regarding the average deceleration, the original feature is the average deceleration, with the unit being "m / s" 2 , feature extraction is performed. Calculate the standard deviation of deceleration to characterize the degree of dispersion of deceleration, and it can also reflect the smoothness of the driver's driving. Analyze the distribution of acceleration and deceleration in different intervals to extract the distribution feature; regarding the number of brakes, the original feature is the number of brakes, with the unit being "number". Feature extraction can be performed by calculating the number of brakes per unit time to obtain the braking frequency, and the braking behavior frequency can be characterized based on the number of brakes. Record the duration of each brake to obtain the braking duration feature; regarding the number of accelerations, the original feature is the number of accelerations, with the unit being "number". Feature extraction can be performed by calculating the number of accelerations per unit time to obtain the acceleration frequency, and the acceleration behavior frequency can be characterized based on the number of accelerations. Record the duration of each acceleration to obtain the acceleration duration feature.

[0104] Similarly, for the number of hard brakes in a driver's driving behavior, the original feature is the number of hard brakes, with the unit of times. The hard brake intensity can be extracted by calculating the acceleration value of each hard brake. The hard brake intensity is used to characterize the intensity of driving. The proportion of the number of hard brakes in the total number of brakes can be calculated to obtain the hard brake ratio. For the number of sharp decelerations, the original feature is the number of sharp decelerations, with the unit of times. The sharp deceleration intensity can be extracted by calculating the deceleration value of each sharp deceleration. The sharp deceleration intensity is used to characterize the intensity of driving. The proportion of the number of sharp decelerations in the total number of decelerations can be calculated to obtain the sharp deceleration ratio. For the number of deep brake pedal presses, with the unit of times, the deep brake intensity can be obtained by calculating the pedal travel of each deep brake pedal press. The proportion of deep braking in the total braking can be calculated to obtain the deep brake ratio. For the number of deep accelerator pedal presses, with the unit of times, the deep acceleration intensity can be obtained by calculating the acceleration value of each deep accelerator pedal press. The proportion of deep acceleration in the total acceleration can be calculated to obtain the deep acceleration ratio.

[0105] For meteorological data, the original feature is time, in the format of year-month-day hour:minute:second. For feature extraction, the time can be converted into type features, such as weekdays, weekends, or holidays, etc.; the time can be divided into different time periods, such as morning rush hour, flat peak, evening rush hour, and night, etc.; or the periodic or trend features of the time series can be extracted.

[0106] When the original feature is the weather type, the weather type can be cloudy, sunny, rainy, or snowy, etc. The weather type can be converted into numerical encoding, or an index affecting energy consumption can be configured for each weather type according to historical data for feature extraction.

[0107] When the original feature is temperature, with the unit of degrees Celsius, feature extraction can be performed by dividing the temperature into different intervals, such as low temperature, moderate temperature, and high temperature, etc., or by calculating the change rate of temperature in different time periods for feature extraction.

[0108] When the original feature is humidity, with the unit of %, feature extraction can be performed by dividing the humidity into different intervals, such as low humidity, moderate humidity, and high humidity, etc., or by analyzing the combined effect of humidity and temperature on energy consumption to obtain interaction features.

[0109] When the original feature is the energy consumption per 100 kilometers, with the unit of kWh / 100 km, feature extraction can be performed by calculating the historical energy consumption average of the same vehicle model on different routes. Or the trend feature can be obtained by analyzing the change trend of energy consumption over time. Or the distribution feature can be obtained by analyzing the distribution of energy consumption in different intervals. Based on the clustering algorithm, the energy consumption intervals are divided, and the interval proportion of energy consumption data in each energy consumption interval is statistically calculated, and the energy consumption distribution feature is characterized based on the interval proportion.

[0110] In the case where the original feature is a Boolean value indicating whether the air conditioner is turned on or off, the duration feature of the air conditioner being turned on can be extracted by calculating the duration of each air conditioner startup. The proportion feature of the air conditioner being turned on can also be extracted by calculating the ratio of the air conditioner startup time to the total driving time. Additionally, based on historical data, energy consumption coefficients can be configured for the air conditioner energy consumption under different temperature or humidity conditions, and the air conditioner energy consumption coefficient feature can be extracted.

[0111] In this way, features can be extracted, transformed, and selected from the feature dataset for use in large language model training. Noise and redundant information can be removed, and key factors that affect the prediction target can be retained, thereby improving the training efficiency and prediction performance of the model. Carefully designed features can better reflect the internal laws and patterns of the data, enabling the model to have stronger generalization ability when facing unseen data. It can reduce the number of parameters that the model needs to learn, lower the complexity of the model, help avoid overfitting, and improve the interpretability of the model.

[0112] In some alternative implementation manners, the feature vector of the bus to be measured is input into the energy consumption prediction model to generate the energy consumption prediction result of the bus to be measured, including: converting features such as the route information, driver driving behavior, weather data, and air conditioner on / off state of the bus to be measured into vector form. For example, numerical features such as route length, number of stops, average speed, and temperature can be directly converted into floating-point vectors; categorical features such as weather conditions and air conditioner states can be converted into binary vectors through one-hot encoding for feature vector construction.

[0113] The Z-score method is used to normalize the numerical features so that they fall within the range of [0, 1] for better model processing. All feature vectors are concatenated into a unified feature vector as the input of the model. For example, features such as route length, average speed, and temperature can be concatenated into a long vector. Model inference is the core step of energy consumption prediction, and the trained BERT model is used to infer the input features. The specific steps are as follows:

[0114] Load the pre-trained BERT model parameters; input the input feature vector into the BERT model, and perform forward propagation calculation through multiple layers of Transformer encoders to obtain the hidden layer state; design a suitable output layer according to the task requirements. For a regression task such as energy consumption prediction, a linear layer is usually used in the last layer, and the Sigmoid activation function is applied to map the hidden layer state to the energy consumption value; calculate the difference between the predicted value and the true value using the mean square error (MSE); calculate the gradient through the backpropagation algorithm and update the model parameters using the Adam optimizer to minimize the loss function.

[0115] After the model inference and prediction are completed, the prediction results are parsed and output. The parsing of the prediction results involves converting the vector output by the model into a specific energy consumption value per 100 kilometers, while the output of the prediction results involves presenting the parsed results to the user or subsequent processing modules in an appropriate form.

[0116] In this way, by superimposing information such as time and space, the energy consumption characteristics are transformed at a high-dimensional level to form a rich description of energy consumption characteristics suitable for complex working conditions. Then, the sample data of the new features are provided to the large language model to complete the route energy consumption training, so as to obtain an energy consumption prediction model for accurately predicting the energy consumption of urban bus lines. The energy consumption of unknown lines can be accurately predicted based on the energy consumption performance of known lines, providing effective technical support for bus operation energy consumption management and cost control. It can solve the problem of weak generalization ability caused by low-dimensional features and shallow neural networks.

[0117] In this embodiment, a data-driven electric bus route energy consumption prediction system is also provided. This system is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0118] This embodiment provides a data-driven electric bus route energy consumption prediction system. Figure 2 The structural schematic diagram of the data-driven electric bus route energy consumption prediction system is shown, as Figure 2 shown, including:

[0119] A feature acquisition module 201, configured to acquire a feature data set of a target route, where the feature data set includes route geographical topology parameters and spatio-temporal association labels.

[0120] A model training module 202, configured to extract features based on the feature data set, evaluate the importance of the extracted features, generate a high-dimensional energy consumption feature description, and train a large language model based on the high-dimensional energy consumption feature description to obtain an energy consumption prediction model.

[0121] An energy consumption prediction module 203, configured to input the feature vector of the bus to be measured into the energy consumption prediction model to generate an energy consumption prediction result of the bus to be measured.

[0122] In some optional implementation manners, the model training module 202 includes:

[0123] The first model training unit is used to construct a random forest regression model. During the construction process, configure the number of decision trees; based on the sample data corresponding to the extracted features, train the random forest regression model; after the random forest regression model is trained, calculate the variance reduction amount of the target feature in the extracted features in the decision tree, sort the variance reduction amounts, and determine the sorting result of the extracted features; determine that a preset number of features in the sorting result are high-dimensional energy consumption feature descriptions.

[0124] In some alternative embodiments, the model training module 202 further includes:

[0125] The second model training unit is used to initialize the bidirectional transducer and load the pre-trained weights of the bidirectional transducer; based on the feature data in the concatenated feature dataset, construct a feature sequence; perform encoding processing on the feature sequence to obtain a feature vector; input the feature vector into the bidirectional transducer, and perform encoding and decoding through the bidirectional transducer to generate an energy consumption prediction result; calculate a loss value based on the energy consumption prediction result and the true label, and perform masking processing on the feature sequence to obtain the true label; calculate the gradient based on the loss value, and update the pre-trained weights based on the gradient descent algorithm.

[0126] In some alternative embodiments, the feature acquisition module 201 includes:

[0127] The first feature acquisition unit is used to obtain the line geographical topology parameters of the target line. The line geographical topology parameters include at least one of the following: the length of the target line, the number of stations in the target line, the station locations in the target line, and the full load rate of the target line; obtain the spatio-temporal correlation label, which is used to characterize the time when the line geographical topology parameters are obtained.

[0128] In some alternative embodiments, the feature acquisition module 201 further includes:

[0129] The second feature acquisition unit is used to obtain the driving behavior data of the driver driving the vehicle on the target line. The driving behavior data includes the time when the driving behavior data is obtained, and the driving behavior data further includes at least one of the following: the driving state parameters of the vehicle and the active safety control parameters; obtain the meteorological data of the target line. The meteorological data includes the time when the meteorological data is obtained, and the meteorological data further includes at least one of the following: weather condition data, temperature data, and humidity data; obtain the energy consumption data of the vehicle. The energy consumption data includes the time when the energy consumption data is obtained, and the energy consumption data further includes at least one of the following: the energy loss of different vehicle models driving on different lines, the state data of the air conditioning system during vehicle driving, and the state data of the vehicle power steering pump.

[0130] In some alternative embodiments, the data-driven electric bus route energy consumption prediction system further includes a preprocessing module configured to preprocess the feature data of the target route to obtain a feature data set of the target route: detect missing values in the feature data, and based on the type of the feature data, supplement the missing values or delete the records containing the missing values; detect outliers in the feature data, and based on the type of the feature data, replace or delete the outliers; perform normalization or standardization processing on the feature data; or perform encoding conversion on the non-numerical data in the feature data.

[0131] In some alternative embodiments, the model training module 202 further includes:

[0132] The third unit of model training is configured to perform clustering analysis on the site locations to obtain an analysis result, and characterize the site distribution features based on the analysis result; calculate the change rate of the full load rate based on the full load rate and the time when the full load rate is obtained, and characterize the dynamic change features of the passenger flow based on the change rate of the full load rate; divide the energy consumption intervals based on the clustering algorithm, and count the interval proportion of the energy consumption data in each energy consumption interval, and characterize the energy consumption distribution features based on the interval proportion.

[0133] The further function descriptions of the above-mentioned modules and units are the same as those in the corresponding embodiments above, and will not be elaborated here.

[0134] The data-driven electric bus route energy consumption prediction system in this embodiment is presented in the form of functional units. Here, the unit refers to an application specific integrated circuit (ASIC) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0135] The embodiment of the present invention further provides a computer device having the above-mentioned Figure 2 shown data-driven electric bus route energy consumption prediction system.

[0136] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As shown in Figure 3As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of a graphical user interface on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 3 In the figure, a processor 10 is taken as an example.

[0137] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0138] Among them, the aforementioned memory 20 stores instructions executable by at least one processor 10, so that the aforementioned at least one processor 10 executes the method shown in the above embodiments.

[0139] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include high-speed random access memory and can also include non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0140] The memory 20 can include volatile memory, such as random access memory; the memory can also include non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memory.

[0141] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected through a bus or other means. Figure 3 Take the connection through the bus as an example.

[0142] The input device 30 can receive input digital or character information and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (such as a light-emitting diode), and a tactile feedback device (such as a vibration motor), etc. The above display device includes but is not limited to a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.

[0143] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented by downloading through a network and originally stored in a remote storage medium or a non-transitory machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiment is implemented.

[0144] A part of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should be able to understand that the forms of existence of computer program instructions in a computer-readable medium include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include but are not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.

[0145] Although embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A data-driven electric bus route energy consumption prediction method, characterized in that: The method comprises: Acquire a feature data set of a target line, wherein the feature data set includes line geographic topology parameters and spatiotemporal association labels; Extracting features based on the feature data set, evaluating the importance of the extracted features, generating a high-dimensional energy consumption feature description, training a large language model based on the high-dimensional energy consumption feature description, and obtaining an energy consumption prediction model; The characteristic vector of the bus to be tested is input into the energy consumption prediction model to generate an energy consumption prediction result of the bus to be tested.

2. The method according to claim 1, characterized in that The extracted features are evaluated for importance to generate a high-dimensional energy consumption feature description, including: Constructing a random forest regression model, wherein the number of decision trees is configured during the construction process; Training the random forest regression model based on the sample data corresponding to the extracted features; After the random forest regression model training is completed, the variance reduction of the target feature in the extracted features in the decision tree is calculated, the variance reduction is sorted, and the sorting result of the extracted features is determined; A preset number of features in the sorting result are determined as the high-dimensional energy consumption feature description.

3. The method according to claim 1 or 2, characterized in that: The training of a large language model based on the high-dimensional energy consumption feature description to obtain an energy consumption prediction model includes: Initializing a bidirectional transformer and loading pre-trained weights of the bidirectional transformer; Constructing a feature sequence based on the concatenation of feature data in the feature data set; Encoding the feature sequence to obtain a feature vector; Inputting the feature vector into the bidirectional converter, encoding and decoding the feature vector through the bidirectional converter, and generating an energy consumption prediction result; Calculating a loss value based on the energy consumption prediction result and the true label, and performing mask processing on the feature sequence to obtain the true label; A gradient is calculated based on the loss value, and the pre-trained weight is updated based on a gradient descent algorithm.

4. The method according to claim 1, characterized in that The step of obtaining a characteristic data set of a target route includes: Acquire a line geographic topology parameter of the target line, wherein the line geographic topology parameter includes at least one of the following: the length of the target line, the number of stations in the target line, the location of the stations in the target line, and the full load rate of the target line; The time-space association tag is obtained, where the time-space association tag is used to represent the time for obtaining the line geographic topology parameter.

5. The method according to claim 4, characterized in that The step of obtaining the characteristic data set of the target route further includes at least one of the following: Acquire driving behavior data of a driver driving a vehicle on the target route, wherein the driving behavior data includes a time when the driving behavior data is acquired, and the driving behavior data also includes at least one of the following: a driving state parameter and an active safety control parameter of the vehicle; Acquire meteorological data of the target route, wherein the meteorological data includes the time when the meteorological data is acquired, and the meteorological data also includes at least one of the following: weather condition data, temperature data, and humidity data; Obtain energy consumption data of the vehicle, the energy consumption data including the time when the energy consumption data is obtained, and the energy consumption data also including at least one of the following: energy loss of different vehicle models traveling on different routes, status data of the air-conditioning system during vehicle driving, and status data of the vehicle power steering pump.

6. The method according to claim 1, characterized in that The method further includes preprocessing the characteristic data of the target line to obtain a characteristic data set of the target line: Detect missing values ​​in the feature data, and based on the type of the feature data, supplement the missing values ​​or delete records containing the missing values; Detecting abnormal values ​​in the feature data, and replacing or deleting the abnormal values ​​based on the type of the feature data; Normalizing or standardizing the feature data; or, The non-numeric data in the feature data is converted into code.

7. The method according to claim 5, characterized in that The extracting features based on the feature data set includes at least one of the following: Performing cluster analysis on the site locations to obtain analysis results, and characterizing site distribution characteristics based on the analysis results; Based on the full load rate and the time when the full load rate is obtained, calculating the full load rate change rate, and characterizing the dynamic change characteristics of the passenger flow based on the full load rate change rate; The energy consumption intervals are divided based on a clustering algorithm, the interval proportions of the energy consumption data in each energy consumption interval are counted, and the energy consumption distribution characteristics are characterized based on the interval proportions.

8. A data-driven electric bus route energy consumption prediction system, characterized in that: The system comprises: A feature collection module is used to obtain a feature data set of a target line, wherein the feature data set includes line geographic topology parameters and spatiotemporal association labels; A model training module, used for extracting features based on the feature data set, evaluating the importance of the extracted features, generating a high-dimensional energy consumption feature description, training a large language model based on the high-dimensional energy consumption feature description, and obtaining an energy consumption prediction model; The energy consumption prediction module is used to input the characteristic vector of the bus to be tested into the energy consumption prediction model to generate the energy consumption prediction result of the bus to be tested.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data-driven electric bus route energy consumption prediction method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data-driven electric bus route energy consumption prediction method according to any one of claims 1 to 7.