Vehicle-mounted hydrogen storage container temperature dynamic prediction method

By constructing a hybrid dataset and using an attention-enhanced long short-term memory network model, the real-time and accuracy issues of temperature prediction for on-board hydrogen storage containers were resolved, achieving efficient and accurate temperature prediction and safety monitoring.

CN121480246BActive Publication Date: 2026-07-21XIAN UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN UNIV OF SCI & TECH
Filing Date
2025-10-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies for predicting the temperature of on-board hydrogen storage containers suffer from poor real-time performance and insufficient accuracy, making it difficult to meet the needs of the hydrogen energy industry's industrialization.

Method used

By constructing a hybrid dataset, a temperature prediction system is built using a hierarchical statistical method combined with a random forest algorithm and an attention-enhanced long short-term memory network model. This includes data distribution adjustment, key feature selection, and temporal structure reconstruction. The system generates safety warning information.

Benefits of technology

It achieves high real-time and high-precision prediction of the temperature of on-board hydrogen storage containers, improves the adaptability and accuracy of the model, and ensures the safe operation of hydrogen refueling stations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121480246B_ABST
    Figure CN121480246B_ABST
Patent Text Reader

Abstract

The application discloses a kind of vehicle hydrogen storage container temperature dynamic prediction method, comprising: collecting actual operation data to construct real dataset, determine virtual dataset by stratified statistical method and fusion to construct hybrid dataset;Data distribution adjustment is carried out to hybrid dataset, key feature screening is carried out according to random forest algorithm, time series structure reconstruction is carried out according to sliding window method, generates time series sample pair and normalizes processing to input sequence, obtains standardized time series training sample set;Long short-term memory network model based on attention mechanism enhancement is constructed as temperature prediction model, the model includes long short-term memory network layer, attention mechanism layer and fully connected output layer, model training is carried out by hybrid data training-real data test mode, and final training model is determined by hyperparameter optimization;Real-time temperature prediction system is constructed based on the model after performance verification, and real-time temperature prediction value is output after system receives real-time operation parameter.The application can improve temperature prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hydrogen energy safety technology, and relates to, but is not limited to, a method for dynamic temperature prediction of on-board hydrogen storage containers. Background Technology

[0002] With the green and low-carbon transformation of the global energy structure, the development and utilization of hydrogen energy, as the most promising clean secondary energy source, is becoming increasingly important. As a core component of hydrogen fuel cell vehicles, the thermal safety of on-board hydrogen storage containers during rapid refueling is one of the key bottlenecks restricting the industrialization of hydrogen energy. During rapid refueling, the combined effect of hydrogen compression heat and the Joule-Thomson effect leads to a significant increase in the internal temperature of the hydrogen storage container. When the temperature exceeds the material safety limit of 85°C, it seriously threatens the integrity and safety of the container. Research shows that the temperature rise of the hydrogen storage container is affected by multiple complex coupled factors such as refueling rate, initial pressure, ambient temperature, and gas source temperature. Its dynamic change process exhibits strong nonlinear and time-varying characteristics. Therefore, real-time prediction of the internal temperature of the hydrogen storage container is crucial for ensuring the safe operation of hydrogen refueling stations.

[0003] In existing technologies, the prediction of the internal temperature of hydrogen storage containers mainly includes two methods: numerical simulation and theoretical analysis. For example, Zhao et al. used a computational fluid dynamics (CFD) model to numerically simulate the temperature change of a 35 MPa, 150 L high-pressure hydrogen cylinder for vehicles during the filling process and proposed a prediction formula for the maximum temperature rise inside the container. Li et al. derived the temperature rise expression in the throttling effect based on the actual gas state equation to reveal the coupling mechanism between filling parameters and throttling temperature rise. However, although these methods can reveal the evolution of the thermal flow field and temperature distribution inside the hydrogen storage container, they usually rely on complex three-dimensional simulations and a large amount of computational resources, resulting in high computational costs and long processing times, making it difficult to meet the real-time and efficient temperature prediction requirements in practical engineering. In addition, some existing technologies apply artificial intelligence to predict the internal temperature of hydrogen storage containers, but this method still has some shortcomings. Due to cost, confidentiality and other reasons, the actual operating data of hydrogen refueling stations has a limited number of samples, which is difficult to support sufficient training of the model. Furthermore, the temperature of hydrogen storage containers exhibits strong nonlinear and time-varying characteristics during the refueling process. Its dynamic changes are affected by multiple complex factors such as refueling rate, initial pressure, and ambient temperature. Existing models have difficulty accurately capturing its long-term dependence, resulting in a significant reduction in the accuracy of predictions for the internal temperature of hydrogen storage containers.

[0004] Therefore, there is an urgent need for a more scientific and comprehensive method for predicting the temperature of hydrogen storage containers to solve the problems of poor real-time performance and insufficient accuracy of existing measurement methods, and to achieve high real-time and high-precision prediction of the temperature of on-board hydrogen storage containers. Summary of the Invention

[0005] This application provides a method for dynamically predicting the temperature of an on-board hydrogen storage container.

[0006] The technical solution of this application embodiment is implemented as follows:

[0007] In a first aspect, embodiments of this application provide a method for dynamic temperature prediction of on-board hydrogen storage containers. The method includes: collecting actual operating data from multiple hydrogen refueling stations during the refueling process of on-board hydrogen storage containers and constructing a real dataset; determining a virtual dataset based on the statistical characteristics of the real dataset using a hierarchical statistical method; fusing the real dataset and the virtual dataset to construct a hybrid dataset; adjusting the data distribution of the hybrid dataset; filtering key features of the distributed dataset using a random forest algorithm to construct a refined dataset; reconstructing the temporal structure of the refined dataset using a sliding window method to generate time-series sample pairs; and normalizing the input sequences in the time-series sample pairs to obtain a standardized time-series training sample set; and constructing a long short-term memory network model based on an attention mechanism enhancement as a temperature prediction model. The temperature prediction model includes a long short-term memory network layer, an attention mechanism enhancement layer, and a long short-term memory network layer. The attention mechanism layer and the fully connected output layer receive an input sequence containing multiple time steps through the long short-term memory network layer and output a hidden state sequence corresponding to each time step. The attention mechanism layer receives the hidden state sequence and outputs a context vector. The fully connected output layer receives the context vector and maps it to a temperature prediction value. The temperature prediction model is trained using a hybrid data training-real data testing mode, and the final training model is determined through hyperparameter optimization. The model performance is verified for the final training model, and the performance index of the model prediction results is calculated. Based on the verified final training model, a real-time temperature prediction system is constructed. The real-time temperature prediction system receives real-time operating parameters from the hydrogen refueling station and outputs a real-time temperature prediction value for the on-board hydrogen storage container. When the real-time temperature prediction value exceeds a preset safe temperature threshold, a safety warning message is generated.

