Fast self-adaptive prediction method for few-sample working condition of hydrogen-electricity double-source vehicle and related device
By combining a global meta-model and a spatiotemporal graph attention network, and utilizing a meta-learning algorithm, the system can quickly adapt to new vehicle operating conditions, achieving high-precision prediction of load power demand for hydrogen-electric dual-source vehicles. This solves the adaptation problem under limited sample data and improves the effectiveness of energy management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-05
AI Technical Summary
Existing load prediction methods for hydrogen-electric dual-source vehicles lack historical operating data when dealing with new vehicles or new regions, leading to decreased prediction accuracy and failing to effectively support energy management.
By employing a global meta-model and a spatiotemporal graph attention network, combined with a meta-learning algorithm, and through offline pre-training and online adjustment with a small amount of data, it can quickly adapt to changes in the operating conditions of new vehicles and achieve high-precision prediction of load power demand.
With very limited data, high-precision prediction of load power demand for hydrogen-electric dual-source vehicles was achieved, solving the adaptive challenge under limited sample data and improving the effectiveness of energy management.
Smart Images

Figure CN121980169A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of prediction technology for new energy electric vehicles, and in particular to a fast adaptive prediction method and related device for hydrogen-electric dual-source vehicles under few sample conditions. Background Technology
[0002] With its unique advantages such as zero emissions and long driving range, the hydrogen-electric dual-source system has become one of the most promising technological routes in the new energy vehicle industry and will play a key role in the future electrification transformation of transportation. The quality of its energy management strategy directly determines the economy, durability, and safety of the entire vehicle. Accurate prediction of future load conditions (power demand) is a prerequisite for formulating optimized energy management strategies. For example, anticipating upcoming high power demands allows for the early activation of fuel cells or adjustment of battery discharge strategies, avoiding system impact and extending component lifespan.
[0003] Currently, existing load prediction methods mainly fall into two categories: one is based on classical time series models (such as ARIMA and Markov chains), which struggles to capture the complex nonlinear spatial couplings and temporal dynamics between multiple components within the system; the other is based on deep learning (such as LSTM and CNN), which, while improving prediction accuracy, typically requires a large amount of historical operating data from the same vehicle for training, resulting in a "data hunger" problem due to its strong data dependence. In practical applications, for newly manufactured vehicles, vehicles traveling to new areas, or vehicles experiencing sudden abnormal operating conditions, the historical operating data available for model training is extremely limited (i.e., the "few-sample problem"), leading to a sharp decline in the accuracy of existing prediction models and failing to provide effective support for energy management.
[0004] Therefore, there is an urgent need for a new method that can quickly adapt to new vehicles and maintain high accuracy in predicting internal operating conditions even with limited data. Summary of the Invention
[0005] The purpose of this application is to provide a fast adaptive prediction method and related device for hydrogen-electric dual-source vehicles under few-sample operating conditions, which can solve the problem of few samples and achieve high-precision prediction of future load power demand.
[0006] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a fast adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles, including: Obtain the current stage operation data of the target hydrogen-electric dual-source vehicle; the current stage operation data is the operation data within a preset time period before the current moment.
[0007] Based on the current stage's operational data and the previous stage's operating condition prediction model, the current stage's operating condition prediction model is determined.
[0008] Based on the current operating data and the current operating condition prediction model, predict the load power demand data for the next stage.
[0009] Wherein, when the current stage operating data is the initial stage operating data, the previous stage operating condition prediction model is a pre-trained global meta-model; the global meta-model is a model obtained by training a spatiotemporal graph attention network based on a meta-learning algorithm and historical operating data of multiple hydrogen-electric dual-source vehicles acquired offline; the time length of the historical operating data is greater than the time length of the current stage operating data.
[0010] In a second aspect, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of the method for rapid adaptive prediction of hydrogen-electric dual-source vehicles under few-sample operating conditions as described above.
[0011] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for rapid adaptive prediction of hydrogen-electric dual-source vehicles under few-sample operating conditions as described above.
[0012] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the fast adaptive prediction method for few-sample operating conditions of a hydrogen-electric dual-source vehicle as described above.
[0013] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method and related apparatus for rapid adaptive prediction of hydrogen-electric dual-source vehicles under limited-sample operating conditions. It involves offline pre-training of a global meta-model, constructing a spatiotemporal graph attention network, processing historical operating data from multiple hydrogen-electric dual-source vehicles, and training the model using a model-independent meta-learning algorithm. This enables the model to quickly adapt to new tasks. In application, for the target hydrogen-electric dual-source vehicle, a small amount of real-time operating data is first collected, i.e., the current stage operating data (the latest state data of the target vehicle) is obtained. The current stage operating data is the operating data within a preset time period before the current moment. Then, based on the current stage operating data and the previous stage operating condition prediction model, the current stage operating condition prediction model is determined, allowing the prediction model to continuously adapt to the current operating conditions. Finally, based on the current stage operating data and the current stage operating condition prediction model, the load power demand data for the next stage is predicted. The historical operating data has a longer time frame than the current stage operating data. Through the meta-learning framework, the global meta-model acquires the ability to "learn," enabling it to quickly adapt to new vehicles using very little new data, solving the limited-sample problem, and achieving high-precision prediction of future load power demand. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is an application environment diagram of a fast adaptive prediction method for a hydrogen-electric dual-source vehicle under few sample conditions in one embodiment of this application. Figure 2 A flowchart illustrating a method for rapid adaptive prediction of hydrogen-electric dual-source vehicles under few sample conditions, provided in an embodiment of this application; Figure 3 This is a flowchart of a pre-training method for a global meta-model in one embodiment of this application; Figure 4 This is a schematic diagram of the spatiotemporal diagram corresponding to the hydrogen-electric dual-source system in one embodiment of this application; Figure 5 This is a schematic diagram of the current stage operating condition prediction model in one embodiment of this application; Figure 6 A flowchart illustrating a fast adaptive prediction method for a hydrogen-electric dual-source vehicle under few sample conditions, provided as another embodiment of this application; Figure 7 for Figure 6 The performance comparison chart of the method in the illustrated embodiment and the prior art method is shown. Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0016] Attached image labels: 102 terminal, 104 server. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] The fast adaptive prediction method for hydrogen-electric dual-source vehicles under few-sample operating conditions provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send the current stage operating data of the target hydrogen-electric dual-source vehicle to server 104. After receiving the current stage operating data, server 104, based on the current stage operating data and the previous stage operating condition prediction model, determines the current stage operating condition prediction model; based on the current stage operating data and the current stage operating condition prediction model, it predicts the load power demand data for the next stage. Server 104 can then feed back the obtained load power demand data for the next stage to terminal 102. Furthermore, in some embodiments, the method for rapid adaptive prediction of few-sample operating conditions for hydrogen-electric dual-source vehicles can also be implemented separately by the server 104 or the terminal 102. For example, the terminal 102 can directly perform rapid adaptive prediction processing of few-sample operating conditions for hydrogen-electric dual-source vehicles based on the current stage operating data of the target hydrogen-electric dual-source vehicle to be processed. Alternatively, the server 104 can obtain the current stage operating data of the target hydrogen-electric dual-source vehicle to be processed from the data storage system and perform rapid adaptive prediction processing of few-sample operating conditions for hydrogen-electric dual-source vehicles based on the current stage operating data of the target hydrogen-electric dual-source vehicle to be processed.
[0020] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.
[0021] In one exemplary embodiment, such as Figure 2 As shown, a fast adaptive prediction method for few-sample operating conditions is provided for hydrogen-electric dual-source vehicles. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 203. Wherein: Step 201: Obtain the current stage operation data of the target hydrogen-electric dual-source vehicle; the current stage operation data is the operation data within a preset time period before the current moment, for example, the operation data 30 minutes before the current moment.
[0022] Step 202: Based on the current stage operating data and the previous stage operating condition prediction model, determine the current stage operating condition prediction model.
[0023] Step 203: Based on the current stage operating data and the current stage operating condition prediction model, predict the load power demand data for the next stage.
[0024] Wherein, when the current stage operating data is the initial stage operating data, the previous stage operating condition prediction model is a pre-trained global meta-model; the global meta-model is a model obtained by training a spatiotemporal graph attention network based on a meta-learning algorithm and historical operating data of multiple hydrogen-electric dual-source vehicles acquired offline; the time length of the historical operating data is greater than the time length of the current stage operating data.
[0025] Preferably, the meta-learning algorithm used in this embodiment is a global meta-model-independent meta-learning algorithm, whose training objective is to make the global meta-model have the minimum loss function on the new task after a small number of gradient updates on a single task.
[0026] Preferably, the time range of the next stage in step 203 is 1-30 minutes, and the load power demand data can be the fuel cell output power, battery SOC and other internal key operating condition parameters in the future period (or within the future time window). The prediction results are used to optimize the energy management strategy of the vehicle's hydrogen-electric dual-source system.
[0027] By implementing steps 201 to 203 above, a global meta-model is pre-trained offline to construct a spatiotemporal graph attention network. Historical operating data from multiple hydrogen-electric dual-source vehicles are processed, and a model-independent meta-learning algorithm is used for training. This enables the model to quickly adapt to new tasks. In application, for the target hydrogen-electric dual-source vehicle, a small amount of real-time operating data is first collected, i.e., the current stage operating data (the latest state data of the target vehicle) is obtained. The current stage operating data is the operating data within a preset time period before the current moment. Then, based on the current stage operating data and the previous stage operating condition prediction model, the current stage operating condition prediction model is determined. This allows the prediction model to continuously adapt to the current operating conditions. Finally, based on the current stage operating data and the current stage operating condition prediction model, the load power demand data for the next stage is predicted. The historical operating data has a longer time frame than the current stage operating data. Through the meta-learning framework, the global meta-model acquires the ability to "learn to learn," enabling it to quickly adapt to new vehicles using very little new data, solving the problem of few samples, and achieving high-precision prediction of future load power demand.
[0028] In another exemplary embodiment of this application, in order to quickly adapt a very small amount of operating data to the target hydrogen-electric dual-source vehicle, step 202 above is replaced by steps 301 to 303: Step 301: Based on the current stage operating data (the current stage operating data is configured as short-term, small-volume operating data, such as 30 minutes of operating data), determine the current support set; the current support set includes multiple current first sample pairs, each current first sample pair includes a current first data and a current second data, the current first data is a feature matrix and an adjacency matrix determined based on the current stage operating data, and the current second data is the actual load power demand data corresponding to the current first data, the actual load power demand data is the data in the current stage operating data.
[0029] Step 302: Based on the current support set and gradient descent optimization algorithm, perform a preset number of parameter iteration operations on the previous stage working condition prediction model (generally a small number of times, such as 5 to 10 times, to ensure rapid optimization) to obtain the first updated working condition prediction model.
[0030] Step 303: If the relative average absolute error of the first updated operating condition prediction model on the current support set is less than a preset threshold (e.g., 10%), then the first updated operating condition prediction model is determined as the operating condition prediction model for the current stage.
[0031] If the relative average absolute error of the first updated operating condition prediction model on the current support set is greater than or equal to a preset threshold, then the global meta-model or the previous stage operating condition prediction model is determined as the current stage operating condition prediction model.
[0032] The formula for calculating the relative mean absolute error of the first updated working condition prediction model on the current support set is as follows: ; in, This represents the relative mean absolute error of the first updated working condition prediction model on the current support set; This represents the first sample pair currently being tested. This indicates the current first data point. This indicates the current second data point. This represents the parameters of the first updated working condition prediction model; The input for the first updated working condition prediction model is At that time, the predicted value is output; This represents the average value of y across all current first sample pairs; Indicates the currently supported set. This indicates the number of the first sample pair in the current support set.
[0033] Preferably, step 302 specifically includes: Step 3021: When the current iteration number d is not equal to the preset number, multiple current prediction values are obtained based on the current support set and the working condition prediction model corresponding to the current iteration number d.
[0034] Step 3022: Based on the current predicted value, the current support set, and the gradient descent optimization algorithm, update the weights of the working condition prediction model corresponding to the current iteration number d, and obtain the working condition prediction model corresponding to the next iteration number d+1.
[0035] Step 3023: Update the current iteration number d to d+1.
[0036] Step 3024: When the current iteration number d is equal to the preset number, the working condition prediction model corresponding to the current iteration number d is determined as the first updated working condition prediction model.
[0037] In each parameter iteration operation, the fully connected layer parameters of the spatiotemporal graph attention network of the working condition prediction model corresponding to the corresponding iteration number are updated, and the spatiotemporal attention layer parameters of the spatiotemporal graph attention network are frozen (which helps to avoid overfitting).
[0038] 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.
[0039] Specifically, the parameter iteration operation includes the following sub-steps: Forward propagation: Input the samples from the current support set into the working condition prediction model corresponding to the current iteration number d. After calculation by the spatiotemporal graph attention network and fully connected layers, the predicted value is output. ).
[0040] Loss calculation: Based on the predicted value and the real labels in the current support set, the predicted loss (L) is calculated using a preset loss function (such as relative mean absolute error).
[0041] Backpropagation: Based on the chain rule, the prediction error is propagated backward from the output layer to the input layer. Specifically, for any weight parameter W in the model, its gradient calculation follows the general chain rule form as follows: ; In the formula, This represents the partial derivative of the loss function with respect to the output. For the partial derivatives of the activation function or inter-layer mapping, This represents the partial derivative of the current layer operation with respect to the weights. This represents the intermediate output feature value (or linear operation result) of the current network layer, and the system uses this gradient as a basis. Execution parameters update.
[0042] Parameter update: Based on the calculated gradient and the preset inner layer learning rate, update the model parameters in the opposite direction of the gradient.
[0043] Preferably, step 303 may further include: Step 3031: If the first determination is that 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, then the current stage running data is reacquired (the reacquisition method is, for example, supplementing the collection of 10 minutes of running data, and using the supplemented running data as the current stage running data), and steps 301 and 302 are re-executed to obtain the model after the second parameter iteration operation.
[0044] Step 3032: Determine the model after the second parameter iteration operation as the current stage operating condition prediction model; or, perform a second judgment on the relationship between the relative average absolute error of the first updated operating condition prediction model on the current support set and the preset threshold. If the second judgment shows that the relative average absolute error of the first updated operating condition prediction model on the current support set is greater than or equal to the preset threshold, then determine the global meta-model as the current stage operating condition prediction model.
[0045] Optionally, supplementary data acquisition and secondary adaptation strategies can be implemented to address insufficient model accuracy: If the relative mean absolute error (RMAE) of the updated operating condition prediction model on the support set is greater than or equal to a preset threshold (e.g., 10%), it indicates that the initially collected 30-minute data may contain noise or is in an unstable period of operating condition mode switching, causing the model to fail to fully capture vehicle characteristics. In this case, instead of directly reverting to the global meta-model, the "incremental data augmentation and secondary fine-tuning" mechanism is triggered, with the specific steps as follows: 1. Incremental data collection: Keep the on-board data acquisition terminal turned on and continue to collect supplementary operating data of the target hydrogen-electric dual-source vehicle immediately following the current moment. The preset supplementary time is 10 minutes.
[0046] 2. Data fusion to build an enhanced support set: The newly collected 10-minute supplementary running data is combined with the original 30-minute first running data in terms of time dimension.
[0047] Specifically, the original current support set contains N1 current sample pairs (corresponding to 30 minutes), and the supplementary data contains M current sample pairs (corresponding to 10 minutes).
[0048] The fused enhanced current support set will contain N1+M current sample pairs, with a time span covering the past 40 minutes of continuous operation.
[0049] 3. Quadratic gradient iteration: Based on the enhanced current support set and gradient descent optimization algorithm, the global meta-model (or the first updated working condition prediction model after the first parameter iteration operation) is subjected to a preset number of parameter iteration operations again.
[0050] Because the enhanced current support set includes a longer time span and richer operating conditions, the model is able to correct previous biases.
[0051] After the iteration is completed, the model after performing the parameter iteration operation a preset number of times is determined as the current stage operating condition prediction model; or, if the second determination shows that the relative average absolute error of the first updated operating condition prediction model on the current support set is greater than or equal to a preset threshold, then the global meta-model is determined as the current stage operating condition prediction model.
[0052] Technical effect: This strategy effectively solves the problem of the one-sidedness of data in a single time window with extremely low data cost (only an additional 10 minutes), and significantly improves the model's adaptive success rate under complex and variable conditions.
[0053] In another exemplary embodiment of this application, a pre-training process for the global meta-model in any of the above embodiments is provided, comprising: Step 401: Obtain historical operating data of multiple hydrogen-electric dual-source vehicles and construct an initial stage spatiotemporal attention network model; the historical operating data includes one or more of the following: fuel cell output power, power battery SOC, drive motor power, and ambient temperature data.
[0054] Step 402: Based on the historical operation data, construct multiple meta-tasks.
[0055] Step 403: Update the parameters of the spatiotemporal attention network model corresponding to the current update stage based on all the meta-tasks to obtain the updated spatiotemporal attention network model for the current update stage.
[0056] Step 404: When the spatiotemporal attention network model updated in the current update stage meets the preset evaluation index, the spatiotemporal attention network model updated in the current update stage is determined as the global meta-model.
[0057] When the spatiotemporal attention network model updated in the current update stage does not meet the preset evaluation index, the spatiotemporal attention network model updated in the current update stage is used as the spatiotemporal attention network model corresponding to the next update stage, the current update stage is updated to the next update stage, and the process returns to step 403.
[0058] Specifically, when the current update stage is the initial stage, the spatiotemporal attention network model corresponding to the current update stage is the initial stage spatiotemporal attention network model.
[0059] In some embodiments, step 404 may also be: when the spatiotemporal attention network model updated in the current update stage meets the preset evaluation index, the spatiotemporal attention network model updated in the current update stage is determined as the global meta-model.
[0060] When the spatiotemporal attention network model updated in the current update stage does not meet the preset evaluation index, based on the historical running data, multiple meta-tasks for the next update stage are constructed, the current update stage is updated to the next update stage, and the process returns to step 403. At this time, the meta-tasks in step 403 are replaced by the multiple meta-tasks of the next update stage, and the spatiotemporal attention network model corresponding to the current stage can be either the spatiotemporal attention network model updated in the previous stage or the spatiotemporal attention network model in the initial stage.
[0061] Preferably, each of the meta-tasks includes a support set and a query set. The support set includes multiple first sample pairs, each first sample pair including a first data and a second data. The first data is a feature matrix and an adjacency matrix determined based on a segment of data in the meta-task, and the second data is the actual load power demand data corresponding to the first data. The query set includes multiple second sample pairs, each second sample pair including a third data and a fourth data. The third data is a feature matrix and an adjacency matrix determined based on another segment of data in the meta-task, and the fourth data is the actual load power demand data corresponding to the third data. The actual load power demand data is the data in the meta-task. Step 403 involves updating the parameters of the spatiotemporal attention network model corresponding to the current update stage based on all the meta-tasks to obtain the updated spatiotemporal attention network model for the current update stage, specifically including: Step 4031: For each meta-task, calculate the personalized model parameters corresponding to the meta-task based on the support set of the meta-task, the spatiotemporal attention network model corresponding to the current update stage, and the stochastic gradient descent algorithm.
[0062] Step 4032: Calculate the global loss based on the personalized model parameters of each meta-task, the spatiotemporal attention network model corresponding to the current update stage, and the query set of all meta-tasks, and calculate the update parameters of the spatiotemporal attention network model corresponding to the current update stage based on the global loss.
[0063] Step 4033: Based on the updated parameters and the spatiotemporal attention network model corresponding to the current update stage, obtain the updated spatiotemporal attention network model for the current update stage.
[0064] The formula for calculating the personalized model parameters is as follows: ; ; In the formula, This represents the initial parameters of the spatiotemporal attention network model corresponding to the current update phase. Representing meta-tasks Corresponding personalized model parameters, (·) indicates a meta-task The mean absolute error loss function, The parameter is At that time, the spatiotemporal attention network model corresponding to the current update phase, Indicates to Find the gradient. The inner learning rate, Indicates the first sample pair, Indicates the first data. Indicates the second data. For input The predicted value of the spatiotemporal attention network model corresponding to the current update stage.
[0065] The formula for calculating the updated parameters is: ; ; In the formula, To update parameters, The outer learning rate, This represents the probability distribution of the meta-task. For the overall loss, For query set, Indicates the second sample pair, Indicates the third data. Indicates the fourth data point. The parameter is At that time, the spatiotemporal attention network model corresponding to the current update phase, For input The predicted value of the spatiotemporal attention network model corresponding to the current update stage.
[0066] As an feasible approach, such as Figure 3 The diagram illustrates a method flowchart that uses the same concept as the pre-training process of the global meta-model in the embodiments of this application. For the constructed spatiotemporal attention network model (ST-GAT model), the model parameters are first initialized, and then the meta-tasks are determined from historical data (i.e., meta-task sampling to obtain task data). Each meta-task data is split into a support set and a query set. The parameters of the support set are first optimized (inner layer task adaptation update, calculating the personalized model parameters corresponding to each original task) to obtain a temporary model (i.e., a model with personalized model parameters). Then, the parameters of the query set are optimized (outer layer global meta-update, calculating the global loss to calculate the updated parameters of the spatiotemporal attention network model) to obtain the updated spatiotemporal attention network model. This can be iteratively optimized multiple times until the optimal global meta-model is obtained (in some embodiments, the inner layer learning rate is set to 0.01 and the outer layer learning rate is set to 0.001).
[0067] By repeating the above process on a large-scale task set, the global meta-model obtains good initialization parameters. The model performance is evaluated with the minimum RMAE (relative mean absolute error) and the adaptation time being less than 10 seconds. The model with the best meta-learning performance is selected as the optimal global meta-model.
[0068] Preferably, before step 4031 is executed, all the meta-tasks are sorted, and the personalized model parameters corresponding to the meta-tasks are calculated sequentially according to the order of ease to difficulty.
[0069] The meta-tasks are arranged from easy to difficult based on the complexity of the operating conditions (such as the standard deviation of load power or entropy value). Prioritizing simple tasks for gradient updates in the early stages of training (e.g., using different meta-tasks to train the model for different update stages) can avoid severe gradient oscillations caused by the model encountering extremely complex samples, thus enabling the global meta-model to converge faster and more stably.
[0070] Preferably, before step 401, the method further includes: Step 400, Data preparation and preprocessing: Obtain a large amount of historical operation data of different vehicles under different operating conditions from a legally authorized and anonymized historical operation database, and preprocess the historical operation data to be processed to obtain the historical operation data in step 401.
[0071] The preprocessing includes using linear interpolation to fill in missing data (e.g., if the fuel cell current is missing at a certain moment, it is calculated using valid data from two adjacent moments), removing outliers using the 3σ principle, and Z-Score standardization (to eliminate the influence of dimensions).
[0072] For example, the formula for imputing missing values using linear interpolation is as follows: ; In the formula, for Data is missing at any time (such as SOC, motor power); and Distance The most recent previous and next valid data points; and These are the time points corresponding to the valid data.
[0073] Outliers are handled using the 3σ principle and deleted. Outliers (such as sudden changes in battery current exceeding 300A) are replaced with the average of the data from the five consecutive time points.
[0074] Z-Score standardization is used to eliminate the influence of dimensions in data standardization, as shown in the following formula: ; In the formula, , , respectively, are the mean and standard deviation of the original data. The standardized data range is [-3, 3].
[0075] Optionally, in the above embodiments, the current stage running data in step 201 and the current stage running data reacquired in step 3031 are both processed using the same data preprocessing method in step 400.
[0076] Preferably, for any of the meta-tasks, the method for determining the first data includes: constructing a spatiotemporal graph corresponding to a segment of data from the meta-task and the hydrogen-electric dual-source system of the hydrogen-electric dual-source vehicle, and determining the first data based on the spatiotemporal graph corresponding to a segment of data from the meta-task.
[0077] The method for determining the third data includes: constructing a spatiotemporal graph corresponding to the other segment of data of the meta-task and the hydrogen-electric dual-source system of the hydrogen-electric dual-source vehicle based on the other segment of data of the meta-task, and determining the third data based on the spatiotemporal graph corresponding to the other segment of data of the meta-task.
[0078] The spatiotemporal graph includes a set of nodes and a set of edges; the set of nodes includes multiple nodes, each node representing a component of the hydrogen-electric dual-source system of the hydrogen-electric dual-source vehicle, and each node includes multiple feature vectors, the feature vectors including temporal features and attribute features; the set of edges includes multiple edges, the edges representing the connection relationships between the components, the connection relationships being determined based on the energy interaction data between the components.
[0079] like Figure 4 The figure shows the spacetime diagram corresponding to a hydrogen-electric dual-source system. The hydrogen-electric dual-source system can be abstracted as a spacetime diagram G=(V,E).
[0080] First, define the node set V: V = {fuel cell, power battery, DC / DC converter, drive motor}, where each node represents a key power component in the system.
[0081] Secondly, the physical connection structure and energy flow direction are determined: the DC bus serves as the energy transmission hub of the system, connecting various power components. Among them, the fuel cell (node V1) is connected to the DC bus through the DC / DC converter (node V3); the power battery (node V2) is directly connected to the DC bus (or connected through a bidirectional converter) to achieve bidirectional power transmission; the drive motor (node V4) obtains power from the DC bus.
[0082] Finally, we define the edge set E: Based on the physical connections described above, we define the edges and energy interaction paths between nodes in the spacetime graph model. The edge set E represents the connection relationships between components. If two nodes have direct physical energy interaction (i.e., connected to the same bus or have a direct path), then an edge is considered to exist between them.
[0083] Each node has multiple feature vectors at time t (such as voltage, current, SOC, etc.). Each node's feature vector includes time-series features (such as the device status at the current time and in the past K steps) and attribute features (such as the device's rated power). A feature matrix is constructed based on the feature vectors of all nodes. (D is the feature dimension).
[0084] Feature matrix The expression is: ; In the formula, each row of data represents a feature vector of a node, and the feature vector includes time features and attribute features. This represents the first feature in the feature vector of the first node; This represents the second feature in the feature vector of the first node; This represents the D-th feature in the feature vector of the first node; This represents the first feature in the feature vector of the second node; This represents the second feature in the feature vector of the second node; This represents the D-th feature in the feature vector of the second node; This represents the first feature in the feature vector of the Nth node; This represents the second feature in the feature vector of the Nth node; This represents the D-th feature in the feature vector of the N-th node.
[0085] Then construct the adjacency matrix. Adjacency matrix It includes multiple edge weights, which represent the energy interaction strength between nodes. The formula for calculating the edge weights is: ; In the formula, Let the edge weights be those between nodes i and j. Let be the historical average energy interaction power between node i and node j (i.e., the time average of the energy interaction power between node i and node j for all historical moments, which is different for different node pairs). For all non-zero The standard deviation.
[0086] Preferably, such as Figure 5The diagram shows the structure of the current stage load condition prediction model (which is essentially a spatiotemporal graph attention network model). The current stage load condition prediction model (or the spatiotemporal graph attention network model in the pre-training stage) is used to calculate and fuse the spatial and temporal features of each node based on the input data (feature matrix and adjacency matrix, or the first or third data in the pre-training stage), and to process the spatiotemporal fusion feature after the spatial and temporal features are fused to predict the load power demand data of the next stage.
[0087] The current stage of the working condition prediction model first calculates the influence weights between nodes through a spatial attention layer (ST-GAT spatial layer), aggregates spatial information, and then performs a process for each node. Its neighboring nodes Attention weights between The feature update method uses the softmax normalization function for unified normalization processing, and the calculation formula for the spatial features is: ; ; In the formula, For the spatial features of node i, and Both are ReLU activation functions. This is the spatial feature weight matrix; Let be the attention weights for node i and node j; Let i be the set of neighboring nodes of node i; Let j be the feature vector of node j; Let i be the feature vector of node i. Let be the feature vector of node k, and W be the learnable feature mapping matrix. For attention kernel, This is a vector concatenation operation; k is the summation index variable, j is the target index variable, and k and i have the same range of values; exp(·) is a Gaussian kernel function, used to quantify the correlation of energy interaction between different node pairs (the larger the value, the more similar the energy interaction patterns between node i and node j).
[0088] The spatiotemporal graph attention network uses a GRU (Gated Recurrent Unit) to extract the temporal series features of each node, and then assigns weights to different time steps through a temporal attention layer (GRU temporal layer). Let the hidden state output by the GRU be... Calculate the time characteristics, and the formula for calculating the time characteristics is: ; ; ; In the formula, Let be the time context feature aggregated for node i, K be the length of the time series feature, r and m be the time step indices in the time series feature, and t be the current time. Let m be the attention coefficient at the current time step. The time series feature projection matrix, Let m be the feature value at time step m in the time series feature. The spatiotemporal similarity score for time step m at the current moment. The spatiotemporal similarity score for the current time step r. Let be the feature value at time step t in the time series feature. Let be the time embedding vector at time step t. Let m be the time embedding vector. Dimensions of time series features.
[0089] The calculation formula for the spatiotemporal fusion feature is as follows: ; ; In the formula, For the spatiotemporal fusion features of node i, For gating weights, This indicates element-wise multiplication; This represents the Sigmoid activation function. The gate space weight matrix, This is the gated time weight matrix. For bias.
[0090] In this embodiment, the time step refers to the time length of a sample pair. For example, if the support set is 30 minutes of running data and the time step is 5 minutes, then the support set will be divided into 6 sample pairs.
[0091] Preferably, the spatiotemporal graph attention network model includes: a spatial attention layer, a temporal attention layer, and a gating fusion layer.
[0092] Spatial Attention Layer: Employs a graph attention mechanism to aggregate information between nodes in the spatial dimension.
[0093] Temporal attention layer: It uses a gated recurrent unit (GRU) to capture dynamic changes in the time dimension and combines them with a temporal attention mechanism.
[0094] Gated fusion layer: Adaptively fuses spatial and temporal features.
[0095] In one exemplary embodiment, a fast adaptive prediction method for few-sample operating conditions of a hydrogen-electric dual-source vehicle is provided.
[0096] like Figure 6 The diagram shown is a flowchart of a fast adaptive prediction method for few-sample operating conditions in hydrogen-electric dual-source vehicles. This method includes: Step 1, Offline Meta-model Training Phase: Historical data from 100 hydrogen fuel cell hybrid buses under different operating conditions were collected from a legally authorized and anonymized historical operational database. The target data from multiple time periods within the acquired continuous timeframe were preprocessed, including linear interpolation to fill in missing data (e.g., if the fuel cell current is missing at a certain moment, it is calculated using valid data from two adjacent moments), removal of outliers using the 3σ principle, and Z-score standardization (to eliminate the influence of dimensions).
[0097] Furthermore, a spatiotemporal graph of the vehicle's hydrogen-electric dual-source system is constructed. The node features of this graph include fuel cell current, battery voltage, and drive motor power. The hydrogen-electric dual-source system is abstracted as a spatiotemporal graph G=(V,E), with the fuel cell, battery, drive motor, and DC / DC converter as core nodes. A feature matrix X (dimension = number of nodes × number of features) is constructed from the temporal and attribute features of each node's feature vector. Edge weights are defined according to the energy interaction intensity between nodes, and an adjacency matrix is constructed.
[0098] Furthermore, an ST-GAT (Spatiotemporal Graph Attention Network) model was built based on PyTorch: the spatiotemporal graph data G=(V,E) was input, the spatial correlation features between nodes were extracted through a 4-head spatial graph attention layer, the dynamics of the time series were captured through a GRU layer (64 hidden layer dimensions), and the spatiotemporal features were integrated through a gated fusion layer.
[0099] Furthermore, the MAML (Model-Agnostic Meta-Learning) algorithm is used to execute the meta-task generation strategy (sampling working condition categories and samples from multi-vehicle data), and inner and outer layer optimizations are performed: the inner loop uses the support set (a small number of samples for each working condition) to fine-tune the model parameters. to (Learning rate α=0.01), the outer loop uses the query set to calculate the global loss and update the initial parameters. (Learning rate β=0.001), iterate training until the model converges, and save the global meta-model.
[0100] Step 2, Online Adaptive Phase: This phase targets new vehicle models (target vehicles) without historical data, fine-tuning the global meta-model using a small amount of real-time data. After the new vehicle model is put into operation, initial 30 minutes of data are collected in real time. The data types are consistent with those in the offline meta-model training phase (fuel cell current, battery voltage, motor power, etc.), and after preprocessing, the current support set is formed.
[0101] Furthermore, the global meta-model is loaded: the vehicle core control unit (VCU) loads the offline trained global meta-model (including the parameters of each layer of ST-GAT) from the cloud or local storage. The loading process takes ≤10 seconds (to meet the real-time requirements of vehicles).
[0102] Furthermore, a small number of gradient iterations (fine-tuning lightweight gradients): only fine-tuning the parameters of the fully connected layer of the model output layer (freezing the spatiotemporal attention layer and GRU layer to avoid overfitting with few samples), performing gradient descent optimization 5 times (inner layer learning rate = 0.01), to obtain personalized working condition prediction model parameters adapted to the new vehicle model (target vehicle) (determining the working condition prediction model for the current stage).
[0103] Further, the adaptation verification: the accuracy of the personalized working condition prediction model (current stage working condition prediction model) is verified using the current support set. If the relative mean absolute error (RMAE) is ≤10%, the internal working condition prediction stage is entered; otherwise, 10 minutes of data are collected for additional fine-tuning.
[0104] Step 3: After the personalized operating condition prediction model is deployed, the vehicle core control unit (VCU) collects the current status data of the new vehicle model once per minute (such as the current motor power and battery SOC), inputs it into the model to predict the drive motor power demand for the next 5 minutes, and outputs the prediction results to the energy management system in real time.
[0105] Furthermore, new operational data is collected every 30 minutes, and the personalized operating condition prediction model (the previous stage operating condition prediction model) is fine-tuned to ensure stable prediction accuracy during long-term operation. The performance comparison chart is shown below. Figure 7 As shown.
[0106] Compared with the prior art, the present invention has the following significant advantages: 1. High adaptability: Through the meta-learning framework, the model acquires the ability to "learn to learn" and can quickly adapt to new vehicles using very little new data, solving the problems of cold start and few samples.
[0107] 2. High accuracy: Spatiotemporal graph attention network can fully explore the complex spatiotemporal correlation characteristics inside the vehicle hydrogen-electric dual-source system, and can capture the nonlinear dynamic behavior of the system better than traditional methods, with higher prediction accuracy.
[0108] 3. Strong generalization ability: The inner and outer layer optimization strategies of meta-learning enable the model to quickly adapt to new working conditions. Compared with traditional CNN and LSTM models, the prediction accuracy is effectively improved in small sample scenarios.
[0109] 4. Practicality: Offline training involves significant computational costs, but online applications require less, making it suitable for in-vehicle computing resources. The model output directly serves the energy management strategy, forming a "prediction-control" closed loop and improving the overall system performance.
[0110] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 8 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores rapid adaptive prediction data for few-sample operating conditions of hydrogen-electric dual-source vehicles. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a rapid adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles.
[0111] Those skilled in the art will understand that Figure 8 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0112] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0113] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0114] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0115] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0116] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A fast adaptive prediction method for few-sample operating conditions of a hydrogen-electric dual-source vehicle, characterized in that, The fast adaptive prediction method for few-sample operating conditions of the hydrogen-electric dual-source vehicle includes: Acquire the current stage operation data of the target hydrogen-electric dual-source vehicle; the current stage operation data is the operation data within a preset time period before the current moment; Based on the current stage operating data and the previous stage operating condition prediction model, determine the current stage operating condition prediction model. Based on the current operating data and the current operating condition prediction model, predict the load power demand data for the next stage. Wherein, when the current stage operating data is the initial stage operating data, the previous stage operating condition prediction model is a pre-trained global meta-model; the global meta-model is a model obtained by training a spatiotemporal graph attention network based on a meta-learning algorithm and historical operating data of multiple hydrogen-electric dual-source vehicles acquired offline; the time length of the historical operating data is greater than the time length of the current stage operating data.
2. The fast adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles according to claim 1, characterized in that, Based on the current operational data and the previous stage's operating condition prediction model, the current stage's operating condition prediction model is determined, specifically including: Based on the current stage operation data, a current support set is determined; the current support set includes multiple current first sample pairs, each current first sample pair includes a current first data and a current second data, the current first data is a feature matrix and an adjacency matrix determined based on the current stage operation data, the current second data is the actual load power demand data corresponding to the current first data, and the actual load power demand data is the data in the current stage operation data; Based on the current support set and gradient descent optimization algorithm, a preset number of parameter iteration operations are performed on the previous stage working condition prediction model to obtain the 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 less than a preset threshold, then the first updated working condition prediction model is determined as the working condition prediction model for the current stage. If the relative average absolute error of the first updated operating condition prediction model on the current support set is greater than or equal to a preset threshold, then the global meta-model or the previous stage operating condition prediction model is determined as the current stage operating condition prediction model. The formula for calculating the relative mean absolute error of the first updated working condition prediction model on the current support set is as follows: ; in, This represents the relative mean absolute error of the first updated working condition prediction model on the current support set; This represents the first sample pair currently being tested. This indicates the current first data point. This indicates the current second data point. This represents the parameters of the first updated working condition prediction model; The input for the first updated working condition prediction model is At that time, the predicted value is output; This represents the average value of y across all current first sample pairs; Indicates the currently supported set. This indicates the number of the first sample pair in the current support set.
3. The fast adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles according to claim 2, characterized in that, Based on the current support set and gradient descent optimization algorithm, a preset number of parameter iteration operations are performed on the previous stage working condition prediction model to obtain the first updated working condition prediction model, specifically including: When the current iteration number d is not equal to the preset number, multiple current prediction values are obtained based on the current support set and the working condition prediction model corresponding to the current iteration number d. Based on the current predicted value, the current support set, and the gradient descent optimization algorithm, update the weights of the working condition prediction model corresponding to the current iteration number d, and obtain the working condition prediction model corresponding to the next iteration number d+1. Update the current iteration number d to d+1; When the current iteration number d is equal to the preset number, the working condition prediction model corresponding to the current iteration number d is determined as the first updated working condition prediction model; In each parameter iteration operation, the fully connected layer parameters of the spatiotemporal graph attention network of the working condition prediction model corresponding to the corresponding iteration number are updated, and the spatiotemporal attention layer parameters of the spatiotemporal graph attention network are frozen. 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. The fast adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles according to claim 1, characterized in that, The pre-training process of the global meta-model includes: Historical operating data of multiple hydrogen-electric dual-source vehicles were acquired, and an initial spatiotemporal attention network model was constructed. The historical operating data included one or more of the following: fuel cell output power, power battery SOC, drive motor power, and ambient temperature data. Based on the historical operational data, multiple meta-tasks are constructed; Based on all the aforementioned meta-tasks, update the parameters of the spatiotemporal attention network model corresponding to the current update stage to obtain the updated spatiotemporal attention network model for the current update stage. When the spatiotemporal attention network model updated in the current update stage meets the preset evaluation index, the spatiotemporal attention network model updated in the current update stage is determined as the global meta-model. When the spatiotemporal attention network model updated in the current update stage does not meet the preset evaluation index, the spatiotemporal attention network model updated in the current update stage is used as the spatiotemporal attention network model corresponding to the next update stage, the current update stage is updated to the next update stage, and the parameters of the step of updating the spatiotemporal attention network model corresponding to the current update stage based on all the meta-tasks are returned to obtain the spatiotemporal attention network model updated in the current update stage. Specifically, when the current update stage is the initial stage, the spatiotemporal attention network model corresponding to the current update stage is the initial stage spatiotemporal attention network model.
5. The fast adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles according to claim 4, characterized in that, Each of the meta-tasks includes a support set and a query set. The support set includes multiple first sample pairs, each first sample pair including a first data and a second data. The first data is a feature matrix and an adjacency matrix determined based on a segment of data in the meta-task, and the second data is the actual load power demand data corresponding to the first data. The query set includes multiple second sample pairs, each second sample pair including a third data and a fourth data. The third data is a feature matrix and an adjacency matrix determined based on another segment of data in the meta-task, and the fourth data is the actual load power demand data corresponding to the third data. The actual load power demand data is the data in the meta-task. The parameters of the spatiotemporal attention network model corresponding to the current update stage are updated based on all the meta-tasks to obtain the updated spatiotemporal attention network model for the current update stage, specifically including: For each of the meta-tasks, based on the support set of the meta-task, the spatiotemporal attention network model corresponding to the current update stage, and the stochastic gradient descent algorithm, the personalized model parameters corresponding to the meta-task are calculated. Based on the personalized model parameters of each meta-task, the spatiotemporal attention network model corresponding to the current update stage, and the query set of all meta-tasks, the global loss is calculated, and based on the global loss, the update parameters of the spatiotemporal attention network model corresponding to the current update stage are calculated. Based on the update parameters and the spatiotemporal attention network model corresponding to the current update stage, the updated spatiotemporal attention network model for the current update stage is obtained. The formula for calculating the personalized model parameters is as follows: ; ; In the formula, This represents the initial parameters of the spatiotemporal attention network model corresponding to the current update phase. Representing meta-tasks Corresponding personalized model parameters, (·) indicates a meta-task The mean absolute error loss function, The parameter is At that time, the spatiotemporal attention network model corresponding to the current update phase, Indicates to Find the gradient. The inner learning rate, Indicates the first sample pair, Indicates the first data. Indicates the second data. For input The predicted value of the spatiotemporal attention network model corresponding to the current update stage; The formula for calculating the updated parameters is: ; ; In the formula, To update parameters, The outer learning rate, This represents the probability distribution of the meta-task. For the overall loss, For query set, Indicates the second sample pair, Indicates the third data. Indicates the fourth data point. The parameter is At that time, the spatiotemporal attention network model corresponding to the current update phase, For input The predicted value of the spatiotemporal attention network model corresponding to the current update stage.
6. The fast adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles according to claim 5, characterized in that, For any of the aforementioned meta-tasks, the method for determining the first data includes: constructing a spatiotemporal graph corresponding to a segment of data from the meta-task and the hydrogen-electric dual-source system of the hydrogen-electric dual-source vehicle, and determining the first data based on the spatiotemporal graph corresponding to a segment of data from the meta-task; The method for determining the third data includes: constructing a spatiotemporal diagram corresponding to the other segment of data of the meta-task and the hydrogen-electric dual-source system of the hydrogen-electric dual-source vehicle based on the other segment of data of the meta-task, and determining the third data based on the spatiotemporal diagram corresponding to the other segment of data of the meta-task. The spatiotemporal graph includes a set of nodes and a set of edges; the set of nodes includes multiple nodes, each node representing a component of the hydrogen-electric dual-source system of the hydrogen-electric dual-source vehicle, and each node includes multiple feature vectors, the feature vectors including temporal features and attribute features; the set of edges includes multiple edges, the edges representing the connection relationships between the components, the connection relationships being determined based on the energy interaction data between the components.
7. The fast adaptive prediction method for few-sample operating conditions of hydrogen-electric dual-source vehicles according to claim 1, characterized in that, The current stage operating condition prediction model is used to calculate and fuse the spatial and temporal characteristics of each node, and to process the spatiotemporal fusion characteristics after the spatial and temporal characteristics are fused to predict the load power demand data for the next stage. The formula for calculating the spatial features is as follows: ; ; In the formula, For the spatial characteristics of node i, and Both are ReLU activation functions. This is the spatial feature weight matrix; Let be the attention weights for node i and node j; Let i be the set of neighboring nodes of node i; Let j be the feature vector of node j; Let i be the feature vector of node i. Let be the feature vector of node k, and W be the learnable feature mapping matrix. For attention kernel, This is a vector concatenation operation; exp() is the Gaussian kernel function; k is the summation index variable, j is the target index variable, and k and i have the same range of values; The formula for calculating the time feature is: ; ; ; In the formula, Let be the time context feature aggregated for node i, K be the length of the time series feature, r and m be the time step indices in the time series feature, and t be the current time. Let m be the attention coefficient at the current time step. The time series feature projection matrix, Let m be the feature value at time step m in the time series feature. The spatiotemporal similarity score for time step m at the current moment. The spatiotemporal similarity score for the current time step r. Let be the feature value at time step t in the time series feature. Let be the time embedding vector at time step t. Let m be the time embedding vector. Dimensions of time series features; The calculation formula for the spatiotemporal fusion feature is as follows: ; ; In the formula, For the spatiotemporal fusion features of node i, For gating weights, This indicates element-wise multiplication; This represents the Sigmoid activation function. The gate space weight matrix, This is the gated time weight matrix. For bias.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the method for rapid adaptive prediction of hydrogen-electric dual-source vehicles under few-sample operating conditions according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the fast adaptive prediction method for hydrogen-electric dual-source vehicles under few-sample operating conditions as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the fast adaptive prediction method for hydrogen-electric dual-source vehicles under few-sample operating conditions as described in any one of claims 1-7.