Search

CN-121980169-A - Rapid self-adaptive prediction method and related device for small sample working conditions of hydrogen-electricity dual-source vehicle

CN121980169ACN 121980169 ACN121980169 ACN 121980169ACN-121980169-A

Abstract

The application discloses a rapid self-adaptive prediction method for a small sample working condition of a hydrogen-electricity dual-source vehicle and a related device, and relates to the technical field of new energy electric vehicle prediction, wherein the method comprises the steps of determining a current stage working condition prediction model according to acquired current stage operation data of the target hydrogen-electricity dual-source vehicle and a previous stage working condition prediction model, predicting load power demand data of a next stage based on the current stage operation data and the current stage working condition prediction model, and when the current stage operation data is initial stage operation data, the previous stage working condition prediction model is a pre-trained global meta-model, wherein the global meta-model is a model obtained after training a constructed time-space diagram attention network based on a meta-learning algorithm and a plurality of historical operation data of the hydrogen-electricity dual-source vehicle acquired off line; the time length of the historical operation data is longer than that of the current stage operation data, the application can solve the problem of less samples, and high-precision prediction of the future load power requirement is realized.

Inventors

  • LI JIANWEI
  • LI SHAOYAN
  • ZHONG HAO
  • YANG QINGQING
  • RAO PEINAN
  • ZHANG LIANG
  • Dong Zhekang
  • ZHAO DONGDONG
  • ZHANG CHENYU
  • GAO FENG

Assignees

  • 北京理工大学

Dates

Publication Date
20260505
Application Date
20251226