[0008] The technical solution provided in this application collects actual operational data from multiple hydrogen refueling stations during the refueling process of on-board hydrogen storage containers and constructs a real dataset. Based on the statistical characteristics of the real dataset, a virtual dataset is determined through a hierarchical statistical method. The real and virtual datasets are then merged to construct a hybrid dataset, effectively expanding the dataset size and addressing the limitations of high data collection costs and scarce sample data in practical applications. Furthermore, the hybrid dataset combines the complexity of real data with the statistical representativeness of virtual data, giving the model stronger adaptability and accuracy, and improving its generalization ability. The data distribution of the hybrid dataset is adjusted, and the adjusted dataset is processed using a random forest algorithm. Key feature selection is performed to construct a refined dataset. The temporal structure of the refined dataset is reconstructed using the sliding window method to generate temporal sample pairs. The input sequences in these time-series sample pairs are then normalized to obtain a standardized temporal training sample set. This makes skewed and multimodal data closer to a normal distribution, optimizing data distribution and stability, enhancing model training stability and convergence efficiency, and effectively capturing the dynamic dependencies of temperature changes, highlighting key temporal features. A long short-term memory (LSTM) network model based on an attention mechanism is constructed as the temperature prediction model. The temperature prediction model includes an LTM network layer, an attention mechanism layer, and a fully connected output layer. The LTM network enhances the temperature prediction model. The network layer receives an input sequence containing multiple time steps and outputs a hidden state sequence corresponding to each time step. An attention mechanism layer receives the hidden state sequence and outputs a context vector. The attention mechanism dynamically assigns weights to different time steps, enabling the model to focus on key temporal nodes and significantly improving prediction accuracy. A fully connected output layer receives the context vector and maps it to the predicted temperature value. The temperature prediction model is trained using a mixed data training-real data testing mode, and the final training model is determined through hyperparameter optimization. This allows the model to quickly converge to the optimal configuration, balancing training efficiency and generalization performance, achieving efficient model optimization. The final trained model is used for performance verification, and the performance indicators of the model prediction results are calculated. The model performance is verified by indicators such as mean absolute error, root mean square error, and coefficient of determination to confirm the prediction accuracy and stability of the model in real-world scenarios, thereby ensuring the reliability and practicality of the model. Based on the verified final trained model, a real-time temperature prediction system is built. The real-time temperature prediction system receives the real-time operating parameters of the hydrogen refueling station and outputs the real-time temperature prediction value of the on-board hydrogen storage container. When the real-time temperature prediction value exceeds the preset safe temperature threshold, a safety warning message is generated, thereby realizing the safe monitoring and early warning of the temperature of the on-board hydrogen storage container and providing an effective protection for the safe operation of the hydrogen refueling station.

[0009] Optionally, the actual operating data includes hydrogen refueling station number, hydrogen refueling name, hydrogen refueling status, and numerical operating parameters. The numerical operating parameters include hydrogen refueling equipment pressure, hydrogen refueling flow rate, hydrogen refueling temperature, on-board hydrogen cylinder temperature, and on-board hydrogen cylinder pressure. Based on the statistical characteristics of the real dataset, a virtual dataset is determined using a hierarchical statistical method. The real dataset and the virtual dataset are then merged to construct a hybrid dataset. This includes: grouping the real dataset using the hydrogen refueling station number and the hydrogen refueling status as joint hierarchical dimensions; calculating the mean and standard deviation of the numerical operating parameters for each group; for each virtual data sample to be generated in the virtual dataset, randomly selecting a group from the joint hierarchical dimensions, and randomly generating virtual data values ​​of the numerical operating parameters using a normal distribution based on the mean and standard deviation of the selected group; dynamically generating the hydrogen refueling station name according to a predefined business rule engine and applying a non-negative constraint to the hydrogen refueling flow rate; merging the virtual dataset and the real dataset to construct the hybrid dataset, and verifying the distribution consistency of the hybrid dataset to ensure that the statistical distribution difference between the virtual data and the real data is within a preset threshold range.

[0010] Optionally, the standardized time-series training sample set is obtained through the following process: identifying right-skewed feature variables in the mixed dataset, and performing a logarithmic transformation on the right-skewed feature variables to obtain the distribution-adjusted dataset; for the distribution-adjusted dataset, calculating the importance score of each feature variable for temperature prediction using the random forest algorithm, and filtering out a subset of key feature variables based on the importance score, and constructing a refined dataset based on the subset of key feature variables; for the refined dataset, using the sliding window method to reconstruct the time-series structure, constructing continuous historical feature data into an input sequence through a preset time step, and constructing the temperature value at the next moment as the prediction target, generating the time-series sample pairs; for the input sequence in the time-series sample pairs, using the max-min normalization method to normalize all feature variables in the subset of key feature variables to a preset numerical range, obtaining the standardized time-series training sample set.

[0011] Optionally, receiving the hidden state sequence and outputting the context vector through the attention mechanism layer includes: after receiving the hidden state sequence, the attention mechanism layer performs a linear transformation on the hidden state sequence to obtain a query matrix, a key matrix, and a value matrix; calculates the dot product of the query matrix and the key matrix, scales the dot product result, and normalizes it using a softmax function to generate an attention weight matrix; and performs a weighted summation of the value matrix using the attention weight matrix to generate the context vector.

[0012] Optionally, training the temperature prediction model using a mixed data training-real data testing mode and determining the final training model through hyperparameter optimization includes: dividing the standardized time-series training sample set into a training set and a test set, wherein samples containing all real data and virtual data are used as the training set, and samples containing only real data are used as the test set; based on the defined training and test set partitioning mode, combining grid search and random search, optimizing the hyperparameters of the temperature prediction model, and obtaining the optimal hyperparameter combination when the best prediction performance is achieved on the test set, wherein the hyperparameters to be optimized include hidden layer size, learning rate, sequence length, batch size, and Dropout rate; configuring the optimizer, learning rate scheduler, and loss function using the training set and the optimal hyperparameter combination, training the temperature prediction model, and terminating the training when the model performance no longer improves through an early stopping mechanism, thus obtaining the final training model.

