A battery safety prediction method, device, electronic device and storage medium
By obtaining vehicle driving data and safety information, using the target neural network model optimized by Haiou algorithm to analyze battery safety parameters, the problems of low accuracy of battery safety prediction and high false alarm rate in the existing technology are solved, and more accurate batteries are achieved Safety risk forecasting and early warning improve vehicle safety.
Patent Information
- Application Number
- CN202311478596.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-07
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-11-07
AI Technical Summary
The existing battery safety warning methods are predicted through a single parameter variable, resulting in low prediction accuracy and prone to false alarms, and it is impossible to judge the changing signals of lithium battery safety issues in a timely manner.
By obtaining vehicle driving data and safety information, a preset number of battery safety parameters are extracted and inputted into the pre-trained target neural network model. The weight of the model is determined based on the Haigull algorithm to determine the safety prediction result of the battery.
Improve the accuracy of battery safety prediction, reduce false alarm rate, enhance the network convergence speed and generalization ability, can more accurately predict the safety risk probability of vehicles, provide reliable early warning and guarantee for the safe operation of batteries, and improve Vehicle safety and user experience.
Smart Images

Figure CN117407795B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery management technology, and in particular to a battery safety prediction method, device, electronic equipment and storage medium. Background Art
[0002] With the promotion of energy policies and the guidance of relevant policies such as environmental protection, more and more users are choosing electric vehicles to replace traditional fossil fuel vehicles. At present, most electric vehicles sold in the domestic market use lithium-ion battery systems as the energy driving core of the vehicle. However, in recent years, the number of safety accidents caused by electric vehicles has increased. Therefore, it is necessary to establish a vehicle battery safety early warning system to ensure vehicle safety.
[0003] Existing early warning methods usually make predictions based on a single parameter variable, and their prediction thresholds are relatively simple and fixed, which makes it impossible to timely identify changing signals of safety problems in lithium batteries. The accuracy of battery safety prediction results is low and false alarms are prone to occur. Summary of the invention
[0004] The present invention provides a battery safety prediction method, device, electronic device and storage medium to solve the problem that the battery safety prediction has low accuracy and is prone to false alarms.
[0005] According to one aspect of the present invention, a battery safety prediction method is provided, comprising:
[0006] Acquiring vehicle driving data and safety information, and extracting a preset number of battery safety parameters based on the vehicle driving data and safety information;
[0007] Inputting each of the battery safety parameters into a pre-trained target neural network model, wherein the weight of the target neural network model is determined based on Seagull algorithm optimization;
[0008] The safety prediction result of the battery is determined according to the output result of the target neural network model.
[0009] According to another aspect of the present invention, there is provided a battery safety prediction device, comprising:
[0010] A data acquisition module, used to acquire vehicle driving data and safety information, and extract a preset number of battery safety parameters based on the vehicle driving data and safety information;
[0011] A model prediction module, used for inputting each of the battery safety parameters into a pre-trained target neural network model, wherein the weight of the target neural network model is determined based on the optimization of the Seagull algorithm;
[0012] A prediction result determination module is used to determine the safety prediction result of the battery according to the output result of the target neural network model.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the battery safety prediction method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the battery safety prediction method described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention obtains vehicle driving data and safety information, and extracts a preset number of battery safety parameters based on the vehicle driving data and safety information; inputs each of the battery safety parameters into a pre-trained target neural network model, and the weight of the target neural network model is determined based on the optimization of the Seagull algorithm; determines the safety prediction result of the battery according to the output result of the target neural network model, which solves the problem of low accuracy of battery safety prediction and easy false alarm, and obtains battery safety parameters affecting battery safety by extracting vehicle driving data and safety information. The number of battery safety parameters is a preset number, which solves the problem of low accuracy when a single parameter is predicted and provides accuracy of the prediction result; trains the target neural network model based on the Seagull algorithm to determine the weight of the target neural network model, and inputs each battery safety parameter into the pre-trained target neural network model for safety prediction to obtain the safety prediction result of the battery, thereby improving the convergence speed and accuracy of the network, and the generalization ability of the model is further enhanced, which can more accurately predict the safety risk probability of the vehicle, and provide reliable early warning and guarantee for the safe operation of the battery, so as to timely detect dangers, improve vehicle safety, and further improve user experience.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a battery safety prediction method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 is a flow chart of a battery safety prediction method provided according to Embodiment 2 of the present invention;
[0023] Figure 3 is a schematic diagram of the structure of a target neural network model provided according to the second embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of the structure of a battery safety prediction device provided according to Embodiment 3 of the present invention;
[0025] Figure 5 It is a schematic diagram of the structure of an electronic device for implementing the battery safety prediction method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Embodiment 1
[0029] Figure 1 This is a flowchart of a battery safety prediction method provided in the first embodiment of the present invention. This embodiment is applicable to the case of predicting the safety of a battery. The method can be executed by a battery safety prediction device. The battery safety prediction device can be implemented in the form of hardware and / or software. The battery safety prediction device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0030] S101. Acquire vehicle driving data and safety information, and extract a preset number of battery safety parameters based on the vehicle driving data and safety information.
[0031] In this embodiment, the vehicle driving data can be specifically understood as the data generated during the vehicle driving process, such as the vehicle's mileage, temperature, voltage, current, etc.; the safety information can be specifically understood as information describing the safety of the vehicle or battery, such as whether the vehicle has a fault, the battery health status, etc. The preset number is a predetermined value, and the preset number can be determined based on the correlation between each type of parameter and battery safety, that is, according to the level of correlation between each type of parameter and battery safety, a suitable parameter type is selected, and then the preset number is obtained by statistics. Battery safety parameters can be specifically understood as parameters that affect battery safety.
[0032] Different types of data can be generated during vehicle driving, and each type of data can reflect the vehicle's condition as well as the battery's operating condition. In this embodiment, the vehicle driving process refers to the process from vehicle startup to vehicle shutdown, during which the vehicle can be driven on the road or parked without shutting down. A preset number and the type of data to be acquired are predetermined, and the vehicle driving data and safety information generated during the vehicle driving process are acquired. Data is extracted from the vehicle driving data and safety information according to the predetermined type of the number to be acquired, and data corresponding to the type of data to be acquired is extracted to obtain different types of battery safety parameters, and the number of each battery safety parameter is a preset number.
[0033] S102. Input each battery safety parameter into a pre-trained target neural network model, and the weight of the target neural network model is determined based on Seagull algorithm optimization.
[0034] In this embodiment, the target neural network model can be specifically understood as a pre-trained neural network model, and the target neural network model is a multi-input model.
[0035] Pre-train the target neural network model, obtain training samples, train the model based on the training samples, and continuously adjust the model weights during the training process to obtain the optimal weights as the model weights. The model obtained at this time is the target neural network model, and its weights are the optimal weights. When determining the optimal weights corresponding to the target neural network model, the Seagull algorithm is used to search for the optimal weights. Input each battery safety parameter into the pre-trained target neural network model. The target neural network model weights and predicts each battery safety parameter according to the model weights and other parameters, determines the final prediction results and outputs them.
[0036] S103. Determine the safety prediction result of the battery according to the output result of the target neural network model.
[0037] In this embodiment, the safety prediction result can be specifically understood as information on whether the battery is predicted to be safe, and the safety prediction result can be safe or unsafe.
[0038] The output result of the target neural network model can be safe / unsafe; or information used to indicate whether it is safe, for example, 1 represents safe, 0 represents unsafe, etc.; or the probability of a safety risk occurring in the battery, etc. The output result of the target neural network model is determined. If the output result is safe / unsafe, it can be directly used as the safety prediction result of the battery; if the output result is information used to indicate whether it is safe, it can be converted to safe / safe and used as a safety prediction result; if the output result is the probability of a safety risk occurring in the battery, whether it is safe is determined based on the size of the probability, for example, when the probability is greater than the probability threshold, it is determined to be safe, otherwise, it is unsafe, and the judgment result is used as the safety prediction result, etc.
[0039] After determining the safety prediction result of the battery, if the battery safety prediction result is unsafe, the driver can be reminded through sound alarms, light prompts, etc., or the owner can be reminded through text messages, etc., to avoid vehicle accidents caused by unsafe batteries.
[0040] The battery safety prediction method provided by the embodiment of the present invention obtains vehicle driving data and safety information, and extracts a preset number of battery safety parameters based on the vehicle driving data and safety information; inputs each of the battery safety parameters into a pre-trained target neural network model, and the weight of the target neural network model is determined based on the optimization of the Seagull algorithm; determines the safety prediction result of the battery according to the output result of the target neural network model, which solves the problem that the accuracy of battery safety prediction is low and false alarms are prone to occur, and obtains battery safety parameters that affect battery safety by extracting vehicle driving data and safety information. The number of battery safety parameters is a preset number, which solves the problem of low accuracy when a single parameter is predicted and improves the accuracy of the prediction result; trains the target neural network model based on the Seagull algorithm to determine the weight of the target neural network model, and inputs each battery safety parameter into the pre-trained target neural network model for safety prediction to obtain the safety prediction result of the battery, thereby improving the convergence speed and accuracy of the network, and the generalization ability of the model is further enhanced, which can more accurately predict the safety risk probability of the vehicle, and provide reliable early warning and guarantee for the safe operation of the battery, so as to timely detect dangers, improve vehicle safety, and further improve user experience.
[0041] Embodiment 2
[0042] Figure 2 This is a flow chart of a battery safety prediction method provided in the second embodiment of the present invention. This embodiment is refined on the basis of the above embodiment. Figure 2 As shown, the method includes:
[0043] S201. Acquire at least one candidate battery safety data set, where the candidate battery safety data set includes at least one set of battery safety risk probability and candidate vehicle parameters, and the types of candidate vehicle parameters in each candidate battery safety data set are different.
[0044] In this embodiment, the candidate battery safety data set can be specifically understood as a data set composed of data related to battery safety; the battery safety risk probability can be specifically understood as the probability of a battery safety risk; the candidate vehicle parameters can be specifically understood as vehicle parameters that may affect battery safety. Each candidate battery safety data set includes at least one set of battery safety risk probabilities and candidate vehicle parameters, and a set of battery safety risk probabilities and candidate vehicle parameters are data at the same time; different candidate battery safety data sets include different types of candidate vehicle parameters, such as voltage, current, mileage, temperature, etc. Based on each type of candidate vehicle parameter, the corresponding type of data is obtained respectively, combined with the battery safety risk probability as a set of data, and a candidate battery safety data set is formed based on one or more sets of data.
[0045] S202: Perform correlation analysis on each candidate battery safety data set to determine a preset number of battery safety related factor types.
[0046] In this embodiment, the battery safety related factor type can be specifically understood as the type of parameters that affect battery safety, such as voltage, temperature, etc. Correlation analysis is performed on the data in each candidate battery safety data set respectively. For each candidate battery safety data set, the correlation between the battery safety risk probability and the candidate vehicle parameters of this type is calculated based on one or more groups of battery safety risk probabilities and candidate vehicle parameters included in the data set, and the correlations between the candidate vehicle parameters of each type are compared, and the type of candidate vehicle parameters with higher correlation is selected as the battery safety related factor type.
[0047] As an optional embodiment of this embodiment, this optional embodiment further performs correlation analysis on each candidate battery safety data set to determine a preset number of battery safety related factor types, which are optimized as A1-A3:
[0048] A1. For each candidate battery safety data set, calculate the correlation between the battery safety risk probability and the candidate vehicle parameters.
[0049] Calculating the correlation between the battery safety risk probability and the candidate vehicle parameters can be achieved by calculating the Pearson correlation coefficient, the Spearman correlation coefficient, etc.
[0050] As an optional embodiment of this embodiment, this optional embodiment further optimizes the correlation between the calculation of the battery safety risk probability and the candidate vehicle parameters to B1-B6:
[0051] B1. Calculate the average value of each battery safety risk probability to obtain a first mean value, and calculate the average value of each candidate vehicle parameter to obtain a second mean value.
[0052] In this embodiment, the first mean is the average value of the battery safety risk probability; the second mean is the average value of the candidate vehicle parameters. The average value of each battery safety risk probability is calculated and used as the first mean value; the average value of each candidate vehicle parameter is calculated and used as the second mean value.
[0053] B2. Calculate the difference between each battery safety risk probability and the first mean to obtain a first difference, calculate the difference between each candidate vehicle parameter and the second mean to obtain a second difference, and add the products of each first difference and the corresponding second difference to obtain a product sum.
[0054] In this embodiment, the first difference is the difference between the battery safety risk probability and the first mean; the second difference is the difference between the candidate vehicle parameter and the second mean; and the sum of products is the sum obtained by adding the products.
[0055] For each battery safety risk probability, calculate the difference between the battery safety risk probability and the first mean, use the difference as the first difference, and obtain one or more first differences; for each candidate vehicle parameter, calculate the difference between the candidate vehicle parameter and the second mean, use the difference as the second difference, and obtain one or more second differences; multiply the first difference and the second difference corresponding to the same time, that is, multiply a group of battery safety risk probabilities and the first difference and the second difference corresponding to the candidate vehicle parameters, add the products, and obtain the sum of products.
[0056] B3. Accumulate the squares of the first differences to obtain a first square sum, and take the square root of the first square sum to obtain a first arithmetic square root.
[0057] In this embodiment, the first square sum is a value obtained by performing square and sum operations on the first differences; and the first arithmetic square root is an arithmetic square root obtained by performing square root extraction. The squares of the first differences are calculated, and then the squares of the first differences are added to obtain the first square sum; the first square sum is square rooted, and its arithmetic square root is used as the first arithmetic square root.
[0058] B4. Add the squares of the second differences to obtain a second square sum, and take the square root of the second square sum to obtain a second arithmetic square root.
[0059] In this embodiment, the second square sum is a value obtained by performing square and sum operations on the second differences; and the second arithmetic square root is an arithmetic square root obtained by performing square root extraction. The squares of the second differences are calculated, and then the squares of the second differences are added to obtain the second square sum; the second square sum is square rooted, and its arithmetic square root is used as the second arithmetic square root.
[0060] B5. Multiply the first arithmetic square root and the second arithmetic square root to obtain the square root product.
[0061] B6. Determine the ratio of the product to the square root product as the correlation between the battery safety risk probability and the candidate vehicle parameters.
[0062] Exemplarily, the present application embodiment provides a calculation formula for the correlation between the battery safety risk probability and the candidate vehicle parameters:
[0063]
[0064] Among them, ρ xy is the correlation, n is the number of groups of battery safety risk probability and candidate vehicle parameters included in the candidate battery safety dataset; x i is the safety risk probability of the ith battery, is the first mean; y i is the parameter of the i-th candidate vehicle, is the second mean.
[0065] Pearson correlation coefficient ρ xy The value range is [-1, +1], negative numbers represent negative correlation, positive numbers represent positive correlation, and 0 represents no correlation. The closer the correlation coefficient is to 0, the weaker the correlation; the closer it is to -1 or +1, the stronger the correlation.
[0066] A2. Compare the correlations, and obtain a preset number of correlations in descending order of correlation, and use them as target correlations.
[0067] In this embodiment, the target correlation can be specifically understood as a correlation with a higher degree of correlation. The sizes of the correlations are compared, and the correlations are sorted from high to low, and a preset number of correlations are obtained from high to low. For example, the preset number is equal to N, and N is greater than or equal to 2, and N correlations are selected from high to low as the target correlation.
[0068] A3. Determine the type of the candidate vehicle parameter corresponding to each target correlation as a battery safety-related factor type.
[0069] The types of candidate vehicle parameters corresponding to each target correlation are determined, and N types of candidate vehicle parameters are obtained, which are used as battery safety related factor types.
[0070] S203: Determine a training sample set based on each battery safety-related factor type.
[0071] The data corresponding to each battery safety-related factor type at the same time is obtained respectively as a training sample, and a training sample set is generated based on the multiple training samples.
[0072] As an optional embodiment of this embodiment, this optional embodiment further determines a training sample set based on each battery safety-related factor type and optimizes it into C1-C3:
[0073] C1. Based on each battery safety-related factor type, at least one candidate data set is acquired, where the candidate data set includes candidate data corresponding to different battery safety-related factor types at the same time.
[0074] In this embodiment, the alternative data set can be specifically understood as a data set composed of alternative data; the alternative data can be specifically understood as data used to determine training data, and the alternative data set includes a preset number of alternative data, and each alternative data is data corresponding to different battery safety-related factor types at the same time.
[0075] For each type of battery safety-related factor, different types of alternative data at the same time are obtained to form an alternative data set; alternative data sets at multiple times are obtained to ensure the accuracy of model training.
[0076] C2. Normalize and denoise each candidate data to obtain processed data to be predicted.
[0077] In this embodiment, the data to be predicted can be specifically understood as data used to predict battery safety.
[0078] All candidate data are normalized and denoised. During the processing, data of the same type can be processed uniformly. For example, for candidate data whose battery safety-related factor type is voltage, normalization is first performed using a normalization algorithm and then denoising is performed, or denoising is performed first and then normalization is performed. Denoising can be achieved by filtering with a filter. Through normalization and denoising, the data to be predicted is obtained.
[0079] Exemplarily, the present application embodiment provides a normalized processing formula:
[0080]
[0081] Where x′ is the normalized data, x is the data before normalization, min(x) is the minimum value of the same type of data, and max(x) is the maximum value of the same type of data.
[0082] Exemplarily, the embodiment of the present application performs denoising by using a Savitzky-Golay filter. The Savitzky-Golay filter is based on the principle of polynomial fitting. It smoothes the data by fitting a polynomial in a sliding window. It has the advantage of removing high-frequency noise while retaining data features. The following are the general steps for using the Savitzky-Golay filter to process these battery data:
[0083] (1) First, prepare battery data with uniform sampling intervals, including time series data such as temperature, voltage, current, and temperature difference.
[0084] (2) Choose an appropriate window size. The window size determines the range of the polynomial fit and is usually selected based on the speed of change of the data. Larger windows are suitable for smoothing slowly changing data, while smaller windows are suitable for faster changing data.
[0085] (3) Use the Savitzky-Golay filter to filter each data sequence. The filter will perform polynomial fitting in each window and then take the value of the center point as the smoothed data point.
[0086] (4) After applying the filter, evaluate whether the smoothed data meets the requirements. Make sure that the smoothed data still retains important features while removing unnecessary noise.
[0087] If the filtering effect is not satisfactory, you can try different window sizes and polynomial orders to find the best parameter settings.
[0088] C3. Take each to-be-predicted data corresponding to each candidate data set as a training sample to form a training sample set.
[0089] Each candidate data set in each candidate data set is processed to obtain each data to be predicted as a training sample, that is, each training sample includes data to be predicted corresponding to different battery safety-related factor types at the same time. A training sample set is formed based on each training sample.
[0090] S204: Perform model training based on the training sample set and the Seagull algorithm to obtain a target neural network model.
[0091] The model is trained with the same training sample set. During the model training process, the Seagull algorithm is used to find the optimal weight and obtain the target neural network model.
[0092] As an optional embodiment of this embodiment, this optional embodiment further performs model training based on the training sample set and the Seagull algorithm to obtain a target neural network model, which is optimized as follows:
[0093] D1. Predict each training sample in the training sample set to obtain predicted fitting data.
[0094] In this embodiment, the predicted fitting data can be specifically understood as data obtained through model prediction. The predicted fitting data is battery safety data, which is used to represent the safety level of the battery. The predicted fitting data can be an estimated output value generated by machine learning or statistical models for specific inputs or observations. The estimated output value is obtained by predicting and calculating the model based on known data, that is, the predicted fitting data is the output generated by the model based on the input data and the learned model parameters. The model or algorithm used for prediction is determined in advance, and the training samples are predicted based on the model or algorithm to obtain the predicted fitting data corresponding to each training sample.
[0095] D2. Determine the error parameter based on each predicted fitting data and the corresponding label value.
[0096] In this embodiment, the error parameter can be specifically understood as the error between the predicted data and the label value. The label value is usually pre-marked, and for each predicted fitting data, the difference between the predicted fitting data and the label value is compared, and the error is calculated. The error parameter is determined based on the error corresponding to each predicted fitting data, for example, the average value, median, mean square error, etc. of each error is calculated.
[0097] As an optional embodiment of this embodiment, this optional embodiment further determines the error parameter based on each predicted fitting data and the corresponding label value, and optimizes it to E1-E3:
[0098] E1. The difference between each predicted fitting data and its corresponding label value is taken as the predicted difference.
[0099] In this embodiment, the prediction difference can be specifically understood as the difference between the prediction value and the label value. For each prediction fitting data, the difference between the prediction fitting data and its corresponding label value is calculated, and the difference is used as the prediction difference.
[0100] E2. Square each prediction difference and sum them to obtain the sum of squared errors.
[0101] In this embodiment, the error square sum can be specifically understood as a value obtained by performing square and sum operations on the errors. Each prediction difference value is first squared, and then each square is added to obtain the error square sum.
[0102] E3. The ratio of the sum of squared errors to the number of training samples is determined as the error parameter.
[0103] Exemplarily, the present application embodiment provides a calculation formula for an error parameter:
[0104]
[0105] Among them, MSE is the error parameter, m is the number of training samples, is the i-th prediction fitting data, P i The label value corresponding to the i-th predicted fitting data.
[0106] D3. Determine the optimal number of hidden layers corresponding to the error parameter based on the error parameter and a predetermined error parameter table.
[0107] In this embodiment, the error parameter table can be specifically understood as a data table corresponding to the data related to the error parameter and the number of hidden layers. The number of hidden layers corresponding to different error parameters is determined in advance to form an error parameter table. After the error parameter is determined, the error parameter table is queried to find the optimal number of hidden layers that matches it. For example, the error parameter table stores the number of hidden layers and the error parameter interval, or stores the number of hidden layers and the error parameter, etc.
[0108] As an optional embodiment of this embodiment, this optional embodiment further determines the optimal number of hidden layers corresponding to the error parameter according to the error parameter combined with a predetermined error parameter table, and optimizes it to F1-F3:
[0109] F1. Calculate the difference between the error parameter and each candidate error parameter in the error parameter table.
[0110] In this embodiment, the candidate error parameters can be specifically understood as the error parameters stored in the error parameter table. Each candidate error parameter in the error parameter table is determined, and the difference between the error parameter and each candidate error parameter is calculated.
[0111] F2. Compare the differences and determine the candidate error parameter with the smallest difference as the target error parameter.
[0112] In this embodiment, the target error parameter can be specifically understood as a candidate error parameter that matches the error parameter in the error parameter table. The difference values are compared to determine the candidate error parameter with the smallest difference, and the candidate error parameter is determined as the target error parameter. The candidate error parameter with the smallest difference can be determined by sorting, and the sorting algorithm can be bubble sort, selection sort, insertion sort, etc.
[0113] F3. Determine the number of hidden layers corresponding to the target error parameter as the optimal number of hidden layers.
[0114] Determine the number of hidden layers corresponding to the target error parameter, and determine the number of hidden layers as the optimal number of hidden layers.
[0115] D4. Construct an initial neural network model based on the optimal number of hidden layers.
[0116] In this embodiment, the initial neural network model can be specifically understood as an initially constructed network model, and its model parameters can be assigned initial values.
[0117] The optimal number of hidden layers is used as the number of hidden layers of the neural network model to construct an initial neural network model. The initial neural network model can be a multi-layer feedforward network BP.
[0118] D5. Use the initial weight matrix of the initial neural network model as the initial position of Seagull, find the optimal weight through the Seagull algorithm, and determine the optimal weight as the weight of the target neural network model.
[0119] In this embodiment, the initial weight matrix can be specifically understood as a matrix composed of the weights of the initial neural network model at the beginning. The model is optimized by the seagull algorithm, and the initial weight matrix of the initial neural network model is used as the initial position of the seagull. The optimal seagull individual is found by the seagull algorithm, which is the optimal weight, and the optimal weight is determined as the weight of the target neural network model.
[0120] The steps of Seagull Algorithm (SOA) are:
[0121] The seagull population randomly initializes the position of each seagull using a uniform distribution:
[0122] HS i,j =Lb j +rand×(Ub j -Lb j )
[0123] Among them, Ub j and Lb j are the upper and lower bounds of the j-th dimension domain, respectively, and rand is a random number in the range [0,1] that follows a uniform distribution.
[0124] The seagull algorithm simulates the behavioral characteristics of seagulls during the migration phase, which corresponds to the global search of the algorithm. The algorithm controls the factor f c To calculate the new position of each seagull:
[0125] C s (t) = f c ×HS(t)
[0126] In the formula, C s (t) represents the new position of the seagull without position conflict with other seagulls, HS(t) represents the position of the seagull before migration, and t is the current iteration number. Control factor f c The role of is to adjust the position of the seagulls to avoid collisions between adjacent seagulls. To a certain extent, it can also balance the global search and local search. The calculation formula is as follows:
[0127]
[0128] Where MaxT is the maximum number of iterations of the algorithm. When the current number of iterations t is equal to MaxT, the algorithm ends and outputs the optimal solution. After avoiding collisions with other seagulls, each seagull will determine the direction of the optimal seagull and then move towards the optimal seagull. The direction of the optimal seagull is calculated using the following formula:
[0129] M s (t) = f b ×[HS best (t)-HS(t)]
[0130] Where M s (t) represents the direction of the optimal seagull HS best (t) represents the optimal seagull position. b is the search balance factor, which is expressed as follows:
[0131] f b =2×f c 2 × d
[0132] In the formula, r d is a random number in the range [0,1] that follows a uniform distribution and is used to assign f b Random attributes; f b Subject to random number r d and control factor f c The influence is used to adjust the flight distance of each seagull. After the individual seagulls obtain the direction of the optimal seagull, their distance can be determined by the following formula:
[0133] D S (t)=|C S (t)+M S (t)|
[0134] Where D S (t) represents the distance between the individual seagull and the optimal seagull;
[0135] The description of the attack behavior of the seagull corresponds to the local development of the algorithm. The purpose is to use the history and experience of the algorithm's search process to adjust the search range, thereby improving the algorithm's search accuracy. The attack positions of the seagull are as follows:
[0136] HS(t+1)=D s (t)×x×y×z+HS best (t)
[0137] Where HS(t+1) is the location where the seagulls attack, which saves the optimal solution and updates the positions of other search agents. The positions of the first generation of initial seagulls are random, and the new positions after each iteration are generated by the above formula.
[0138] In the embodiment of the present application, in order to improve the accuracy of the algorithm, the Seagull algorithm is used to optimize the BP neural network. On the basis of the original algorithm, the speed at which the neural network converges to the expected error is further improved, thereby enhancing the global search capability.
[0139] In the process of model training, the embodiment of the present application can also optimize the fitness of the model, and find the minimum error through evolution by utilizing the change of error with the evolutionary generations.
[0140] The target neural network model provided in the embodiment of the present application determines the optimal weight by gradient descent. During the model training process, the training set data is input into the model for training, and a preset error threshold can also be set. When the error is lower than the preset error, the training is stopped, otherwise, the training adjustment is continued. The training samples can also be divided into a test set and a training set, and the prediction results of the model for the test set data are compared with the true value, and an error analysis is performed to calculate whether the accuracy meets the requirements.
[0141] After completing the model training, the battery safety can be predicted in real time by obtaining the target neural network model.
[0142] S205: Acquire vehicle driving data and safety information, and extract a preset number of battery safety parameters based on the vehicle driving data and safety information.
[0143] Optional battery safety parameters include: vehicle region, vehicle usage time, vehicle fault status, vehicle balance status, vehicle usage current, vehicle mileage, maximum temperature, temperature change, temperature difference, temperature dispersion, maximum voltage, voltage difference, voltage change, voltage dispersion, internal short-circuit resistance and battery health status.
[0144] In this embodiment, the vehicle region is the region where the vehicle is currently located; the vehicle usage time is the time from when the vehicle is fully charged to when it is currently in use; whether the vehicle has any faults, and the faults refer to faults related to battery safety; the vehicle balance condition refers to the consistency of the charge state, voltage and capacity among the battery cells in the battery pack in the vehicle, which can be determined by the battery management system BMS; the vehicle usage current refers to the total current that the battery supplies power to the vehicle; the vehicle mileage is the mileage from when the vehicle is fully charged to the current moment; the maximum temperature refers to the maximum temperature from the start time of the vehicle's current use to the current time; the temperature change includes the change in the battery's temperature during use and the change in the temperature during the charging and discharging process; the temperature difference refers to the temperature difference between different parts of the battery; the temperature dispersion refers to the uniformity of the temperature distribution at different positions inside the battery. The lower the temperature dispersion, the more uniform the temperature distribution inside the battery. On the contrary, a higher temperature dispersion indicates a larger temperature difference between different parts of the battery. The highest voltage refers to the highest voltage output by the battery from the start time of the vehicle's use to the current time; voltage changes include changes in the battery's voltage during use and changes in the voltage during charging and discharging; the battery is usually a battery pack composed of multiple sub-batteries, and the voltage difference refers to the voltage difference between different sub-batteries in the battery pack; voltage dispersion refers to the uniformity of the voltage distribution of different sub-batteries in the battery. The lower the voltage dispersion, the more uniform the voltage distribution inside the battery. On the contrary, a higher voltage dispersion means that the voltage difference between different parts of the battery is larger. The battery health status is used to indicate the health of the battery.
[0145] Internal short-circuit resistance refers to the resistance of the short-circuit path that exists inside the battery; this resistance is the resistance of the electrical connection between different components inside the battery (such as battery cells or sub-units in a battery pack), and is usually caused by a fault or damage inside the battery. The internal short-circuit resistance of the battery is not necessarily always caused by a fault or damage. It can have a variety of reasons, including production and manufacturing defects, material aging, external stress or damage, battery charging and discharging, pollution and impurities. It is usually not an absolute zero value because the materials inside the battery have a certain resistance. Under normal circumstances, these resistances are so small that they can be ignored. When an internal short circuit or problem occurs, the resistance value may increase significantly. The size of the internal short-circuit resistance usually depends on the specific cause and extent.
[0146] The above 16 battery safety parameters are divided into external factors and internal factors. Among them, vehicle region, vehicle usage time, whether the vehicle has faults, vehicle balance, vehicle usage current, and vehicle mileage are external factors; maximum temperature, temperature change, temperature difference, temperature discreteness, maximum voltage, voltage difference, voltage change, voltage discreteness, internal short-circuit resistance, and battery health status are internal factors.
[0147] This embodiment provides 16 types of battery safety parameters, and the above-mentioned types of battery safety parameters are battery safety related factor types selected based on correlation. After being selected during the model training process, in the application process of battery safety prediction, the corresponding data can be directly obtained according to the above-mentioned types. At least two of the above-mentioned 16 types of battery safety parameters can also be selected according to the settings.
[0148] S206. Input each battery safety parameter into the pre-trained target neural network model.
[0149] Each battery safety parameter is input into the input layer of the target neural network model, and the hidden layer is imported using the activation function. Taking the battery voltage as an example, the corresponding activation function is:
[0150]
[0151] Among them, m is the number of training samples; w i is the weight of the i-th input data when it passes through the neuron connection; V i is the battery voltage input to the i-th neuron; θ is the threshold.
[0152] For example, Figure 3 A schematic diagram of the structure of a target neural network model is provided. In the activation function, x1, x2…x mis the input data of the first to mth neurons, namely, battery safety parameters, including maximum temperature T, battery voltage V, vehicle current I, etc.; w1, w2…w m is the weight of each input data when passing through the neuron connection; θ is the threshold; y is the activation function after passing through the neuron.
[0153] S207. Determine the safety prediction result of the battery according to the output result of the target neural network model.
[0154] When predicting battery safety parameters through the target neural network model, the sim function can be called for prediction. The sim function performs prediction operations based on the input variables and the optimized target neural network model, and outputs safety prediction results for the battery safety status.
[0155] The battery safety prediction method provided by the embodiment of the present invention solves the problem of low accuracy of battery safety prediction and easy false alarm. It adopts a multi-parameter coupling method to detect the safety status, which can significantly reduce errors, improve the fitting effect, and solve the problem of single parameter variable prediction and relatively fixed prediction threshold; by introducing the Seagull algorithm in the model training process, the convergence speed and accuracy of the network are improved, and the generalization ability of the model is further enhanced, which can more accurately predict the safety risk probability of the vehicle and provide reliable early warning and guarantee for the safe operation of the battery. And by analyzing the correlation between parameters and battery safety, the parameter types with high correlation are selected for model training and prediction, which improves the accuracy of the prediction; by determining the error parameter and selecting the optimal number of hidden layers to construct the model, the model prediction ability is further improved, the false alarm rate is reduced, and the model promotion ability is improved; battery dangers are discovered in time, vehicle safety is improved, and user experience is improved at the same time.
[0156] Embodiment 3
[0157] Figure 4 This is a schematic diagram of the structure of a battery safety prediction device provided by Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a data acquisition module 31, a model prediction module 32 and a prediction result determination module 33.
[0158] The data acquisition module 31 is used to acquire vehicle driving data and safety information, and extract a preset number of battery safety parameters based on the vehicle driving data and safety information;
[0159] A model prediction module 32, used for inputting each of the battery safety parameters into a pre-trained target neural network model, wherein the weight of the target neural network model is determined based on the optimization of the Seagull algorithm;
[0160] The prediction result determination module 33 is used to determine the safety prediction result of the battery according to the output result of the target neural network model.
[0161] The battery safety prediction device provided in the embodiment of the present invention solves the problems of low accuracy in battery safety prediction and prone to false alarms. By extracting vehicle driving data and safety information, battery safety parameters that affect battery safety are obtained. The number of battery safety parameters is a preset number, which solves the problem of low accuracy when a single parameter is predicted and provides accuracy of the prediction result. The target neural network model is trained based on the Seagull algorithm to determine the weight of the target neural network model, and each battery safety parameter is input into the pre-trained target neural network model for safety prediction to obtain a battery safety prediction result, thereby improving the convergence speed and accuracy of the network. The generalization ability of the model has been further enhanced, and it can more accurately predict the safety risk probability of the vehicle, provide reliable early warning and protection for the safe operation of the battery, so as to detect danger in time, improve vehicle safety, and further improve user experience.
[0162] Optionally, the device comprises:
[0163] A candidate data set acquisition module, used to acquire at least one candidate battery safety data set, wherein the candidate battery safety data set includes at least one set of battery safety risk probability and candidate vehicle parameters, and the types of candidate vehicle parameters in each candidate battery safety data set are different;
[0164] A correlation analysis module, used to perform correlation analysis on each of the candidate battery safety data sets to determine a preset number of battery safety related factor types;
[0165] A training set determination module, used to determine a training sample set based on each of the battery safety related factor types;
[0166] The model training module is used to perform model training based on the training sample set and the Seagull algorithm to obtain a target neural network model.
[0167] Optional, correlation analysis module, including:
[0168] A correlation calculation unit, used for calculating the correlation between the battery safety risk probability and the candidate vehicle parameters for each candidate battery safety data set;
[0169] A correlation screening unit, used to compare the correlations, and sequentially obtain a preset number of correlations in descending order of correlations, and use them as target correlations;
[0170] The safety-related type determination unit is used to determine the type of the candidate vehicle parameter corresponding to each of the target correlations as a battery safety-related factor type.
[0171] Optionally, the correlation calculation unit is specifically used to: calculate the average value of each of the battery safety risk probabilities to obtain a first mean, calculate the average value of each of the candidate vehicle parameters to obtain a second mean; calculate the difference between each of the battery safety risk probabilities and the first mean to obtain a first difference, calculate the difference between each of the candidate vehicle parameters and the second mean to obtain a second difference, add the products of each of the first differences and the corresponding second differences to obtain a product sum; add the squares of each of the first differences to obtain a first square sum, take the square root of the first square sum to obtain a first arithmetic square root; add the squares of each of the second differences to obtain a second square sum, take the square root of the second square sum to obtain a second arithmetic square root; multiply the first arithmetic square root and the second arithmetic square root to obtain a square root product; determine the ratio of the product to the square root product as the correlation between the battery safety risk probability and the candidate vehicle parameters.
[0172] Optionally, a training set determination module includes:
[0173] A candidate data set acquisition unit, configured to acquire at least one candidate data set based on each of the battery safety related factor types, wherein the candidate data set includes candidate data corresponding to different battery safety related factor types at the same time;
[0174] A data processing unit, used for normalizing and denoising each of the candidate data to obtain processed data to be predicted;
[0175] The training sample set forming unit is used to take each of the to-be-predicted data corresponding to each candidate data set as a training sample to form a training sample set.
[0176] Optional, model training module, including:
[0177] A prediction and fitting unit, used for predicting each training sample in the training sample set to obtain prediction and fitting data;
[0178] An error parameter determination unit, used to determine an error parameter based on each of the predicted fitting data and the corresponding label value;
[0179] A layer number determination unit, used to determine the optimal hidden layer number corresponding to the error parameter according to the error parameter combined with a predetermined error parameter table;
[0180] An initial model building unit, used to build an initial neural network model based on the optimal number of hidden layers;
[0181] The model weight determination unit is used to use the initial weight matrix of the initial neural network model as the initial position of the seagull, optimize through the seagull algorithm, determine the optimal weight, and determine the optimal weight as the weight of the target neural network model.
[0182] Optionally, the error parameter determination unit is specifically used to: take the difference between each of the predicted fitting data and its corresponding label value as the predicted difference; square and sum each of the predicted differences to obtain the sum of squared errors; and determine the ratio of the sum of squared errors to the number of training samples as the error parameter.
[0183] Optionally, the layer number determination unit is specifically used to: calculate the difference between the error parameter and each candidate error parameter in the error parameter table; compare the differences, and determine the candidate error parameter with the smallest difference as the target error parameter; determine the number of hidden layers corresponding to the target error parameter as the optimal number of hidden layers.
[0184] Optionally, the battery safety parameters include: vehicle region, vehicle usage time, whether the vehicle has any faults, vehicle balance status, vehicle usage current, vehicle mileage, maximum temperature, temperature change, temperature difference, temperature discreteness, maximum voltage, voltage difference, voltage change, voltage discreteness, internal short-circuit resistance and battery health status.
[0185] The battery safety prediction device provided in the embodiment of the present invention can execute the battery safety prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0186] Embodiment 4
[0187] Figure 5 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0188] like Figure 5As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0189] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0190] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a battery safety prediction method.
[0191] In some embodiments, the battery safety prediction method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the battery safety prediction method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the battery safety prediction method in any other appropriate manner (e.g., by means of firmware).
[0192] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0193] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0194] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an 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 foregoing.
[0195] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0196] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0197] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0198] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0199] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A battery safety prediction method, characterized in that: include: Acquiring vehicle driving data and safety information, and extracting a preset number of battery safety parameters based on the vehicle driving data and safety information; Inputting each of the battery safety parameters into a pre-trained target neural network model, wherein the weight of the target neural network model is determined based on Seagull algorithm optimization; Determining a safety prediction result of the battery according to an output result of the target neural network model; The training steps of the target neural network model include: Acquire at least one candidate battery safety data set, the candidate battery safety data set comprising at least one set of battery safety risk probability and candidate vehicle parameters, the candidate vehicle parameters in each of the candidate battery safety data sets being of different types; Performing correlation analysis on each of the candidate battery safety data sets to determine a preset number of battery safety-related factor types; Determine a training sample set based on each of the battery safety related factor types; Perform model training based on the training sample set and the Seagull algorithm to obtain a target neural network model; The performing correlation analysis on each of the candidate battery safety data sets to determine a preset number of battery safety related factor types includes: For each candidate battery safety data set, calculating the correlation between the battery safety risk probability and the candidate vehicle parameters; Comparing the correlations, and sequentially obtaining a preset number of correlations in descending order of correlation, and using them as target correlations; Determining the type of the candidate vehicle parameter corresponding to each of the target correlations as a battery safety related factor type; The calculating the correlation between the battery safety risk probability and the candidate vehicle parameters includes: Calculating the average value of each of the battery safety risk probabilities to obtain a first average value, and calculating the average value of each of the candidate vehicle parameters to obtain a second average value; Calculating the difference between each of the battery safety risk probabilities and a first mean value to obtain a first difference, calculating the difference between each of the candidate vehicle parameters and the second mean value to obtain a second difference, and adding the products of each of the first differences and the corresponding second differences to obtain a product sum; Accumulating the squares of the first differences to obtain a first square sum, and taking a square root of the first square sum to obtain a first arithmetic square root; Accumulate the squares of the second differences to obtain a second square sum, and take a square root of the second square sum to obtain a second arithmetic square root; multiplying the first arithmetic square root and the second arithmetic square root to obtain a square root product; The ratio of the product to the square root product is determined as the correlation between the battery safety risk probability and the candidate vehicle parameter.
2. The method according to claim 1, characterized in that The determining of the training sample set based on each of the battery safety related factor types includes: Based on each of the battery safety-related factor types, acquiring at least one candidate data set, wherein the candidate data set includes candidate data corresponding to different battery safety-related factor types at the same moment; Normalizing and denoising each of the candidate data to obtain processed data to be predicted; Each of the to-be-predicted data corresponding to each candidate data set is taken as a training sample to form a training sample set.
3. The method according to claim 1, characterized in that The model training is performed based on the training sample set and the Seagull algorithm to obtain a target neural network model, including: Predicting each training sample in the training sample set to obtain predicted fitting data; Determine an error parameter based on each of the predicted fitting data and the corresponding label value; Determining the optimal number of hidden layers corresponding to the error parameter according to the error parameter combined with a predetermined error parameter table; Constructing an initial neural network model based on the optimal number of hidden layers; The initial weight matrix of the initial neural network model is used as the initial position of the seagull, and the optimal weight is determined by the seagull algorithm, and the optimal weight is determined as the weight of the target neural network model.
4. The method according to claim 3, characterized in that The determining of the error parameter based on each of the predicted fitting data and the corresponding label value includes: Taking the difference between each predicted fitting data and its corresponding label value as the predicted difference; Square and sum the predicted differences to obtain a square error sum; The ratio of the error sum of squares to the number of training samples is determined as an error parameter.
5. The method according to claim 3, characterized in that: The step of determining the optimal number of hidden layers corresponding to the error parameter according to the error parameter in combination with a predetermined error parameter table includes: Calculating the difference between the error parameter and each candidate error parameter in the error parameter table; Comparing the differences, and determining the candidate error parameter with the smallest difference as the target error parameter; The number of hidden layers corresponding to the target error parameter is determined as the optimal number of hidden layers.
6. The method according to any one of claims 1 to 5, characterized in that: The battery safety parameters include: vehicle region, vehicle usage time, whether the vehicle has faults, vehicle balance status, vehicle usage current, vehicle mileage, maximum temperature, temperature change, temperature difference, temperature dispersion, maximum voltage, voltage difference, voltage change, voltage dispersion, internal short-circuit resistance and battery health status.
7. A battery safety prediction device, which is controlled by the battery safety prediction method according to any one of claims 1 to 6, characterized in that: include: A data acquisition module, used to acquire vehicle driving data and safety information, and extract a preset number of battery safety parameters based on the vehicle driving data and safety information; A model prediction module, used for inputting each of the battery safety parameters into a pre-trained target neural network model, wherein the weight of the target neural network model is determined based on the optimization of the Seagull algorithm; A prediction result determination module is used to determine the safety prediction result of the battery according to the output result of the target neural network model.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the battery safety prediction method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the battery safety prediction method according to any one of claims 1 to 6 when executed.