Claims (10)

  1. 1. The rapid self-adaptive prediction method for the small sample working condition of the hydrogen-electricity double-source vehicle is characterized by comprising the following steps of: Acquiring current-stage operation data of a target hydrogen-electricity dual-source vehicle, wherein the current-stage operation data is operation data in a preset time period before the current moment; determining a current stage working condition prediction model based on the current stage operation data and the previous stage working condition prediction model; predicting load power demand data of a next stage based on the current stage operation data and the current stage working condition prediction model; When the current stage operation data is the initial stage operation data, the previous stage working condition prediction model is a pre-trained global meta-model, the global meta-model is a model obtained by training a constructed space-time diagram attention network based on a meta-learning algorithm and historical operation data of a plurality of hydrogen-electricity dual-source vehicles acquired off line, and the time length of the historical operation data is longer than that of the current stage operation data.
  2. 2. The rapid adaptive prediction method for a hydrogen-electric dual-source vehicle under a few-sample condition according to claim 1, wherein the determining the current-stage condition prediction model based on the current-stage operation data and the previous-stage condition prediction model specifically comprises: Determining a current support set based on the current stage operation data, wherein the current support set comprises a plurality of current first sample pairs, each current first sample pair comprises current first data and current second data, the current first data is a feature matrix and an adjacent matrix determined based on the current stage operation data, the current second data is real load power demand data corresponding to the current first data, and the real load power demand data is data in the current stage operation data; Based on the current support set and a gradient descent optimization algorithm, performing parameter iteration operation for the previous stage working condition prediction model for a preset number of times to obtain a first updated working condition prediction model; if the relative average absolute error of the first updated working condition prediction model on the current support set is smaller than a preset threshold value, determining the first updated working condition prediction model as a working condition prediction model of the current stage; If the relative average absolute error of the first updated working condition prediction model on the current support set is greater than or equal to a preset threshold value, determining the global meta-model or the previous-stage working condition prediction model as a current-stage working condition prediction model; The calculation formula of the relative average absolute error of the first updated working condition prediction model on the current support set is as follows: ; Wherein, the Representing the average absolute error of the first updated operating mode prediction model on the current support set; Representing the current first pair of samples, The current first data is represented by a first data, The current second data is represented by a representation of the second data, Parameters representing a first updated operating mode prediction model; inputting the first updated working condition prediction model as Outputting a predicted value; Representing the average value of y in all current first sample pairs; Representing the current support set and, Representing the number of current first sample pairs in the current support set.
  3. 3. The rapid adaptive prediction method for a hydrogen-electric dual-source vehicle under a small sample condition according to claim 2, wherein the method is characterized in that based on the current support set and a gradient descent optimization algorithm, a parameter iteration operation of a preset number of times is performed on the previous stage of working condition prediction model to obtain a first updated working condition prediction model, and specifically comprises: When the current iteration number d is not equal to the preset number, a plurality of current predicted values are obtained based on the current support set and the working condition prediction model corresponding to the current iteration number d; updating the weight of the working condition prediction model corresponding to the current iteration number d based on the current prediction value, the current support set and the gradient descent optimization algorithm to obtain a working condition prediction model corresponding to the next iteration number d+1; Updating the current iteration number d to d+1; When the current iteration number d is equal to the preset number, determining a working condition prediction model corresponding to the current iteration number d as a first updated working condition prediction model; In each parameter iteration operation, updating the full-connection layer parameters of the space-time diagram attention network of the working condition prediction model corresponding to the corresponding iteration times, and freezing the space-time diagram attention layer parameters of the space-time diagram attention network; When the current iteration number d is 1, the working condition prediction model corresponding to the current iteration number d is the working condition prediction model of the previous stage.
  4. 4. The method for rapid adaptive prediction of hydrogen-electric dual-source vehicle under low sample conditions according to claim 1, wherein the pre-training process of the global meta-model comprises: acquiring historical operation data of a plurality of hydrogen-electricity double-source vehicles, and constructing an initial stage space-time attention network model, wherein the historical operation data comprises one or more of fuel cell output power, power cell SOC, driving motor power and environmental temperature data; Constructing a plurality of meta-tasks based on the historical operating data; Updating parameters of the space-time attention network model corresponding to the current updating stage based on all the meta-tasks to obtain the space-time attention network model updated in the current updating stage; When the space-time attention network model updated in the current updating stage meets a preset evaluation index, determining the space-time attention network model updated in the current updating stage as a global meta-model; When the space-time attention network model updated in the current updating stage does not meet the preset evaluation index, the space-time attention network model updated in the current updating stage is used as a space-time attention network model corresponding to the next updating stage, the current updating stage is updated to be the next updating stage, and the parameters of the space-time attention network model corresponding to the current updating stage are updated based on all the meta-tasks, so that the space-time attention network model updated in the current updating stage is obtained; When the current updating stage is an initial stage, the space-time attention network model corresponding to the current updating stage is the space-time attention network model of the initial stage.
  5. 5. The method of claim 4, wherein each of the plurality of meta-tasks includes a support set and a query set, the support set including a plurality of first sample pairs, each of the first sample pairs including a first data and a second data, the first data being a feature matrix and an adjacent matrix determined based on one segment of data in the meta-task, the second data being a real load power demand data corresponding to the first data, the query set including a plurality of second sample pairs, each of the second sample pairs including a third data and a fourth data, the third data being a feature matrix and an adjacent matrix determined based on another segment of data in the meta-task, the fourth data being real load power demand data corresponding to the third data, the real load power demand data being data in the meta-task, the updated current phase parameters of the attention network model based on all of the meta-task update phases, the updated current phase being obtained, the updated specific attention network model including: Aiming at each metatask, calculating personalized model parameters corresponding to the metatask based on a support set of the metatask, a space-time attention network model corresponding to a current updating stage and a random gradient descent algorithm; Calculating global loss based on personalized model parameters of each metatask, a space-time attention network model corresponding to a current updating stage and a query set of all metatasks, and calculating updating parameters of the space-time attention network model corresponding to the current updating stage based on the global loss; based on the update parameters and the space-time attention network model corresponding to the current update stage, obtaining the space-time attention network model updated in the current update stage; the calculation formula of the personalized model parameters is as follows: ; ; In the formula, Initial parameters representing the spatiotemporal attention network model corresponding to the current update phase, Representing meta-tasks The corresponding parameters of the personalized model are set, (. Cndot.) represents meta-tasks Is a function of the average absolute error loss of (c), Representing the parameters as When the time-space attention network model corresponding to the current updating stage is updated, Representation pair The gradient is calculated and the gradient is calculated, For the learning rate of the inner layer, A first pair of samples is represented and, The first data is represented by a first set of data, The second data is represented by a representation of the second data, Is input as A predicted value of a spatiotemporal attention network model corresponding to a current update stage; The calculation formula of the updated parameters is as follows: ; ; In the formula, In order to update the parameters of the parameter, For the learning rate of the outer layer, For the meta-task probability distribution, In the event of a global loss, In order to query the set of queries, A second pair of samples is represented and is shown, The third data is represented by a representation of the third data, The fourth data is represented by a representation of the fourth data, Representing the parameters as When the time-space attention network model corresponding to the current updating stage is updated, Is input as A predictive value of a spatiotemporal attention network model corresponding to a current update stage of (a).
  6. 6. The rapid adaptive prediction method for a small sample condition of a hydrogen-electric dual-source vehicle according to claim 5, wherein for any metatask, the method for determining the first data comprises constructing a space-time diagram corresponding to one piece of data of the metatask based on one piece of data of the metatask and a hydrogen-electric dual-source system of the hydrogen-electric dual-source vehicle, and determining the first data based on the space-time diagram corresponding to one piece of data of the metatask; constructing a time-space diagram corresponding to the other section of data of the meta-task based on the other section of data of the meta-task and a hydrogen-electricity dual-source system of the hydrogen-electricity dual-source vehicle, and determining third data based on the time-space diagram corresponding to the other section of data of the meta-task; the time-space diagram comprises a node set and an edge set, wherein the node set comprises a plurality of nodes, any node represents one component of a hydrogen-electricity dual-source system of the hydrogen-electricity dual-source vehicle, each node comprises a plurality of feature vectors, each feature vector comprises a time sequence feature and an attribute feature, the edge set comprises a plurality of edges, the edges represent connection relations among the components, and the connection relations are determined based on energy interaction data among the components.
  7. 7. The rapid self-adaptive prediction method for the working conditions of the hydrogen-electricity dual-source vehicle with few samples according to claim 1, wherein the working condition prediction model of the current stage is used for calculating and fusing spatial characteristics and time characteristics of each node, processing the spatial characteristics and the time characteristics fused spatial and temporal fusion characteristics, and predicting load power demand data of the next stage; Wherein, the calculation formula of the space feature is: ; ; In the formula, As a spatial feature of the node i, And Are all functions of the activation of the ReLU, Is a space feature weight matrix; attention weights for node i and node j; a neighbor node set of the node i; is the feature vector of node j; As the feature vector of the node i, For the feature vector of node k, W is a learnable feature mapping matrix, In order to be able to pay attention to the nucleus, The method is vector splicing operation, exp (&) is a Gaussian kernel function, k is a sum index variable, j is a target index variable, and the value ranges of k and i are the same; the calculation formula of the time characteristic is as follows: ; ; ; In the formula, For the time context feature aggregated by node i, K is the length of the time series feature, r and m are both the time step indices in the time series feature, t is the current time, For the attention coefficient of time step m at the current moment, For the projection matrix of the time series features, For the feature value of the mth time step in the time series feature, For the spatio-temporal similarity score of time step m at the current instant, For the spatio-temporal similarity score of the time step r at the current moment, As the feature value of the t-th time step in the time series feature, The vector is embedded for the time of time step t, For the time embedding vector of time step m, Is the dimension of the time series feature; The calculation formula of the space-time fusion characteristic is as follows: ; ; In the formula, Is a spatio-temporal fusion feature of node i, In order to gate the weights on the basis of the weight, Representing element-by-element multiplication; Representing the Sigmoid activation function, In order to gate the spatial weight matrix, In order to gate the time-weight matrix, Is biased.
  8. 8. A computer device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the method for fast adaptive prediction of the low sample operating conditions of a hydrogen electric dual source vehicle according to any one of claims 1-7.
  9. 9. A computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the rapid adaptive prediction method for the low sample condition of a hydrogen electric dual source vehicle according to any one of claims 1 to 7.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the rapid adaptive prediction method for the low sample operating condition of a hydrogen electric dual source vehicle according to any one of claims 1 to 7.