[0013] Optionally, the step of receiving real-time operating parameters from the hydrogen refueling station and outputting the real-time temperature prediction value of the on-board hydrogen storage container through the real-time temperature prediction system includes: after receiving the real-time operating parameters from the hydrogen refueling station, the real-time temperature prediction system performs feature selection, time-series sample construction, and normalization processing on the real-time operating parameters according to the data processing logic and hyperparameters used in model training to generate standardized real-time time-series samples; and inputs the standardized real-time time-series samples into the final training model to obtain the real-time temperature prediction value of the on-board hydrogen storage container.

[0014] Secondly, embodiments of this application provide an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the steps in the above-described method for dynamically predicting the temperature of an on-board hydrogen storage container.

[0015] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the above-described method for dynamically predicting the temperature of an on-board hydrogen storage container.

[0016] The beneficial effects of the technical solutions provided in this application include at least the following:

[0017] This application provides a method for dynamic temperature prediction of on-board hydrogen storage containers. It collects actual operational data from multiple hydrogen refueling stations during the refueling process to construct a real dataset. Based on the statistical characteristics of the real dataset, a virtual dataset is determined using a hierarchical statistical method. The real and virtual datasets are then merged to construct a hybrid dataset, effectively expanding the dataset size and addressing the limitations of high data collection costs and scarce sample data in practical applications. Furthermore, the hybrid dataset combines the complexity of real data with the statistical representativeness of virtual data, giving the model stronger adaptability and accuracy, and improving its generalization ability. The data distribution of the hybrid dataset is adjusted using a random forest algorithm. The adjusted dataset undergoes key feature selection to construct a refined dataset. The temporal structure of this refined dataset is reconstructed using the sliding window method, generating temporal sample pairs. The input sequences in these time-series sample pairs are then normalized to obtain a standardized temporal training sample set. This makes skewed and multimodal data closer to a normal distribution, optimizing data distribution and stability, enhancing model training stability and convergence efficiency, and effectively capturing the dynamic dependencies of temperature changes, highlighting key temporal features. A long short-term memory network model based on an attention mechanism is constructed as the temperature prediction model. This model includes a long short-term memory network layer, an attention mechanism layer, and a fully connected output layer. The Long Short-Term Memory (LSTM) network layer receives an input sequence containing multiple time steps and outputs a hidden state sequence corresponding to each time step. An attention mechanism layer receives the hidden state sequence and outputs a context vector. The attention mechanism dynamically assigns weights to different time steps, enabling the model to focus on key time nodes and significantly improving the model's prediction accuracy. A fully connected output layer receives the context vector and maps it to the predicted temperature value. The temperature prediction model is trained using a mixed data training-real data testing mode, and the final training model is determined through hyperparameter optimization. This allows the model to quickly converge to the optimal configuration, balancing training efficiency and generalization performance, and achieving efficient model optimization. The final trained model was validated, and performance metrics of the model's prediction results were calculated. The model's performance was verified using metrics such as mean absolute error, root mean square error, and coefficient of determination to confirm the model's prediction accuracy and stability in real-world scenarios, thereby ensuring the model's reliability and practicality. Based on the validated final trained model, a real-time temperature prediction system was built. This system receives real-time operating parameters from the hydrogen refueling station and outputs the real-time temperature prediction value of the on-board hydrogen storage container. When the real-time temperature prediction value exceeds a preset safe temperature threshold, a safety warning message is generated, thereby realizing the safe monitoring and early warning of the on-board hydrogen storage container temperature and providing an effective protection measure for the safe operation of the hydrogen refueling station. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of 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, wherein:

[0019] Figure 1 A flowchart illustrating a method for dynamically predicting the temperature of an on-board hydrogen storage container provided in this application embodiment;

[0020] Figure 2 A schematic diagram illustrating the distribution of feature variables in a virtual dataset of a hydrogen refueling station, provided as an embodiment of this application;

[0021] Figure 3 This application provides a schematic diagram of feature importance analysis based on the random forest algorithm.

[0022] Figure 4 A schematic diagram of the structure of a vehicle-mounted hydrogen storage container temperature prediction model based on the LSTM-AT algorithm provided in an embodiment of this application;

[0023] Figure 5 The mean absolute error and R0 of a temperature prediction model provided in this application under different training-prediction modes are shown in the embodiments. 2 Diagram illustrating the changes;

[0024] Figure 6 This is a schematic diagram of the hardware entity of an electronic device provided in an embodiment of this application. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0027] It should be noted that the terms "first, second, and third" used in the embodiments of this application are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0028] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0029] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0030] In view of the current problems in the research on dynamic prediction of the temperature of on-board hydrogen storage containers in the field of hydrogen energy safety technology, this application provides a method for dynamic prediction of the temperature of on-board hydrogen storage containers.

[0031] The technical solution of this application is described below, starting with the method embodiments.

[0032] Please refer to Figure 1 It shows a flowchart illustrating a method for dynamically predicting the temperature of an on-board hydrogen storage container provided in an embodiment of this application, such as... Figure 1 As shown, the method includes at least the following steps S110 to S140.

[0033] Step S110: Collect actual operating data during the refueling process of the on-board hydrogen storage container from multiple hydrogen refueling stations and construct a real dataset. Based on the statistical characteristics of the real dataset, determine a virtual dataset through a hierarchical statistical method. Merge the real dataset and the virtual dataset to construct a hybrid dataset.

[0034] In this embodiment of the application, actual operating data during the refueling process of on-board hydrogen storage containers are collected from multiple hydrogen refueling stations to construct a real dataset. Specifically, hydrogen refueling order data was collected from eight hydrogen refueling stations in a certain city, including stations in Zones A (Hydrogen Energy Demonstration Zone), B, C, D, E, F, G, and H, resulting in 45 sets of hydrogen refueling order samples. Based on these 45 sets of hydrogen refueling order samples, the actual operating data during the refueling process of the on-board hydrogen storage container was determined. The order characteristic variables included the hydrogen refueling station number, hydrogen refueling name, hydrogen refueling status, hydrogen refueling equipment pressure, hydrogen refueling flow rate, hydrogen refueling temperature, on-board hydrogen cylinder temperature, and on-board hydrogen cylinder pressure. Correspondingly, the actual operating data included the hydrogen refueling station number, hydrogen refueling name, hydrogen refueling status, and numerical operating parameters, namely the hydrogen refueling equipment pressure, hydrogen refueling flow rate, hydrogen refueling temperature, on-board hydrogen cylinder temperature, and on-board hydrogen cylinder pressure. Through the above actual operating data, the actual changes in the parameters of the hydrogen refueling equipment and on-board hydrogen storage container during the hydrogen refueling process can be obtained, thus providing a reliable data foundation for constructing a real dataset.

