Methods and devices for early warning and location of hydrogen leaks in fuel cell vehicles
By combining depthwise separable convolution and the Transformer model, the problem of traditional models being unable to cope with noise and abnormal situations in hydrogen leak early warning of fuel cell vehicles is solved, achieving more accurate hydrogen leak early warning and location, and improving the stability and adaptability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF TECH XINYUAN INFORMATION TECH CO LTD
- Filing Date
- 2023-12-28
- Publication Date
- 2026-05-26
AI Technical Summary
Traditional recurrent neural network models are unable to effectively handle noise and anomalies in time-series data when dealing with hydrogen leaks in fuel cell vehicles. They are prone to overfitting, ignore spatial variation patterns, and thus provide inaccurate warnings.
This method combines depthwise separable convolution and the Transformer model. By acquiring sensor data and performing depthwise separable convolution processing, useful features are extracted. Then, an encoder and decoder are used for refined prediction. The warning result is determined by combining the preset warning threshold, thereby reducing the influence of human factors.
It improves the accuracy and reliability of hydrogen leak early warning, reduces false alarms and missed alarms, can better identify the location of leak points, provides specific early warning information, and enhances the stability and adaptability of the system.
Smart Images

Figure CN117922295B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fuel cell technology, and specifically to a method and device for early warning and location of hydrogen leaks in fuel cell vehicles. Background Technology
[0002] Hydrogen leakage is a significant safety concern in fuel cell vehicles. Because hydrogen is the lightest gas, it readily diffuses upwards and has a relatively wide explosive range in air. Therefore, in the event of a hydrogen leak, the accumulated hydrogen can form an explosive mixture. Hydrogen leaks in fuel cell vehicles can occur in multiple locations, including the fuel cell, hydrogen storage tank, and hydrogen pipelines. The complexity of these locations, along with the dangers of high-pressure hydrogen, makes handling leaks difficult.
[0003] Diagnosing hydrogen leaks is a crucial safety measure. Traditional neural networks focus on the temporal variations of digital signals from each sensor, easily overlooking spatial variations. For example, in the event of a gas leak, some areas may have higher gas concentrations than others. Traditional recurrent neural network models suffer from vanishing or exploding gradients, failing to adequately handle noise and anomalies in time-series data. In practical applications, this can easily lead to overfitting. Summary of the Invention
[0004] In view of this, the present invention provides a method and device for early warning and location of hydrogen leaks in fuel cell vehicles, in order to solve the problem that traditional recurrent neural network models cannot well cope with noise and anomalies in time series data and are prone to overfitting.
[0005] In a first aspect, the present invention provides a method for early warning and location of hydrogen leaks in fuel cell vehicles. The method includes: acquiring first target data fed back by various sensors inside the target vehicle, the first target data including sensor location information and hydrogen release concentration data; inputting the first target data into a trained first model to obtain second target data, the first model being used to perform depthwise separable convolution processing on the first target data; inputting the second target data into a trained second model to obtain prediction data, the second model being used to determine the predicted hydrogen release concentration data and the predicted leak probability corresponding to the location information of each sensor based on the second target data; and determining the early warning result based on a preset early warning threshold and the prediction data.
[0006] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment firstly monitors the hydrogen release within the target vehicle comprehensively by acquiring feedback data from various sensors, taking into account the location information of hydrogen concentration. Secondly, depthwise separable convolution can better extract useful features from the first target data, such as the correlation patterns between sensor location information and hydrogen release concentration data. This enhanced feature extraction capability improves the accuracy and reliability of predictions. Depthwise separable convolution processing effectively removes noise and interference from the first target data, improving data purity. This helps reduce the possibility of false alarms and missed alarms, improving the stability of the warning system. Then, the second target data is input into a trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and predicted leakage probability corresponding to the location information of each sensor based on the second target data. Through the processing of the second model, the hydrogen release concentration and leakage probability at each sensor location can be predicted in a refined manner. This refined prediction can provide more specific and accurate warning information, helping to better understand and respond to potential hydrogen leak risks. Finally, the warning result is determined based on a preset warning threshold and the prediction data. The preset warning threshold provides a standardized method to determine the warning result, making the warning judgment more objective and consistent. This helps reduce the impact of human factors or experience dependence on early warning results, addressing the issue that traditional neural networks, which focus on the temporal variation patterns of digital signals from each sensor, tend to overlook spatial variation patterns. For example, in the case of a gas leak, the gas concentration may be higher in some areas than in others. Traditional recurrent neural network models suffer from problems such as vanishing or exploding gradients, failing to adequately handle noise and anomalies in time-series data. In practical applications, this can easily lead to overfitting.
[0007] In one optional implementation, acquiring first target data fed back by various sensors inside the target vehicle includes: acquiring the volume data of the target vehicle and a preset target leakage area; extracting a leakage scenario set from a preset leakage scenario database, the leakage scenario set including the number of target leakage areas in each leakage scenario and the leakage probability of each target leakage area; determining a hydrogen leakage sensor set based on preset sensor installation principles, volume data, target leakage areas, and leakage scenario set, the hydrogen leakage sensor set including the number and spatial location of each sensor; and acquiring the first target data based on the number and spatial location of the sensors.
[0008] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment, based on the target vehicle's volume data, can more accurately understand the vehicle's internal structure and spatial distribution. This helps determine the suitable locations for installing hydrogen leak sensors to achieve comprehensive monitoring of hydrogen release inside the vehicle. By pre-setting target leak areas, potential leak risk areas can be identified. When determining the hydrogen leak sensor set, these areas can be prioritized to ensure that the sensors can cover these critical areas, improving monitoring coverage. By extracting a leak scenario set from a pre-set leak scenario database, the number of target leak areas and the leak probability of each area for different leak scenarios can be understood. This helps to consider various possible leak scenarios when determining the hydrogen leak sensor set, making the sensor set more adaptable.
[0009] In one optional implementation, the trained first model is trained using labeled historical leaked data. The second target data is then input into the trained first model to obtain the second target data. This process includes: tensorizing the first target data; inputting the tensorized first target data into the trained first model; performing depthwise convolution on the first target data using a depthwise convolutional layer in the first model to obtain first convolutional data; performing pointwise convolution on the first convolutional data using a pointwise convolutional layer in the first model to obtain second convolutional data; performing batch normalization on the second convolutional data to obtain normalized second convolutional data; processing the normalized second convolutional data using an activation function to obtain activated second convolutional data; and concatenating the activated second convolutional data with the first target data to obtain the second target data.
[0010] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment preprocesses the first target data through tensor quantization to adapt it to the model's input requirements. This preprocessing improves data quality and consistency, reducing the impact of noise and outliers. Deep convolution operations extract deeper features from the first target data. By stacking multiple convolutional layers, complex patterns and correlations in the data can be learned, helping to improve the accuracy and reliability of predictions. Pointwise convolution operations capture local dependencies between adjacent data points, enhancing feature extraction capabilities. This local modeling ability helps the model better understand and process spatial information in the data. Batch normalization accelerates the model's training process and improves its generalization ability. Normalization reduces the differences between different batches of data, making the model more stable and reliable. Activation functions introduce nonlinear characteristics into the model, enabling it to better learn and simulate complex patterns in the data. The selection and processing of activation functions are crucial to the model's performance and expressive power. Concatenating the activated second convolutional data with the first target data achieves multi-source data fusion. This data fusion can comprehensively utilize information from different types of data, improving the model's prediction accuracy and robustness.
[0011] In one optional implementation, the second model includes at least one encoder and at least one decoder, which are trained from labeled historical leaked data. The second target data is input into the trained second model to obtain prediction data, including: inputting the second target data into the encoder to extract semantic features of the second target data; inputting the semantic features into the decoder to convert the semantic features into a target output sequence, where each element in the target output sequence represents the prediction data for the next time point corresponding to the second target data.
[0012] The hydrogen leak early warning and location method for fuel cell vehicles provided in this embodiment can extract semantic features of the second target data through an encoder. These semantic features reflect the inherent laws and patterns of the data, helping the model to more accurately understand and predict the dynamic changes of the data. By inputting the semantic features into the decoder, the decoder can convert these features into the target output sequence. This conversion process can predict the data at the next time point corresponding to the second target data, realizing time series prediction. Using labeled historical leak data to train the encoder and decoder can make full use of the information and patterns in the historical data. This training method allows the model to learn the changing patterns and trends of the data, improving the accuracy and reliability of the prediction. By processing the second target data and converting it into predicted data through the encoder and decoder, the accuracy and real-time response capability of the early warning system can be improved, the decision-making process can be optimized, and the adaptability and practicality of the system can be enhanced. The Transformer uses a self-attention mechanism to capture the dependencies between different positions in the sequence, and the convolution operation can be used to extract local features of the sensor array, effectively capturing the spatiotemporal relationship of the leak point with higher accuracy. The use of advanced Transformer technology instead of traditional sequence models greatly improves the inference speed while ensuring accuracy.
[0013] In one optional implementation, the preset warning threshold includes a concentration threshold and a probability threshold. The warning result is determined based on the preset warning threshold and prediction data, including: determining the predicted hydrogen release concentration data and predicted leakage probability of each sensor based on the prediction data; determining whether to issue a warning based on the predicted hydrogen release concentration data and the concentration threshold; and determining the location of the warning leakage point based on the predicted leakage probability and the probability threshold.
[0014] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment innovatively incorporates leak point location information into a deep learning model. The model learns the leak point location information through training data and, based on predicted hydrogen release concentration data and predicted leak probability from various sensors, can finely determine the warning result. This refined warning can better identify the leak point location and provide more specific warning information. By comparing the predicted data with preset concentration and probability thresholds in real time, it can quickly determine whether a warning needs to be issued. This rapid response capability helps to promptly detect potential hydrogen leak risks and reduce potential accident risks. Based on the predicted leak probability and probability threshold, the location of the leak point can be determined. This location function helps to quickly locate and handle the leak source, reducing the potential harm to equipment and personnel. The dual-threshold monitoring method enhances the robustness of the warning system. Even under complex or uncertain environmental conditions, the warning system can maintain relatively stable and reliable warning performance.
[0015] In one optional implementation, the method further includes: acquiring the actual hydrogen release concentration data and leakage value at the next moment from each sensor; generating a loss function based on the actual hydrogen release concentration data, leakage value, and prediction data at the next moment; and using the loss function to calculate the loss value and perform backpropagation to adjust the parameters of the first model and the second model.
[0016] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment generates a loss function by comparing the difference between predicted and actual data. The loss value is then used for backpropagation to adjust model parameters, allowing the model to gradually approximate the actual data and improve prediction accuracy. The calculation of the loss function and backpropagation prevents model overfitting. Overfitting refers to a model performing well on training data but poorly on test data. Adjusting model parameters reduces model complexity and the risk of overfitting. The process of adjusting model parameters using the loss function through backpropagation is essentially an adaptive learning process. This adaptive learning capability enables the model to continuously learn and adapt to new data patterns, improving the intelligence and adaptability of the warning system.
[0017] In one alternative implementation, the loss function is:
[0018] Where y represents the actual hydrogen release concentration data collected by the sensor. The second model predicts the hydrogen release concentration from the sensor at the next moment, where p represents the actual leakage value at the sensor location, indicating whether a leak exists. To predict the probability of leakage at each sensor location. The L2 norm represents the prediction error of hydrogen concentration. λ1 and λ2 represent the L2 norm of the error in predicting the location of the leak point, and λ1 and λ2 are the weighting coefficients of the two error components, respectively.
[0019] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment takes into account both the hydrogen concentration prediction error and the leak point prediction location error in the loss function, thereby more comprehensively evaluating the prediction accuracy of the model.
[0020] Secondly, the present invention provides a hydrogen leak warning and location device for fuel cell vehicles. The device includes: an acquisition module for acquiring first target data fed back by various sensors within the target vehicle, the first target data including sensor location information and hydrogen release concentration data; a convolution module for inputting the first target data into a trained first model to obtain second target data, the first model being used to perform depthwise separable convolution processing on the first target data; a prediction module for inputting the second target data into a trained second model to obtain prediction data, the second model being used to determine the predicted hydrogen release concentration data and predicted leak probability corresponding to the location information of each sensor based on the second target data; and an early warning module for determining an early warning result based on a preset early warning threshold and the prediction data. Attached Figure Description
[0021] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating the method for early warning and location of hydrogen leaks in fuel cell vehicles according to an embodiment of the present invention.
[0023] Figure 2 This is a flowchart illustrating another method for early warning and location of hydrogen leaks in fuel cell vehicles according to an embodiment of the present invention.
[0024] Figure 3 This is a schematic diagram of the model input definition according to an embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the model output definition according to an embodiment of the present invention;
[0026] Figure 5 This is a schematic diagram of a depthwise convolution operation according to an embodiment of the present invention;
[0027] Figure 6 This is a schematic diagram of pointwise convolution operation according to an embodiment of the present invention;
[0028] Figure 7 This is a schematic diagram of data splicing operation according to an embodiment of the present invention;
[0029] Figure 8 This is a schematic diagram of the transformer model structure according to an embodiment of the present invention;
[0030] Figure 9This is a schematic diagram of hydrogen leak prediction and leak location determination according to an embodiment of the present invention;
[0031] Figure 10 This is a structural block diagram of a hydrogen leak warning and location device for fuel cell vehicles according to an embodiment of the present invention. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] Hydrogen leakage is a significant safety concern in fuel cell vehicles. Because hydrogen is the lightest gas, it readily diffuses upwards and has a relatively wide explosive range in air. Therefore, in the event of a hydrogen leak, the accumulated hydrogen can form an explosive mixture. Hydrogen leaks in fuel cell vehicles can occur in multiple locations, including the fuel cell, hydrogen storage tank, and hydrogen pipelines. The complexity of these locations, along with the dangers of high-pressure hydrogen, makes handling leaks difficult.
[0034] Diagnosing hydrogen leaks is a crucial safety measure. Traditional neural networks focus on the temporal variations of digital signals from each sensor, easily overlooking spatial variations. For example, in the event of a gas leak, some areas may have higher gas concentrations than others. Traditional recurrent neural network models suffer from vanishing or exploding gradients, failing to adequately handle noise and anomalies in time-series data. In practical applications, this can easily lead to overfitting.
[0035] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment firstly monitors the hydrogen release within the target vehicle comprehensively by acquiring feedback data from various sensors, taking into account the location information of hydrogen concentration. Secondly, depthwise separable convolution can better extract useful features from the first target data, such as the correlation patterns between sensor location information and hydrogen release concentration data. This enhanced feature extraction capability improves the accuracy and reliability of predictions. Depthwise separable convolution processing effectively removes noise and interference from the first target data, improving data purity. This helps reduce the possibility of false alarms and missed alarms, improving the stability of the warning system. Then, the second target data is input into a trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and predicted leakage probability corresponding to the location information of each sensor based on the second target data. Through the processing of the second model, the hydrogen release concentration and leakage probability at each sensor location can be predicted in a refined manner. This refined prediction can provide more specific and accurate warning information, helping to better understand and respond to potential hydrogen leak risks. Finally, the warning result is determined based on a preset warning threshold and the prediction data. The preset warning threshold provides a standardized method to determine the warning result, making the warning judgment more objective and consistent. This helps reduce the impact of human factors or experience dependence on early warning results, addressing the issue that traditional neural networks, which focus on the temporal variation patterns of digital signals from each sensor, tend to overlook spatial variation patterns. For example, in the case of a gas leak, the gas concentration may be higher in some areas than in others. Traditional recurrent neural network models suffer from problems such as vanishing or exploding gradients, failing to adequately handle noise and anomalies in time-series data. In practical applications, this can easily lead to overfitting.
[0036] According to an embodiment of the present invention, a method for early warning and location of hydrogen leaks in fuel cell vehicles is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0037] This embodiment provides a method for early warning and location of hydrogen leaks in fuel cell vehicles. Figure 1 This is a flowchart of a hydrogen leak warning and location method for fuel cell vehicles according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0038] Step S101: Obtain the first target data fed back by each sensor in the target vehicle. The first target data includes sensor location information and hydrogen release concentration data.
[0039] Specifically, sensors are installed at various key locations on the target vehicle to monitor hydrogen concentration and location information. These sensors can be optical, electrochemical, or other types, depending on application requirements and sensor performance. A data acquisition system is configured to receive and process the data from the sensors. This system can be a standalone hardware device or a software module integrated into the vehicle control system. The data acquisition system needs to be capable of receiving, storing, and processing data in real time. The system periodically or in real-time collects location information and hydrogen release concentration data from each sensor. This data can be transmitted to the data acquisition system via wired or wireless means and stored in a corresponding database or storage device.
[0040] Step S102: Input the first target data into the trained first model to obtain the second target data. The first model is used to perform depthwise separable convolution processing on the first target data.
[0041] Specifically, the trained first model undergoes depthwise separable convolution processing. Depthwise separable convolution is a special type of convolution operation that breaks down the convolution operation into two steps: channel-wise convolution and element-wise convolution. Channel-wise convolution performs the convolution operation independently on each channel, and then element-wise convolution multiplies the convolution results element-wise. This approach reduces the number of model parameters, improves computational efficiency, and maintains model performance. During depthwise separable convolution processing, the model parameters are updated based on the input data. These parameters are optimized using the backpropagation algorithm to minimize the error between predicted and actual values. By continuously updating the model parameters, the model's prediction accuracy and generalization ability can be improved. After depthwise separable convolution processing, the first model outputs second target data. This data may include predicted values, classification results, or other information related to the first target data. The second target data can be used for subsequent analysis, fault diagnosis, or decision support tasks.
[0042] Step S103: Input the second target data into the trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and the predicted leakage probability corresponding to the location information of each sensor based on the second target data.
[0043] Specifically, the second target data, processed by depthwise separable convolution, is input into the trained second model. The second model can be a Transformer-based model with an encoder and decoder structure for processing sequential data. Before inputting the data, the location information of each sensor needs to be encoded. Location information can be represented using one-hot encoding or embedding vectors. This encoded location information will serve as one of the model's inputs. The model can be trained using supervised learning, using known sensor location information and hydrogen release concentration data as ground truth, and adjusting the model's parameters by optimizing the loss function. After training, the model can be used to predict new sensor data. Inputting new sensor location information, the model will output the predicted hydrogen release concentration and leakage probability for each location. The predicted hydrogen release concentration and leakage probability are then provided as output data to decision-makers or other systems. This data can be used in applications such as fault warning, decision support, and maintenance planning. The second model needs to be capable of processing sequential data and handling sensor location information and other relevant features. During model training, a suitable loss function and optimization algorithm need to be selected, and appropriate hyperparameters need to be set to obtain optimal model performance. Meanwhile, in order to improve the generalization ability of the model, techniques such as regularization and data augmentation can be used to prevent overfitting and insufficient generalization.
[0044] Step S104: Determine the warning result based on the preset warning threshold and prediction data.
[0045] Specifically, the predicted hydrogen release concentration and leakage probability data are obtained from the second model. The system then determines whether the hydrogen release concentration exceeds a threshold: the predicted hydrogen release concentration is compared with a preset concentration threshold. If the predicted concentration exceeds the threshold, a potential hydrogen leakage risk is considered. Next, the system determines whether the leakage probability exceeds a threshold: the predicted leakage probability is compared with a preset probability threshold. If the predicted probability exceeds the probability threshold, a potential hydrogen leakage risk is considered. By comprehensively considering both the hydrogen release concentration and leakage probability data, a potential hydrogen leakage risk is determined. If either factor exceeds the threshold, a risk is considered present, and an early warning is issued. Based on the comprehensive judgment, if a potential hydrogen leakage risk exists, an early warning is issued. The early warning information may include sensor location, predicted concentration, predicted probability, etc., so that decision-makers or other systems can take appropriate preventative or handling measures. The setting of the early warning threshold needs to be adjusted and optimized according to actual conditions. Different application scenarios and devices may require different threshold settings. Furthermore, to improve the accuracy and reliability of the early warning, a comprehensive judgment can be made by combining historical data, device status, and other information.
[0046] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment firstly monitors the hydrogen release within the target vehicle comprehensively by acquiring feedback data from various sensors, taking into account the location information of hydrogen concentration. Secondly, depthwise separable convolution can better extract useful features from the first target data, such as the correlation patterns between sensor location information and hydrogen release concentration data. This enhanced feature extraction capability improves the accuracy and reliability of predictions. Depthwise separable convolution processing effectively removes noise and interference from the first target data, improving data purity. This helps reduce the possibility of false alarms and missed alarms, improving the stability of the warning system. Then, the second target data is input into a trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and predicted leakage probability corresponding to the location information of each sensor based on the second target data. Through the processing of the second model, the hydrogen release concentration and leakage probability at each sensor location can be predicted in a refined manner. This refined prediction can provide more specific and accurate warning information, helping to better understand and respond to potential hydrogen leak risks. Finally, the warning result is determined based on a preset warning threshold and the prediction data. The preset warning threshold provides a standardized method to determine the warning result, making the warning judgment more objective and consistent. This helps reduce the impact of human factors or experience dependence on early warning results, addressing the issue that traditional neural networks, which focus on the temporal variation patterns of digital signals from each sensor, tend to overlook spatial variation patterns. For example, in the case of a gas leak, the gas concentration may be higher in some areas than in others. Traditional recurrent neural network models suffer from problems such as vanishing or exploding gradients, failing to adequately handle noise and anomalies in time-series data. In practical applications, this can easily lead to overfitting.
[0047] This embodiment provides a method for early warning and location of hydrogen leaks in fuel cell vehicles. Figure 2 This is a flowchart of a hydrogen leak warning and location method for fuel cell vehicles according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0048] Step S201: Obtain the first target data fed back by each sensor in the target vehicle. The first target data includes sensor location information and hydrogen release concentration data.
[0049] Specifically, step S201 includes:
[0050] Step S2011: Obtain the volume data of the target vehicle and the preset target leakage area.
[0051] Specifically, the size of the target vehicle's space and the areas on the vehicle where hydrogen may leak are determined, i.e., the preset target leakage areas, which include hydrogen storage tanks, hydrogen transmission pipelines, and fuel cell stacks.
[0052] Step S2012: Extract a set of leakage scenarios from a preset leakage scenario database. The set of leakage scenarios includes the number of target leakage areas in each leakage scenario and the leakage probability of each target leakage area.
[0053] Specifically, a historical leak scenario database is collected to determine the leak scenario set, which includes the number of leak scenarios and the probability of occurrence of each leak scenario.
[0054] Step S2013: Based on the preset sensor installation principles, volume data, target leakage area and leakage scenario set, determine the hydrogen leakage sensor set. The hydrogen leakage sensor set includes the number of sensors and their spatial location.
[0055] Specifically, the hydrogen leak sensor set is determined based on the principle of installing sensors in the upper half of the area and the leak scenario set. The hydrogen leak sensor set includes the feasible number of sensors and the feasible spatial location of their arrangement.
[0056] Step S2014: Obtain the first target data based on the number of arrangements and their spatial location.
[0057] Specifically, after determining the feasible number and spatial location of the sensors, the actual installation and debugging of the sensors are carried out. Data feedback from the sensors, i.e., the primary target data, is collected by running real-world scenarios. This data includes physical quantities such as the sensor's output voltage and current, as well as possible signal processing results.
[0058] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment, based on the target vehicle's volume data, can more accurately understand the vehicle's internal structure and spatial distribution. This helps determine the suitable locations for installing hydrogen leak sensors to achieve comprehensive monitoring of hydrogen release inside the vehicle. By pre-setting target leak areas, potential leak risk areas can be identified. When determining the hydrogen leak sensor set, these areas can be prioritized to ensure that the sensors can cover these critical areas, improving monitoring coverage. By extracting a leak scenario set from a pre-set leak scenario database, the number of target leak areas and the leak probability of each area for different leak scenarios can be understood. This helps to consider various possible leak scenarios when determining the hydrogen leak sensor set, making the sensor set more adaptable.
[0059] Step S202: Input the first target data into the trained first model to obtain the second target data. The first model is used to perform depthwise separable convolution processing on the first target data.
[0060] Specifically, the trained first model is obtained by training labeled historical leak data, and step S202 above includes:
[0061] Step S2021: Perform tensor quantization on the first target data, and input the tensor quantized first target data into the trained first model.
[0062] Specifically, firstly, hydrogen release concentration data at different leak locations are collected using sensors for model training and testing. The set of sensors installed on the vehicle is set to S, and the number of sensors is n, n≥1. When defining the relative positions of the sensors within the vehicle, the vehicle coordinate system is used as the reference frame. The vehicle coordinate system is a three-dimensional Cartesian coordinate system with the center of the vehicle as the origin, including the X-axis, Y-axis, and Z-axis. The sensor positions are defined as Ls=[Ls1,Ls2,…,Ls…]. n Then, the hydrogen concentration sensor collects the hydrogen concentration at its location in real time, in ppm. During the training phase, the collected hydrogen concentration data is set as X1. X1 is processed into a tensor of shape [batch_size, sequence_length, input_size], where batch_size represents the batch size for model training, sequence_length represents the length of the time series, and input_size represents the dimension of the feature vector at each time point. Each element in this tensor represents a feature vector at a time point. Batch_size and sequence_length are not required, and input_size is equal to the number of sensors n. Simultaneously, the location of the hydrogen leak point is set as X2, and X2 is mapped to the sensor at a single point, forming a [1, n] binary vector. The encoding of each position in this vector is 0 if there is no hydrogen leak at that position, and 1 if there is a hydrogen leak at that position. The model input is defined as follows: Figure 3 As shown. The model's output y is set as a tensor of shape [batch_size, output_size+n], where output_size represents the dimension of the target value predicted by the model. In the hydrogen leak data prediction task, it is necessary to predict the target value of each sensor at the next time point, so output_size is set to n. Additionally, n is the number of sensors, representing the probability of a leak point in the output. During training, the output contains two parts. The first part uses the true value as the target value at the last time point of the input; that is, each element in the output tensor represents the target value predicted by the model at the next time point. The second part outputs the probability P of hydrogen leak at each sensor location of the target vehicle. The larger this value, the higher the model believes that there is a hydrogen leak point in that sensor area. The model output is defined as follows: Figure 4 As shown.
[0063] Step S2022: Perform depth convolution operation on the first target data using the depth convolution layer in the first model to obtain the first convolution data.
[0064] Specifically, depthwise separable convolution operations are used to help extract spatial local information from multiple sensors. First, a depthwise convolutional layer is defined with the number of kernels equal to `input_size`, and each kernel has a size of [1, 1, k], where k is the size of the 1D kernel. A separate spatial convolution is performed on the value of each input channel, such as... Figure 5 As shown, the output of this stage is used as the input of the next stage.
[0065] Step S2023: Perform pointwise convolution operation on the first convolutional data using the pointwise convolutional layer in the first model to obtain the second convolutional data.
[0066] Specifically, such as Figure 6 As shown, a pointwise convolutional layer is defined with the number of kernels input_size, where each kernel has a size of [1, 1, input_size]. The value of each input channel is multiplied by the corresponding kernel weight, and the results of all channels are summed to generate the value at that position in the output tensor. The input tensor X is then processed through the convolutional layer to obtain a new output tensor X. conv .
[0067] Step S2024: Perform batch normalization on the second convolutional data to obtain normalized second convolutional data.
[0068] Specifically, if the size of the input tensor is [batch_size, sequence_length, input_size], then after the convolution operation, the size of the output tensor will become: [batch_size, sequence_length, input_size]. The output X of the convolutional layer... conv Perform batch normalization.
[0069] Step S2025: The normalized second convolutional data is processed by an activation function to obtain the activated second convolutional data.
[0070] Specifically, for the normalized X conv Then, perform activation function processing. Here, you can choose ReLU or other suitable activation functions.
[0071] Step S2026: The activated second convolutional data and the first target data are concatenated to obtain the second target data.
[0072] Specifically, such as Figure 7 As shown, the output tensor X conv Concatenate with the original input tensor X: Concatenate the original input tensor X and the new output tensor Y in the last dimension to form a new input tensor. The size of the concatenated input tensor is [batch_size, sequence_length, 2*input_size].
[0073] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment preprocesses the first target data through tensor quantization to adapt it to the model's input requirements. This preprocessing improves data quality and consistency, reducing the impact of noise and outliers. Deep convolution operations extract deeper features from the first target data. By stacking multiple convolutional layers, complex patterns and correlations in the data can be learned, helping to improve the accuracy and reliability of predictions. Pointwise convolution operations capture local dependencies between adjacent data points, enhancing feature extraction capabilities. This local modeling ability helps the model better understand and process spatial information in the data. Batch normalization accelerates the model's training process and improves its generalization ability. Normalization reduces the differences between different batches of data, making the model more stable and reliable. Activation functions introduce nonlinear characteristics into the model, enabling it to better learn and simulate complex patterns in the data. The selection and processing of activation functions are crucial to the model's performance and expressive power. Concatenating the activated second convolutional data with the first target data achieves multi-source data fusion. This data fusion can comprehensively utilize information from different types of data, improving the model's prediction accuracy and robustness.
[0074] Step S203: Input the second target data into the trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and the predicted leakage probability corresponding to the location information of each sensor based on the second target data.
[0075] Specifically, the second model includes at least one encoder and at least one decoder, which are trained from labeled historical leaked data. Step S203 above includes:
[0076] Step S2031: Input the second target data into the encoder and use the encoder to extract the semantic features of the second target data.
[0077] Specifically, such as Figure 8As shown, the second model includes at least one encoder and at least one decoder, which are trained from labeled historical leaked data. The encoder consists of several layers of multi-head self-attention layers and forward propagation network layers stacked alternately, used to map the input sequence to the hidden space and extract its semantic features.
[0078] Step S2032: Input the semantic features into the decoder and use the decoder to convert the semantic features into a target output sequence. Each element in the target output sequence represents the predicted data for the next time point corresponding to the second target data.
[0079] Specifically, the encoder's output serves as the decoder's input. The decoder, composed of stacked forward propagation network layers, transforms the encoder's output into the target output sequence. In the hydrogen leak data prediction task, it's necessary to predict the target value at the next time point for each sensor; therefore, each element in the output tensor represents the model's predicted target value at the next time point. The overall architecture diagram is as follows: Figure 8 As shown.
[0080] The hydrogen leak early warning and location method for fuel cell vehicles provided in this embodiment can extract semantic features of the second target data through an encoder. These semantic features reflect the inherent laws and patterns of the data, helping the model to more accurately understand and predict the dynamic changes of the data. By inputting the semantic features into the decoder, the decoder can convert these features into the target output sequence. This conversion process can predict the data at the next time point corresponding to the second target data, realizing time series prediction. Using labeled historical leak data to train the encoder and decoder can make full use of the information and patterns in the historical data. This training method allows the model to learn the changing patterns and trends of the data, improving the accuracy and reliability of the prediction. By processing the second target data and converting it into predicted data through the encoder and decoder, the accuracy and real-time response capability of the early warning system can be improved, the decision-making process can be optimized, and the adaptability and practicality of the system can be enhanced. The Transformer uses a self-attention mechanism to capture the dependencies between different positions in the sequence, and the convolution operation can be used to extract local features of the sensor array, effectively capturing the spatiotemporal relationship of the leak point with higher accuracy. The use of advanced Transformer technology instead of traditional sequence models greatly improves the inference speed while ensuring accuracy.
[0081] Step S204: Determine the warning result based on the preset warning threshold and prediction data.
[0082] Specifically, the preset warning thresholds include a concentration threshold and a probability threshold, and step S204 includes:
[0083] Step S2041: Determine the predicted hydrogen release concentration data and predicted leakage probability of each sensor based on the prediction data.
[0084] Specifically, such as Figure 9 As shown, assume that the predicted value at a certain moment is a matrix y of 1*input_size, where y represents the set of predicted concentrations for each sensor. Also assume that the predicted value at a certain moment is a matrix p of 1*n, where p represents the set of probabilities of leakage locations for each sensor position on each vehicle.
[0085] Step S2042: Determine whether to issue an early warning based on the predicted hydrogen release concentration data and concentration threshold.
[0086] Specifically, when the hydrogen concentration in y exceeds a threshold, a hydrogen leak warning and location for the fuel cell vehicle is initiated. In this embodiment, assuming a threshold of 1000 ppm, if the concentration predictions of sensors 2 and 4 exceed the threshold, a warning signal is issued. The location of the hydrogen leak is used as the detection target and incorporated into the transformer model for training.
[0087] Step S2043: Determine the location of the early warning leak point based on the predicted leakage probability and probability threshold.
[0088] Specifically, when a probability value in p is greater than a threshold, the location of the leak can be identified. In this embodiment, assuming the threshold is 0.8, the probability that each sensor area (x=1, y=1, z=2) is a hydrogen leak location is greater than the threshold, while the probability of any other location being a hydrogen leak location is less than the threshold. Therefore, only (x=1, y=1, z=2) is identified as a hydrogen leak location.
[0089] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment innovatively incorporates leak point location information into a deep learning model. The model learns the leak point location information through training data and, based on predicted hydrogen release concentration data and predicted leak probability from various sensors, can finely determine the warning result. This refined warning can better identify the leak point location and provide more specific warning information. By comparing the predicted data with preset concentration and probability thresholds in real time, it can quickly determine whether a warning needs to be issued. This rapid response capability helps to promptly detect potential hydrogen leak risks and reduce potential accident risks. Based on the predicted leak probability and probability threshold, the location of the leak point can be determined. This location function helps to quickly locate and handle the leak source, reducing the potential harm to equipment and personnel. The dual-threshold monitoring method enhances the robustness of the warning system. Even under complex or uncertain environmental conditions, the warning system can maintain relatively stable and reliable warning performance.
[0090] In some optional embodiments, the method further includes: acquiring the true hydrogen release concentration data and the true leakage value at the next time step collected by each sensor; generating a loss function based on the true hydrogen release concentration data, the true leakage value, and the predicted data at the next time step; and using the loss function to calculate the loss value and perform backpropagation to adjust the parameters of the first model and the second model.
[0091] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment generates a loss function by comparing the difference between predicted and actual data. The loss value is then used for backpropagation to adjust model parameters, allowing the model to gradually approximate the actual data and improve prediction accuracy. The calculation of the loss function and backpropagation prevents model overfitting. Overfitting refers to a model performing well on training data but poorly on test data. Adjusting model parameters reduces model complexity and the risk of overfitting. The process of adjusting model parameters using the loss function through backpropagation is essentially an adaptive learning process. This adaptive learning capability enables the model to continuously learn and adapt to new data patterns, improving the intelligence and adaptability of the warning system.
[0092] The loss function is:
[0093]
[0094] Where y represents the actual hydrogen release concentration data collected by the sensor. The second model predicts the hydrogen release concentration from the sensor at the next moment, where p represents the actual leakage value at the sensor location, indicating whether a leak exists. To predict the probability of leakage at each sensor location. The L2 norm represents the prediction error of hydrogen concentration. λ1 and λ2 represent the L2 norm of the error in predicting the location of the leak point, and λ1 and λ2 are the weighting coefficients of the two error components, respectively.
[0095] The hydrogen leak warning and location method for fuel cell vehicles provided in this embodiment takes into account both the hydrogen concentration prediction error and the leak point prediction location error in the loss function, thereby more comprehensively evaluating the prediction accuracy of the model.
[0096] This embodiment also provides a hydrogen leak warning and location device for fuel cell vehicles. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0097] This embodiment provides a hydrogen leak warning and location device for fuel cell vehicles, such as... Figure 10 As shown, it includes:
[0098] The acquisition module 1001 is used to acquire the first target data fed back by various sensors in the target vehicle. The first target data includes sensor location information and hydrogen release concentration data.
[0099] The convolution module 1002 is used to input the first target data into the trained first model to obtain the second target data. The first model is used to perform depthwise separable convolution processing on the first target data.
[0100] Prediction module 1003 is used to input the second target data into the trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and the predicted leakage probability corresponding to the location information of each sensor based on the second target data.
[0101] The early warning module 1004 is used to determine the early warning result based on the preset early warning threshold and the predicted data.
[0102] The hydrogen leak warning and location device for fuel cell vehicles provided in this embodiment firstly monitors the hydrogen release within the target vehicle comprehensively by acquiring feedback data from various sensors, taking into account the location information of the hydrogen concentration. Secondly, depthwise separable convolution can better extract useful features from the first target data, such as the correlation patterns between sensor location information and hydrogen release concentration data. This enhanced feature extraction capability improves the accuracy and reliability of predictions. Depthwise separable convolution processing effectively removes noise and interference from the first target data, improving data purity. This helps reduce the possibility of false alarms and missed alarms, improving the stability of the warning system. Then, the second target data is input into a trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and predicted leakage probability corresponding to the location information of each sensor based on the second target data. Through the processing of the second model, the hydrogen release concentration and leakage probability at each sensor location can be predicted in a refined manner. This refined prediction can provide more specific and accurate warning information, helping to better understand and respond to potential hydrogen leak risks. Finally, the warning result is determined based on a preset warning threshold and the prediction data. The preset warning threshold provides a standardized method to determine the warning result, making the warning judgment more objective and consistent. This helps reduce the impact of human factors or experience dependence on early warning results, addressing the issue that traditional neural networks, which focus on the temporal variation patterns of digital signals from each sensor, tend to overlook spatial variation patterns. For example, in the case of a gas leak, the gas concentration may be higher in some areas than in others. Traditional recurrent neural network models suffer from problems such as vanishing or exploding gradients, failing to adequately handle noise and anomalies in time-series data. In practical applications, this can easily lead to overfitting.
[0103] In some optional implementations, the acquisition module 1001 includes:
[0104] The target leakage area acquisition unit is used to acquire the volume data of the target vehicle and the preset target leakage area.
[0105] The leakage scenario set extraction unit is used to extract leakage scenario sets from a preset leakage scenario database. The leakage scenario set includes the number of target leakage areas in the leakage scenario and the leakage probability of each target leakage area.
[0106] The hydrogen leak sensor set acquisition unit is used to determine the hydrogen leak sensor set based on preset sensor installation principles, volume data, target leak area and leak scenario set. The hydrogen leak sensor set includes the number of sensors and their spatial location.
[0107] The first target data acquisition unit is used to acquire first target data based on the number of arrangements and the spatial location of the arrangements.
[0108] The hydrogen leak warning and location device for fuel cell vehicles provided in this embodiment, based on the target vehicle's volume data, can more accurately understand the vehicle's internal structure and spatial distribution. This helps determine the suitable locations for installing hydrogen leak sensors to achieve comprehensive monitoring of hydrogen release inside the vehicle. By pre-setting target leak areas, potential leak risk areas can be identified. When determining the set of hydrogen leak sensors, these areas can be prioritized to ensure that the sensors can cover these critical areas, improving monitoring coverage. By extracting a set of leak scenarios from a pre-set leak scenario database, the number of target leak areas and the leak probability of each area for different leak scenarios can be understood. This helps to consider various possible leak scenarios when determining the set of hydrogen leak sensors, making the sensor set more adaptable.
[0109] In some alternative implementations, the convolution module 1002 includes:
[0110] Tensor quantization processing unit is used to perform tensor quantization processing on the first target data and input the tensor quantized first target data into the trained first model.
[0111] A depthwise convolutional unit is used to perform a depthwise convolution operation on the first target data using the depthwise convolutional layer in the first model to obtain the first convolutional data.
[0112] The pointwise convolutional unit is used to perform pointwise convolution operations on the first convolutional data using the pointwise convolutional layers in the first model to obtain the second convolutional data.
[0113] The normalization unit is used to perform batch normalization on the second convolutional data to obtain the normalized second convolutional data.
[0114] The activation unit is used to process the normalized second convolutional data through the activation function to obtain the activated second convolutional data.
[0115] The concatenation unit is used to concatenate the activated second convolutional data with the first target data to obtain the second target data.
[0116] The fuel cell vehicle hydrogen leak early warning and location device provided in this embodiment preprocesses the first target data through tensor quantization to adapt it to the model's input requirements. This preprocessing improves data quality and consistency, reducing the impact of noise and outliers. Deep convolution operations extract deeper features from the first target data. By stacking multiple convolutional layers, complex patterns and correlations in the data can be learned, helping to improve the accuracy and reliability of predictions. Pointwise convolution operations capture local dependencies between adjacent data points, enhancing feature extraction capabilities. This local modeling ability helps the model better understand and process spatial information in the data. Batch normalization accelerates the model's training process and improves its generalization ability. Normalization reduces the differences between different batches of data, making the model more stable and reliable. Activation functions introduce nonlinear characteristics into the model, enabling it to better learn and simulate complex patterns in the data. The selection and processing of activation functions are crucial to the model's performance and expressive power. Concatenating the activated second convolutional data with the first target data achieves multi-source data fusion. This data fusion can comprehensively utilize information from different types of data, improving the model's prediction accuracy and robustness.
[0117] In some alternative implementations, the prediction module 1003 includes:
[0118] The input unit is used to input the second target data into the encoder and use the encoder to extract the semantic features of the second target data.
[0119] The feature transformation unit is used to input semantic features into the decoder and use the decoder to transform the semantic features into a target output sequence. Each element in the target output sequence represents the predicted data for the next time point corresponding to the second target data.
[0120] The hydrogen leak warning and location device for fuel cell vehicles provided in this embodiment can extract semantic features of the second target data through an encoder. These semantic features reflect the inherent laws and patterns of the data, helping the model to more accurately understand and predict the dynamic changes of the data. By inputting the semantic features into the decoder, the decoder can convert these features into a target output sequence. This conversion process can predict the data at the next time point corresponding to the second target data, realizing time series prediction. Using labeled historical leak data to train the encoder and decoder can make full use of the information and patterns in the historical data. This training method allows the model to learn the changing patterns and trends of the data, improving the accuracy and reliability of prediction. By processing the second target data and converting it into predicted data through the encoder and decoder, the accuracy and real-time response capability of the warning system can be improved, the decision-making process can be optimized, and the adaptability and practicality of the system can be enhanced. The Transformer uses a self-attention mechanism to capture the dependencies between different positions in the sequence, and the convolution operation can be used to extract local features of the sensor array, effectively capturing the spatiotemporal relationship of the leak point with higher accuracy. The use of advanced Transformer technology instead of traditional sequence models greatly improves the inference speed while ensuring accuracy.
[0121] In some optional implementations, the early warning module 1004 includes:
[0122] The unit for predicting hydrogen release concentration data and predicting leakage probability is used to determine the predicted hydrogen release concentration data and predicted leakage probability of each sensor based on the predicted data.
[0123] The early warning determination unit is used to determine whether to issue an early warning based on the predicted hydrogen release concentration data and concentration threshold.
[0124] The early warning leak point location determination unit is used to determine the location of the early warning leak point based on the predicted leak probability and probability threshold.
[0125] The hydrogen leak warning and location device for fuel cell vehicles provided in this embodiment innovatively incorporates leak point location information into a deep learning model. It learns the leak point location information through training data and, based on predicted hydrogen release concentration data and predicted leak probability from various sensors, can finely determine the warning result. This refined warning can better identify the leak point location and provide more specific warning information. By comparing the predicted data with preset concentration and probability thresholds in real time, it can quickly determine whether a warning needs to be issued. This rapid response capability helps to promptly detect potential hydrogen leak risks and reduce potential accident risks. Based on the predicted leak probability and probability threshold, the location of the leak point can be determined. This location function helps to quickly locate and handle the leak source, reducing the potential harm to equipment and personnel. The dual-threshold monitoring method enhances the robustness of the warning system. Even under complex or uncertain environmental conditions, the warning system can maintain relatively stable and reliable warning performance.
[0126] In some alternative implementations, the hydrogen leak warning and location device for fuel cell vehicles includes:
[0127] The hydrogen release real concentration data and leakage real value acquisition unit is used to acquire the hydrogen release real concentration data and leakage real value collected by each sensor at the next moment.
[0128] The loss function generation unit is used to generate a loss function based on the actual hydrogen release concentration data, the leaked true value, and the predicted data at the next time step.
[0129] The adjustment unit is used to calculate the loss value and perform backpropagation using the loss function, and to adjust the parameters of the first and second models.
[0130] The hydrogen leak warning and location device for fuel cell vehicles provided in this embodiment generates a loss function by comparing the difference between predicted and actual data. The loss value is then used for backpropagation to adjust model parameters, allowing the model to gradually approximate the actual data and improve prediction accuracy. The calculation of the loss function and backpropagation prevents model overfitting. Overfitting refers to a model performing well on training data but poorly on test data. Adjusting model parameters reduces model complexity and the risk of overfitting. The process of adjusting model parameters using the loss function through backpropagation is essentially an adaptive learning process. This adaptive learning capability enables the model to continuously learn and adapt to new data patterns, improving the intelligence and adaptability of the warning system.
[0131] In some alternative implementations, the loss function is:
[0132]
[0133] Where y represents the actual hydrogen release concentration data collected by the sensor. The second model predicts the hydrogen release concentration from the sensor at the next moment, where p represents the actual leakage value at the sensor location, indicating whether a leak exists. To predict the probability of leakage at each sensor location. The L2 norm represents the prediction error of hydrogen concentration. λ1 and λ2 represent the L2 norm of the error in predicting the location of the leak point, and λ1 and λ2 are the weighting coefficients of the two error components, respectively.
[0134] The hydrogen leak warning and location device for fuel cell vehicles provided in this embodiment uses a loss function that comprehensively considers both the hydrogen concentration prediction error and the leak point prediction location error, thereby more comprehensively evaluating the prediction accuracy of the model.
[0135] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0136] In this embodiment, the hardware encryption device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
Claims
1. A method for early warning and positioning of hydrogen leakage of a fuel cell vehicle, characterized in that, The method includes: Acquire first target data fed back by various sensors inside the target vehicle, the first target data including sensor location information and hydrogen release concentration data; The first target data is input into the trained first model to obtain the second target data. The first model is used to perform depthwise separable convolution processing on the first target data. The second target data is input into the trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and the predicted leakage probability corresponding to the location information of each sensor based on the second target data. The warning result is determined based on the preset warning threshold and the predicted data; The acquisition of the first target data fed back by various sensors inside the target vehicle includes: The system acquires the volume data of the target vehicle and a preset target leak area; extracts a leak scenario set from a preset leak scenario database, the leak scenario set including the number of target leak areas in each leak scenario and the leak probability of each target leak area; determines a hydrogen leak sensor set based on preset sensor installation principles, the volume data, the target leak area, and the leak scenario set, the hydrogen leak sensor set including the number and spatial location of each sensor; and acquires the first target data based on the number and spatial location of the sensors. The first trained model is obtained by training labeled historical leaked data; the step of inputting the first target data into the trained first model to obtain the second target data includes: The first target data is subjected to tensor quantization, and the tensor-quantized first target data is input into the trained first model. A depthwise convolutional layer in the first model is used to perform a depthwise convolution operation on the first target data to obtain first convolutional data. A pointwise convolutional layer in the first model is used to perform a pointwise convolution operation on the first convolutional data to obtain second convolutional data. Batch normalization is performed on the second convolutional data to obtain normalized second convolutional data. The normalized second convolutional data is then processed by an activation function to obtain activated second convolutional data. The activated second convolutional data and the first target data are concatenated to obtain the second target data. The second model includes at least one encoder and at least one decoder, which are trained from labeled historical leaked data; the step of inputting the second target data into the trained second model to obtain prediction data includes: The second target data is input into the encoder, and the encoder is used to extract the semantic features of the second target data; the semantic features are input into the decoder, and the decoder is used to convert the semantic features into a target output sequence, wherein each element in the target output sequence represents the predicted data for the next time point corresponding to the second target data.
2. The method according to claim 1, characterized in that, The preset warning thresholds include a concentration threshold and a probability threshold. The process of determining the warning result based on the preset warning threshold and the predicted data includes: Based on the predicted data, the predicted hydrogen release concentration data and predicted leakage probability of each sensor are determined; Whether to issue an early warning is determined based on the predicted hydrogen release concentration data and the concentration threshold. The location of the early warning leak point is determined based on the predicted leak probability and the probability threshold.
3. The method according to claim 1, characterized in that, The method further includes: Acquire the actual hydrogen release concentration data and leakage value collected by each sensor at the next moment; A loss function is generated based on the actual hydrogen release concentration data at the next moment, the actual leakage value, and the predicted data. The loss function is used to calculate the loss value and perform backpropagation to adjust the parameters of the first model and the second model.
4. The method according to claim 3, characterized in that, The loss function is: in, This refers to the actual concentration data of hydrogen release collected by the sensor. The second model predicts the hydrogen release concentration data of the sensor at the next moment. To determine the true leakage value at the sensor location to indicate whether there is a leak. To predict the probability of leakage at each sensor location. The L2 norm represents the prediction error of hydrogen concentration. The L2 norm represents the error in predicting the location of the leak point. and These are the weighting coefficients for the two parts of the error, respectively.
5. A hydrogen leak warning and location device for fuel cell vehicles, characterized in that, The device includes: The acquisition module is used to acquire first target data fed back by various sensors inside the target vehicle. The first target data includes sensor location information and hydrogen release concentration data. The convolution module is used to input the first target data into the trained first model to obtain the second target data. The first model is used to perform depthwise separable convolution processing on the first target data. The prediction module is used to input the second target data into the trained second model to obtain prediction data. The second model is used to determine the predicted hydrogen release concentration data and the predicted leakage probability corresponding to the location information of each sensor based on the second target data. The early warning module is used to determine the early warning result based on the preset early warning threshold and the predicted data; The acquisition module includes: The target leakage area acquisition unit is used to acquire the volume data of the target vehicle and the preset target leakage area; The leakage scenario set extraction unit is used to extract a leakage scenario set from a preset leakage scenario database. The leakage scenario set includes the number of target leakage areas in the leakage scenario and the leakage probability of each target leakage area. A hydrogen leak sensor set acquisition unit is used to determine a hydrogen leak sensor set based on preset sensor installation principles, the volume data, the target leak area, and the leak scenario set. The hydrogen leak sensor set includes the number and spatial location of each sensor. The first target data acquisition unit is used to acquire the first target data based on the number of arrangements and the spatial location of the arrangements; The trained first model is obtained by training labeled historical leaked data; the convolutional module includes: Tensor quantization processing unit performs tensor quantization processing on the first target data and inputs the tensor quantized first target data into the trained first model; A depthwise convolutional unit is used to perform a depthwise convolution operation on the first target data using the depthwise convolutional layer in the first model to obtain the first convolutional data. A pointwise convolutional unit is used to perform pointwise convolution operations on the first convolutional data using the pointwise convolutional layer in the first model to obtain the second convolutional data. The normalization unit is used to perform batch normalization on the second convolutional data to obtain normalized second convolutional data; An activation unit is used to process the normalized second convolutional data through an activation function to obtain activated second convolutional data. The splicing unit is used to splice the activated second convolutional data and the first target data to obtain the second target data; The second model includes at least one encoder and at least one decoder, which are trained from labeled historical leaked data; the prediction module includes: An input unit is used to input the second target data into the encoder and use the encoder to extract the semantic features of the second target data. The feature conversion unit is used to input the semantic features into the decoder and use the decoder to convert the semantic features into a target output sequence, wherein each element in the target output sequence represents the predicted data for the next time point corresponding to the second target data.