Cooling liquid leakage detection method and device based on multi-model fusion and electronic equipment
By fusing multiple models, including the self-attention prediction model Transformer-KAN and the random forest prediction model, the problems of insufficient real-time performance, poor prediction ability, and poor environmental adaptability of existing coolant detection methods are solved, and early prediction and high-precision detection of coolant level are achieved.
Patent Information
- Application Number
- CN202510925888.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Existing coolant detection methods lack real-time performance and predictive capabilities, have poor environmental adaptability, and poor model robustness, making it difficult to distinguish between normal consumption and abnormal leakage, leading to false alarms or missed alarms.
A multi-model fusion approach is adopted, combining the self-attention prediction model Transformer-KAN and the random forest prediction model, with multiple engine operating data to predict coolant level. By transforming the regression problem into a classification problem, the detection efficiency and accuracy are improved.
It enables early prediction of coolant level, improves the real-time performance and accuracy of detection, reduces false alarms and false negatives, and enhances the robustness of the model.
Smart Images

Figure CN120822178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control, and specifically to a coolant leakage detection method, device and electronic equipment based on multi-model fusion. Background Art
[0002] Existing coolant detection methods have the following problems: (1) Insufficient real-time and predictive capabilities. Most of them are passive monitoring, and the alarm is only triggered when the liquid level falls below the threshold. It is impossible to predict the downward trend of the liquid level in advance. For example, the liquid level drop caused by slow leakage or evaporation takes a long time to accumulate before triggering the alarm, which may delay the time for maintenance. (2) Poor environmental adaptability. Mechanical or capacitive sensors are easily affected by coolant components (such as scale and additive corrosion). After long-term use, the accuracy decreases, resulting in false alarms or missed alarms. (3) Poor model robustness. It does not comprehensively consider multi-dimensional data such as engine operating conditions (such as speed, load), ambient temperature, and coolant evaporation rate. It is difficult to distinguish between normal consumption and abnormal leakage, leading to misjudgment. Summary of the Invention
[0003] In view of this, the present application provides a coolant leakage detection method, device and electronic equipment based on multi-model fusion, so as to solve the problem of insufficient engine coolant detection capability in the prior art.
[0004] In a first aspect, an embodiment of the present application provides a coolant leakage detection method based on multi-model fusion, comprising:
[0005] Acquire multiple preset types of engine operating data in real time based on sensors;
[0006] Inputting the engine operating data into a self-attention prediction model Transformer-KAN to obtain a first prediction value;
[0007] Inputting the engine operating data and the first prediction value into a random forest prediction model to obtain a second prediction value;
[0008] The second prediction value continuously output by the random forest prediction model is processed based on a preset false alarm judgment rule to determine a target prediction value, where the target prediction value is used to characterize the liquid level information of the engine coolant.
[0009] In an optional embodiment, the engine operating data includes one or more of the following combinations:
[0010] Time data;
[0011] Water pump speed data;
[0012] Water pump current data;
[0013] Water pump voltage data;
[0014] Water pump power data;
[0015] Engine coolant temperature data.
[0016] In an optional embodiment, before acquiring multiple preset types of engine operating data in real time based on sensors, the method further includes:
[0017] Preprocessing the historically collected training data, the training data including engine operating data and coolant level data, the preprocessing including: deleting abnormal values or performing difference processing;
[0018] Determine the data labels of each training data, and balance the training data under each data label based on the balanced data processing algorithm BorderlineSMOTE;
[0019] Dividing the training data into a training set and a test set;
[0020] Model training is performed based on the training set and the test set to obtain the self-attention prediction model and the random forest prediction model.
[0021] In an optional embodiment, determining the data label of each engine operating data includes:
[0022] Setting a first tag for the engine operating data collected when there is no coolant leakage; or,
[0023] Setting a second tag for the engine operating data collected when the coolant leakage amount is less than the first value; or,
[0024] Setting a third tag for the engine and operating data collected when the coolant leakage amount is between the first value and the second value; or,
[0025] A fourth tag is set for the engine and operating data collected when the coolant leakage amount is between a second value and a third value; wherein the first value is smaller than the second value, and the second value is smaller than the third value.
[0026] In an optional embodiment, before acquiring multiple preset types of engine operating data in real time based on sensors, the method further includes:
[0027] Optimizing the parameters of the random forest prediction model based on the Bayesian optimization algorithm;
[0028] The optimization process includes:
[0029] Set the value range of the random forest prediction model parameters and establish a probabilistic mapping relationship between the parameters and model performance based on the Gaussian process;
[0030] The parameter combination to be evaluated is selected through the expected improvement acquisition function, and the random forest prediction model is trained iteratively and the posterior distribution of the surrogate model is updated.
[0031] After reaching the preset number of iterations, the best performing parameter combination is determined from all evaluation results.
[0032] In an optional embodiment, the processing of the second prediction value continuously output by the random forest prediction model based on a preset false alarm judgment rule to determine the target prediction value includes:
[0033] When the random forest prediction model continuously outputs the same second prediction value and the number of consecutive identical second prediction values exceeds a preset false alarm threshold, the corresponding second prediction value is determined as the target prediction value.
[0034] In an optional embodiment, before acquiring multiple preset types of engine operating data in real time based on sensors, the method further includes:
[0035] Get the maximum delay time allowed by the system;
[0036] determining a sampling frequency range based on the maximum delay time;
[0037] Determine the number of false alarms corresponding to each sampling frequency within the sampling frequency range;
[0038] The maximum sampling frequency for which the number of false alarms is less than the false alarm number threshold is determined as the sampling frequency of the sensor.
[0039] In a second aspect, an embodiment of the present application provides a coolant leakage detection device based on multi-model fusion, comprising:
[0040] An acquisition module, used to acquire various preset types of engine operating data in real time based on sensors;
[0041] a processing module, configured to input the engine operating data into a self-attention prediction model Transformer-KAN to obtain a first prediction value;
[0042] The processing module is further configured to input the engine operating data and the first prediction value into a random forest prediction model to obtain a second prediction value;
[0043] A determination module is used to process the second prediction value continuously output by the random forest prediction model based on a preset false alarm judgment rule to determine a target prediction value, where the target prediction value is used to characterize the liquid level information of the engine coolant.
[0044] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the electronic device is triggered to execute any of the methods described in the first aspect above.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes any one of the methods described in the first aspect.
[0047] Using the solution provided in the embodiment of the present application, multiple preset types of engine operating data are acquired in real time based on sensors; the engine operating data is input into the self-attention prediction model Transformer-KAN to obtain a first prediction value; the engine operating data and the first prediction value are input into the random forest prediction model to obtain a second prediction value; the second prediction value continuously output by the random forest prediction model is processed based on the preset false alarm judgment rule to determine the target prediction value. Due to the need for water level warning, the embodiment of the present application does not require accurate water level prediction, so the engine coolant water level prediction is converted from a regression problem to a classification problem, which facilitates data collection and simple model prediction; using signals such as time, water pump speed, water pump voltage, water pump current, and engine coolant temperature for prediction can improve prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0049] Figure 1 A schematic diagram of a coolant leakage detection method based on multi-model fusion provided in an embodiment of the present application Figure 1 ;
[0050] Figure 2 An example of a coolant leakage detection method based on multi-model fusion provided in an embodiment of the present application Figure 1 ;
[0051] Figure 3An example of a coolant leakage detection method based on multi-model fusion provided in an embodiment of the present application Figure 2 ;
[0052] Figure 4 An example of a coolant leakage detection method based on multi-model fusion provided in an embodiment of the present application Figure 3 ;
[0053] Figure 5 A schematic diagram of a coolant leakage detection method based on multi-model fusion provided in an embodiment of the present application Figure 2 ;
[0054] Figure 6 A schematic structural diagram of a coolant leakage detection device based on multi-model fusion provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0057] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0058] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0059] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.
[0060] Engine coolant circulates within the engine radiator, providing protection against freezing, boiling, rust, and corrosion. To ensure proper engine operation, the coolant level must be monitored to prevent malfunctions caused by coolant leaks. Existing monitoring methods rely on the driver or maintenance personnel regularly visually checking the coolant reservoir's level mark to determine whether refilling is necessary based on whether the level falls below the minimum threshold (MIN line). This manual approach is inefficient and susceptible to errors in ambient light and empirical judgment. Some vehicles use a mechanical float sensor, which triggers a level warning light based on changes in the float's position. However, these sensors are susceptible to coolant impurities, temperature fluctuations, and mechanical wear, leading to false or missed alarms. Some vehicles use electrodes contacting the coolant to measure changes in capacitance or resistance to determine the level. This method, however, has the disadvantage that long-term contact with the coolant can cause electrode corrosion, affecting accuracy. Furthermore, it cannot distinguish between slow leaks and normal consumption. Some vehicles indirectly infer the level by monitoring engine temperature and cooling system pressure changes. However, this method relies on complex mathematical models and lacks sensitivity to sudden or slow leaks. Existing vehicles generally use preset liquid level thresholds to trigger alarms (such as turning on the light when the liquid level falls below the MIN line). However, this method cannot predict the trend of liquid level changes and cannot provide early warning of potential faults (such as slow leakage or water pump failure).
[0061] To address the above problems, an embodiment of the present application provides a coolant leak detection method based on multi-model fusion. After fusing the self-attention prediction model Transformer-KAN and the random forest prediction model, various types of engine operating data are processed and prediction values are output. By converting the regression problem into a classification problem and increasing the data type, both the detection efficiency and the prediction accuracy can be improved.
[0062] Figure 1 A schematic diagram of a coolant leakage detection method based on multi-model fusion provided in an embodiment of the present application Figure 1 The method may be executed by a control unit of a vehicle, such as Figure 1 As shown, the method may include:
[0063] Step 101: Acquire multiple preset types of engine operating data in real time based on sensors.
[0064] Optionally, the engine operating data may include: time data, water pump speed data, water pump current data, water pump voltage data, water pump power data, and engine coolant temperature data. There is a mapping relationship between different engine operating data and coolant levels. The specific mapping relationship is as follows:
[0065] Water pump speed data: When the coolant level decreases, the total amount of liquid in the circulation system decreases, and the water pump needs to run at a higher speed to maintain the same flow rate. An abnormal increase in the water pump speed is an early signal of insufficient liquid level.
[0066] Water pump current data: When the liquid level decreases, cavitation may occur, cavitation bubbles increase, and the load decreases, resulting in a decrease in current. Heat dissipation may also deteriorate, and the motor temperature and resistance increase, resulting in an increase in current. The overall performance is a "V-shaped curve" that first decreases and then increases.
[0067] Water pump voltage data: Abnormal coolant levels trigger system protection mechanisms, leading to voltage regulation. Specifically, a low coolant level triggers overload protection, causing voltage reduction. Voltage sags are a secondary indicator of a coolant crisis. For example, when the coolant level is <40%, the voltage may drop from 24V to 22.5V.
[0068] Water pump power data: As the coolant level drops, the gas content increases, resulting in a decrease in coolant density. This requires increasing the pump power to compensate for the flow rate. Furthermore, cavitation occurs as the level drops, leading to decreased efficiency and also requiring increased pump power.
[0069] Engine coolant temperature data: A drop in coolant level reduces heat capacity, resulting in a faster temperature rise for the same amount of heat absorbed. Furthermore, a drop in coolant level reduces cooling cycle efficiency, potentially leading to localized overheating. Furthermore, a drop in coolant level reduces heat dissipation area, reducing heat exchange capacity.
[0070] In the embodiment of the present application, by acquiring various types of engine operating data, more support can be provided for coolant level prediction and the accuracy of the prediction can be improved.
[0071] Step 102: Input the engine operating data into the self-attention prediction model Transformer-KAN to obtain a first prediction value.
[0072] The self-attention prediction model Transformer-KAN is obtained by fusing the Transformer model and the KAN model. The Transformer model structure is as follows Figure 2 As shown, the input X is converted into a continuous dense vector through the input embedding layer, making it easier for the model to process. Positional encoding generates fixed position encodings using sine and cosine functions (as shown in Formula 1), injecting sequence information into the sequence, allowing the model to perceive the sequence order.
[0073]
[0074] Afterwards, the weighted sum of query (Q), key (K), and value (V) is calculated through Multi-Head Self-Attention (as shown in Formula 2).
[0075]
[0076] Multi-head mechanism: Split Q, K, and V into h heads, calculate them independently, and then concatenate them (as shown in Formula 3).
[0077] MultiHead(Q,K,V)=Concat(head1,…,head h )W o Formula 3
[0078] The multi-head mechanism captures the dependencies at any position in the sequence, dynamically assigns attention weights, and then alleviates the gradient disappearance through residual connections and layer normalization (Add&LayerNorm) and normalizes the feature dimensions of each sample (as shown in Formula 4).
[0079]
[0080] Then, the nonlinear expression ability of the model is enhanced through the feed-forward neural network (FFN) (as shown in Formula 5), and finally the hidden state of the last layer is output through residual connection and layer normalization.
[0081] FFN(x)=ReLU(xW1+b1)W2+b2 Formula 5
[0082] On this basis, the Transformer model is integrated with the KAN model, and its structure is as follows Figure 3 As shown. The Transformer model is connected with residuals and normalized to output the hidden state of the last layer as the input of the KAN model. The feature extraction of the Transformer model and the fitting performance of the KAN model are used to achieve more accurate prediction. The structure of the KAN model is shown as follows Figure 4As shown in Figure 6, its mathematical theoretical basis is that any multivariate continuous function can be decomposed into a two-layer nested superposition of a finite number of single-variable continuous functions. In the KAN model, each activation function accepts input data from upstream and performs a nonlinear transformation. The KAN model, through its hidden layer, performs a weighted summation of the processed input data and the output of the activation function node to ultimately generate the network output. Traditional artificial neural networks apply fixed activation functions (such as ReLU) to neuron nodes, while the KAN model places learnable activation functions on the weight edge. Each "weight" is replaced by a single-variable function (usually parameterized using B-splines). Neurons only perform summation operations, and nonlinear transformations are entirely handled by the activation functions on the edges. This results in better accuracy than traditional artificial neural network structures. The formula is shown in Equation 6: and A univariate function parameterized as a spline; x p is the input feature.
[0083]
[0084] The engine operating data is input into the above-mentioned self-attention prediction model Transformer-KAN, and the model outputs the first prediction value after prediction.
[0085] Step 103: Input the engine operating data and the first prediction value into a random forest prediction model to obtain a second prediction value.
[0086] The engine operating data provides the latest, most direct observational information. The first prediction value is used to represent the complex patterns and dependencies mined by the self-attention prediction model Transformer-KAN from the historical sequence. The second prediction value also contains a strong prior signal. Transformer-KAN has already made a water level prediction based on the historical sequence. The random forest prediction model can use this signal and combine it with other features for adjustment.
[0087] Step 104 : Process the second prediction value continuously output by the random forest prediction model based on a preset false alarm judgment rule to determine a target prediction value, which is used to represent the liquid level information of the engine coolant.
[0088] Optionally, when the random forest prediction model continuously outputs the same second prediction value and the number of consecutive identical second prediction values exceeds a preset false alarm threshold, the corresponding second prediction value is determined as the target prediction value. Taking into account the false alarms predicted by the model, the control unit pre-sets the false alarm threshold. Taking 3 times as an example, when the random forest prediction model outputs the same second prediction value 1, 2 or 3 times in a row, the control unit may regard it as an erroneous warning caused by an abnormal mutation in the engine working environment. When the random forest prediction model continuously outputs the same second prediction value 4 times or more, the control unit may determine it as the target prediction value.
[0089] Based on the coolant level leakage situation, the coolant level can be divided into multiple situations. For example, the first situation is that there is no coolant leakage, the second situation is that the coolant leakage amount is less than the first value, the third situation is that the coolant leakage amount is between the first value and the second value, and the fourth situation is that the coolant leakage amount is between the second value and the third value. The fusion model of the above-mentioned self-attention prediction model Transformer-KAN and the random forest prediction model can be regarded as a classification model. For different input engine operating data, its output result value is any preset coolant level situation.
[0090] In the embodiment of the present application, for the purpose of water level warning, there is no need to accurately predict the water level, so the water level prediction of the engine coolant is converted from a regression problem to a classification problem, which makes data collection convenient and model prediction simple; using signals such as time, water pump speed, water pump voltage, water pump current and engine coolant temperature for prediction can improve the prediction accuracy.
[0091] The training process of the above fusion model can be referred to Figure 5 , specifically including:
[0092] Step 501: pre-process the historically collected training data.
[0093] Each set of training data contains a mapping relationship between engine operating data and coolant level data. The engine operating data is the input data and the coolant level data is the output data, which is used for model training.
[0094] Initially collected training data may contain various issues, such as missing values, outliers, format errors, and duplicate records. Preprocessing is required before use, primarily by removing outliers or performing interpolation. Optionally, outliers can be removed using the interquartile range (IQR) method, and missing values can be filled using cubic spline interpolation.
[0095] Step 502: Determine the data labels of each training data, and perform balancing processing on the training data under each data label based on the balanced data processing algorithm BorderlineSMOTE.
[0096] By setting data labels, the regression problem is converted into a classification problem. Optionally, the label settings may include: setting the first label for the engine operating data collected when there is no coolant leakage, setting the second label for the engine operating data collected when the coolant leakage amount is less than the first value, setting the third label for the engine and operating data collected when the coolant leakage amount is between the first value and the second value, and setting the fourth label for the engine and operating data collected when the coolant leakage amount is between the second value and the third value. Among them, the first value is less than the second value, and the second value is less than the third value. For example, set the label for the original state without coolant leakage as "0", the label for leakage less than 1L of coolant as "1", the label for leakage greater than 1L and less than 1.5L of coolant as "2", and the label for leakage greater than 1.5L and less than 2L of coolant as "..."
[0097] For the problem of data differences between different data labels, the balanced data processing algorithm BorderlineSMOTE can be used to process the training data. This method is an improved oversampling method for class-imbalanced data. Based on the classic Synthetic Minority Oversampling Technique (SMOTE), it generates new samples by focusing on the minority class samples near the boundary, thus more effectively improving the classifier's ability to recognize class boundaries. The following are its core principles and implementation details:
[0098] (1) Identify boundary samples
[0099] For each minority class sample x i , perform the following operations: Calculate the k nearest neighbors of x i (usually using Euclidean distance), count the number m of majority class samples among these k nearest neighbors, and judge the sample type according to m. When k / 2 < m < k, it can be determined as a dangerous sample; when m < k / 2, it can be determined as a safe sample; when m = k, it can be determined as a noise sample. Only oversample the dangerous samples.
[0100] (2) Generate synthetic samples
[0101] For each minority class sample x i marked as a dangerous sample, randomly select a sample x i from the minority neighbors of x zi , and generate a new sample x new . x new = x i+λ(x zi -x i ), λ is a random number in [0,1] that controls the location of generated samples. Repeat the above operation until the balance ratio of the minority class is met.
[0102] Step 503: Divide the training data into a training set and a test set.
[0103] Divide the training data into a training set and a test set according to a certain ratio. For example, divide 80% of the training data into the training set for model training, and divide 20% of the training data into the test set for testing the trained model. Optionally, before dividing the data, the training data needs to be normalized and converted into standardized data. The formula is as follows: x min is the minimum value of the data, x max The maximum value of the data.
[0104] Step 504: Perform model training based on the training set and the test set to obtain a self-attention prediction model and a random forest prediction model.
[0105] The model is trained with engine operating data as input and coolant level data as output, and the performance of the model can be evaluated by accuracy. TP indicates that the data is actually leaked and predicted to be leaked, TN indicates that the data is actually not leaked and predicted to be leaked, FN indicates that the data is actually leaked and predicted to be leaked, and FP indicates that the data is actually not leaked and predicted to be leaked.
[0106] In an optional embodiment, designers can optimize the parameters of the random forest prediction model using a Bayesian algorithm. Specifically, the range of values for the random forest prediction model parameters is set, and a probabilistic mapping relationship between the parameters and model performance is established based on a Gaussian process. The expected lift acquisition function is used to select the parameter combination to be evaluated. The random forest prediction model is iteratively trained and the posterior distribution of the proxy model is updated. After a preset number of iterations is reached, the parameter combination with the best performance is determined from all evaluation results.
[0107] In the embodiments of the present application, the performance of the random forest prediction model is highly dependent on parameter settings (such as the number of trees, splitting criteria, etc.). Traditional grid search or random search has drawbacks such as high computational cost and inability to utilize historical information. Bayesian optimization, on the other hand, guides parameter search by building a probabilistic model, and can find the optimal parameter combination with fewer iterations.
[0108] In an optional embodiment, designers can determine the sensor's sampling frequency based on the system's maximum allowable delay time. Specifically, a sampling frequency range is determined based on the maximum delay time. The number of false alarms corresponding to each sampling frequency within the sampling frequency range is determined. The maximum sampling frequency for which the number of false alarms is less than the false alarm threshold is determined as the sensor's sampling frequency.
[0109] It's understandable that if the sensor sampling frequency is high (e.g., once per second), the model prediction frequency is also high. This can lead to multiple consecutive prediction errors (e.g., three consecutive false alarms of "coolant leak") due to noise, short-term fluctuations, or model errors. This can trigger an alarm, impacting system reliability. If the sampling frequency is reduced (e.g., once every 10 seconds), false alarms will be reduced, but system response latency will increase (e.g., if a coolant leak actually occurs, the system will react more slowly). Designers consider both aspects and determine a reasonable sampling frequency. The specific method is as follows:
[0110] (1) Determine system constraints: Set the maximum latency allowed by the system, T_max (in seconds). This means that the total latency from data collection to result output must satisfy T_total ≤ T_max. Define the maximum number of consecutive false alarms that the service can tolerate, n. This means that an alarm mechanism is triggered when the number of consecutive false alarms exceeds n.
[0111] (2) Determine the initial range of sampling frequency: Based on the delay constraint, calculate the theoretical maximum sampling frequency: f_min = 1 / T_max (unit: Hz), set the initial sampling frequency f (f>f_min), and form the frequency range to be tested [f_min, f].
[0112] Randomly select a sampling frequency in the frequency range to be tested [f_min,f] and count the number of false alarms. The sampling frequency with a false alarm number less than the maximum sampling frequency in n is determined as the sampling frequency of the sensor.
[0113] In the embodiment of the present application, the above method can maximize the data sampling frequency while satisfying the real-time constraints of the system, thereby improving the sensitivity and reliability of the monitoring system.
[0114] Figure 6 This is a schematic diagram of the structure of a coolant leakage detection device based on multi-model fusion provided in an embodiment of the present application. Figure 6 As shown, the device may include:
[0115] The acquisition module 610 is used to acquire various preset types of engine operating data in real time based on sensors.
[0116] The processing module 620 is used to input the engine operating data into the self-attention prediction model Transformer-KAN to obtain a first prediction value.
[0117] The processing module 620 is further configured to input the engine operating data and the first prediction value into a random forest prediction model to obtain a second prediction value.
[0118] The determination module 630 is used to process the second prediction value continuously output by the random forest prediction model based on a preset false alarm judgment rule to determine a target prediction value, where the target prediction value is used to represent the liquid level information of the engine coolant.
[0119] Corresponding to the above embodiments, the present application also provides an electronic device. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 700 may include: a processor 701, a memory 702, and a communication unit 703. These components communicate via one or more buses. Those skilled in the art will understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present application. It can be a bus structure or a star structure, and can also include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0120] The communication unit 703 is configured to establish a communication channel so that the electronic device can communicate with other devices, receive user data sent by other devices, or send user data to other devices.
[0121] The processor 701 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device. It runs or executes software programs, instructions, and / or modules stored in the memory 702, and calls the data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 701 can only include a central processing unit (CPU). In the embodiment of the present application, the CPU can be a single computing core or multiple computing cores.
[0122] The memory 702 is used to store execution instructions of the processor 701. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0123] When the execution instructions in the memory 702 are executed by the processor 701 , the electronic device 700 is enabled to execute part or all of the steps in the above embodiments.
[0124] In a specific implementation, the present application further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps of each embodiment of the coolant leak detection method based on multi-model fusion provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0125] In a specific implementation, the present application also provides a computer program product, wherein the computer program product includes executable instructions. When the executable instructions are executed on a computer, the computer executes some or all of the steps in each embodiment of the coolant leakage detection method based on multi-model fusion provided in the present application.
[0126] An embodiment of the present application also provides a non-temporary computer-readable storage medium, which stores computer instructions. The computer instructions enable the computer to execute the coolant leakage detection method based on multi-model fusion provided in an embodiment of the present application.
[0127] The above-mentioned non-temporary computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (Read Only Memory; hereinafter referred to as: ROM), an erasable programmable read-only memory (ErasableProgrammableRead Only Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0128] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0129] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0130] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solutions in the embodiments of the present application are essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or certain parts of the embodiments.
[0131] In this specification, reference can be made to the same or similar parts between the various embodiments. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims
1. A coolant leakage detection method based on multi-model fusion, characterized in that: include: Acquire multiple preset types of engine operating data in real time based on sensors; Inputting the engine operating data into a self-attention prediction model Transformer-KAN to obtain a first prediction value; Inputting the engine operating data and the first prediction value into a random forest prediction model to obtain a second prediction value; The second prediction value continuously output by the random forest prediction model is processed based on a preset false alarm judgment rule to determine a target prediction value, where the target prediction value is used to characterize the liquid level information of the engine coolant.
2. The method according to claim 1, characterized in that The engine operating data includes one or more of the following: Time data; Water pump speed data; Water pump current data; Water pump voltage data; Water pump power data; Engine coolant temperature data.
3. The method according to claim 1, characterized in that Before acquiring a plurality of preset types of engine operating data in real time based on sensors, the method further includes: Preprocessing the historically collected training data, the training data including engine operating data and coolant level data, the preprocessing including: deleting abnormal values or performing difference processing; Determine the data labels of each training data, and balance the training data under each data label based on the balanced data processing algorithm BorderlineSMOTE; Dividing the training data into a training set and a test set; Model training is performed based on the training set and the test set to obtain the self-attention prediction model and the random forest prediction model.
4. The method according to claim 3, characterized in that The data tags for determining the operating data of each engine include: Setting a first tag for the engine operating data collected when there is no coolant leakage; or, Setting a second tag for the engine operating data collected when the coolant leakage amount is less than the first value; or, Setting a third tag for the engine and operating data collected when the coolant leakage amount is between the first value and the second value; or, A fourth tag is set for the engine and operating data collected when the coolant leakage amount is between a second value and a third value; wherein the first value is smaller than the second value, and the second value is smaller than the third value.
5. The method according to claim 1, wherein Before acquiring a plurality of preset types of engine operating data in real time based on sensors, the method further includes: Optimizing the parameters of the random forest prediction model based on the Bayesian optimization algorithm; The optimization process includes: Set the value range of the random forest prediction model parameters and establish a probabilistic mapping relationship between the parameters and model performance based on the Gaussian process; The parameter combination to be evaluated is selected through the expected improvement acquisition function, and the random forest prediction model is trained iteratively and the posterior distribution of the surrogate model is updated. After reaching the preset number of iterations, the best performing parameter combination is determined from all evaluation results.
6. The method according to claim 1, characterized in that The method of processing the second predicted value continuously output by the random forest prediction model based on a preset false alarm judgment rule to determine a target predicted value includes: When the random forest prediction model continuously outputs the same second prediction value and the number of consecutive identical second prediction values exceeds a preset false alarm threshold, the corresponding second prediction value is determined as the target prediction value.
7. The method according to claim 6, characterized in that Before acquiring a plurality of preset types of engine operating data in real time based on sensors, the method further includes: Get the maximum delay time allowed by the system; determining a sampling frequency range based on the maximum delay time; Determine the number of false alarms corresponding to each sampling frequency within the sampling frequency range; The maximum sampling frequency for which the number of false alarms is less than the false alarm number threshold is determined as the sampling frequency of the sensor.
8. A coolant leakage detection device based on multi-model fusion, characterized in that: include: An acquisition module, used to acquire various preset types of engine operating data in real time based on sensors; a processing module, configured to input the engine operating data into a self-attention prediction model Transformer-KAN to obtain a first prediction value; The processing module is further configured to input the engine operating data and the first prediction value into a random forest prediction model to obtain a second prediction value; A determination module is used to process the second prediction value continuously output by the random forest prediction model based on a preset false alarm judgment rule to determine a target prediction value, where the target prediction value is used to characterize the liquid level information of the engine coolant.
9. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Water quality prediction model training method and device, water quality prediction method and device, equipment and medium
CN113361690A
Water level prediction method based on whale optimization algorithm and long-short term memory network
CN114912673A
Automobile thermal runaway early warning method and device based on random forest and SVM and medium
CN117454259A
Method and system for detecting leakage of hydrogen-doped natural gas pipeline in comprehensive pipe gallery
CN119042546A
Vehicle equipment consumption prediction method and device, model training method and device, computer readable storage medium and electronic equipment
CN119272807A