[0035] In this embodiment, a virtual dataset is determined using a hierarchical statistical method based on the statistical characteristics of the real dataset. Specifically, due to cost and information confidentiality limitations in the data acquisition process, a sufficient number of samples cannot be obtained. Therefore, based on 45 sets of actual on-site operational data, the training and test sets are divided in an 8:2 ratio, and 200 sets of samples are virtually generated. In a specific implementation, regarding hierarchical statistics, the distribution of each feature variable is first statistically analyzed, and hydrogen refueling stations and hydrogen refueling status are randomly selected. The data hierarchy is divided using the hydrogen refueling station number and hydrogen refueling status as a joint hierarchical dimension. The real dataset is grouped, and for each group, a feature distribution based on a normal distribution is simulated, and the mean and standard deviation of the numerical operating parameters are calculated, thereby establishing a statistical feature model based on the hierarchical dimension. For each virtual data sample to be generated in the virtual dataset, the following operation is performed: a group is randomly selected from the joint hierarchical dimension, and virtual data values ​​of numerical operating parameters are randomly generated using a normal distribution based on the mean and standard deviation corresponding to the selected group. Meanwhile, regarding rules, based on a predefined business rule engine, such as the `station_rules` dictionary defining naming rules and the `generate_name` function dynamically evolving, the generated virtual data samples are assigned identification information that conforms to business logic. Hydrogen refueling station names are dynamically generated, and non-negative constraints are applied to hydrogen refueling flow rates. The original data distribution characteristics are maintained during data generation to ensure that the original data distribution characteristics and logical relationships between fields are preserved. Furthermore, in terms of synthesis, regular expressions are used to remove uncommon control characters from the generated data, and synthesis verification is performed to ensure that the skewness or kurtosis of the newly generated data differs from the original data by less than 15%. This ensures the consistency of the statistical distribution between virtual and real data, effectively simulating the operational data of real hydrogen refueling stations. Simultaneously, the rule engine ensures the rationality of business logic, providing data support for the subsequent model building.

[0036] Furthermore, a hybrid dataset is constructed by merging virtual and real datasets. This involves combining 45 sets of real operational data with 200 sets of virtual data synthesized based on hierarchical statistical rules, resulting in a total of 245 samples of hydrogen storage container temperature data, i.e., the hybrid dataset. This dataset includes hydrogen refueling equipment pressure, hydrogen flow rate, hydrogen refueling temperature, and internal state parameters of the hydrogen storage container. The hybrid dataset is then subjected to distribution consistency verification to ensure that the statistical distribution difference between the virtual and real data is within a preset threshold range, thereby providing a reliable data foundation for subsequent model training.

[0037] Step S120: Adjust the data distribution of the mixed dataset, select key features of the dataset after distribution adjustment according to the random forest algorithm, construct a refined dataset, reconstruct the temporal structure of the refined dataset according to the sliding window method, generate time series sample pairs, and normalize the input sequences in the time series sample pairs to obtain a standardized time series training sample set.

[0038] In this embodiment, data distribution adjustment is performed on the mixed dataset. Specifically, right-skewed characteristic variables in the mixed dataset are identified, and a logarithmic transformation is performed on these right-skewed characteristic variables to obtain the dataset with adjusted distribution. Since there are significant deviations in the hydrogen refueling station number, hydrogen refueling equipment pressure, hydrogen refueling flow rate, and on-board hydrogen cylinder temperature, identifying and adjusting these deviation characteristic variables in the mixed dataset can improve the fitting and generalization ability of the prediction model. The distribution of numerical operating parameters (hydrogen refueling equipment pressure, hydrogen refueling flow rate, hydrogen refueling temperature, on-board hydrogen cylinder temperature, and on-board hydrogen cylinder pressure) is studied using histograms and kernel density estimation. For an example, please refer to [reference needed]. Figure 2 This diagram illustrates the distribution of feature variables in a virtual dataset of a hydrogen refueling station provided in this embodiment. It shows that the hydrogen flow rate distribution is extremely right-skewed, with most data concentrated in the low-flow-rate region. Furthermore, the Shapiro-Wilk and Kolmogorov-Smirnov tests indicate that the features significantly deviate from a normal distribution. Therefore, a logarithmic transformation method is used to adjust the right-skewed feature variables to help stabilize the variance, improve the robustness of the algorithm, make the variable distribution tend towards a normal distribution, and make the data independent of the distribution's mean, ultimately obtaining the distribution-adjusted dataset. The formula for this logarithmic transformation is expressed as follows:

[0039] ;

[0040] In the formula, Represents the characteristic variables after logarithmic transformation; This represents the maximum value of the logarithmically transformed data; Represents a constant. It is usually set to 1; The characteristic variable representing the original right-skewed distribution.

[0041] In this embodiment, a refined dataset is constructed by filtering key features from the distributed dataset using the random forest algorithm. Specifically, for the distributed dataset, the importance score of each feature variable for temperature prediction is determined based on feature importance analysis using the random forest algorithm. The core of this method lies in quantifying the relative contribution of each feature to the model's prediction of the target variable by calculating the total reduction in impurity brought about by node splitting of each feature across all decision trees. A higher importance score indicates a greater loss in the model's predictive ability after removing the feature, thereby filtering out important features from the dataset. For an example, please refer to [link to example]. Figure 3 The diagram illustrates a feature importance analysis based on a random forest algorithm provided in this application embodiment. As can be seen from the diagram, the hydrogen refueling equipment pressure (0.2885), hydrogen refueling temperature (0.2236), on-board hydrogen cylinder pressure (0.1899), and hydrogen flow rate (0.1560) together constitute the feature subset with the strongest predictive power, namely the key feature variable subset. The feature importance score in the key feature variable subset is significantly higher than other features, indicating that the dynamic changes in pressure distribution and gas temperature and flow rate parameters during the refueling process play a decisive role in predicting the real-time temperature of the on-board hydrogen storage container. Conversely, time-dimensional features such as hour (0.0729) and weekday (0.0429), as well as the discrete state feature representing the refueling process, hydrogen refueling state (0.0262), all have the lowest importance scores, indicating that specific time information and the single change in refueling state themselves have very limited statistical contribution to the model's prediction of the real-time temperature of the on-board hydrogen storage container. Based on this, the pressure of the hydrogen refueling equipment, the hydrogen refueling flow rate, the hydrogen refueling temperature, the temperature inside the on-board hydrogen cylinder, and the pressure inside the on-board hydrogen cylinder are selected as the input feature variables of the model. The hydrogen refueling status and hydrogen refueling time are removed to reduce the model complexity and improve the computational efficiency. Thus, a refined dataset is constructed based on this subset of key feature variables.