Description

Rapid self-adaptive prediction method and related device for small sample working conditions of hydrogen-electricity dual-source vehicle Technical Field The application relates to the technical field of new energy electric automobile prediction, in particular to a rapid self-adaptive prediction method and a related device for a small sample working condition of a hydrogen-electricity dual-source vehicle. Background The hydrogen-electricity dual-source system has become one of the most potential technical routes of the new energy automobile industry by virtue of the unique advantages of zero emission, long endurance and the like, plays a key role in future traffic electric transformation, and directly determines the economy, durability and safety of the whole automobile by virtue of the advantages and disadvantages of an energy management strategy. Accurate future load condition (power demand) predictions are a precondition for formulating optimized energy management strategies, e.g., predicting upcoming high power demands can start the fuel cell in advance or adjust the battery discharge strategy, avoid system impact, and extend component life. At present, existing load prediction methods are mainly divided into two types, namely a method based on a classical time sequence model (such as ARIMA and Markov chain), wherein the method is difficult to capture complex nonlinear space coupling and time dynamics among multiple components in a system, and a method based on deep learning (such as LSTM and CNN), and the method generally requires a large amount of historical running data of the same vehicle to train although the prediction accuracy is improved, so that the problem of data hunger and thirst with strong data dependence exists. In practical application, for a newly-offline vehicle, a vehicle running to a new area or a sudden abnormal working condition, historical running data available for model training is extremely limited (namely, the problem of 'few samples'), so that the accuracy of the existing prediction model is rapidly reduced, and effective support cannot be provided for energy management. Therefore, a new method for predicting the internal working condition, which can be rapidly adapted to a new vehicle and still can maintain high precision under a small amount of data, is urgently needed. Disclosure of Invention The application aims to provide a rapid self-adaptive prediction method and a related device for a small sample working condition of a hydrogen-electricity dual-source vehicle, which can solve the problem of small sample and realize high-precision prediction of future load power requirements. In order to achieve the above object, the present application provides the following solutions: In a first aspect, the application provides a method for rapidly and adaptively predicting a small sample working condition of a hydrogen-electricity dual-source vehicle, which comprises the following steps: And acquiring current-stage operation data of the target hydrogen-electricity dual-source vehicle, wherein the current-stage operation data is operation data in a preset time period before the current moment. And determining a current-stage working condition prediction model based on the current-stage operation data and the previous-stage working condition prediction model. And predicting load power demand data of the next stage based on the current stage operation data and the current stage working condition prediction model. When the current stage operation data is the initial stage operation data, the previous stage working condition prediction model is a pre-trained global meta-model, the global meta-model is a model obtained by training a constructed space-time diagram attention network based on a meta-learning algorithm and historical operation data of a plurality of hydrogen-electricity dual-source vehicles acquired off line, and the time length of the historical operation data is longer than that of the current stage operation data. In a second aspect, the application provides a computer device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, the processor executing the computer program to implement the steps of the rapid adaptive prediction method for the low sample operating condition of the hydrogen electric dual source vehicle according to any one of the above. In a third aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the rapid adaptive prediction method for a low sample condition of a hydrogen electric dual source vehicle as described in any one of the above. In a fourth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the rapid adaptive prediction method for the low sample operatin