New energy battery anti-static foam box flaw detection method based on artificial intelligence
By collecting charge dissipation and surface response data of foam boxes, and using multi-objective threshold optimization and improvement of the support vector machine model of quantum genetic algorithm, the problem of traditional models being unable to adaptively adjust parameters is solved, enabling accurate detection of defects in foam boxes and improving the safety of new energy battery transportation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional support vector machine models cannot adaptively adjust parameters in foam box defect detection, resulting in an inability to accurately capture the subtle differences between internal latent defects and minor surface defects, affecting the accuracy of defect classification and failing to meet the high-precision requirements of new energy battery transportation.
By employing an artificial intelligence-based approach, this method collects charge dissipation and surface response data from foam boxes. It then utilizes a multi-objective threshold optimization method and a support vector machine model based on an improved quantum genetic algorithm, combined with the analytic hierarchy process (AHP), to perform defect classification and risk assessment, thereby achieving accurate detection of defects in foam boxes.
It achieves precise adaptation to the nonlinear relationship between the internal conductive structure and surface response of foam boxes, significantly improving the robustness and accuracy of defect classification, adapting to complex electrostatic response detection scenarios, and ensuring the safety of new energy battery transportation.
Smart Images

Figure CN121744019A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of foam box defect detection technology, specifically to an artificial intelligence-based method for detecting defects in antistatic foam boxes for new energy batteries. Background Technology
[0002] New energy batteries, with their high-efficiency energy storage characteristics, have been widely used in new energy vehicles, energy storage power stations and other fields. As a core protective component in the transportation and storage of batteries, the integrity of the internal conductive path and the integrity of the surface structure directly determine the static dissipation effect, which is a key guarantee to prevent batteries from being damaged by static accumulation.
[0003] Currently, the industry commonly uses support vector machine (SVM) classification method for detecting defects in foam boxes. By collecting charge response data or appearance image features of the foam box and inputting them into the SVM model, defects are distinguished from normal samples by preset fixed parameters, and the defect category of the foam box is output.
[0004] However, the selection of penalty and kernel parameters in traditional support vector machine models often relies on trial and error based on human experience or fixed threshold settings. They lack a global and accurate optimization mechanism based on data features and cannot adaptively adjust the parameter combination according to the complex nonlinear relationship between the defect features of foam boxes and electrostatic response. This results in limited model fitting ability, making it difficult to accurately capture the subtle differences between internal latent defects and surface minor defects, ultimately affecting the accuracy of defect classification and failing to meet the high-precision requirements for foam box defect detection in new energy battery transportation. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an artificial intelligence-based method for detecting defects in antistatic foam boxes for new energy batteries, thereby resolving the problems existing in the background technology.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence, comprising the following steps: Step S1: Collect charge dissipation data of the foam box and preprocess it to obtain a dimension-reduced feature vector. Input the dimension-reduced feature vector into the support vector machine model to output the internal structure deviation score. Use a three-dimensional visualization algorithm to perform feature mapping to obtain a three-dimensional feature map. Step S2: Collect surface response data of the foam box, calculate the optimal threshold by using the multi-objective threshold optimization method, and perform anomaly identification on the surface response data based on the optimal threshold and the three-dimensional feature map to obtain surface anomaly data; Step S3: Construct a fused feature vector based on surface anomaly data, input the fused feature vector into a support vector machine model based on an improved quantum genetic algorithm, and output the defect classification result; Step S4: Collect the status data of the foam box. Based on the defect classification results and the status data, use the analytic hierarchy process (AHP) to perform weighted summation to obtain the risk value of the foam box. Based on the risk value of the foam box, classify the safety level to realize the defect detection of the antistatic foam box for new energy batteries.
[0007] Preferably, the process of collecting and preprocessing the charge dissipation data of the foam box to obtain a dimensionality-reduced feature vector includes the following specific steps: A controllable DC electrostatic excitation was applied to the foam box using an electrostatic generator, and charge dissipation data of the foam box was collected. The charge dissipation data included three types of data: first, the spatial coverage data of charge diffusion. Second, data on the trend of charge dissipation rate. Thirdly, data on charge boundary propagation behavior. All collected data form the original dataset. ,in t represents the three-dimensional spatial coordinates of the foam box, and t represents the time coordinate. A feature mapping network is introduced to perform dimensionality transformation and redundancy removal on the original data. The formula for the feature mapping process is as follows:
[0008] in, The feature mapping matrix, For bias terms, It is the ReLU activation function. It is a low-dimensional feature vector. The feature vector after standardization; For low-dimensional feature vectors Channel-level compression is performed using the following formula:
[0009] in, This is a channel compression matrix. For L2 norm normalization, These are dimensionality-reduced feature vectors; Finally, the dimensionality-reduced feature vectors are obtained.
[0010] Preferably, the specific steps for inputting the dimensionality-reduced feature vector into the support vector machine model and outputting the internal structure deviation score are as follows: The SVM model selects the radial basis function (RBF) as the kernel function, and its expression is:
[0011] in, The output value of the kernel function. , Let be the i-th and j-th dimensionality-reduced feature vectors in the training set, respectively, and g be the kernel parameter. Let i be the squared Euclidean distance between the two feature vectors, and i and j be the sample indices. Under constraints and The training objective of the SVM model is to minimize the structural risk function, as shown in the following formula:
[0012] in, The normal vector of the classification hyperplane, For the bias term of the classification hyperplane, As slack variables, For penalty parameters, Let be the label of the i-th sample. The number of samples; After the model is trained, the dimensionality-reduced feature vectors are input into the support vector machine model to obtain the internal structure deviation score.
[0013] Preferably, the process of collecting surface response data from the foam box and calculating the optimal threshold using a multi-objective threshold optimization method includes the following steps: Surface response data of the foam box is collected, including the following data: surface charge adsorption time. Charge release time Potential decay rate grayscale change rate of surface image Edge gradient Features, forming a surface response dataset ; The surface response data is calculated using a multi-objective threshold optimization method. Three optimization objectives are calculated, and the formula for calculating the boundary domain uncertainty is as follows:
[0014] in, For the number of samples in the boundary domain, Let be the defect probability of the i-th boundary domain sample. For the uncertainty of a single sample, For boundary domain uncertainty; The formula for calculating the size of the domain is as follows:
[0015] in, The total number of samples in the surface response data. For the number of samples in the boundary domain, Size of the boundary; The formula for calculating the misclassification rate of the decision region is as follows:
[0016] in, This represents the number of true positive samples. This represents the number of true negative samples. This represents the number of false positive samples. The number of false negative samples. The misclassification rate for the decision region; The weights of the optimization objective are calculated using the entropy weight method. Based on these weights, the TOPSIS method is used to calculate the optimal threshold.
[0017] Preferably, the step of calculating the optimal threshold using the TOPSIS method based on the weights of the optimization objective includes the following steps: Construct a weighted standardized decision matrix:
[0018] in, For the first The weighted standardized value of the k-th objective under a combination of thresholds. The entropy weight of the k-th target is... For the first The normalized value of the k-th objective under a set of threshold combinations, where k is the index of the optimized objective. For threshold combination indexes; The formulas for calculating the positive ideal solution and the negative ideal solution are as follows:
[0019]
[0020] in, For the positive ideal solution, For a negative ideal solution, For all threshold combinations The maximum value of the corresponding weighted standardized value, for The maximum value of the corresponding weighted standardized value, for The maximum value of the corresponding weighted standardized value, For all threshold combinations The minimum value of the corresponding weighted standardized value, for The minimum value of the corresponding weighted standardized value, for The minimum value of the corresponding weighted standardized value; Calculate the Euclidean distance between each threshold combination and the positive and negative ideal solutions:
[0021]
[0022] in, Let be the distance between the t-th threshold combination and the positive ideal solution. Let be the distance between the t-th threshold combination and the negative ideal solution. Let be the difference between the k-th objective and the positive ideal solution for the t-th threshold combination. Let be the difference between the k-th objective and the negative ideal solution for the t-th threshold combination; Calculate the closeness of each threshold combination :
[0023] in, Proximity of threshold combination ( , ); Select Proximity The combination of the largest thresholds is taken as the optimal threshold.
[0024] Preferably, the step of identifying anomalies in the surface response data based on the optimal threshold and the three-dimensional feature map to obtain surface anomaly data includes the following steps: The internal structure deviation score is mapped to a 3D spatial feature map using a 3D visualization algorithm. The preprocessed surface response data is then input into a trained support vector machine model to obtain the defect probability of each sample. Based on the optimal threshold and the three-dimensional feature map, a joint judgment is made: when If the conductive structure of the corresponding area in the 3D feature map is intact, then the surface layer is considered normal; when ,or Furthermore, if the conductive structure of the corresponding region in the 3D feature map is abnormal, it is determined to be a surface anomaly; when If the sample is not found, it is considered a boundary domain sample, and the surface anomaly data is obtained.
[0025] Preferably, the step of constructing a fused feature vector based on surface anomaly data, inputting the fused feature vector into a support vector machine model based on an improved quantum genetic algorithm, and outputting the defect classification result includes the following specific steps: A fusion feature vector is constructed based on surface anomaly data, and the fusion formula is as follows:
[0026] in, To fuse the weight matrix, To incorporate the bias term, To fuse feature vectors, The three-dimensional spatial feature vector of each detection region, surface response vector ; A support vector machine model based on an improved quantum genetic algorithm is constructed. The fused feature vector is input into the support vector machine model based on the improved quantum genetic algorithm to obtain the defect probability vector. , This represents the probability of a functional defect. For structural defects, This represents the probability of being defect-free. Defect judgment is performed based on defect probability vectors to obtain defect classification results. And the grayscale value of the corresponding region in the 3D feature map If so, it is determined to be a functional defect; when And the surface charge adsorption time If it is, then it is determined to be a structural defect; when or Then, combining the edge gradient of the surface image Further verification: When >0.8 and If it is, then it is determined to be a structural defect; when 0.8 and If so, it is determined to be a functional defect; when If it is, then it is determined to be defect-free.
[0027] Preferably, the construction of the support vector machine model based on the improved quantum genetic algorithm includes the following specific steps: Three major improvement strategies are introduced into the traditional quantum genetic algorithm: crossover evolution, dynamic rotation angle, and quantum convergence gate. The SVM parameters are encoded using qubit encoding. Encode it in the form of ,in , , where are the probability amplitudes of the j-th qubit, and j is the qubit index; The crossover operation formula of the crossover evolution strategy is as follows:
[0028] in, For the j-th qubit of the b-th individual in subpopulation 1, For subpopulation 2 The j-th qubit of an individual Here, b represents the crossed qubits, and b is the individual index. The formula for the dynamic rotation angle is as follows:
[0029]
[0030] in, Let be the rotation angle of the b-th individual. The initial maximum rotation angle, This is the minimum rotation angle in the later stage. This represents the optimal fitness value for the current population. Let be the fitness value of the i-th individual. This is the adjustment coefficient; The quantum convergence gate formula is as follows:
[0031] in, The convergence threshold, , The probability amplitude before correction. , This is the corrected probability amplitude; The fitness function formula for the improved quantum genetic algorithm is as follows:
[0032] in, This represents the number of true positive samples. This represents the number of true negative samples. This represents the number of false positive samples. The number of false negative samples. The fitness function value; By optimizing the parameters of the support vector machine model using an improved quantum genetic algorithm, a support vector machine model based on the improved quantum genetic algorithm is obtained.
[0033] Preferably, the collected foam box status data, based on the defect classification results and the status data, is weighted and summed using the analytic hierarchy process (AHP) to obtain the foam box risk value, specifically: Collect status data of foam boxes, including turnover number, cumulative temperature and humidity exposure value, cumulative stacking pressure, and number of maintenance operations; Construct a risk assessment indicator system, with the target layer R representing the electrostatic safety risk value of the foam box; and the criterion layer... : As a defect characteristic criterion, For dynamic attribute criteria, Internal structural criteria; indicator layer : Defect type Defect severity To standardize the number of turnovers, To standardize the cumulative values of temperature and humidity exposure, To standardize the cumulative stacking pressure value, To standardize the number of repairs, For the integrity of the internal conductive structure; The weights of the indicators are determined using the analytic hierarchy process (AHP), and the formula for calculating the risk value of the foam box is as follows:
[0034] in, For the first The overall weight of each indicator For the first The quantified value of each indicator, Risk value of foam box For indexing indicators.
[0035] Preferably, the method of classifying safety levels based on the risk value of the foam box specifically includes: Security Level I: 3 indicates low risk; Safety Level II: This indicates medium risk; Safety level III: This indicates a high risk.
[0036] This invention provides an artificial intelligence-based method for detecting defects in antistatic foam boxes for new energy batteries, involving machine learning and deep learning technologies, which has the following beneficial effects: (1) The feature mapping repository mechanism can strip away redundant information in charge response data, retain core effective signals while compressing feature dimensions, and combine with multi-objective threshold optimization method to balance classification accuracy and efficiency from multiple dimensions, avoid subjective bias in surface anomaly identification, accurately capture hidden defects such as minor wear and cracks in foam boxes, provide high-quality data support for subsequent classification, and adapt to the complex electrostatic response detection scenario of antistatic foam boxes.
[0037] (2) The defect feature classification algorithm based on SVM can accurately adapt to the nonlinear relationship between the internal conductive structure and the surface response of the foam box. By learning the defect pattern of dual-dimensional fusion data, it can effectively distinguish between functional and structural defects, clarify the relationship between defects and electrostatic dissipation performance, break the limitation of the disconnect between internal structure and surface state in traditional detection, lay a precise classification foundation for the safety risk assessment of foam boxes, and ensure the reliability of the detection results.
[0038] (3) The defect classification algorithm based on IQGA optimized SVM optimizes parameters through strategies such as cross-evolution and dynamic rotation angle on the basis of SVM, which solves the problem that traditional SVM parameter optimization is prone to getting trapped in local optima, and significantly improves the robustness and accuracy of defect classification. It is suitable for the scenario of complex data and diverse defect types in foam box detection, and further reduces the misjudgment rate of the two types of defects. Compared with single SVM classification, it can better adapt to the dynamic needs of actual detection and provide stronger technical support for the safety of new energy battery transportation. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart illustrating the steps of an artificial intelligence-based method for detecting defects in antistatic foam boxes for new energy batteries, as proposed in this invention. Figure 2 This is a step hierarchy diagram of obtaining surface abnormality data in an artificial intelligence-based method for detecting defects in antistatic foam boxes for new energy batteries proposed in this invention. Figure 3 This is a step hierarchy diagram of obtaining the risk value of a foam box in an artificial intelligence-based method for detecting defects in antistatic foam boxes for new energy batteries, as proposed in this invention. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] Please see Figures 1-3 The present invention provides a technical solution: a method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence.
[0043] Step S1: Collect charge dissipation data of the foam box and preprocess it to obtain a dimension-reduced feature vector. Input the compact feature vector into the support vector machine model, output the internal structure deviation score, and use a three-dimensional visualization algorithm to perform feature mapping to obtain a three-dimensional feature map. The charge dissipation data of the foam box was collected and preprocessed to obtain the dimensionality-reduced feature vector. The steps are as follows: First, electrostatic excitation application and response data collection are carried out. Before implementation, the antistatic foam box of new energy batteries needs to be pretreated to remove surface dust, oil stains and other interfering substances to avoid affecting the accuracy of charge transfer and response data.
[0044] Six key areas—the top surface, bottom surface, and four sides—of the foam box were selected as excitation and data acquisition areas. The distance between the edges of each area was no less than 5 cm to ensure that data acquisition in each area did not interfere with each other. A pair of symmetrical metal electrodes (copper material, 0.5 mm thick, 2 cm × 2 cm in area) were placed in each area. The electrodes were tightly attached to the surface of the foam box with uniform pressure (the pressure value was controlled between 0.1 MPa and 0.2 MPa to avoid deformation of the foam box due to excessive pressure or excessive contact resistance due to insufficient pressure). A programmable electrostatic generator was used to apply controllable DC electrostatic excitation. The excitation voltage range was 500 V to 1000 V, which was determined according to the electrostatic dissipation performance test standard of antistatic foam boxes for new energy batteries. The excitation duration was set to 10 s, with the first 3 s being the charge injection stage and the last 7 s being the stable response stage, ensuring that data acquisition covered the complete charge diffusion process.
[0045] During the application of the excitation, charge dissipation data of the foam box is collected. The charge dissipation data includes three types of data: first, the spatial coverage data of charge diffusion. The first method uses a laser rangefinder to record the coordinates of the charge diffusion boundary in three-dimensional space; the second method uses data on the charge dissipation rate trend. The data includes: 1) using an electrostatic voltmeter to record the decay rate of surface potential in each region over time; and 2) data on charge boundary propagation behavior. Using a high-speed camera combined with image recognition technology, the dynamic trajectory of charge diffusion boundaries is captured. All acquired data is stored on a local server at a frequency of 100Hz, forming the raw dataset. ,in t represents the three-dimensional spatial coordinates of the foam box, and t represents the time coordinate.
[0046] Secondly, high-dimensional data transformation and repository compression based on feature mapping networks are performed. Since the original charge response data contains redundant background information such as foam pore structure and surface texture, directly using it for modeling would lead to feature confusion and a surge in computational cost. Therefore, a feature mapping network is introduced to perform dimensionality transformation and redundancy removal on the original data. The feature mapping network adopts an encoder-decoder structure. The encoder consists of 3 convolutional layers (3×3 kernel size, stride 1, padding=1) and 2 fully connected layers, while the decoder consists of 2 fully connected layers and 3 deconvolutional layers. The input to the network is the original dataset. The feature vector after standardization The output is a low-dimensional feature vector. The formula for the feature mapping process is as follows:
[0047] in, This is the feature mapping matrix, trained using normal sample data from defect-free foam boxes. Its element values reflect the association weights between the original features and the target features. This is the bias term, and its value is the mean offset of the original feature vector of the normal samples. It is the ReLU activation function. These are low-dimensional feature vectors.
[0048] Employing a repository mechanism for low-dimensional feature vectors Channel-dimensional compression is performed. The repository consists of a set of feature vectors from normal samples. By calculating the cosine similarity between the input feature vector and the feature vectors in the repository, the most representative feature channels are selected. The compression formula is as follows:
[0049] in, The channel compression matrix is obtained by dimensionality reduction of normal sample features through principal component analysis. L2 norm normalization is used to eliminate differences in characteristic dimensions. These are dimensionality-reduced feature vectors.
[0050] Finally, we obtain the set of dimensionality-reduced feature vectors. .
[0051] Finally, SVM model training and 3D spatial feature map generation were carried out. 300 defect-free foam boxes, verified by both traditional resistance testing and visual inspection (no cracks, no uneven foaming), were selected as training samples. Five sets of charge response data were collected for each sample, resulting in a total of 1500 sets of training data, which constituted the training set for the SVM model. ,in For the label vector, the kernel function of the SVM model is the radial basis function (RBF). There is a nonlinear mapping relationship between charge response characteristics and the state of the conductive structure. The RBF kernel function can effectively fit this nonlinear relationship, and its expression is:
[0052] in, The kernel function output value reflects the similarity between two dimensionality-reduced feature vectors. , ... The squared Euclidean distance between two feature vectors is used to quantify feature differences.
[0053] The training objective of the SVM model is to minimize the structural risk function, as shown in the following formula:
[0054] in, The normal vector of the classification hyperplane, For the bias term of the classification hyperplane, These are slack variables used to tolerate a small number of outlier samples. This is a penalty parameter, with a value ranging from 1 to 10, determined based on the noise level of the training set. Let be the label of the i-th sample. Equations for classifying hyperplanes.
[0055] It should be noted that, This is not the dot product of a vector and a scalar in a strictly mathematical sense, but rather a simplified engineering notation. The simplified logic is as follows: As the normal vector of the classification hyperplane, its practical application is in high-dimensional feature spaces, in the mathematical derivation of kernelized SVM. The equivalent expression in high-dimensional space is: (in For Lagrange multipliers, (For sample labels), this high-dimensional normal vector and the high-dimensional feature vector of the sample to be detected The inner product needs to be transformed using a kernel function. The final result is a scalar. For the sake of simplification, the document uses concise symbols to summarize the core logic of "high-dimensional space inner product → kernel function substitution".
[0056] After model training, the dimensionality-reduced feature vector of the foam box to be detected is input into the SVM model to obtain the internal structure deviation score. The internal structure deviation score reflects the degree of deviation of the conductive pathway in this region from that of normal samples. Then, a three-dimensional visualization algorithm (using the Marching Cubes algorithm) is used to map the internal structure deviation score into a three-dimensional spatial feature map. The three dimensions of this three-dimensional feature map correspond to the spatial coordinates of the foam box, and the gray value of the feature map corresponds to the conductive pathway integrity coefficient (the value ranges from 0 to 255, where 255 represents a complete conductive pathway and 0 represents an interrupted conductive pathway). This visually presents whether there are hidden defects such as dark cracks, conductive particle shedding, and uneven foaming inside the foam box, providing an accurate internal structure benchmark for subsequent surface anomaly identification.
[0057] Step S2: Collect surface response data of the foam box, calculate the optimal threshold by using the multi-objective threshold optimization method, and perform anomaly identification on the surface response data based on the optimal threshold and the three-dimensional feature map to obtain surface anomaly data; The steps for collecting surface response data from the foam box are as follows: First, the pulse electrostatic excitation parameters are configured and the surface response data is collected. Before the excitation is implemented, the six key areas of the foam box determined in step S1 should be used as a reference to ensure that the electrode arrangement position is consistent with step S1, so as to ensure that the excitation area corresponds one-to-one with the internal structure detection area and realize the comparative analysis of the surface response and the internal structure.
[0058] A programmable pulse electrostatic generator is used to apply pulsed electrostatic excitation. The excitation parameters are determined based on the characteristics of the surface material of the antistatic foam box and the sensitivity requirements of the defect response: the pulse peak voltage is set to 300V-800V (lower than the DC excitation voltage in step S1 to avoid excessive excitation that could damage the surface structure, while ensuring that the surface defect area produces a differentiated response), the pulse width is set to 50μs-200μs (determined based on the time characteristics of surface charge adsorption-release to allow sufficient time for the defect area to show the difference in charge accumulation), the pulse repetition frequency is set to 1kHz-5kHz, and the duration of a single area excitation is set to 5s, including 10 pulse cycles, to ensure that the complete dynamic process of the surface charge response is covered.
[0059] During the excitation process, surface response data of the foam box is collected. This surface response data includes the following: surface charge adsorption time is collected using a high-precision electrostatic response sensor. Charge release time Potential decay rate Three types of charge response data; simultaneously, a high-resolution industrial camera with a light source (ring-shaped LED light source to avoid reflection interference) was used to acquire surface image data, and the grayscale change rate of the image was extracted. Edge gradient Features are used to assist in determining surface physical damage. All collected data are stored synchronously by timestamp to form a surface response dataset. Each region corresponds to one set of data, and the number of samples is... The number of testing areas should match the number of foam boxes (6 groups / foam box, for batch testing). =6×N, where N is the number of foam boxes).
[0060] Secondly, surface response data preprocessing is performed. Since the collected charge response data and image feature data have different dimensions and contain device noise, standardization is needed to eliminate the influence of dimensions and suppress noise. The Z-score standardization method is used for the dataset. Each feature dimension in the dataset is processed using the following formula:
[0061] in, Let j be the standardized feature value of the i-th sample. This represents the original value of the j-th feature of the i-th sample in the original surface response data. The mean of the j-th feature is obtained through statistical analysis of 300 normal foam box samples without surface defects. Let be the standard deviation of the j-th feature.
[0062] The optimal threshold is obtained by calculating the surface response data using a multi-objective threshold optimization method, as follows: The three core objective values of the multi-objective optimization are calculated based on the preprocessed surface response data and the SVM model trained in step 1 (only its feature mapping capability is used, without involving the classification result). This allows for the calculation of the three optimization objectives of the TwdMo method, achieving multi-dimensional constraints on threshold selection. Boundary domain uncertainty is used to quantify the degree of classification ambiguity of boundary domain samples. Boundary domain samples refer to surface response data that are difficult to directly classify as "normal" or "abnormal." The lower the uncertainty, the higher the subsequent classification accuracy. The formula for calculating boundary domain uncertainty is as follows:
[0063] in, For the number of samples in the boundary domain, Let be the defect probability of the i-th boundary domain sample. For the uncertainty of a single sample, This represents uncertainty in the boundary domain.
[0064] It should be noted that, The formula is obtained by performing probability mapping on the features of the preprocessed i-th boundary domain sample using the support vector machine model trained in step S1. The significance of this formula is to ensure that the optimized threshold can minimize the proportion of fuzzy samples by statistically analyzing the average uncertainty of the boundary domain samples, thereby improving the certainty of anomaly identification.
[0065] Boundary size is used to control the proportion of samples in the boundary region, avoiding excessive delay in decision-making due to an overly large boundary region, or an increase in misclassification rate due to an overly small boundary region. The formula for calculating the boundary size is as follows:
[0066] in, The total number of samples in the surface response data. This represents the number of samples in the boundary region, ideally ranging from 0.1 to 0.2, determined based on the actual needs of surface defect detection in foam boxes. The size of the boundary.
[0067] The core function of this formula is to balance accurate identification and detection efficiency, and to avoid affecting the practicality of detection due to an imbalance in the proportion of the boundary domain.
[0068] The decision region misclassification rate is used to evaluate the classification accuracy of the positive region (classified as normal) and the negative region (classified as abnormal) at the current threshold. The lower the misclassification rate, the better the threshold. The formula for calculating the decision region misclassification rate is as follows:
[0069] in, This represents the number of true positive samples. This represents the number of true negative samples. This represents the number of false positive samples. The number of false negative samples. The misclassification rate for the decision region.
[0070] It should be noted that a true positive sample is a sample that is actually abnormal but is judged as abnormal, a true negative sample is a sample that is actually normal but is judged as normal, a false positive sample is a sample that is actually normal but is judged as abnormal, and a false negative sample is a sample that is actually abnormal but is judged as normal. Each parameter is obtained by statistical analysis of 100 labeled surface defect samples. The significance of this formula is to ensure that the optimized threshold can effectively reduce the risk of misjudgment and avoid misjudging normal areas as abnormal or abnormal areas as normal.
[0071] Subsequently, the entropy weight method is used to calculate the weights of the optimization objectives, avoiding optimization bias caused by subjective weighting. The entropy weight method determines the weights based on the dispersion of the data; the greater the dispersion, the greater the impact of the objective on threshold optimization. The specific steps are as follows: Since the three objectives have different dimensions, they need to be normalized first, as shown in the following formula:
[0072] in, This is the normalized value for the k-th objective; This is the original value of the k-th target; The minimum value of the k-th target; This represents the maximum value of the k-th target.
[0073] Calculate the weight of the k-th target under the t-th threshold combination:
[0074] in, For the first The proportion of the k-th target under a combination of thresholds For the first The normalized value of the k-th target under a combination of thresholds The total number of threshold combinations. The sum of the normalized values of the k-th target across all threshold combinations, where k is the target index. For threshold combination indexes.
[0075] Calculate the information entropy of the k-th target:
[0076] in, Let the information entropy of the k-th target be , It is the natural logarithm.
[0077] The smaller the information entropy, the greater the dispersion of the target, the more effective information it contains, and the greater its contribution to threshold optimization.
[0078] Calculate the weight of the k-th objective:
[0079] in, The weight of the k-th objective. Information redundancy reflects the effective information content of the target.
[0080] Based on the weights of the optimization objective, the TOPSIS method is used to calculate the optimal threshold. The TOPSIS method selects the threshold combination with the highest closeness to the positive and negative ideal solutions by calculating the closeness of each threshold combination to the positive and negative ideal solutions. The specific steps are as follows: Construct a weighted standardized decision matrix:
[0081] in, For the first The weighted standardized value of the k-th objective under a combination of thresholds. The entropy weight of the k-th target is... For the first The normalized value of the k-th target under a combination of thresholds.
[0082] The purpose of this matrix is to integrate target weights with normalized data to highlight the impact of important targets.
[0083] The formulas for calculating the positive ideal solution and the negative ideal solution are as follows:
[0084]
[0085] in, The positive ideal solution is the optimal combination of values for all objectives. The negative ideal solution is the worst-case combination of all objectives. For all threshold combinations The maximum value of the corresponding weighted standardized value, for The maximum value of the corresponding weighted standardized value, for The maximum value of the corresponding weighted standardized value.
[0086] Calculate the Euclidean distance between each threshold combination and the positive and negative ideal solutions:
[0087]
[0088] in, Let be the distance between the t-th threshold combination and the positive ideal solution. Let be the distance between the t-th threshold combination and the negative ideal solution. Let be the difference between the k-th objective and the positive ideal solution for the t-th threshold combination. It is the difference between the k-th objective and the negative ideal solution of the t-th threshold combination.
[0089] Calculate the closeness of each threshold combination :
[0090] in, The value is the closeness of the threshold combination; the closer it is to 1, the closer the threshold combination is to the positive ideal solution.
[0091] choose The largest combination of thresholds is the optimal threshold. , Experiments have shown that the typical range of optimal threshold values is as follows: The specific value is dynamically adjusted according to the characteristics of the foam box surface material.
[0092] Anomaly identification is performed on the surface response data based on the optimal threshold and the three-dimensional feature map to obtain surface anomaly data. The steps are as follows: The preprocessed surface response data is input into the SVM model trained in step S1 to obtain the defect probability of each sample. The optimal threshold and the three-dimensional spatial feature map from step S1 are combined for joint judgment: if If the conductive structure of the corresponding area in the 3D feature map is intact, then the surface layer is considered normal; if ,or Furthermore, if the conductive structure of the corresponding region in the 3D feature map is abnormal (grayscale value ≤ 50), it is determined to be a surface abnormality. The type of abnormality is determined based on a combination of charge response characteristics and image features (e.g., charge adsorption time extended by > 30 μs and edge gradient > 0.8 indicates a fine crack). If the sample is identified as a boundary domain sample, it needs to be further confirmed by combining the function-structure correlation judgment in step S3. Through this process, the accurate identification of minor surface defects can be achieved, and a comparison can be made with the internal structural state to avoid misjudgment of a surface that is intact but has degraded internal conductivity or a surface that is worn but has intact internal structure.
[0093] Step S3: Construct a fused feature vector based on surface anomaly data, input the fused feature vector into a support vector machine model based on an improved quantum genetic algorithm, and output the defect classification result; The steps for constructing a fused feature vector based on surface anomaly data are as follows: First, a two-dimensional data fusion and labeled dataset construction are performed. The data fusion is based on the core principle of one-to-one spatial correspondence, and the three-dimensional spatial feature vectors of each detection region in step S1 are combined. (i is the region number) and the standardized surface response vector of the corresponding region in step 2 The features are concatenated to obtain the fused feature vector. This achieves information complementarity between the internal structure and the surface response, and the fusion formula is as follows:
[0094] in, The weight matrix is obtained through joint training of defect-free samples and samples with known defect types. This is the fusion bias term, and its value is the mean offset of the fused feature vector. To fuse feature vectors.
[0095] After data fusion, a labeled dataset is constructed. ,in For defect type labels, three-dimensional one-hot encoding is used: , =1 indicates a functional defect (internal conductive path interruption, conductive particle shedding, etc.). =1 indicates a structural defect (minor surface wear, fine cracks, localized peeling, etc.). =1 indicates no defects and only one element is 1 (mutually exclusive label).
[0096] The dataset includes: normal samples of defect-free foam boxes, samples of functionally defective foam boxes, and samples of structurally defective foam boxes, totaling 4200 samples.
[0097] Secondly, an improved quantum genetic algorithm (IQGA) parameter optimization design was developed. Addressing the issues of traditional quantum genetic algorithms (QGA) easily getting trapped in local optima and exhibiting slow convergence speed in SVM parameter optimization, three major improvement strategies were introduced: crossover evolution strategy, dynamic rotation angle, and quantum convergence gate. These strategies achieve globally accurate optimization of the SVM penalty parameter C and kernel parameter g. The specific design is as follows: SVM parameters are encoded using qubits. Encoding is performed, with each parameter corresponding to 10 qubits. The quantum chromosome of a single individual is 20 bits long, in the form of... ,in , These are the probability amplitudes of the j-th qubit. During population initialization, the traditional QGA is abandoned and fixed as follows: The probability amplitude is set by initializing random numbers within the (0,1) interval. , Population size S=30, parameter optimization range is set as follows: Based on the commonly used parameter range of SVM in defect classification, we avoid underfitting due to C being too small or overfitting due to C being too large, and we match the dimensionality characteristics of the fused features to ensure effective mapping of the kernel function.
[0098] To address the issues of insufficient population diversity and susceptibility to local optima in the later stages of traditional QGA (Quick Genetic Alignment), the population was fixedly divided into two independent subpopulations (subpopulation size = 15). Experimental verification showed that this number achieves an optimal balance between gene exchange efficiency and the independent evolutionary effect of the subpopulations, allowing for parallel and independent evolution. When the number of generations reaches the crossover generation... (When the total number of iterations is 1 / 4, ensuring that the genes are exchanged after the subpopulation has fully evolved) 5 excellent individuals with the top 30% fitness in each subpopulation are randomly selected for crossover, with a fixed crossover probability of 0.8 (experiments have verified that when the crossover probability = 0.8, the convergence speed of IQGA is improved by 15% compared to 0.6, and the classification accuracy of the SVM parameters obtained by the final optimization is the highest). That is, each time crossover evolution is triggered, the selected individuals to be crossovered have an 80% probability of performing the crossover operation and a 20% probability of retaining the original individuals. After crossover, the two subpopulations continue to evolve independently. The crossover operation formula is as follows:
[0099] in, For the j-th qubit of the b-th individual in subpopulation 1, For subpopulation 2 The j-th qubit of an individual is the crossed qubit, and b is the individual index.
[0100] By preserving superior genes through linear fusion and introducing new gene combinations, the population can be helped to escape local optima.
[0101] To balance optimization speed and accuracy, a dynamic rotation angle is designed. The formula is as follows: This replaces the fixed rotation angle of the traditional QGA.
[0102]
[0103] in, Let be the rotation angle of the b-th individual. The initial maximum rotation angle is 0.005. , The minimum rotation angle in the later stage is 0.002. The value is determined based on the relationship between the rotation angle and the convergence rate verified by numerous experiments. This represents the optimal fitness value for the current population. Let be the fitness value of the i-th individual. This is the adjustment coefficient.
[0104] To prevent the probability amplitude of a qubit from converging prematurely to 0 or 1 (leading to a loss of population diversity), a quantum convergence gate is introduced to correct the probability amplitude that is close to 0 or 1. The formula is as follows:
[0105] in, The convergence threshold is set to 0.1, determined based on the reasonable distribution range of the quantum bit probability amplitude. , The probability amplitude before correction. , This is the corrected probability amplitude.
[0106] When the probability amplitude of a certain qubit approaches 0 or 1, it is corrected through a quantum convergence gate to preserve the diversity of the population and ensure that the algorithm continues to seek optimization.
[0107] The classification accuracy of SVM on the validation set is used as the fitness function of IQGA, as shown in the following formula:
[0108] in, This represents the number of true positive samples. This represents the number of true negative samples. This represents the number of false positive samples. The number of false negative samples. This is the fitness function value.
[0109] The larger the fitness function value, the better the classification performance of the SVM parameter combination. The optimization goal of IQGA is to maximize this function value.
[0110] Next, IQGA-SVM model training and parameter optimization were performed. The maximum number of generations for IQGA was set to T=200, and the termination condition was set to a fitness value improvement of less than 0.001 for 20 consecutive generations or reaching the maximum number of generations. The training process is as follows: Initialize the population, decode the quantum chromosome of each individual, and obtain the SVM parameters. , using parameters Train the SVM model and calculate the fitness value on the validation set; The probability amplitude of an individual's qubits is updated via a quantum rotation gate (the rotation direction is determined by the fitness difference between the current individual and the best individual: if...). < Rotate towards the direction of the optimal individual; if > While maintaining the current rotation direction, execute the cross-evolution strategy and quantum convergence gate correction until the termination condition is met, and output the optimal parameters corresponding to the individual with the highest fitness value. .
[0111] After the model training is complete, the fused feature vector of the foam box to be detected is input into the trained IQGA-SVM model to obtain the defect probability vector. , This represents the probability of a functional defect. For structural defects, Given the probability of no defects, defect judgment is performed based on the defect probability vector to obtain the defect classification result: like And the grayscale value of the corresponding region in the 3D feature map If the conductive structure is interrupted, it is judged as a functional defect. The cause is the interruption of the internal conductive path or the shedding of conductive particles. It should be marked as a key concern and should be avoided for use in the transportation of highly sensitive batteries. like And the surface charge adsorption time If surface damage leads to charge accumulation, it is determined to be a structural defect. The cause is slight surface wear, fine cracks, or local peeling. It is necessary to assess whether the degree of wear affects the use. like or Then, combining the charge dissipation path integrity in step S1 with the surface image edge gradient in step S2... Further verification: If >0.8 and (If the internal structure is intact but the surface has physical damage), it is considered a structural defect; if 0.8 and If the surface is intact but the internal conductivity is abnormal, it is determined to be a functional defect. like If it is found to be defect-free, it can be used normally for the transportation of new energy batteries.
[0112] It should be noted that the fixed thresholds used for defect classification in this invention are all determined based on statistical analysis and experimental verification of 4200 sets of labeled samples (including samples with no defects, functional defects, and structural defects). The statistics revealed that functional defect samples... Structural defect samples All samples exhibit a concentrated distribution characteristic, with 99.2% of genuine defect samples having a probability value ≥0.9. This threshold effectively eliminates noise interference and ensures the accuracy of defect identification. Samples in the 0.7~0.9 range are mostly "minor defects" or "suspected defects" (such as surface micro-wear or a small amount of internal conductive particles falling off). Among the samples with a probability below 0.7, 89.5% are defect-free samples or false detection signals; therefore, this range is set as a supplementary judgment boundary. Experimental verification shows that the surface charge adsorption time of defect-free foam boxes is ≤25μs, while the adsorption time of samples with structural defects is ≥30μs. This threshold... This threshold serves as the natural dividing point between the two types of samples. 98.5% of functional defect samples (internal conductive path interruption) have a corresponding grayscale value ≤50. This threshold accurately characterizes severe damage to the conductive structure. When structural defects (such as surface wear) do not damage the internal conductive structure, the corresponding grayscale value remains at a high level (≥200). Fine surface cracks and micro-wear lead to a significant increase in the image edge gradient. The edge gradient of defect-free areas is ≤0.6, while the edge gradient of areas with slight structural defects is ≥0.8. This threshold is an effective distinguishing point for surface physical damage.
[0113] Step S4: Collect the status data of the foam box. Based on the defect classification results and the status data, use the analytic hierarchy process (AHP) to perform weighted summation to obtain the risk value of the foam box. Based on the risk value of the foam box, classify the safety level to realize the defect detection of the antistatic foam box for new energy batteries.
[0114] First, the status data of the foam boxes is collected and standardized preprocessed. This status data includes turnover count, cumulative temperature and humidity exposure, cumulative stacking pressure, and maintenance frequency. These data directly affect the defect evolution speed and safety risk level, and need to be collected synchronously from the production management system, environmental sensors, and logistics records. Specifically, it includes four core attributes: Turnover Number of battery loading-transporting-unloading cycles completed in the foam box; cumulative temperature and humidity exposure values. The calculation formula is: ,in, For the first Temperature during the period For the first Humidity during the period For indicator functions, The time interval is 1 hour. Stack pressure accumulation value The calculation formula is ,in, For the first Maximum stacking pressure during the period; number of maintenance operations Number of repairs, cleaning, and other maintenance operations performed.
[0115] The collected data needs to undergo standardization preprocessing to eliminate dimensional differences and outlier interference. The min-max standardization method is used, and the formula is as follows:
[0116] in, Let j be the standardized value of the j-th dynamic attribute of the i-th foam box. Let j be the original value of the dynamic attribute of the i-th foam box. Let j be the minimum value of the j-th dynamic attribute. This represents the maximum value of the j-th dynamic attribute.
[0117] Based on the defect classification results and the aforementioned status data, a weighted summation is performed using the analytic hierarchy process (AHP) to obtain the risk value of the foam box. The steps are as follows: A risk assessment indicator system was constructed, and the analytic hierarchy process (AHP) was used to determine the indicator weights. The indicator system is divided into three layers: the target layer (static electricity safety risk level of foam boxes), the criterion layer (3 types of core criteria), and the indicator layer (7 specific indicators). The specific structure is as follows: Target layer R: Electrostatic safety risk value of foam box (quantifying the degree of risk, used for level classification); Criterion layer : Defect characteristic criteria (weight) ), For dynamic attribute criteria (weights) ), Internal structure criteria (weights) ); Indicator layer : The defect type is 1 for functional defects, 0.6 for structural defects, and 0 for no defects. Defect severity (quantified by the percentage of defect area). To standardize the number of turnovers, To standardize the cumulative values of temperature and humidity exposure, To standardize the cumulative stacking pressure value, To standardize the number of repairs, The integrity of the internal conductive structure (the normalized value of the grayscale value of the three-dimensional feature map in step S1).
[0118] The weights of each indicator are determined using the analytic hierarchy process (AHP). The specific steps are as follows: Constructing a judgment matrix: Ten safety engineering experts and five foam box production technicians were invited to score the relative importance of the criterion layer and the indicator layer using a 1-9 scale (1 = equally important, 3 = slightly important, 5 = significantly important, 7 = very important, 9 = extremely important, with 2 / 4 / 6 / 8 as median values). This resulted in the construction of a criterion layer judgment matrix. Judgment matrix of indicator layer (in the guidelines) Down), (in the guidelines) Down), (in the guidelines) Down).
[0119] Find the largest eigenvalue of the judgment matrix using the eigenvalue method. The weights are obtained by normalizing the corresponding feature vectors. Taking the criterion layer as an example, the calculation process is as follows: Calculate the product of each row of the judgment matrix. Calculate the cube root of the product in each row. Normalization yields the criterion layer weights. , For the corresponding criterion weights, For criteria index.
[0120] To ensure the reasonableness of the weights, a consistency index is calculated. To determine the matrix order, the consistency ratio CR is calculated using the random consistency index RI (RI = 0.52 for a 3-order matrix). The requirement is that CR < 0.1; otherwise, the judgment matrix needs to be reconstructed.
[0121] The initial comprehensive weights are finally obtained. .
[0122] The initial index layer comprehensive weights calculated by the analytic hierarchy process are normalized and corrected using the following formula:
[0123] in, For the first The initial comprehensive weight of each indicator, The sum of the initial comprehensive weights of the 7 indicators. For the first The overall weight of each indicator.
[0124] After correction, it is necessary to verify whether the sum of weights satisfies the constraint of approximating 1, with an allowable error threshold of [value missing]. If the sum of weights is within the allowable error threshold, it means that the normalization is effective; otherwise, the AHP judgment matrix construction and calculation process needs to be re-examined, corrected, and normalized again.
[0125] Next, the risk value is calculated and the safety level is classified. The risk value R of the foam box is calculated using a weighted summation model, taking into account the influence of all indicators. The formula for calculating the risk value of the foam box is as follows:
[0126] in, For the first The overall weight of each indicator For the first The quantified value of each indicator, Risk value of foam box For indexing indicators.
[0127] Three safety levels were defined based on the risk value R. The threshold for each level was determined through statistical analysis of the risk values of 1000 foam box samples and correlation analysis of safety incidents (referencing the safety standard for the transportation of new energy batteries GB / T30038-2013). Safety Level I (Low risk, permitted for transporting power battery cells): 3. At this point, the impact of defects is minimal, the dynamic properties are in good condition, the internal conductive structure is intact, and there are no electrostatic safety hazards. Safety Level II (Medium Risk, permitted only for handling low-sensitivity materials): At this point, there are slight structural defects or low-level functional defects, or the dynamic properties are close to the design limit, and the electrostatic dissipation performance is slightly reduced, making it unsuitable for highly sensitive power cells. Security Level III (High Risk, Completely Prohibited and Mandatory Disposal): At this point, there is a serious functional defect (internal conductive path interruption) or the foam box status data far exceeds the design limit, and the risk of static electricity accumulation is extremely high, which may lead to cell breakdown or BMS component damage.
[0128] Finally, precise and executable usage restriction policies are generated. Based on security levels and quantitative indicators, differentiated and implementable usage restrictions are formulated, as follows: Safety Level I: Permitted for the transportation and storage of all types of new energy batteries (single cells, modules, PACKs); requires surface cleaning and resistance testing every 50 cycles; a green safety and usability label must be affixed, indicating the next maintenance time.
[0129] Safety Level II: Only permitted for handling of low-sensitivity materials (such as battery packaging materials and non-energized components), and prohibited from contact with power cells; temperature and humidity must be controlled between 10℃ and 40℃ and 30% and 70% during transportation, and stacking pressure must not exceed 0.8MPa; surface static dissipation rate must be tested with a portable electrostatic tester before each use; a yellow restricted use label must be affixed, clearly indicating the restricted purpose and conditions of use.
[0130] Safety Level III: Completely prohibited from use in any transportation, storage, or turnover scenarios related to new energy batteries; immediately initiate the scrapping process for dismantling and recycling (conductive particles and foam substrate are separated and recycled); the system automatically marks it as mandatory scrapping and synchronizes it to the production management system, prohibiting its reuse in the warehouse; affix a red prohibition label and indicate the reason for scrapping.
[0131] Furthermore, based on the above method embodiments, the present invention also provides an apparatus, including a memory, a processor, and a computer program stored in the memory, which is adapted to be loaded and executed by the processor to implement the above-described artificial intelligence-based method for detecting defects in antistatic foam boxes for new energy batteries.
[0132] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, the phrase "comprising an element defined as..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0133] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence, characterized in that: Includes the following steps: Step S1: Collect charge dissipation data of the foam box and preprocess it to obtain a dimension-reduced feature vector. Input the dimension-reduced feature vector into the support vector machine model to output the internal structure deviation score. Use a three-dimensional visualization algorithm to perform feature mapping to obtain a three-dimensional feature map. Step S2: Collect surface response data of the foam box, calculate the optimal threshold by using the multi-objective threshold optimization method, and perform anomaly identification on the surface response data based on the optimal threshold and the three-dimensional feature map to obtain surface anomaly data; Step S3: Construct a fused feature vector based on surface anomaly data, input the fused feature vector into a support vector machine model based on an improved quantum genetic algorithm, and output the defect classification result; Step S4: Collect the status data of the foam box. Based on the defect classification results and the status data, use the analytic hierarchy process (AHP) to perform weighted summation to obtain the risk value of the foam box. Based on the risk value of the foam box, classify the safety level to realize the defect detection of the antistatic foam box for new energy batteries.
2. The method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence according to claim 1, characterized in that: The process of collecting and preprocessing the charge dissipation data of the foam box to obtain a dimensionality-reduced feature vector includes the following specific steps: A controllable DC electrostatic excitation was applied to the foam box using an electrostatic generator, and charge dissipation data of the foam box was collected. The charge dissipation data included three types of data: first, the spatial coverage data of charge diffusion. ; Second, data on the trend of charge dissipation rate. ; Third, data on charge boundary propagation behavior. All collected data form the original dataset. ,in t represents the three-dimensional spatial coordinates of the foam box, and t represents the time coordinate. A feature mapping network is introduced to perform dimensionality transformation and redundancy removal on the original data. The formula for the feature mapping process is as follows: ; in, The feature mapping matrix, For bias terms, () is the ReLU activation function. It is a low-dimensional feature vector. The feature vector after standardization; For low-dimensional feature vectors Channel-level compression is performed using the following formula: ; in, This is a channel compression matrix. For L2 norm normalization, These are dimensionality-reduced feature vectors; Finally, the dimensionality-reduced feature vectors are obtained.
3. The method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence according to claim 2, characterized in that: The specific steps for inputting the dimensionality-reduced feature vector into the support vector machine model and outputting the internal structure deviation score are as follows: The SVM model selects the radial basis function (RBF) as the kernel function, and its expression is: ; in, The output value of the kernel function. , Let be the i-th and j-th dimensionality-reduced feature vectors in the training set, respectively, and g be the kernel parameter. Let i be the squared Euclidean distance between the two feature vectors, and i and j be the sample indices. Under constraints and The training objective of the SVM model is to minimize the structural risk function, as shown in the following formula: ; in, The normal vector of the classification hyperplane, For the bias term of the classification hyperplane, As slack variables, For penalty parameters, Let be the label of the i-th sample. The number of samples; After the model is trained, the dimensionality-reduced feature vectors are input into the support vector machine model to obtain the internal structure deviation score.
4. The method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence according to claim 3, characterized in that: The process of collecting surface response data from the foam box and calculating the optimal threshold using a multi-objective threshold optimization method includes the following steps: Surface response data of the foam box is collected, including the following data: surface charge adsorption time. Charge release time Potential decay rate grayscale change rate of surface image Edge gradient Features, forming a surface response dataset ; The surface response data is calculated using a multi-objective threshold optimization method. Three optimization objectives are calculated, and the formula for calculating the boundary domain uncertainty is as follows: ; in, For the number of samples in the boundary domain, Let be the defect probability of the i-th boundary domain sample. For the uncertainty of a single sample, For boundary domain uncertainty; The formula for calculating the size of the domain is as follows: ; in, The total number of samples in the surface response data. For the number of samples in the boundary domain, Size of the boundary; The formula for calculating the misclassification rate of the decision region is as follows: ; in, This represents the number of true positive samples. This represents the number of true negative samples. This represents the number of false positive samples. The number of false negative samples. The misclassification rate for the decision region; The weights of the optimization objective are calculated using the entropy weight method. Based on these weights, the TOPSIS method is used to calculate the optimal threshold.
5. The method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence according to claim 4, characterized in that: The weights based on the optimization objective are calculated using the TOPSIS method to obtain the optimal threshold, including the following steps: Construct a weighted standardized decision matrix: ; in, For the first The weighted standardized value of the k-th objective under a combination of thresholds. The entropy weight of the k-th target is... For the first The normalized value of the k-th objective under a combination of thresholds, where k is the index of the optimized objective. For threshold combination indexes; The formulas for calculating the positive ideal solution and the negative ideal solution are as follows: ; ; in, For the positive ideal solution, For a negative ideal solution, For all threshold combinations The maximum value of the corresponding weighted standardized value, for The maximum value of the corresponding weighted standardized value, for The maximum value of the corresponding weighted standardized value, For all threshold combinations The minimum value of the corresponding weighted standardized value, for The minimum value of the corresponding weighted standardized value, for The minimum value of the corresponding weighted standardized value; Calculate the Euclidean distance between each threshold combination and the positive and negative ideal solutions: ; ; in, Let be the distance between the t-th threshold combination and the positive ideal solution. Let be the distance between the t-th threshold combination and the negative ideal solution. Let be the difference between the k-th objective and the positive ideal solution for the t-th threshold combination. Let be the difference between the k-th objective and the negative ideal solution for the t-th threshold combination; Calculate the closeness of each threshold combination : ; in, Proximity of threshold combinations ( , ); Select Proximity The combination of the largest thresholds is taken as the optimal threshold.
6. The method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence according to claim 5, characterized in that: The process of identifying anomalies in surface response data based on the optimal threshold and the three-dimensional feature map to obtain surface anomaly data includes the following steps: The internal structure deviation score is mapped to a 3D spatial feature map using a 3D visualization algorithm. The preprocessed surface response data is then input into a trained support vector machine model to obtain the defect probability of each sample. Based on the optimal threshold and the three-dimensional feature map, a joint judgment is made: when If the conductive structure of the corresponding area in the 3D feature map is intact, then the surface layer is considered normal; when ,or Furthermore, if the conductive structure of the corresponding region in the 3D feature map is abnormal, it is determined to be a surface anomaly; when If the sample is not found, it is considered a boundary domain sample, and the surface anomaly data is obtained.
7. The method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence according to claim 6, characterized in that: The process of constructing a fused feature vector based on surface anomaly data, inputting the fused feature vector into a support vector machine model based on an improved quantum genetic algorithm, and outputting the defect classification result includes the following specific steps: A fusion feature vector is constructed based on surface anomaly data, and the fusion formula is as follows: ; in, To fuse the weight matrix, To incorporate the bias term, To fuse feature vectors, The three-dimensional spatial feature vector of each detection region, surface response vector ; A support vector machine model based on an improved quantum genetic algorithm is constructed. The fused feature vector is input into the support vector machine model based on the improved quantum genetic algorithm to obtain the defect probability vector. , This represents the probability of a functional defect. For structural defect probability, This represents the probability of being defect-free. Defect judgment is performed based on defect probability vectors to obtain defect classification results. And the grayscale value of the corresponding region in the 3D feature map If so, it is determined to be a functional defect; when And the surface charge adsorption time If it is, then it is determined to be a structural defect; when or Then, combining the edge gradient of the surface image Further verification: When >0.8 and If it is, then it is determined to be a structural defect; when 0.8 and If so, it is determined to be a functional defect; when If it is, then it is determined to be defect-free.
8. The method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence according to claim 7, characterized in that: The construction of the support vector machine model based on the improved quantum genetic algorithm includes the following specific steps: Three major improvement strategies are introduced into the traditional quantum genetic algorithm: crossover evolution, dynamic rotation angle, and quantum convergence gate. The SVM parameters are encoded using qubit encoding, in the form of... ,in , , where are the probability amplitudes of the j-th qubit, and j is the qubit index; The crossover operation formula of the crossover evolution strategy is as follows: ; in, For the j-th qubit of the b-th individual in subpopulation 1, For subpopulation 2 The j-th qubit of an individual b represents the cross-linked qubits, and b is the individual index. The formula for the dynamic rotation angle is as follows: ; ; in, Let be the rotation angle of the b-th individual. The initial maximum rotation angle, This is the minimum rotation angle in the later stage. This represents the optimal fitness value for the current population. Let be the fitness value of the i-th individual. This is the adjustment coefficient; The quantum convergence gate formula is as follows: ; in, The convergence threshold, , The probability amplitude before correction. , This is the corrected probability amplitude; The fitness function formula for the improved quantum genetic algorithm is as follows: ; in, This represents the number of true positive samples. This represents the number of true negative samples. This represents the number of false positive samples. The number of false negative samples. The fitness function value; By optimizing the parameters of the support vector machine model using an improved quantum genetic algorithm, a support vector machine model based on the improved quantum genetic algorithm is obtained.
9. A method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence, as described in claim 8, characterized in that: The collected status data of the foam boxes, based on the defect classification results and the status data, are used to perform weighted summation using the analytic hierarchy process (AHP) to obtain the risk value of the foam boxes, specifically: Collect status data of foam boxes, including turnover number, cumulative temperature and humidity exposure value, cumulative stacking pressure, and number of maintenance operations; Construct a risk assessment indicator system, with target layer R: electrostatic safety risk value of foam box; Criterion layer : As a defect characteristic criterion, For dynamic attribute criteria, Internal structural criteria; indicator layer : Defect type Defect severity To standardize the number of turnovers, To standardize the cumulative values of temperature and humidity exposure, To standardize the cumulative stacking pressure value, To standardize the number of repairs, For the integrity of the internal conductive structure; The weights of the indicators are determined using the analytic hierarchy process (AHP), and the formula for calculating the risk value of the foam box is as follows: ; in, For the first The overall weight of each indicator For the first The quantified value of each indicator, Risk value of foam box For indexing indicators.
10. A method for detecting defects in antistatic foam boxes for new energy batteries based on artificial intelligence, as described in claim 9, characterized in that: The classification of safety levels based on the risk value of foam boxes is as follows: Security Level I: 3 indicates low risk; Safety Level II: This indicates medium risk; Safety level III: This indicates a high risk.