[0042] In this embodiment, the temporal structure of the refined dataset is reconstructed using the sliding window method to generate temporal sample pairs. Specifically, for the refined dataset, the sliding window method is used for temporal structure reconstruction, and sample pairs (X) are constructed based on a preset time step T. t ,y t ), where X t =[x t−T+1 ,x t−T+2 ,…,x t ]∈R T×d y represents the historical feature data from the previous T time points. t∈R represents the target temperature value for the current moment. This transformation converts the original data into a time-dependent sample structure, generating time-series sample pairs. During the construction of these time-series sample pairs, the window length is seq_length. Each sample contains historical feature data from consecutive time steps (seq_length) as input features, and the temperature value of the next time step as the prediction target. This process reduces the sample size of each dataset, with the real data sample size decreasing to 45 - seq_length and the virtual data sample size decreasing to 200 - seq_length. To improve the model's generalization ability, data augmentation techniques are used to process both datasets separately. Each sample is copied factor times and Gaussian noise is added. After augmentation, the real data sample size is (45 - seq_length) × factor, and the virtual data sample size is (200 - seq_length) × factor.

[0043] In this embodiment, the input sequences in the time-series sample pairs are normalized to obtain a standardized time-series training sample set. Specifically, since the various feature variables have significant differences in units, such as pressure in MPa, temperature in K, and flow rate in L / min, their numerical ranges span multiple orders of magnitude. This difference can easily lead to oscillations in the gradient descent direction during model training, significantly reducing the convergence speed and increasing the risk of getting trapped in local optima. Therefore, to eliminate the negative impact of unit differences on the model, the max-min normalization method is used for the input sequences in the time-series sample pairs to normalize all feature variables in the subset of key feature variables to a preset numerical range [-1, 1] without changing the distribution of the variables, thereby effectively eliminating the negative impact of unit differences and finally obtaining a standardized time-series training sample set suitable for model training. The expression formula for this normalization process is shown in the following formula:

[0044] ;

[0045] In the formula, Represents the normalized feature variables; Represents the original feature variables; This represents the maximum value of a feature variable in the training dataset; This represents the minimum value of the feature variable in the training dataset.

[0046] Step S130: Construct a long short-term memory network model based on attention mechanism enhancement as a temperature prediction model. The temperature prediction model includes a long short-term memory network layer, an attention mechanism layer, and a fully connected output layer. The long short-term memory network layer receives an input sequence containing multiple time steps and outputs a hidden state sequence corresponding to each time step. The attention mechanism layer receives the hidden state sequence and outputs a context vector. The fully connected output layer receives the context vector and maps the context vector to a temperature prediction value. The temperature prediction model is trained using a mixed data training-real data testing mode, and the final training model is determined through hyperparameter optimization.

[0047] In this embodiment, due to the limited sample size, multiple physical parameter coupling, and strong temporal correlation of the dataset, a Long Short-Term Memory Network (LSTM-TemporalAttention, LSTM-AT) model based on an attention mechanism is constructed as the temperature prediction model. Specifically, this temperature prediction model fully explores the temporal characteristics and state correlations of feature variables through multi-level feature extraction and dynamic weight allocation mechanisms. For examples, please refer to [reference needed]. Figure 4 This document illustrates a schematic diagram of a temperature prediction model for an on-board hydrogen storage container based on the LSTM-AT algorithm, provided in an embodiment of this application. The model includes a Long Short-Term Memory (LSTM-AT) network layer (i.e.,...). Figure 4 The network consists of an LSTM hidden layer, an attention mechanism layer, and a fully connected output layer. The Long Short-Term Memory (LSTM) network layer is primarily responsible for capturing long-term dependencies in the time series through a gating mechanism. The number of hidden units in this layer is determined through system optimization. The LSTM layer receives an input sequence containing multiple time steps and outputs a hidden state sequence corresponding to each time step, providing the foundation for subsequent attention-weighted processing. Furthermore, the input of the attention mechanism layer is connected to the output of the LSTM layer. The attention mechanism layer receives the hidden state sequence and outputs a context vector. This attention mechanism dynamically calculates the importance score of the feature vector at each time step, achieving adaptive focusing on key time nodes. This allows the network to stably acquire global feature correlations of the data, enhancing its ability to model long-range feature dependencies and improving its learning ability and performance. Specifically, the attention mechanism adopted in this application is a Scaled Dot-Product Attention architecture. After receiving the hidden state sequence, the attention mechanism layer performs a cubic linear transformation on the query vector, key vector, and value vector using a learnable weight matrix to generate the query matrix, key matrix, and value matrix. The calculation formula for this cubic linear transformation is expressed by the following formula:

[0048] ;

[0049] In the formula, , , These represent the query weight matrix, key weight matrix, and value weight matrix, respectively. ; Represents a hidden state sequence; Represents the query matrix; Represents the key matrix; This represents the value matrix. Further, the dot product of the query matrix and the key matrix is ​​calculated. The dot product result is then adjusted for scaling and normalized using the softmax function to generate the similarity score, thus generating the attention weight matrix. The formula for calculating this attention weight matrix is ​​as follows:

[0050] ;

[0051] In the formula, This represents the dot product of the query matrix and the key matrix, i.e., the similarity. This indicates that the key matrix is ​​transposed along the last two dimensions; This indicates the dimension of the hidden layer, used to prevent the softmax gradient from saturating due to excessively large dot product results; This represents the attention weight of time step i to time step j; Indicates the preset time step; Indicates the first Query vectors for each location; Indicates the first A key vector at each position; Indicates the first The key vector is generated at each position. Further, the value matrix is ​​weighted and aggregated using the attention weight matrix to generate a context vector, which is calculated using the following formula:

