Battery package detection method
Through deep learning and multi-angle data verification, the problems of battery packaging detection automation and time stamp recording accuracy are solved, and the accurate identification and early warning mechanism of battery packaging components are improved, and the detection efficiency and safety are improved.
Patent Information
- Application Number
- CN202411102704.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing battery packaging detection methods are low in automation and inefficient, and cannot accurately identify and locate components in the battery packaging, and cannot ensure the accuracy and completeness of timestamp records, and the early warning mechanism is limited.
Using a deep learning framework to create anomaly detection model and object detection model, through image preprocessing and multi-angle data verification, identify components in the battery packaging, verify traceability information and timestamps, perform cascade analysis and state prediction, and establish a 3D model for simulation.
It improves the degree of automation of the production line, ensures the accurate identification and positioning of battery packaging components, ensures the accuracy of timestamp recording, enhances the intelligence and sensitivity of the early warning mechanism, and improves overall safety and efficiency.
Smart Images

Figure CN119006418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery packaging detection, and in particular to a battery packaging detection method. Background Art
[0002] Battery packaging inspection is a complex and multi-dimensional task, involving the inspection of battery quantity and material model information, the inspection of safety labels and hazardous materials, the verification of source time and quality information, and the integrity inspection of outer packaging and internal components. With the rapid development of applications such as electric vehicles and power storage devices, batteries play an increasingly important role in modern industry and daily life. The quality and safety of battery packaging directly affect the performance and service life of the battery, and even involve the safety of users. Therefore, the research and development and application of battery packaging inspection technology has become an important task in the current industry. Traditional inspection methods mainly rely on manual inspection and simple image processing technology, which have problems such as low efficiency and insufficient accuracy; therefore, it is particularly important to invent a battery packaging inspection method.
[0003] The existing battery packaging detection method has a low degree of automation in the production line, and there is a lot of human intervention, which reduces the overall efficiency. It is also unable to accurately identify and locate the various components in the battery packaging, and there is a possibility of missing important components. In addition, the existing battery packaging detection method cannot ensure the accuracy and completeness of the timestamp record of the battery packaging, and cannot provide a basis for timely processing and intervention of abnormal conditions, and the early warning mechanism has great limitations. For this reason, we propose a battery packaging detection method. Summary of the invention
[0004] The purpose of the present invention is to solve the defects in the prior art and to propose a battery packaging detection method.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A battery packaging detection method, the specific steps of the detection method are as follows:
[0007] Ⅰ. Collect and preprocess battery images and sensor data;
[0008] Ⅱ. Detect various types of abnormalities in various types of battery packaging.
[0009] As a further solution of the present invention, the specific steps of the battery packaging abnormality detection in step II are as follows:
[0010] S1.1: Collect image data of battery packaging from different sources and angles, and record and annotate various parameter information of the battery packaging in each image. Then scale the image to a uniform size and normalize the pixel values of the image data to the range of [0, 1]. Expand the dataset by rotating, flipping, and cropping, and divide the dataset into a training set and a validation set.
[0011] S1.2: Use the TensorFlow or PyTorch deep learning framework to create a sequential model, add a set of bidirectional GRU layers, specify the input shape and number of GRU units, add a set of fully connected layers for classification, and configure the optimizer, loss function, and evaluation metrics of the model training process to generate the corresponding anomaly detection model;
[0012] S1.3: Input the training set into the input layer of the model, then calculate the hidden state of each time step through the bidirectional GRU layer layer by layer, and then pass the output of the bidirectional GRU layer to the fully connected layer for linear transformation and activation function calculation. Use the cross entropy loss function to calculate the loss value between the model prediction result and the true label, and then calculate the gradient of each parameter through the back propagation algorithm. Update the model parameters according to the calculated gradient and Adam optimizer parameters;
[0013] S1.4: Input the verification data into the trained model, calculate the prediction results, and calculate the accuracy, precision, recall and F1 value of the model based on the prediction results. If there are any performance indicators that do not meet the expected performance indicators, retrain the anomaly detection model until the preset maximum number of training times is reached or the performance of the anomaly detection model reaches the expected performance indicators;
[0014] S1.5: Input the newly collected battery packaging image into the model, and then use the anomaly detection model to predict the image, detect the quantity, material and model information of the battery packaging, output the test results, and compare them with the standards to determine whether they meet the requirements. At the same time, mark the batteries that do not meet the requirements and feedback them to the staff.
[0015] III. Identify and classify the batteries and components in the package.
[0016] As a further solution of the present invention, the specific steps of identification and classification in step III are as follows:
[0017] S2.1: Collect image data of battery packs, modules, single cells, and wiring harnesses, annotate the objects in the images, configure the network architecture of the object detection model, and define the multi-task loss function of the object detection model, including bounding box coordinate loss, confidence loss, and classification loss;
[0018] S2.2: Input image data and corresponding annotation labels, obtain the predicted bounding box coordinates, confidence and category probability through the forward propagation of the object detection model, and calculate the loss value of each training sample according to the multi-task loss function, and then calculate the gradient through the back-propagation algorithm and update the model parameters;
[0019] S2.3: Input the validation set into the trained target detection model, calculate the loss value and various performance indicators of the model on the validation set, adjust the model's hyperparameters according to the validation results, and then re-divide the training set and test set to train and validate the target detection model until the preset number of iterations is reached;
[0020] S2.4: Input the test image into the trained object detection model. The model outputs the bounding box coordinates and category probability of each object. The model removes overlapping bounding boxes through the non-maximum suppression algorithm and retains the best prediction. Then, the bounding box coordinates (x, y, w, h), confidence C, and category probability p of each detected object in the prediction results are collected from the object detection model, and the bounding box coordinates, confidence, and category probability are combined into a feature vector.
[0021] S2.5: Manually or automatically assign a category label to each target’s feature vector based on prior knowledge, manual annotation, or known rules or algorithms, construct a matrix X containing all feature vectors and a vector Y containing all category labels, and then input the matrix X and vector Y into the target classifier;
[0022] S2.6: The target classifier calculates the prior probability of each category based on the input matrix X and vector Y, and then calculates the conditional probability of each feature under each category. It assumes that the features are independent of each other, extracts the feature vector from the new detection results, calculates the posterior probability of each category, and selects the category with the largest posterior probability as the predicted category;
[0023] S2.7: Based on the output of the target classifier, determine the final category of each target, count the number of identified battery packs, modules, single cells, and wiring harness components, and generate a classification and quantity statistics report.
[0024] As a further solution of the present invention, the specific calculation formula of the bounding box coordinate loss in S2.1 is as follows:
[0025]
[0026] Where, L coord Represents the difference between the predicted bounding box and the true bounding box; λ coord Represents the weight parameter; S represents the number of grid divisions; B represents the number of bounding boxes predicted for each grid cell; represents whether the j-th bounding box of the i-th grid cell contains the target, where obj represents whether the grid cell contains the target; (x i ,y i ,w i ,h i ) represents the predicted bounding box center coordinates and width and height; Represents the center coordinates, width and height of the real bounding box;
[0027] The specific calculation formula for the confidence loss described in S2.1 is as follows:
[0028]
[0029] Where, L conf Represents the difference between the confidence that the predicted bounding box contains the target and the actual situation; C i Represents the confidence of the prediction; represents the true confidence; The jth bounding box representing the i-th grid cell does not contain the object;
[0030] The specific calculation formula for the classification loss described in S2.1 is as follows:
[0031]
[0032] Where, L class Represents the difference between the predicted category probability and the true category probability; classes represents the set of all possible target categories; p i (c) represents the predicted category probability of the i-th grid cell; represents the true category probability; c represents the category label of the target.
[0033] IV. Check the integrity of packaging safety labels and detect risky materials.
[0034] As a further solution of the present invention, the color image is converted into a grayscale image, and the image is Gaussian blurred to remove noise. Canny edge detection is then used to identify edges in the image. The contour is extracted using a function in the image processing library, and the moment and Hu moment of the contour shape, as well as the color histogram in the region of interest are calculated. The image is then matched with a pre-stored safety mark template, and the batteries with defective packaging safety marks are marked based on the matching results.
[0035] V. Integrate multi-angle data to verify the test results.
[0036] As a further solution of the present invention, the specific steps of verifying the test results in step V are as follows:
[0037] S3.1: Select images with the same or similar time points for matching based on the timestamps of the images to synchronize the data of multiple cameras, convert the synchronized images into grayscale images, and normalize the images to reduce the impact of illumination changes;
[0038] S3.2: applying Gaussian blur to the preprocessed image to generate images of different scales, gradually reducing the images of different scales to generate multiple sets of images of different resolutions to construct corresponding Gaussian pyramids, calculating the difference between adjacent Gaussian blurred images in the Gaussian pyramid, and constructing a differential Gaussian pyramid from the Gaussian pyramid;
[0039] S3.3: At each pixel point at each scale of the differential Gaussian pyramid, compare it with the 26 neighboring points in the space and scale domain to find the local extreme point, then perform Taylor expansion on the extreme point in the image scale space to accurately locate the key point. If the contrast of the key point is lower than the preset threshold and the ratio of the principal curvature of the point exceeds the preset threshold, the point is discarded;
[0040] S3.4: Calculate the gradient direction and magnitude of each pixel in the neighborhood of the key point, generate a gradient direction histogram in the neighborhood of the key point, select the main direction, and construct a descriptor containing the gradient direction and magnitude in the neighborhood of the key point with the main direction as the center, and divide the neighborhood into several sub-regions, and calculate the gradient direction histogram in each sub-region;
[0041] S3.5: Match the nearest neighbors between descriptors based on the Euclidean distance between them, and filter out the descriptor matching results with multiple sets of nearest neighbors. Then use the RANSAC algorithm to eliminate false matches, build a co-viewing plane by matching point pairs, project the images of each camera onto a common viewing plane, and convert images from different perspectives to the same reference frame.
[0042] S3.6: Align the detection results of each camera into the common view, compare the detection results of the same object, and use the metric function Evaluate the consistency of the test results, where Q represents the consistency score, N represents the number of test results, and 1(D q ) represents the consistency indicator function of the qth test result;
[0043] S3.7: Set a consistency threshold to determine whether retesting or manual intervention is needed. If the consistency score is lower than the threshold, mark it as abnormal and retest the abnormal result or notify manual inspection.
[0044] VI. Verify traceability information and dynamically monitor battery packaging status.
[0045] As a further solution of the present invention, the specific steps of verifying the traceability information in step VI are as follows:
[0046] S4.1: Extract the source time T of each battery from the system database or recording device source And packaging time T package , check and process the missing values in the timestamp data, use interpolation to fill the missing timestamps, and record the missing value locations. After the processing is completed, unify the formats of each timestamp into a standard date and time format;
[0047] S4.2: Calculate the average time interval between the source time and the packaging time, and calculate the upper and lower control limits of the control chart based on the average time interval and standard deviation, draw a control chart for the time interval, and mark the average line The upper control limit UCL and the lower control limit LCL are used to detect abnormal points in the control chart that exceed the upper and lower control limits, and mark the abnormal time interval position;
[0048] S4.3: Classify the timestamp data into different time periods, and calculate the expected frequency and the actual frequency of each time period according to the distribution of the timestamp data. Then calculate the corresponding chi-square statistic based on the expected frequency and the actual frequency, and set the critical value in the chi-square distribution table according to the significance level and degrees of freedom.
[0049] S4.4: Compare the calculated chi-square statistic with the critical value. If the chi-square statistic is greater than the critical value, reject the null hypothesis and consider that the timestamp data is inconsistent or mismatched. Otherwise, accept the null hypothesis and consider that the timestamp data is consistent. Analyze the cause of the abnormal timestamp and correct or re-record the abnormal data. Then record the abnormal handling process and generate a report including the abnormal detection results, cause analysis and handling measures.
[0050] VII. Perform cascade analysis on the packaging process and predict the battery packaging status.
[0051] As a further solution of the present invention, the specific steps of battery packaging status prediction in step VII are as follows:
[0052] S5.1: Collect data on the battery packaging state and perform preprocessing, determine the discrete state set and observation variable set of the battery packaging state based on the preprocessed data, and initialize the transition probability matrix A, the observation probability matrix B and the initial state probability vector π;
[0053] S5.2: Initialize a set of antibodies, where each antibody represents a possible parameter set θ = (A, B, π), evaluate each antibody based on the prediction accuracy of the HMM or the fit to the historical data, and select a specified number of high-fitness antibodies for cloning according to the fitness from high to low;
[0054] S5.3: Mutate the cloned antibodies by adjusting the transition probability matrix A, the observation probability matrix B, and the initial state probability vector π, remove antibodies with high similarity, add new antibodies to the population, retain the best antibodies according to the fitness selection rule, and use the antibodies with the highest fitness as the optimal parameters to replace the original HMM model parameters;
[0055] S5.4: Calculate the probability of being in state e at the initial time t = 1 and multiply it by the probability of observing the first observation value in this state, and use the calculated result α1(e) as the probability distribution of the initial state, and use the recursive relationship to calculate the forward probability α at each time from t = 2 to t = T t (e) When the termination time T is reached, the total probability of the observation sequence is calculated, and then the backward probability β is calculated by the backward algorithm. t (e);
[0056] S5.5: According to the forward probability α t (e) and the backward probability β t (e) Obtain the joint probability ξ of transitioning from state e to state f at time t, then calculate the probability γ of being in state e at time t, update the model parameters θ = (A, B, π) based on the calculated ξ and γ, and repeat the parameter search, forward algorithm, backward algorithm and update model parameters until the model parameters change to within the preset range;
[0057] S5.6: Set the battery packaging state to be predicted and the prediction time range, calculate the forward probability of the observation sequence to the current moment and the backward probability of the observation sequence from the current moment to the end moment, and then obtain the probability γ of each state at the current moment based on the forward probability and backward probability t (e);
[0058] S5.7: According to the state probability γ at the current moment t (e) and the state transition probability matrix, predict the state probability distribution at the future time t+1, and then use the state probability γ predicted in the previous step as the new state probability γ at the current time t+1 (e) Continue to apply the state transition probability matrix to predict the next moment, repeating the state prediction step until the prediction covers all required future moments;
[0059] S5.8: Check the state probability at each prediction moment. If the probability of certain states exceeds the set warning threshold, generate a corresponding warning signal, and organize the generated warning signal into a report or warning information to notify the staff to take corresponding measures, and output the warning time, specific content of the warning and recommended treatment measures.
[0060] VIII. Establish a 3D model of battery packaging for packaging and transportation simulation.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] 1. The battery packaging detection method collects and preprocesses image data of battery packs, modules, single cells and wiring harness components, and forward-propagates the image data and corresponding annotation labels through the target detection model to obtain the predicted bounding box coordinates, confidence and category probability, calculates the loss value of each training sample to adjust the hyperparameters of the model, and then re-divides the training set and test set to train and verify the target detection model until the preset number of iterations is reached. The test image is input into the trained target detection model, and the model outputs the bounding box coordinates and category probability of each target, and removes overlapping bounding boxes through the non-maximum suppression algorithm, retains the best prediction, and then collects the bounding box coordinates, confidence and category probability of each detected target in the prediction results from the target detection model, and combines the bounding box coordinates, confidence and category probability into a feature vector. According to prior knowledge, manual annotation or known rules or algorithms, manually or automatically assign category labels to the feature vectors of each target. The target classifier calculates the prior probability of each category, and then calculates the conditional probability of each feature under each category. It is assumed that the features are independent of each other, and feature vectors are extracted from the new detection results to calculate the posterior probability of each category. The category with the largest posterior probability is selected as the predicted category. According to the output of the target classifier, the final category of each target is determined, and the number of identified battery packs, modules, single cells and wiring harness components is counted, and classification and quantity statistical reports are generated to improve the degree of automation of the production line, reduce human intervention, and thus improve overall efficiency. It can accurately identify and locate various components in the battery package, avoid missing any important components, ensure the reliability of the detection results, and adapt to battery package detection of different types and models.
[0063] 2. The battery packaging detection method extracts the source time and packaging time of each battery from the system database or recording device, calculates the average interval time between the source time and the packaging time, and calculates the upper and lower control limits of the control chart based on the average time interval and standard deviation, draws the time interval control chart, and detects abnormal points in the control chart that exceed the upper and lower control limits. Then, the distribution of the packaging timestamp data is statistically analyzed through the chi-square test to check whether the actual records conform to the expected statistical distribution. Data on the battery packaging status is collected and preprocessed, and the parameters of the HMM are initialized based on the preprocessed data. Then, parameter search, forward algorithm, backward algorithm and model parameter update are repeated until the model parameters change to within the preset range, and the battery packaging status to be predicted and the predicted time range are set. Predict the state probability distribution at future moments, then use the state probability obtained in the previous step as the new state probability at the current moment, continue to apply the state transfer probability matrix to predict the next moment, repeat the state prediction steps until the prediction covers all required future moments, check the state probability at each predicted moment, and if the probability of some states exceeds the set warning threshold, generate a corresponding warning signal, and organize the generated warning signal into a report or warning information to notify the staff to take corresponding measures, and output the time of the warning, the specific content of the warning and the recommended handling measures, which can ensure that the timestamp record of the battery packaging is accurate and complete, avoid human negligence and operational errors, and be able to predict potential abnormal states in advance, providing a basis for timely processing and intervention, making the warning mechanism more intelligent and sensitive, and improving overall safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0065] Figure 1 This is a flowchart of a battery packaging detection method proposed by the present invention. DETAILED DESCRIPTION
[0066] Example 1
[0067] Reference Figure 1 , a battery packaging detection method, the specific steps of the detection method are as follows:
[0068] Collect and preprocess battery images and sensor data.
[0069] Detect various types of anomalies in various types of battery packaging.
[0070] Specifically, collect image data of battery packaging from different sources and angles, record and annotate various parameter information of battery packaging in each image, scale the image to a uniform size, normalize the pixel values of the image data to the range of [0, 1], expand the data set by rotation, flipping, and cropping, and divide the data set into training and validation sets. Use TensorFlow or PyTorch deep learning framework to create a sequential model, add a set of bidirectional GRU layers, specify the input shape and number of GRU units, add a set of fully connected layers for classification, configure the optimizer, loss function, and evaluation index of the model's training process to generate the corresponding anomaly detection model, input the training set into the input layer of the model, and then calculate the hidden state of each time step through the bidirectional GRU layer layer by layer, and then pass the output of the bidirectional GRU layer to the fully connected layer for linear transformation. and activation function calculation, use the cross entropy loss function to calculate the loss value between the model prediction result and the true label, and then calculate the gradient of each parameter through the back propagation algorithm, update the model parameters according to the calculated gradient and Adam optimizer parameters, input the verification data into the trained model, calculate the prediction result, and calculate the accuracy, precision, recall and F1 value of the model based on the prediction result. If there are performance indicators that do not meet the expected performance indicators, retrain the anomaly detection model until the preset maximum number of training times is reached or the performance of the anomaly detection model reaches the expected performance indicators, input the newly collected battery packaging image into the model, and then use the anomaly detection model to predict the image, detect the quantity, material and model information of the battery packaging, output the test results, and compare them with the standard to determine whether they meet the requirements, mark the batteries that do not meet the requirements, and feed them back to the staff.
[0071] Identify and classify the batteries and components in the package.
[0072] Specifically, collect image data of various components including battery packs, modules, single cells and wiring harnesses, and annotate the targets in the images, then configure the network architecture of the target detection model, and define the multi-task loss function of the target detection model, including bounding box coordinate loss, confidence loss and classification loss, input image data and corresponding annotation labels, obtain the predicted bounding box coordinates, confidence and category probability through forward propagation of the target detection model, and calculate the loss value of each training sample according to the multi-task loss function, and then calculate the gradient and update the model parameters through the back propagation algorithm, input the validation set into the trained target detection model, calculate the loss value and various performance indicators of the model on the validation set, adjust the model's hyperparameters according to the verification results, and then re-divide the training set and test set to train and verify the target detection model until the preset number of iterations is reached and stop, input the test image into the trained target detection model, the model outputs the bounding box coordinates and category probability of each target, and removes overlapping bounding boxes through the non-maximum suppression algorithm. , retain the best prediction, and then collect the bounding box coordinates (x, y, w, h), confidence C, and category probability p of each detected target in the prediction results from the target detection model, and combine the bounding box coordinates, confidence and category probability into a feature vector. According to prior knowledge, manual annotation or known rules or algorithms, manually or automatically assign category labels to the feature vectors of each target, and construct a matrix X containing all feature vectors and a vector Y containing all category labels. Then, input the matrix X and vector Y into the target classifier. The target classifier calculates the prior probability of each category based on the input matrix X and vector Y, and then calculates the conditional probability of each feature under each category. It is assumed that the features are independent of each other, and the feature vectors are extracted from the new detection results to calculate the posterior probability of each category. The category with the largest posterior probability is selected as the predicted category. According to the output of the target classifier, the final category of each target is determined, and the number of identified battery packs, modules, single cells, and wiring harness components is counted, and a classification and quantity statistics report is generated.
[0073] In addition, it should be noted that the specific calculation formula for the bounding box coordinate loss is as follows:
[0074]
[0075] Where, L coord Represents the difference between the predicted bounding box and the true bounding box; λ coord Represents the weight parameter; S represents the number of grid divisions; B represents the number of bounding boxes predicted for each grid cell; represents whether the j-th bounding box of the i-th grid cell contains the target, where obj represents whether the grid cell contains the target; (x i ,y i ,w i ,hi ) represents the predicted bounding box center coordinates and width and height; Represents the center coordinates, width and height of the real bounding box;
[0076] The specific calculation formula of confidence loss is as follows:
[0077]
[0078] Where, L conf Represents the difference between the confidence that the predicted bounding box contains the target and the actual situation; C i Represents the confidence of the prediction; represents the true confidence; The jth bounding box representing the i-th grid cell does not contain the object;
[0079] The specific calculation formula for classification loss is as follows:
[0080]
[0081] Where, L class Represents the difference between the predicted category probability and the true category probability; classes represents the set of all possible target categories; p i (c) represents the predicted category probability of the i-th grid cell; represents the true category probability; c represents the category label of the target.
[0082] Check packaging safety marking integrity and detect risk materials.
[0083] In this embodiment, the integrity check of the packaging safety label is specifically performed by converting a color image into a grayscale image, performing Gaussian blur on the image to remove noise, using Canny edge detection to identify edges in the image, using functions in the image processing library to extract contours, and calculating the moments and Hu moments of the contour shape, as well as the color histogram in the area of interest, and then matching with a pre-stored safety label template, and marking batteries with defective packaging safety labels based on the matching results.
[0084] Example 2
[0085] Reference Figure 1 , a battery packaging detection method, the specific steps of the detection method are as follows:
[0086] Integrate multi-angle data to verify the test results.
[0087] Specifically, images of the same or similar time points are selected for matching according to the timestamps of the images to synchronize the data of multiple cameras in time, the synchronized images are converted into grayscale images, and the images are normalized to reduce the impact of illumination changes, Gaussian blur is applied to the preprocessed images to generate images of different scales, the images of different scales are gradually reduced to generate multiple groups of images of different resolutions to construct the corresponding Gaussian pyramid, the difference of adjacent Gaussian blurred images in the Gaussian pyramid is calculated, a differential Gaussian pyramid is constructed from the Gaussian pyramid, and at each pixel point of each scale of the differential Gaussian pyramid, it is compared with 26 neighboring points in the space and scale domain to find the local extreme points, and then the extreme points are Taylor expanded in the image scale space to accurately locate the key points, and if the contrast of the key points is lower than the preset threshold and the point is dominant If the curvature ratio exceeds the preset threshold, the point is discarded, the gradient direction and amplitude of each pixel in the neighborhood of the key point are calculated, and a gradient direction histogram is generated in the neighborhood of the key point, and the main direction is selected. In the neighborhood of the key point, a descriptor containing the gradient direction and amplitude is constructed with the main direction as the center, and the neighborhood is divided into several sub-regions. The gradient direction histogram is calculated in each sub-region, and the nearest neighbors between the descriptors are matched according to the Euclidean distance between each descriptor, and the descriptor matching results with multiple groups of nearest neighbors are screened out. Then, the RANSAC algorithm is used to eliminate false matches, and a co-viewing image is constructed by matching point pairs. The images of each camera are projected onto a common viewing plane, and images from different perspectives are converted to the same reference system. The detection results of each camera are aligned to the co-viewing image, and the detection results of the same object are compared. The metric function is used. Evaluate the consistency of the test results, where Q represents the consistency score, N represents the number of test results, and 1(D q ) represents the consistency indicator function of the qth test result. A consistency threshold is set to determine whether retesting or manual intervention is needed. If the consistency score is lower than the threshold, it is marked as abnormal, and the abnormal result is retested or notified for manual inspection.
[0088] Verify traceability information and dynamically monitor battery packaging status.
[0089] Specifically, the source time T of each battery is extracted from the system database or recording device. source And packaging time T package , check and process the missing values in the timestamp data, use interpolation to fill in the missing timestamps, and record the missing value positions. After the processing is completed, unify the timestamp formats into the standard date and time format, calculate the average interval between the source time and the packaging time, and calculate the upper and lower control limits of the control chart based on the average time interval and standard deviation, draw the time interval control chart, and mark the average line The upper control limit UCL and the lower control limit LCL are used to detect abnormal points that exceed the upper and lower control limits in the control chart, and the abnormal time interval position is marked. The timestamp data is classified into different time periods, and the expected frequency and the actual frequency of each time period are calculated according to the distribution of the timestamp data. Then, the corresponding chi-square statistic is calculated based on the expected frequency and the actual frequency. The critical value in the chi-square distribution table is set according to the significance level and the degrees of freedom. The calculated chi-square statistic is compared with the critical value. If the chi-square statistic is greater than the critical value, the null hypothesis is rejected, and it is believed that the timestamp data is inconsistent or mismatched. Otherwise, the null hypothesis is accepted, and the timestamp data is considered to be consistent. The cause of the abnormal timestamp is analyzed, and the abnormal data is corrected or re-recorded. After that, the abnormal handling process is recorded and a report is generated, including the abnormal detection results, cause analysis and handling measures.
[0090] Cascade analysis of the packaging process and prediction of battery pack status.
[0091] Specifically, data on the battery packaging state are collected and preprocessed. Based on the preprocessed data, the discrete state set and observation variable set of the battery packaging state are determined, and the transition probability matrix A, the observation probability matrix B and the initial state probability vector π are initialized. A group of antibodies are initialized, where each antibody represents a possible parameter set θ=(A, B, π). Each antibody is evaluated based on the prediction accuracy of the HMM or the fit to the historical data, and a specified number of high-fitness antibodies are selected for cloning according to the fitness from high to low. The cloned antibodies are mutated by adjusting the transition probability matrix A, the observation probability matrix B and the initial state probability vector π, and antibodies with high similarity are removed. New antibodies are added to the population, and the optimal antibodies are retained according to the fitness selection rule. At the same time, the antibodies with the highest fitness are used as the optimal parameters to replace the original HMM model parameters. The probability of being in state e at the initial time t=1 is calculated multiplied by the probability of observing the first observation value in this state, and the calculated result α1(e) is used as the probability distribution of the initial state. The forward probability α at each time from t=2 to t=T is calculated using the recursive relationship. t (e) When the termination time T is reached, the total probability of the observation sequence is calculated, and then the backward probability β is calculated by the backward algorithm. t (e), according to the forward probability α t (e) and the backward probability β t(e), obtain the joint probability ξ of transitioning from state e to state f at time t, and then calculate the probability γ of being in state e at time t, update the model parameters θ = (A, B, π) according to the calculated ξ and γ, repeat the parameter search, forward algorithm, backward algorithm and update model parameters until the model parameters change to the preset range, set the battery packaging state to be predicted and the prediction time range, calculate the forward probability of the observation sequence to the current moment and the backward probability of the observation sequence from the current moment to the end moment, and then obtain the probability γ of being in each state at the current moment according to the forward probability and backward probability t (e), according to the state probability γ at the current moment t (e) and the state transition probability matrix, predict the state probability distribution at the future time t+1, and then use the state probability γ predicted in the previous step as the new state probability γ at the current time t+1 (e) Continue to apply the state transition probability matrix to predict the next moment, repeat the state prediction steps until the prediction covers all required future moments, check the state probability at each prediction moment, and if the probability of some states exceeds the set warning threshold, generate a corresponding warning signal, and organize the generated warning signal into a report or warning information to notify the staff to take corresponding measures, and output the warning time, specific content of the warning and recommended treatment measures.
[0092] Create a 3D model of the battery package for packaging and shipping simulation.
Claims
1. A battery packaging detection method, characterized in that: The specific steps of this detection method are as follows: Ⅰ. Collect and preprocess battery images and sensor data; Ⅱ. Detect various abnormalities of various battery packaging; III. Identify and classify the batteries and components in the package; IV. Check the integrity of packaging safety labels and detect risk materials; V. Integrate multi-angle data to verify test results; VI. Verify traceability information and dynamically monitor battery packaging status; VII. Cascade analysis of the packaging process and prediction of battery packaging status; VIII. Establish a 3D model of battery packaging for packaging and transportation simulation.
2. A battery packaging detection method according to claim 1, characterized in that: The specific steps of battery packaging abnormality detection in step II are as follows: S1.1: Collect image data of battery packaging from different sources and angles, and record and annotate various parameter information of the battery packaging in each image. Then scale the image to a uniform size and normalize the pixel values of the image data to the range of [0, 1]. Expand the dataset by rotating, flipping, and cropping, and divide the dataset into a training set and a validation set. S1.2: Use the TensorFlow or PyTorch deep learning framework to create a sequential model, add a set of bidirectional GRU layers, specify the input shape and number of GRU units, add a set of fully connected layers for classification, and configure the optimizer, loss function, and evaluation metrics of the model training process to generate the corresponding anomaly detection model; S1.3: Input the training set into the input layer of the model, then calculate the hidden state of each time step through the bidirectional GRU layer layer by layer, and then pass the output of the bidirectional GRU layer to the fully connected layer for linear transformation and activation function calculation. Use the cross entropy loss function to calculate the loss value between the model prediction result and the true label, and then calculate the gradient of each parameter through the back propagation algorithm. Update the model parameters according to the calculated gradient and Adam optimizer parameters; S1.4: Input the verification data into the trained model, calculate the prediction results, and calculate the accuracy, precision, recall and F1 value of the model based on the prediction results. If there are any performance indicators that do not meet the expected performance indicators, retrain the anomaly detection model until the preset maximum number of training times is reached or the performance of the anomaly detection model reaches the expected performance indicators; S1.5: Input the newly collected battery packaging image into the model, and then use the anomaly detection model to predict the image, detect the quantity, material and model information of the battery packaging, output the test results, and compare them with the standards to determine whether they meet the requirements. At the same time, mark the batteries that do not meet the requirements and feedback them to the staff.
3. A battery packaging detection method according to claim 1, characterized in that: The specific steps of identification and classification described in step III are as follows: S2.1: Collect image data of battery packs, modules, single cells, and wiring harnesses, annotate the objects in the images, configure the network architecture of the object detection model, and define the multi-task loss function of the object detection model, including bounding box coordinate loss, confidence loss, and classification loss; S2.2: Input image data and corresponding annotation labels, obtain the predicted bounding box coordinates, confidence and category probability through the forward propagation of the object detection model, and calculate the loss value of each training sample according to the multi-task loss function, and then calculate the gradient through the back-propagation algorithm and update the model parameters; S2.3: Input the validation set into the trained target detection model, calculate the loss value and various performance indicators of the model on the validation set, adjust the model's hyperparameters according to the validation results, and then re-divide the training set and test set to train and validate the target detection model until the preset number of iterations is reached; S2.4: Input the test image into the trained object detection model. The model outputs the bounding box coordinates and category probability of each object. The model removes overlapping bounding boxes through the non-maximum suppression algorithm and retains the best prediction. Then, the bounding box coordinates (x, y, w, h), confidence C, and category probability p of each detected object in the prediction results are collected from the object detection model, and the bounding box coordinates, confidence, and category probability are combined into a feature vector. S2.5: Manually or automatically assign a category label to each target’s feature vector based on prior knowledge, manual annotation, or known rules or algorithms, construct a matrix X containing all feature vectors and a vector Y containing all category labels, and then input the matrix X and vector Y into the target classifier; S2.6: The target classifier calculates the prior probability of each category based on the input matrix X and vector Y, and then calculates the conditional probability of each feature under each category. It assumes that the features are independent of each other, extracts the feature vector from the new detection results, calculates the posterior probability of each category, and selects the category with the largest posterior probability as the predicted category; S2.7: Based on the output of the target classifier, determine the final category of each target, count the number of identified battery packs, modules, single cells, and wiring harness components, and generate a classification and quantity statistics report.
4. A battery packaging detection method according to claim 3, characterized in that: The specific calculation formula for the bounding box coordinate loss described in S2.1 is as follows: Where, L coord Represents the difference between the predicted bounding box and the true bounding box; λ coord Represents the weight parameter; S represents the number of grid divisions; B represents the number of bounding boxes predicted for each grid cell; represents whether the j-th bounding box of the i-th grid cell contains the target, where obj represents whether the grid cell contains the target; (x i ,y i ,w i ,h i ) represents the predicted bounding box center coordinates and width and height; Represents the center coordinates, width and height of the real bounding box; The specific calculation formula for the confidence loss described in S2.1 is as follows: Where, L conf Represents the difference between the confidence that the predicted bounding box contains the target and the actual situation; C i Represents the confidence of the prediction; represents the true confidence; The jth bounding box representing the i-th grid cell does not contain the object; The specific calculation formula for the classification loss described in S2.1 is as follows: Where, L class Represents the difference between the predicted category probability and the true category probability; classes represents the set of all possible target categories; p i (c) represents the predicted category probability of the i-th grid cell; represents the true category probability; c represents the category label of the target.
5. A battery packaging detection method according to claim 1, characterized in that: The specific steps for verifying the test results described in step V are as follows: S3.1: Select images with the same or similar time points for matching based on the timestamps of the images to synchronize the data of multiple cameras, convert the synchronized images into grayscale images, and normalize the images to reduce the impact of illumination changes; S3.2: applying Gaussian blur to the preprocessed image to generate images of different scales, gradually reducing the images of different scales to generate multiple sets of images of different resolutions to construct corresponding Gaussian pyramids, calculating the difference between adjacent Gaussian blurred images in the Gaussian pyramid, and constructing a differential Gaussian pyramid from the Gaussian pyramid; S3.3: At each pixel point at each scale of the differential Gaussian pyramid, compare it with the 26 neighboring points in the space and scale domain to find the local extreme point, then perform Taylor expansion on the extreme point in the image scale space to accurately locate the key point. If the contrast of the key point is lower than the preset threshold and the ratio of the principal curvature of the point exceeds the preset threshold, the point is discarded; S3.4: Calculate the gradient direction and magnitude of each pixel in the neighborhood of the key point, generate a gradient direction histogram in the neighborhood of the key point, select the main direction, and construct a descriptor containing the gradient direction and magnitude in the neighborhood of the key point with the main direction as the center, and divide the neighborhood into several sub-regions, and calculate the gradient direction histogram in each sub-region; S3.5: Match the nearest neighbors between descriptors based on the Euclidean distance between them, and filter out the descriptor matching results with multiple sets of nearest neighbors. Then use the RANSAC algorithm to eliminate false matches, build a co-viewing plane by matching point pairs, project the images of each camera onto a common viewing plane, and convert images from different perspectives to the same reference frame. S3.6: Align the detection results of each camera into the common view, compare the detection results of the same object, and use the metric function Evaluate the consistency of the test results, where Q represents the consistency score, N represents the number of test results, and 1(D q ) represents the consistency indicator function of the qth test result; S3.7: Set a consistency threshold to determine whether retesting or manual intervention is needed. If the consistency score is lower than the threshold, mark it as abnormal and retest the abnormal result or notify manual inspection.
6. A battery packaging detection method according to claim 1, characterized in that: The specific steps for verifying the traceability information in step VI are as follows: S4.1: Extract the source time T of each battery from the system database or recording device source And packaging time T package , check and process the missing values in the timestamp data, use interpolation to fill the missing timestamps, and record the missing value locations. After the processing is completed, unify the formats of each timestamp into a standard date and time format; S4.2: Calculate the average time interval between the source time and the packaging time, and calculate the upper and lower control limits of the control chart based on the average time interval and standard deviation, draw a control chart for the time interval, and mark the average line The upper control limit UCL and the lower control limit LCL are used to detect abnormal points in the control chart that exceed the upper and lower control limits, and mark the abnormal time interval position; S4.3: Classify the timestamp data into different time periods, and calculate the expected frequency and the actual frequency of each time period according to the distribution of the timestamp data. Then calculate the corresponding chi-square statistic based on the expected frequency and the actual frequency, and set the critical value in the chi-square distribution table according to the significance level and degrees of freedom. S4.4: Compare the calculated chi-square statistic with the critical value. If the chi-square statistic is greater than the critical value, reject the null hypothesis and consider that the timestamp data is inconsistent or mismatched. Otherwise, accept the null hypothesis and consider that the timestamp data is consistent. Analyze the cause of the abnormal timestamp and correct or re-record the abnormal data. Then record the abnormal handling process and generate a report including the abnormal detection results, cause analysis and handling measures.
7. A battery packaging detection method according to claim 1, characterized in that: The specific steps of battery packaging status prediction in step VII are as follows: S5.1: Collect data on the battery packaging state and perform preprocessing, determine the discrete state set and observation variable set of the battery packaging state based on the preprocessed data, and initialize the transition probability matrix A, the observation probability matrix B and the initial state probability vector π; S5.2: Initialize a set of antibodies, where each antibody represents a possible parameter set θ = (A, B, π), evaluate each antibody based on the prediction accuracy of the HMM or the fit to the historical data, and select a specified number of high-fitness antibodies for cloning according to the fitness from high to low; S5.3: Mutate the cloned antibodies by adjusting the transition probability matrix A, the observation probability matrix B, and the initial state probability vector π, remove antibodies with high similarity, add new antibodies to the population, retain the best antibodies according to the fitness selection rule, and use the antibodies with the highest fitness as the optimal parameters to replace the original HMM model parameters; S5.4: Calculate the probability of being in state e at the initial time t = 1 and multiply it by the probability of observing the first observation value in this state, and use the calculated result α1(e) as the probability distribution of the initial state, and use the recursive relationship to calculate the forward probability α at each time from t = 2 to t = T t (e) When the termination time T is reached, the total probability of the observation sequence is calculated, and then the backward probability β is calculated by the backward algorithm. t (e); S5.5: According to the forward probability α t (e) and the backward probability β t (e) Obtain the joint probability ξ of transitioning from state e to state f at time t, then calculate the probability γ of being in state e at time t, update the model parameters θ = (A, B, π) based on the calculated ξ and γ, and repeat the parameter search, forward algorithm, backward algorithm and update model parameters until the model parameters change to within the preset range; S5.6: Set the battery packaging state to be predicted and the prediction time range, calculate the forward probability of the observation sequence to the current moment and the backward probability of the observation sequence from the current moment to the end moment, and then obtain the probability γ of each state at the current moment based on the forward probability and backward probability t (e); S5.7: According to the state probability γ at the current moment t (e) and the state transition probability matrix, predict the state probability distribution at the future time t+1, and then use the state probability γ predicted in the previous step as the new state probability γ at the current time t+1 (e) Continue to apply the state transition probability matrix to predict the next moment, repeating the state prediction step until the prediction covers all required future moments; S5.8: Check the state probability at each prediction moment. If the probability of certain states exceeds the set warning threshold, generate a corresponding warning signal, and organize the generated warning signal into a report or warning information to notify the staff to take corresponding measures, and output the warning time, specific content of the warning and recommended treatment measures.
Citation Information
Patent Citations
Intelligent sensing robot based on logistics transportation application
CN111639721A
Instrument panel key data accurate positioning method based on scale invariant feature transformation
CN114037755A
Product packaging state detection method and system, electronic equipment and storage medium
CN117173621A
Improved YOLOv5 marine organism target detection method
CN117523381A
Intelligent package detection method and system
CN118195994A
Cited By
Detection and early warning system for optical glass processing
CN119741268A
Fault detection method for string PCS
CN119805268A
Power transmission and distribution equipment operation state monitoring system based on intelligent agent
CN120377504A