[0052] ;

[0053] In the formula, This represents a context matrix containing temporal dependencies. ; Indicates the first A vector of values ​​at each position; Indicates that the input is hidden; This represents the hidden output state. Through the above mechanism, the model can automatically capture key moments with predictive value during temperature changes, while suppressing noise interference from non-critical time steps, significantly improving prediction accuracy. Finally, the input of the fully connected output layer is connected to the output of the attention mechanism layer. The fully connected output layer receives the context vector, and the context vector, after being weighted and aggregated by the attention mechanism, undergoes a final nonlinear transformation to output a one-dimensional temperature prediction value, thus completing the mapping from multi-dimensional temporal features to a single temperature target.

[0054] In this embodiment, the temperature prediction model is trained using a hybrid data training-real data testing mode, and the final trained model is determined through hyperparameter optimization. For specific examples, please refer to [link / reference]. Figure 5 It shows a schematic diagram illustrating the changes in the mean absolute error and R² of a temperature prediction model provided in this application under different training-prediction modes. Figure 5 As shown in (b), among the four training prediction modes (Real→Virtual for real data training and virtual data testing, Mixed→Real for mixed data training and real data testing, Mixed→Mixed for mixed data training and mixed data testing, and Virtual→Real for virtual data training and real data testing), the Mixed→Mixed mode has the lowest mean absolute error (MAE), only 1.68°C at a testing ratio of 20%, but the difference is large compared to the MAEs at testing ratios of 30% and 40%. The Mixed→Real mode has an MAE of 2.62°C at a testing ratio of 20%, higher than the Mixed→Mixed mode. The testing ratio is relatively uniform in the Mixed→Real mode from 20% to 40%, but the MAE of the Mixed→Real mode is lower than that of the Mixed→Mixed mode at testing ratios of 30% and 40%. Figure 5 As shown in (a), the coefficient of determination values ​​are extremely close across all proportions in the Mixed→Mixed and Mixed→Real modes. Therefore, considering both the mean absolute error and the coefficient of determination, the Mixed→Real mode performs best among the four training and prediction modes. This mode uses mixed data (real + virtual) for training and real data for testing. When the testing proportion is set to 20%, the model reaches peak performance, indicating that with a 20% testing set proportion, the model can better utilize the training data, thereby achieving higher prediction accuracy. The standardized time-series training sample set is divided into training and testing sets in an 8:2 ratio. The training set uses samples containing all real and virtual data, while the testing set uses samples containing only real data.

[0055] Furthermore, regarding hyperparameter optimization, based on the defined mixed data training-real data testing mode, a combination of grid search and random search was used to adjust and optimize the hyperparameters of the temperature prediction model. Specifically, the hidden layer sizes were 64, 128, and 256; the learning rates were 0.001, 0.0005, and 0.0001; the sequence lengths were 12, 24, and 36; the batch sizes were 16 and 32; and the dropout rates were 0.1, 0.2, and 0.3. The optimal hyperparameter combination was obtained when the best prediction performance was achieved on the test set. After system optimization, the optimal hyperparameter combination for the temperature prediction model with a testing ratio of 20% was determined to be a hidden layer size of 128, a learning rate of 0.0001, a sequence length of 12, a batch size of 32, and a dropout rate of 0.1. The temperature prediction model is trained by configuring the optimizer, learning rate scheduler, and loss function using the training set and the optimal hyperparameter combination. Under this configuration, the model loss is minimized in the 12th iteration. The training is terminated when the model performance no longer improves through an early stopping mechanism, resulting in a high-performance final training model.

[0056] Step S140: Validate the performance of the final training model and calculate the performance index of the model prediction results. Based on the validated final training model, construct a real-time temperature prediction system. Receive real-time operating parameters from the hydrogen refueling station through the real-time temperature prediction system and output the real-time temperature prediction value of the on-board hydrogen storage container. When the real-time temperature prediction value exceeds a preset safe temperature threshold, generate a safety warning message.

[0057] In this embodiment, the model performance is validated for the final trained model, and performance metrics of the model prediction results are calculated. Specifically, the performance metrics for quantitatively evaluating model performance mainly include mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (CDE). The MAE ranges from [0, +∞). The smaller the error between the model prediction and the experimental results, the smaller the MAE value, indicating higher accuracy of the prediction model. The RMSE is the standard deviation of the samples, representing the dispersion of the samples. The smaller the RMSE value, the better the model performs in nonlinear fitting. The CDE ranges from [0, 1]. The closer the CDE is to 1, the better the model's fitting and generalization ability. The formulas for measuring MAE, RMSE, and CDE are expressed as follows:

[0058] ;

[0059] In the formula, n represents the sum of the sample data; Indicates the experimental results; This indicates the model's prediction results; This represents the average value of the experimental results.

[0060] In a specific embodiment, an LSTM model was established, and the performance of the LSTM-AT and LSTM-AT-TCN hybrid models was compared. Table 1 below shows the performance metrics of the three models for dynamically predicting the temperature of on-board hydrogen storage containers. Table 1 displays the performance metrics of the three models for dynamically predicting the temperature of on-board hydrogen storage containers, including training time, convergence speed, training set performance, and test set performance. As can be seen from the table, the LSTM-AT model has the highest training efficiency, requiring only 100 training epochs, and reaches its best performance at the 50th epoch. In contrast, both the LSTM and LSTM-AT-TCN models require 200 training epochs and have slower convergence speeds. During the training phase, the LSTM-AT model performed best, with the lowest mean absolute error and root mean square error, and the highest coefficient of determination (1.68, 2.36, and 0.98, respectively), indicating that the attention mechanism can effectively improve the model's ability to learn the features of the training data. The LSTM model performed the weakest on the training set, with mean absolute error (MAO), root mean square error (RMSE), and coefficient of determination (CDO) of 2.71, 5.44, and 0.90, respectively. The LSTM-AT-TCN model performed slightly better on the training set, with MAO, RMSE, and CDO of 2.57, 5.05, and 0.91, but still significantly worse than the LSTM-AT model. In the testing phase, the LSTM-AT model also performed best, with the lowest MAO and RMSE and the highest CDO of 2.62, 3.56, and 0.95, respectively. Furthermore, the LSTM-AT model showed the smallest difference between its test set and training set performance, indicating a lower risk of overfitting. The LSTM-AT-TCN model has the same mean absolute error as LSTM-AT during the testing phase, but a slightly higher root mean square error. While the coefficient of determination is the same, its performance drops significantly from the training set to the test set, and its training cost is higher. Overall, its performance is lower than the LSTM-AT model, with the LSTM model being the weakest. Its mean absolute error, root mean square error, and coefficient of determination are 2.85, 3.97, and 0.94, respectively, and its performance drops significantly from the training set to the test set. In summary, the LSTM-AT model provided in this embodiment exhibits the best overall performance, followed by the LSTM-AT-TCN model. The LSTM model is the weakest, primarily because key features such as hydrogen temperature and pressure are often concentrated at specific time points. The LSTM-AT model, by introducing an attention mechanism, dynamically allocates weights at different time steps, enabling the model to more effectively capture key features, thereby improving learning efficiency and prediction accuracy, and significantly enhancing model performance. In contrast, although the LSTM-AT-TCN model combines an attention mechanism and temporal convolution, theoretically it should have stronger feature extraction capabilities, but its actual performance improvement is limited, and its training cost increases significantly.

[0061] Table 1 (Comparison of Performance Indicators of Onboard Hydrogen Storage Container Temperature Dynamic Prediction Model)

[0062]

[0063] Furthermore, a real-time temperature prediction system is constructed based on the validated final training model. This system uses the AT-LSTM model, which has been verified as having the best overall performance, as its core algorithm engine and is integrated and deployed as an online service system. The real-time temperature prediction system receives real-time operating parameters from the hydrogen refueling station and outputs the predicted real-time temperature of the onboard hydrogen storage container. Specifically, after receiving real-time operating parameters from the hydrogen refueling station, such as the pressure, flow rate, and temperature of the hydrogen refueling equipment, the system processes them according to the same data processing logic and hyperparameters used in the model training phase. Feature selection, time-series sample construction, and normalization are performed on the real-time operating parameters. Specifically, feature selection is performed based on the key feature subset determined by the random forest algorithm (such as the pressure of the hydrogen refueling equipment, the hydrogen flow rate, the hydrogen temperature, the temperature inside the onboard hydrogen cylinder, and the pressure inside the onboard hydrogen cylinder). Time-series samples are constructed using the same preset time step as during training using the sliding window method. The maximum and minimum values ​​obtained from the training set are used to normalize the input sequence to the range [-1, 1] using the max-min normalization method. After processing, standardized real-time time-series samples are finally obtained. Furthermore, by inputting standardized real-time time-series samples into the final training model, the real-time temperature prediction value of the on-board hydrogen storage container can be obtained. The real-time temperature prediction value is then compared with a preset safe temperature threshold. This preset safe temperature threshold is primarily based on recognized standards in the field of hydrogen energy safety. Since temperatures exceeding the material safety limit of 85°C will seriously threaten the integrity and safety of the container, the preset safe temperature threshold is set at 85°C. When the real-time temperature prediction value exceeds the preset safe temperature threshold, the system will automatically trigger an early warning mechanism, sending safety warning information to hydrogen refueling station operators through sound and light, interface pop-ups, or message pushes. This enables real-time monitoring and proactive prevention of safety risks, thereby ensuring the safe operation of the hydrogen refueling station.

[0064] In summary, the method for dynamic temperature prediction of on-board hydrogen storage containers provided in this application collects actual operating data from multiple hydrogen refueling stations during the refueling process of on-board hydrogen storage containers and constructs a real dataset. Based on the statistical characteristics of the real dataset, a virtual dataset is determined through a hierarchical statistical method. The real dataset and the virtual dataset are then merged to construct a hybrid dataset, effectively expanding the dataset size and addressing the limitations of high data collection costs and scarce sample data in practical applications. Furthermore, the hybrid dataset combines the complexity of real data with the statistical representativeness of virtual data, giving the model stronger adaptability and accuracy, and improving its generalization ability. The data distribution of the hybrid dataset is adjusted according to the following... The machine forest algorithm filters key features from the distributed dataset to construct a refined dataset. The temporal structure of the refined dataset is reconstructed using the sliding window method, generating time-series sample pairs. The input sequences in these time-series sample pairs are then normalized to obtain a standardized time-series training sample set. This makes skewed and multimodal data closer to a normal distribution, optimizing data distribution and stability, enhancing model training stability and convergence efficiency, and effectively capturing the dynamic dependencies of temperature changes, highlighting key temporal features. A long short-term memory network model based on an attention mechanism is constructed as the temperature prediction model. The temperature prediction model includes a long short-term memory network layer, an attention mechanism layer, and a fully connected input layer. The model takes an input sequence containing multiple time steps through a Long Short-Term Memory (LSTM) network layer and outputs a hidden state sequence corresponding to each time step. An attention mechanism layer receives the hidden state sequence and outputs a context vector. The attention mechanism dynamically assigns weights to different time steps, enabling the model to focus on key temporal nodes and significantly improving prediction accuracy. A fully connected output layer receives the context vector and maps it to the predicted temperature value. The temperature prediction model is trained using a hybrid data training-real data testing mode, and the final training model is determined through hyperparameter optimization. This allows the model to quickly converge to the optimal configuration, balancing training efficiency and generalization performance, achieving high efficiency and superior performance. The final trained model is validated, and its prediction performance metrics are calculated. The model's performance is verified using metrics such as mean absolute error, root mean square error, and coefficient of determination to confirm its accuracy and stability in real-world scenarios, thus ensuring its reliability and practicality. Based on the validated final trained model, a real-time temperature prediction system is built. This system receives real-time operating parameters from the hydrogen refueling station and outputs the real-time temperature prediction value of the onboard hydrogen storage container. When the real-time temperature prediction value exceeds a preset safe temperature threshold, a safety warning is generated, thereby achieving safe monitoring and early warning of the onboard hydrogen storage container temperature and providing effective protection for the safe operation of the hydrogen refueling station.

[0065] It should be noted that, in the embodiments of this application, if the above-mentioned method for dynamic temperature prediction of an on-board hydrogen storage container is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0066] Correspondingly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps in any of the above-described methods for dynamically predicting the temperature of an on-board hydrogen storage container. Correspondingly, embodiments of this application also provide a computer program product, which, when executed by a processor of an electronic device, is used to implement the steps in any of the above-described methods for dynamically predicting the temperature of an on-board hydrogen storage container.

[0067] Based on the same technical concept, this application provides an electronic device for implementing the method described in the above method embodiment for dynamically predicting the temperature of an on-board hydrogen storage container. Figure 6 This is a hardware entity diagram of an electronic device provided in an embodiment of this application, such as... Figure 6 As shown, the electronic device 600 includes a memory 610 and a processor 620. The memory 610 stores a computer program that can run on the processor 620. When the processor 620 executes the program, it implements the steps in any of the vehicle-mounted hydrogen storage container temperature dynamic prediction methods described in the embodiments of this application.

[0068] The memory 610 is configured to store instructions and applications executable by the processor 620, and can also cache data to be processed or already processed by the processor 620 and various modules in the electronic device (e.g., image data, audio data, voice communication data and video communication data), which can be implemented by flash memory or random access memory (RAM).

[0069] When the processor 620 executes the program, it implements the steps of a method for dynamically predicting the temperature of an on-board hydrogen storage container as described above. The processor 620 typically controls the overall operation of the electronic equipment 600.

[0070] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.

[0071] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0072] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0073] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0074] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0075] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0076] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0077] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0078] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the device automatic test line to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0079] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0080] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0081] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for dynamic temperature prediction of an on-board hydrogen storage container, characterized in that, The method includes: Actual operational data during the refueling process of vehicle-mounted hydrogen storage containers was collected from multiple hydrogen refueling stations to construct a real dataset. The actual operational data includes hydrogen refueling station number, hydrogen refueling name, hydrogen refueling status, and numerical operational parameters, including hydrogen refueling equipment pressure, hydrogen refueling flow rate, hydrogen refueling temperature, on-board hydrogen cylinder temperature, and on-board hydrogen cylinder pressure. The real dataset was grouped using the hydrogen refueling station number and the hydrogen refueling status as joint stratification dimensions. For each group, the mean and standard deviation of the numerical operational parameters were calculated. For each virtual data sample to be generated in the virtual dataset, a group is randomly selected from the joint hierarchical dimension. Based on the mean and standard deviation of the selected group, virtual data values ​​of numerical operating parameters are randomly generated through a normal distribution. According to the predefined business rule engine, the name of the hydrogen refueling station is dynamically generated, and a non-negative constraint is applied to the hydrogen refueling flow rate. The virtual dataset is merged with the real dataset to construct a hybrid dataset, and the distribution consistency of the hybrid dataset is verified to ensure that the statistical distribution difference between the virtual data and the real data is within a preset threshold range. The data distribution of the mixed dataset is adjusted, and key features of the adjusted dataset are selected according to the random forest algorithm to construct a refined dataset. The time-series structure of the refined dataset is reconstructed according to the sliding window method to generate time-series sample pairs. The input sequences in the time-series sample pairs are normalized to obtain a standardized time-series training sample set. A long short-term memory network model based on attention mechanism enhancement is constructed as a temperature prediction model. The temperature prediction model includes a long short-term memory network layer, an attention mechanism layer, and a fully connected output layer. The long short-term memory network layer receives an input sequence containing multiple time steps and outputs a hidden state sequence corresponding to each time step. The attention mechanism layer receives the hidden state sequence and outputs a context vector. The fully connected output layer receives the context vector and maps the context vector to a temperature prediction value. The temperature prediction model is trained using a mixed data training-real data testing mode, and the final training model is determined through hyperparameter optimization. The model performance of the final training model is verified, and the performance index of the model prediction results is calculated. Based on the verified final training model, a real-time temperature prediction system is constructed. The real-time temperature prediction system receives the real-time operating parameters of the hydrogen refueling station and outputs the real-time temperature prediction value of the on-board hydrogen storage container. When the real-time temperature prediction value exceeds the preset safe temperature threshold, a safety warning message is generated.

2. The method according to claim 1, characterized in that, The standardized time-series training sample set is obtained through the following process: Identify the right-skewed characteristic variables in the mixed dataset, and perform a logarithmic transformation on the right-skewed characteristic variables to obtain the distribution-adjusted dataset; For the dataset with the adjusted distribution, the importance score of each feature variable for temperature prediction is calculated according to the random forest algorithm, and a subset of key feature variables is obtained based on the importance score. A refined dataset is then constructed based on the subset of key feature variables. For the refined dataset, the sliding window method is used to reconstruct the time series structure. By using a preset time step, continuous historical feature data is constructed into an input sequence, and the temperature value at the next moment is constructed into a prediction target to generate the time series sample pairs. For the input sequence in the time series sample pair, the max-min normalization method is used to normalize all feature variables in the subset of key feature variables to a preset numerical range, thereby obtaining the standardized time series training sample set.

3. The method according to claim 1, characterized in that, The process of receiving the hidden state sequence through the attention mechanism layer and outputting a context vector includes: After receiving the hidden state sequence, the attention mechanism layer performs a linear transformation on the hidden state sequence to obtain a query matrix, a key matrix, and a value matrix. Calculate the dot product between the query matrix and the key matrix, scale the dot product result, and then normalize it using the softmax function to generate the attention weight matrix. The context vector is generated by weighting and summing the value matrix using the attention weight matrix.

4. The method according to claim 1, characterized in that, The process of training the temperature prediction model using a hybrid data training-real data testing mode and determining the final trained model through hyperparameter optimization includes: The standardized time-series training sample set is divided into a training set and a test set. The training set is used to include samples corresponding to all real data and virtual data, and the test set is used to include samples corresponding to only real data. Based on the defined training and test set partitioning pattern, the hyperparameters of the temperature prediction model are optimized by combining grid search and random search. When the best prediction performance is achieved on the test set, the optimal combination of hyperparameters is obtained. The hyperparameters to be optimized include hidden layer size, learning rate, sequence length, batch size, and Dropout rate. The temperature prediction model is trained by configuring the optimizer, learning rate scheduler, and loss function using the training set and the optimal hyperparameter combination. The training is terminated when the model performance no longer improves, thus obtaining the final trained model.

5. The method according to claim 1, characterized in that, The process of receiving real-time operating parameters from the hydrogen refueling station through the real-time temperature prediction system and outputting the real-time temperature prediction value of the on-board hydrogen storage container includes: After receiving real-time operating parameters from the hydrogen refueling station, the real-time temperature prediction system performs feature selection, time-series sample construction, and normalization on the real-time operating parameters according to the data processing logic and hyperparameters used in model training, generating standardized real-time time-series samples. The standardized real-time time series samples are input into the final training model to obtain the real-time temperature prediction value of the on-board hydrogen storage container.

6. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 5.