Screw tightening anomaly recognition method, device, equipment and storage medium
By constructing an anomaly recognition model based on CART decision trees, the screw tightening process is monitored in real time, solving the problem that existing technologies cannot identify tightening anomalies, and improving screw tightening quality and battery safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUNWODA MOBILITY ENERGY TECHNOLOGY CO LTD
- Filing Date
- 2024-09-29
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies detect abnormalities by measuring tightening torque and angle after screws are tightened, but they cannot identify abnormalities during the tightening process, such as screw misalignment and stripping, which affects product quality and leaves safety hazards.
By acquiring data on the screw tightening process, feature extraction and cleaning are performed. An anomaly recognition model is constructed using CART decision trees. Anomaly recognition is performed by combining torque and angle data. The model is then trained and validated to identify anomalies in the screw tightening process.
This technology enables real-time monitoring of the screw tightening process, timely detection of abnormalities, reduction of the impact of screw tightening on battery quality, and improvement of product safety and reliability.
Smart Images

Figure CN119360091B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of anomaly detection technology, specifically to a method, apparatus, equipment, and storage medium for identifying screw tightening anomalies. Background Technology
[0002] Screws are among the most commonly used parts in industry, and the quality of tightening each screw directly affects the quality of the product. In the battery manufacturing industry, screws are also one of the important parts for completing the packaging of each battery pack. They are of great significance for ensuring the normal charging and discharging of the battery and its safe and reliable operation. If the screw tightening quality is not good, it may cause serious safety accidents.
[0003] The commonly used method for identifying screw tightening abnormalities mainly involves detecting the tightening torque and tightening angle after the screw has been tightened. However, this method cannot identify abnormalities that occur during the tightening process (such as screw misalignment or stripped threads), thus affecting product quality. Summary of the Invention
[0004] Embodiments of this application provide a method, apparatus, device, and storage medium for identifying abnormal screw tightening, so as to effectively monitor abnormalities generated during screw tightening and reduce the impact of screw tightening on battery quality.
[0005] To address the aforementioned technical problems, embodiments of this application disclose the following technical solutions:
[0006] Firstly, a method for identifying abnormal screw tightening is provided, the method comprising:
[0007] Obtain the tightening data of the screw under test during the tightening process;
[0008] Remove abnormal data from the tightening data to determine the data to be tested;
[0009] Feature extraction is performed on the data to be tested to determine the feature data;
[0010] The feature data is input into the anomaly recognition model to obtain the recognition result of the screw under test. The recognition result is used to characterize whether there is an anomaly in the tightening process of the screw under test. The anomaly recognition model is trained based on the feature data of the sample screw, the labeling result corresponding to the feature data of the sample screw, and the category of the sample screw.
[0011] In some embodiments, before acquiring the tightening data of the screw under test during the tightening process, the method further includes:
[0012] The architecture of the anomaly recognition model is built based on the CART decision tree;
[0013] Obtain the tightening data of the sample screws;
[0014] Based on the tightening data of the sample screws, the category of the sample screws is determined, and the category of the sample screws includes negative sample screws and positive sample screws;
[0015] Feature extraction and anomaly marking are performed on the tightening data of the sample screws to obtain the feature data of the sample screws and the marking results corresponding to the feature data;
[0016] Based on the feature data of the sample screws, the labeling results corresponding to the feature data, and the category of the sample screws, the anomaly recognition model is trained and validated, and the trained anomaly recognition model is obtained.
[0017] In some embodiments, the tightening data includes torque data; determining the category of the sample screw based on the tightening data of the sample screw includes:
[0018] Based on the torque data of the sample screws, determine the mean torque, maximum torque, torque distribution kurtosis, and torque distribution skewness of the sample screws.
[0019] Based on the three-standard-deviation method, the first outlier sample screw with abnormal torque mean and / or abnormal torque maximum was identified from all the sample screws.
[0020] Based on cluster analysis, a second outlier sample screw with abnormal torque distribution kurtosis and / or abnormal torque distribution skewness was identified from all the sample screws.
[0021] The first outlier screw and the second outlier screw are identified as the negative sample screws, and the remaining sample screws among all sample screws, excluding the first outlier screw and the second outlier screw, are identified as the positive sample screws.
[0022] In some embodiments, the tightening data includes torque data and angle data; feature extraction and anomaly marking are performed on the tightening data of the sample screw to obtain feature data of the sample screw and the marking results corresponding to the feature data, including:
[0023] Based on the torque data and angle data of the sample screw, feature data of the sample screw is extracted, and the feature data includes multiple feature values;
[0024] Each of the aforementioned feature values is marked as an anomaly, and the marking result corresponding to each of the aforementioned feature values is determined. The marking result includes normal and abnormal.
[0025] In some embodiments, the tightening process includes a screwing-in stage and a tightening stage, and the plurality of the characteristic values include the maximum torque value of the tightening process, the tightening angle difference value of the tightening process, the climbing angle value of the tightening process, the maximum torque value of the screwing-in stage, the average torque value of the screwing-in stage, and the torque distribution kurtosis of the tightening stage.
[0026] The step of marking each feature value as an anomaly and determining the marking result corresponding to each feature value includes:
[0027] Based on the comparison results of the maximum torque value, the tightening angle difference value, and the climbing angle value of the tightening process with the corresponding preset thresholds, the marking result corresponding to each of the feature values in the tightening process is determined.
[0028] Based on the maximum torque value and the mean torque value of the screw-in stage corresponding to all the sample screws, the labeling result corresponding to each feature value in the maximum torque value and the mean torque value of the screw-in stage is determined by the three-standard deviation method.
[0029] Based on the torque distribution kurtosis of all the fastening stages, the labeling result corresponding to each feature value in the torque distribution kurtosis of all the fastening stages is determined by cluster analysis.
[0030] In some embodiments, before training and validating the anomaly recognition model based on the feature data of the sample screws, the labeling results corresponding to the feature data, and the category of the sample screws, the method further includes:
[0031] Based on the feature data of the negative sample screws and the labeling results corresponding to the feature data, the negative sample screws are oversampled to obtain the feature data of the newly added negative sample screws and the labeling results corresponding to the feature data. The deviation between the sum of the number of negative sample screws and the number of newly added negative sample screws and the number of positive sample screws satisfies a preset condition.
[0032] In some embodiments, before determining the category of the sample screw based on the tightening data of the sample screw, the method further includes:
[0033] Data cleaning is performed on the tightening data of the sample screws to remove abnormal samples from the sample screws.
[0034] In some embodiments, the feature data includes multiple feature values; the method further includes:
[0035] If the identification result indicates that there is an abnormality in the tightening process of the screw under test, then the decision path information of the feature data in the abnormality identification model is obtained;
[0036] Based on the decision path information, feature values in the feature data that are marked as abnormal are determined.
[0037] Secondly, a screw tightening abnormality identification device is provided, the device comprising:
[0038] The data acquisition module is used to acquire tightening data of the screw under test during the tightening process;
[0039] The data cleaning module is used to remove abnormal data from the tightening data and determine the data to be tested;
[0040] The feature extraction module is used to extract features from the data to be tested and determine the feature data;
[0041] An anomaly identification module is used to input the feature data into an anomaly identification model to obtain the identification result of the screw under test. The identification result is used to characterize whether there is an anomaly in the tightening process of the screw under test. The anomaly identification model is trained based on the feature data of the sample screw, the labeling result corresponding to the feature data of the sample screw, and the category of the sample screw.
[0042] Thirdly, an electronic device is provided, the electronic device including a memory and a processor;
[0043] The memory stores a computer program executable by the processor, which, when executed by the processor, performs the method as described in any of the first aspects.
[0044] Fourthly, a computer-readable storage medium is provided, wherein computer program instructions are stored therein, which, when executed by a processor, perform the method as described in any of the first aspects.
[0045] One of the above technical solutions has the following advantages or beneficial effects:
[0046] Compared with existing technologies, this application provides a screw tightening anomaly identification method, comprising: acquiring tightening data of the screw under test during the tightening process; removing abnormal data from the tightening data to determine the data to be tested; extracting features from the data to be tested to determine feature data; inputting the feature data into an anomaly identification model to obtain the identification result of the screw under test. The identification result is used to characterize whether there is an anomaly in the tightening process of the screw under test. The anomaly identification model is trained based on the feature data of a sample screw, the labeling results corresponding to the feature data of the sample screw, and the category of the sample screw. The method provided in this application can monitor the screw tightening process online through the anomaly identification model, thereby timely detecting anomalies in the tightening process, achieving effective monitoring of anomalies in the tightening process, and thus reducing the impact of screw tightening on battery quality.
[0047] This application discloses a screw tightening abnormality identification device, which can monitor the screw tightening process online, thereby promptly detecting abnormalities in the tightening process, achieving effective monitoring of abnormalities in the tightening process, and thus reducing the impact of screw tightening on battery quality. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 A schematic diagram of the overall process for obtaining the anomaly recognition model provided in the embodiments of this application;
[0050] Figure 2 This is a schematic diagram of the structure of the CART decision tree provided in the embodiments of this application;
[0051] Figure 3 A schematic diagram of the torque distribution curve of the sample screw provided in the embodiments of this application;
[0052] Figure 4 This is a schematic diagram of the angle distribution curve of the sample screws provided in the embodiments of this application;
[0053] Figure 5 This is a schematic diagram of the overall process of a screw tightening abnormality identification method provided in an embodiment of this application;
[0054] Figure 6 This is a schematic flowchart illustrating a method for identifying abnormal screw tightening provided in an embodiment of this application.
[0055] Figure 7 This is a schematic diagram of the screw tightening abnormality identification device according to an embodiment of this application;
[0056] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0057] Figure label:
[0058] 701 - Data acquisition module; 702 - Data cleaning module; 703 - Feature extraction module; 704 - Anomaly detection module; 801 - Memory; 802 - Processor. Detailed Implementation
[0059] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0060] In the description of this application, it should be understood that the terms "upper," "lower," "front," "rear," "left," "right," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, and "at least one" can mean one, two, or more, unless otherwise explicitly specified.
[0061] Because the quality of screw tightening significantly impacts battery quality, battery production workshops typically inspect screw tightening quality. Common methods for identifying screw tightening anomalies involve detecting tightening torque and angle after tightening, such as checking if the torque reaches a preset value of 6N or if the tightening angle exceeds 62 degrees. However, this method, relying on a single data point, is limited and monotonous. It fails to identify some anomalies during tightening (such as screw misalignment or stripped threads causing curve jitter), and relying solely on a single threshold can leave safety hazards, compromising product quality. Manual re-inspection is both labor-intensive and unable to identify most anomalies.
[0062] In view of this, this application provides a screw tightening anomaly identification method. By acquiring tightening data of the screw tightening process and extracting feature data from it, the method finally puts the data into a pre-constructed and trained anomaly identification model for anomaly identification to determine whether there is an anomaly in the tightening process of the screw under test. This allows for timely detection of anomalies in the tightening process, achieving effective monitoring of anomalies in the tightening process, and thereby reducing the impact of screw tightening on battery quality.
[0063] The process of obtaining the anomaly recognition model in this application embodiment will be described below.
[0064] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating the overall process of obtaining the anomaly recognition model provided in this application embodiment. Before judging anomalies in the tightening process of the screw under test, the anomaly recognition model can be obtained through the following steps:
[0065] Step 101: Build the architecture of the anomaly recognition model based on CART decision tree.
[0066] Specifically, CART (Classification and Regression Trees) decision trees are machine learning models based on decision trees used to solve classification and regression problems. A CART decision tree can select one feature from the input sample data for splitting, generating two child nodes each time, and continue this splitting process until the sample's category can be determined.
[0067] Please see Figure 2 , Figure 2 This is a schematic diagram of the CART decision tree structure provided in an embodiment of this application. The parameters of the CART decision tree can be set according to actual conditions. For example, in this embodiment, the following parameters can be set for the CART decision tree: using Gini impurity to select the optimal splitting feature; setting the tree depth `max_depth` to 3-10; setting a splitter strategy to determine how the decision tree selects the best classification point; and setting the `max_features` parameter to control the maximum number of features considered by the decision tree when splitting nodes. Figure 2 As shown, the CART decision tree has a depth of 4. Each tree node has the label x[i], where i indicates which feature is used for classification and the value of x[i] is the classification threshold. gini refers to the Gini coefficient of the node. samples indicates the number of samples to be classified by the node. In value[0,82], 0 represents the classification category of the node and 82 represents that there are 82 samples belonging to that category.
[0068] Step 102: Obtain the tightening data of the sample screws.
[0069] Specifically, the sample screws can be any screws tightened on the production line within a preset historical time period. Each screw on the production line within the preset historical time period can be tightened using a screwdriver. Tightening data can be collected using the screwdriver. For example, the collection frequency can be set to 2ms (milliseconds). The tightening process of each screw can collect data from 1000 sample points, which may include characteristic variables such as torque, angle, and current. In other words, the tightening data of the sample screws can include at least one of torque data, angle data, and current data.
[0070] In some embodiments, after performing step 102 and before performing step 103, the method of this application embodiment may further include:
[0071] Data cleaning was performed on the tightening data of the sample screws to remove abnormal samples from the sample screws.
[0072] Specifically, since the screw will recognize the cap before tightening, and the cap recognition data can interfere with the subsequent feature extraction, the cap recognition data and blank data need to be cleaned up in this data cleaning stage.
[0073] For example, during data cleaning, the completeness of the tightening data for each sample screw can be checked first. For instance, if 1000 data points are collected for each sample screw during tightening, screws with missing data points (less than 1000) and screws containing numerous abnormal or missing characters are identified as anomalous samples. Then, the angle and torque data of each remaining sample screw are iterated. If the maximum angle is less than or equal to 2000° and the maximum torque is less than or equal to 1N, the sample screw is identified as a "hat-recognition" sample and is also identified as an anomalous sample. Finally, anomalous samples are removed from all sample screws, and the remaining sample screws are saved for subsequent model training.
[0074] The above method can remove abnormal samples, thereby ensuring that the data used for training can fit most tightening scenarios, which is conducive to improving the accuracy of subsequent training.
[0075] Step 103: Based on the tightening data of the sample screws, determine the category of the sample screws. The categories of sample screws include negative sample screws and positive sample screws.
[0076] Specifically, based on the tightening data of the sample screws, data mining techniques are used to classify the sample screws into positive and negative sample screws. Positive sample screws represent those that tightened normally, while negative sample screws represent those that tightened abnormally.
[0077] In some embodiments, step 103 can be specifically implemented through the following steps:
[0078] Step 1: Based on the torque data of the sample screws, determine the mean torque, maximum torque, torque distribution kurtosis, and torque distribution skewness of the sample screws.
[0079] Specifically, torque data refers to the rotational torque applied to screws. The torque data of sample screws can be visualized using a line graph to determine the overall trend of torque variation through the torque change curve.
[0080] The mean torque refers to the average torque value of the sample screw throughout the entire tightening process. The maximum and minimum torque values include the highest and lowest torque values, respectively, representing the maximum and minimum torque values of the sample screw during the entire tightening process. Torque distribution kurtosis refers to the sharpness of the torque distribution pattern of the sample screw throughout the tightening process. Torque distribution skewness refers to the degree of skewness or asymmetry in the torque distribution of the sample screw throughout the tightening process, describing the degree to which the torque curve deviates from symmetry. Both torque distribution kurtosis and torque distribution skewness can be calculated based on the torque value, standard deviation, mean torque, and number of data points for each data point; these details will not be elaborated upon in this embodiment.
[0081] Understandably, each sample screw corresponds to a mean torque, a maximum torque, a torque distribution kurtosis, and a torque distribution skewness.
[0082] Step 2: Based on the three-standard-deviation method, identify the first outlier sample screws with abnormal mean torque and / or abnormal maximum torque from all sample screws.
[0083] Specifically, the first outlier screw refers to a screw with an abnormal mean torque and / or an abnormal maximum torque and / or an abnormal minimum torque. The three-standard-deviation method is mean + 3σ, where mean is the mean of the dataset and σ is the standard deviation of the dataset.
[0084] For example, based on the mean torque values corresponding to all sample screws, the mean torque value (mean1) and the standard deviation (σ1) of the mean torque value are determined. Mean torque values exceeding the range of mean1 ± 3σ1 are identified as torque mean anomalies, and the sample screws corresponding to these torque mean values are identified as the first outlier sample screws. Based on the maximum torque values corresponding to all sample screws, the mean torque value (mean2) and the standard deviation (σ2) of the maximum torque values are determined. Maximum torque values exceeding the range of mean2 ± 3σ2 are identified as torque maximum value anomalies, and the sample screws corresponding to these torque maximum values are also identified as the first outlier sample screws.
[0085] Step 3: Based on cluster analysis, identify the second outlier screws with abnormal torque distribution kurtosis and / or abnormal torque distribution skewness from all sample screws.
[0086] Specifically, the second outlier screw refers to screws with abnormal torque distribution kurtosis and / or abnormal torque distribution skewness. KMeans clustering analysis can be used for this purpose.
[0087] For example, the kurtosis of the torque distribution corresponding to all sample screws forms a kurtosis sample space, and the skewness of the torque distribution corresponding to all sample screws forms a skewness sample space. K points are randomly selected as cluster centers in both the kurtosis and skewness sample spaces. The distance from each point to the cluster center is calculated, and the point is assigned to the nearest cluster center. The average value of the sample points in each cluster is calculated, and the cluster center is moved to this average value. Then, k points are randomly selected again as cluster centers, and the above steps are repeated until the cluster centers in each sample space no longer change significantly, thus achieving the optimal clustering result. The distance from each sample point to the cluster center is calculated, and a cluster radius threshold is set. The sample screws corresponding to discrete points outside this cluster radius threshold are identified as the second outlier sample screws.
[0088] Understandably, the optimal k value can be calculated based on kurtosis and skewness. Initially, the range of k value can be defined as 3 to 10, and the calculated k value may not be the same each time. By visually observing the classification effect, the cluster center can be regarded as a sample circle. For example, in a certain training, the cluster radius threshold is set to 1.412, that is, normal samples are divided into a circle with a cluster radius of 1.412, and those outside 1.412 are abnormal samples. The specific value can be determined according to the actual situation. This application embodiment does not make specific limitations on the selection of k value and the setting of cluster radius threshold.
[0089] Step four: Identify the first and second outlier screws as negative sample screws, and identify the remaining sample screws (excluding the first and second outlier screws) as positive sample screws.
[0090] In some embodiments, after performing step four, the negative sample screws determined through steps one to four can be compared with the abnormal samples from process verification to determine whether the labeling results of the negative sample screws are incorrect. If the labeling results of the negative sample screws are incorrect, they can be corrected based on the abnormal samples from process verification to improve the accuracy of training sample construction.
[0091] By using the above method to mark abnormal samples from the sample screws using statistical methods, we can avoid the problem of leaving potential safety hazards by relying on a single threshold for anomaly detection. This allows for a more reasonable differentiation of abnormal samples, reducing the likelihood of over-killing and under-killing rates. The results are also less affected by equipment and have better versatility.
[0092] Step 104: Perform feature extraction and anomaly marking on the tightening data of the sample screws to obtain the feature data of the sample screws and the marking results corresponding to the feature data.
[0093] Specifically, feature data is extracted from the tightening data, and each feature value in the feature data is marked as normal or abnormal.
[0094] In some embodiments, step 104 can be specifically implemented through the following steps:
[0095] Step 1: Based on the torque and angle data of the sample screw, extract the feature data of the sample screw. The feature data includes multiple feature values.
[0096] Specifically, angle data refers to the angle of screw rotation. The angle data of the sample screws can be visualized using a line graph to determine the overall trend of angle change through the curve.
[0097] The selection of feature values can be pre-selected by comparing the torque and angle curves of normal and abnormal samples. It is understandable that the selected feature values will exhibit different performance on normal and abnormal samples.
[0098] Please refer to the following: Figure 3 and Figure 4 , Figure 3 This is a schematic diagram of the torque distribution curve of the sample screw provided in the embodiments of this application. Figure 4 This is a schematic diagram of the angle distribution curve of the sample screws provided in this application embodiment. The horizontal axis represents the column index of the data point; for example, a horizontal axis of 100 indicates that the 100th data point was collected in the time series. Exemplarily, the screw can be tightened in two steps, including a screw-in stage and a tightening stage. In the screw-in stage, the torque reaches a first preset value T1, and in the tightening stage, the torque reaches a second preset value T2. Since the tightening time of each screw varies, there may be redundant data in the sample, but this does not affect the results, and this situation can be left unprocessed in this application embodiment. Multiple feature values may include the maximum torque value during the tightening process, the tightening angle difference during the tightening process, the ramp angle value during the tightening process, the maximum torque value during the screw-in stage, the average torque value during the screw-in stage, and the kurtosis of the torque distribution during the tightening stage.
[0099] Specifically, the maximum torque value during the tightening process can be obtained by iterating through the torque data of each sample screw during the tightening process. The tightening angle difference during the tightening process can represent how many revolutions (one revolution is 360°) the tightening gun rotates during the screw tightening process. This can be obtained by reading the torque curve of the sample screw, obtaining the index x0 of the starting screw insertion point, and then obtaining the angle value a0 corresponding to x0. Let the maximum tightening angle be a. maxThis means that the tightening angle difference 'a' throughout the entire tightening process can be obtained. diff =a max -a0. The climbing angle value during the tightening process can be obtained by reading the torque curve of the sample screw, obtaining the index x5 corresponding to the torque reaching 5N, and then obtaining the angle value a5 corresponding to x5, thus obtaining the climbing angle value a. max -a5.
[0100] Because the torque curves of the two-step tightening process differ significantly between the first part (i.e., the screwing-in stage) and the second part (i.e., the tightening stage), this embodiment extracts a portion of the torque curve as a feature. The index of the point where the first peak value returns to zero is taken as the boundary between the screwing-in stage and the tightening stage. The reason for the point where the first peak value returns to zero is that the sample screw is tightened in two steps: first, the screw is tightened to the surface of the component, which is equivalent to the screwing-in stage. During this stage, the component and bolt do not undergo elastic deformation. Then, in the tightening stage, the connecting parts experience axial loads, leading to elastic deformation. For the deformed bolt, it is subjected to impact loads. Therefore, appropriately loosening the bolt by a certain angle (i.e., returning to zero after the first peak value) before tightening it to the target value can reduce torque loss. In some examples, a counter can be initialized, searching backwards from index x5 until a sample point x is found. i The corresponding torque value closest to 0 is the index of the dividing point, spilt_index. In other examples, the index spilt_index of the dividing point can also be obtained in other ways, and this application embodiment does not specifically limit this.
[0101] The maximum torque value during the screwing-in stage refers to the maximum torque value of the torque curve before the index spilt_index of the dividing point, which is also the first peak value. The average torque value during the screwing-in stage refers to the average torque value of the torque curve before the index spilt_index of the dividing point. The kurtosis of the torque distribution during the tightening stage refers to the steepness of the torque curve after the index spilt_index of the dividing point.
[0102] It is understood that the index in this application embodiment is used to characterize a sample point during the tightening process of the sample screw. In addition, multiple feature values may also include other feature values, such as the maximum torque value in the tightening stage, that is, the maximum torque value of the torque curve after the index split_index of the dividing point, which is also the second peak value. This application embodiment does not specifically limit this.
[0103] Step 2: Mark each feature value as an anomaly and determine the marking result corresponding to each feature value. The marking result includes normal and abnormal.
[0104] In some embodiments, the labeling result corresponding to each feature value can be determined in the following ways:
[0105] Based on the comparison results of the maximum torque value, the tightening angle difference value, and the climbing angle value during the tightening process with the corresponding preset thresholds, the labeling result corresponding to each feature value in the maximum torque value, the tightening angle difference value, and the climbing angle value during the tightening process is determined.
[0106] Based on the maximum torque value and the mean torque value during the screw-in stage for all sample screws, the labeling result corresponding to each feature value in the maximum torque value and the mean torque value during the screw-in stage is determined by the three-standard deviation method.
[0107] Based on the torque distribution kurtosis of all fastening stages, cluster analysis was used to determine the labeling result corresponding to each feature value in the torque distribution kurtosis of all fastening stages.
[0108] In some examples, the preset threshold corresponding to the maximum torque value during the tightening process may include a first threshold and a second threshold greater than the first threshold. The first threshold may be set to a second preset value T2-0.5N, and the second threshold may be set to a second preset value T2+0.5N. That is, if the maximum torque value during the tightening process of the sample screw is less than T2-0.5N or greater than T2+0.5N, then the maximum torque value during the tightening process of the sample screw is marked as an abnormal feature; if the maximum torque value during the tightening process of the sample screw is greater than or equal to T2-0.5N and less than or equal to T2+0.5N, then the maximum torque value during the tightening process of the sample screw is marked as a normal feature.
[0109] The preset threshold corresponding to the tightening angle difference during the tightening process may include a third threshold. For example, if the normal tightening angle difference is around 3000°, then the third threshold can be set to 2000°. That is to say, if the tightening angle difference during the tightening process is less than 2000°, it indicates that the sample screw has not been tightened enough turns, and the tightening angle difference during the tightening process of the sample screw is marked as an abnormal feature; if the tightening angle difference during the tightening process is greater than or equal to 2000°, then the tightening angle difference during the tightening process of the sample screw is marked as a normal feature.
[0110] The preset threshold corresponding to the ramp angle value during the tightening process can include a fourth threshold. For example, the fourth threshold can be set to 62°. That is, if the ramp angle value during the tightening process is greater than 62°, the ramp angle value during the tightening process of the sample screw is marked as an abnormal feature; if the ramp angle value during the tightening process is less than or equal to 62°, the ramp angle value during the tightening process of the sample screw is marked as a normal feature. Thus, since 62° is the tightening angle threshold determined by the process, the tightening threshold is reached when the torque reaches 5N. A slight further tightening (at this stage, the tightening angle threshold is 62°) will tighten the screw. Excessive tightening (angle greater than 62°) will result in excessive tightening force, potentially damaging the screw or threads. Therefore, setting the fourth threshold to 62° can effectively improve the problem of screw or thread damage.
[0111] Based on the maximum torque value during the screw-in stage for all sample screws, determine the average value (mean3) and standard deviation (σ3) of the maximum torque values. Maximum torque values exceeding the range of mean3 ± 3σ3 are identified as abnormal features, while those within the range are identified as normal features. Similarly, based on the mean torque value during the screw-in stage for all sample screws, determine the average value (mean4) and standard deviation (σ4) of the mean torque values. Mean torque values exceeding the range of mean4 ± 3σ4 are identified as abnormal features, while those within the range are identified as normal features.
[0112] Using the above method, since the period before the split point split_index is from the first stage of screwing in to the completion of the first peak value, the torque curve in this stage is relatively stable except for the first peak value. Using mean analysis on the curve before the split point split_index can effectively detect the stability of the curve in this stage.
[0113] Based on the kurtosis sample space formed by the torsional distribution kurtosis of all tightening stages, k points are randomly selected as cluster centers in this kurtosis sample space. The distance from each point to the cluster center is calculated, and the point is assigned to the nearest cluster center. The average value of the sample points in each cluster is calculated, and the cluster center is moved to the average value. Then, k points are randomly selected again as cluster centers, and the above steps are repeated until the cluster centers in each sample space no longer change significantly, thus achieving the optimal clustering result. After calculating the distance from each sample point to the cluster center and setting a cluster radius threshold, the torsional distribution kurtosis corresponding to discrete points outside the cluster radius threshold is identified as anomaly features, while the torsional distribution kurtosis corresponding to discrete points within the cluster radius threshold is identified as normal features.
[0114] With the above scheme, since the curve after the index spilt_index of the dividing point is an important stage of bolt tightening, namely the second peak, the curve fluctuates greatly. Using kurtosis to measure the sharpness and peak state of this segment of the curve can effectively measure the curve in this stage, thus making feature extraction more accurate.
[0115] In some embodiments, after performing step 104 and before performing step 105, the method of this application embodiment may further include the following steps:
[0116] Based on the feature data of the negative sample screws and the corresponding labeling results, the negative sample screws are oversampled to obtain the feature data of the newly added negative sample screws and the corresponding labeling results. The deviation between the sum of the number of negative sample screws and the number of newly added negative sample screws and the number of positive sample screws meets the preset condition.
[0117] Specifically, since the number of negative sample screws is usually less than the number of positive sample screws, for example, if 3000 sample screws are extracted, only 200 of them are negative sample screws, it is necessary to oversample the negative sample screws to balance the number of positive and negative samples.
[0118] In some examples, the SMOTE method can be used to oversample negative sample screws. This involves analyzing the K nearest neighbors of each negative sample screw and randomly interpolating between the sample points of each negative sample screw and its neighboring negative sample screws to synthesize new negative sample screws. This increases the number of negative samples to 10 times the original number, resulting in a more balanced ratio of positive and negative samples. Thus, the SMOTE method can focus on minority class samples, using interpolation to generate new samples to balance the ratio of positive to negative samples, thereby allowing for greater attention to the distribution and characteristics of minority samples.
[0119] In other examples, methods such as undersampling and data augmentation can also be used to generate new negative sample screws, and this application embodiment does not specifically limit this.
[0120] The above approach avoids the situation where the number of abnormal samples is small, which can easily lead to model overfitting during training, and improves the accuracy of subsequent model training.
[0121] Step 105: Based on the feature data of the sample screws, the labeling results corresponding to the feature data, and the category of the sample screws, train and validate the anomaly recognition model, and obtain the trained anomaly recognition model.
[0122] In some examples, grid search and ten-fold cross-validation can be used to train and evaluate the anomaly detection model multiple times to find the optimal parameter combination. For example, using... Figure 2Taking the CART decision tree shown as an example, after training and validation, the tree depth (max_depth) is 3, the splitter strategy is best, and the max_features parameter is 3. After completing training and validation, the test set can be input into the trained model for testing, and the model's classification accuracy can be observed using the confusion matrix and classification report. Finally, the results can be printed out. Figure 2 The decision tree shown is easy to observe, such as Figure 2 As shown, a decision tree has classification features for each node, as well as classification thresholds, Gini coefficients, and the number of samples for each classification. By tracing the path of feature values within the decision tree, we can further understand the specific anomalous characteristics of the abnormal samples, for example... Figure 2 x[7]<=2.737 is one of the classification thresholds; finally, the feature and the anomaly type can be output, such as "the second peak is too small".
[0123] The above approach uses machine learning to train an anomaly detection model. The training sample data consists of the extracted feature data of the screw tightening process and the anomaly labeling results of each feature value. This can improve the model's anomaly detection rate. In addition, by balancing the number of positive and negative samples, the training accuracy can be further improved. This allows the anomaly detection model to monitor the screw tightening quality online and issue timely alarms when anomalies are detected in the tightening data, thus reducing the impact of screw tightening on battery quality.
[0124] The following describes the method of detecting abnormalities in the screw tightening process using an anomaly recognition model in the embodiments of this application.
[0125] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating the overall process of a screw tightening abnormality identification method provided in an embodiment of this application. The method specifically includes the following steps:
[0126] Step 501: Obtain the tightening data of the screw under test during the tightening process.
[0127] Specifically, the screw to be tested can be any screw currently being tightened on the production line. Data can be collected from multiple sample points during the tightening process of the screw under test. The tightening data of the screw under test can be at least one of torque data, angle data, and current data.
[0128] Step 502: Remove abnormal data from the tightening data to determine the data to be tested.
[0129] For example, anomalous data may include hat-marked data, empty data, and garbled data. Removing such anomalous data from the tightened data removes data that does not contribute to feature extraction, thus improving the accuracy of subsequent predictions.
[0130] Step 503: Extract features from the data to be tested and determine the feature data.
[0131] For example, feature data of the screw under test can be extracted based on the torque and angle data of the screw under test. The feature data of the screw under test includes multiple feature values, which may include the maximum torque value during the tightening process, the tightening angle difference during the tightening process, the ramp angle value during the tightening process, the maximum torque value during the screwing-in stage, the average torque value during the screwing-in stage, and the torque distribution kurtosis during the tightening stage.
[0132] It should be noted that the specific feature extraction process can be found in the feature extraction process described in the foregoing embodiments, and will not be repeated here in the embodiments of this application.
[0133] Step 504: Input the feature data into the anomaly recognition model to obtain the recognition result of the screw under test. The recognition result is used to characterize whether there is an anomaly in the tightening process of the screw under test. The anomaly recognition model is trained based on the feature data of the sample screw, the labeling result corresponding to the feature data of the sample screw, and the category of the sample screw.
[0134] In other words, by inputting the extracted feature data into the anomaly identification model, the anomaly identification model can output whether there is an anomaly in the tightening process of the screw under test.
[0135] Please see Figure 6 , Figure 6 This is a schematic flowchart illustrating a method for identifying abnormal screw tightening provided in an embodiment of this application. In some embodiments, after performing step 504, the method of this application embodiment may further include the following steps:
[0136] Step 505: If the identification result indicates that there is an abnormality in the tightening process of the screw under test, then obtain the decision path information of the feature data in the anomaly identification model.
[0137] Step 506: Based on the decision path information, determine the feature values in the feature data that are marked as anomalous.
[0138] It is understandable that since the anomaly detection model uses a CART decision tree, the node of each feature value and the classification threshold can be obtained from the decision tree. Therefore, after the tightening process of the screw under test is judged to be abnormal, the feature value marked as abnormal in the feature data can be obtained from the current decision path information of the model.
[0139] It is understood that the method in this application embodiment extracts multi-dimensional features through data mining, which improves the anomaly detection rate and can output the anomaly type for the abnormal tightening curve, effectively reducing the time and cost of manual re-inspection. In addition, by using the anomaly recognition model to monitor the screw tightening process online, anomalies in the tightening process can be detected in a timely manner, achieving effective monitoring of anomalies in the tightening process, thereby reducing the impact of screw tightening on battery quality.
[0140] Accordingly, please refer to Figure 7 , Figure 7 This is a schematic diagram of the screw tightening anomaly identification device according to an embodiment of this application. The screw tightening anomaly identification device provided in this embodiment includes a data acquisition module 701, a data cleaning module 702, a feature extraction module 703, and an anomaly identification module 704.
[0141] The data acquisition module 701 is used to acquire the tightening data of the screw under test during the tightening process.
[0142] The data cleaning module 702 is used to remove abnormal data from the tightening data and determine the data to be tested.
[0143] The feature extraction module 703 is used to extract features from the test data and determine the feature data.
[0144] The anomaly recognition module 704 is used to input feature data into the anomaly recognition model to obtain the recognition result of the screw under test. The recognition result is used to characterize whether there is an anomaly in the tightening process of the screw under test. The anomaly recognition model is trained based on the feature data of the sample screw, the labeling result corresponding to the feature data of the sample screw, and the category of the sample screw.
[0145] In some embodiments, the device further includes a model training module, which is used to: Before acquiring tightening data of the screw under test during the tightening process, the model training module is configured to:
[0146] An architecture for an anomaly detection model based on CART decision trees.
[0147] Obtain the tightening data of the sample screws.
[0148] Based on the tightening data of the sample screws, the category of the sample screws is determined, which includes negative sample screws and positive sample screws.
[0149] Feature extraction and anomaly labeling are performed on the tightening data of the sample screws to obtain the feature data of the sample screws and the corresponding labeling results.
[0150] Based on the feature data of the sample screws, the labeling results corresponding to the feature data, and the category of the sample screws, the anomaly recognition model is trained and validated, and the trained anomaly recognition model is obtained.
[0151] In some embodiments, the tightening data includes torque data. The model training module is specifically used for:
[0152] Based on the torque data of the sample screws, determine the mean torque, maximum torque, torque distribution kurtosis, and torque distribution skewness of the sample screws.
[0153] Based on the three-standard-deviation method, the first outlier sample screw with abnormal torque mean and / or abnormal torque maximum was identified from all sample screws.
[0154] Based on cluster analysis, a second outlier screw sample was identified from all sample screws, exhibiting abnormal torque distribution kurtosis and / or abnormal torque distribution skewness.
[0155] The first and second outlier screws are identified as negative screws, and the remaining screws in all samples, excluding the first and second outlier screws, are identified as positive screws.
[0156] In some embodiments, the tightening data includes torque data and angle data. The model training module is specifically used for:
[0157] Based on the torque and angle data of the sample screws, feature data of the sample screws are extracted, including multiple feature values.
[0158] Each feature value is marked as an anomaly, and the marking result corresponding to each feature value is determined. The marking result includes normal and abnormal.
[0159] In some embodiments, the tightening process includes a screw-in stage and a tightening stage, and multiple characteristic values include the maximum torque value of the tightening process, the tightening angle difference of the tightening process, the ramp angle value of the tightening process, the maximum torque value of the screw-in stage, the average torque value of the screw-in stage, and the torque distribution kurtosis of the tightening stage.
[0160] The model training module is specifically used for:
[0161] Based on the comparison results of the maximum torque value, the tightening angle difference value, and the climbing angle value during the tightening process with the corresponding preset thresholds, the labeling result corresponding to each feature value in the maximum torque value, the tightening angle difference value, and the climbing angle value during the tightening process is determined.
[0162] Based on the maximum torque value and the mean torque value during the screw-in stage for all sample screws, the labeling result corresponding to each feature value in the maximum torque value and the mean torque value during the screw-in stage is determined by the three-standard deviation method.
[0163] Based on the torque distribution kurtosis of all fastening stages, the labeling result corresponding to each feature value in the torque distribution kurtosis of all fastening stages is determined by cluster analysis.
[0164] In some embodiments, before training and validating the anomaly recognition model based on the feature data of the sample screws, the labeling results corresponding to the feature data, and the category of the sample screws, the model training module is further used for:
[0165] Based on the feature data of the negative sample screws and the corresponding labeling results, the negative sample screws are oversampled to obtain the feature data of the newly added negative sample screws and the corresponding labeling results. The deviation between the sum of the number of negative sample screws and the number of newly added negative sample screws and the number of positive sample screws meets the preset condition.
[0166] In some embodiments, before determining the category of the sample screws based on the tightening data of the sample screws, the model training module is further used for:
[0167] Data cleaning was performed on the tightening data of the sample screws to remove abnormal samples from the sample screws.
[0168] In some embodiments, the feature data includes multiple feature values. The anomaly detection module 704 is further configured to:
[0169] If the identification result indicates that there is an abnormality in the tightening process of the screw under test, the decision path information of the feature data in the anomaly identification model is obtained.
[0170] Based on decision path information, feature values in the feature data that are marked as anomalous are identified.
[0171] It is understood that the screw tightening abnormality identification device of this application embodiment can monitor the screw tightening process online, thereby timely detecting abnormalities in the tightening process, realizing effective monitoring of abnormalities in the tightening process, and thus reducing the impact of screw tightening on battery quality.
[0172] Accordingly, please refer to Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. This application also provides an electronic device including a memory 801 and a processor 802. The memory 801 stores a computer program executable by the processor 802. When the computer program is executed by the processor 802, it performs the steps of the screw tightening abnormality identification method as described in the foregoing embodiments.
[0173] It is understood that the electronic device in this application embodiment can monitor the screw tightening process online, thereby timely detecting abnormalities in the tightening process, achieving effective monitoring of abnormalities in the tightening process, and thus reducing the impact of screw tightening on battery quality.
[0174] Accordingly, this application also provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, perform the steps of the screw tightening anomaly identification method as described in the foregoing embodiments.
[0175] It is understood that the readable storage medium in the embodiments of this application enables the processor to monitor the screw tightening process online, thereby enabling timely detection of abnormalities in the tightening process, achieving effective monitoring of abnormalities in the tightening process, and thus reducing the impact of screw tightening on battery quality.
[0176] The foregoing has provided a detailed description of a screw tightening abnormality identification method, apparatus, device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the technical solutions and core ideas of this application. Those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for identifying abnormal screw tightening, characterized in that, The method includes: Obtain the tightening data of the screw under test during the tightening process; Remove abnormal data from the tightening data to determine the data to be tested; Feature extraction is performed on the data to be tested to determine the feature data; The feature data is input into the anomaly detection model to obtain the identification result of the screw under test. The identification result is used to characterize whether there is an anomaly in the tightening process of the screw under test. The anomaly detection model is trained based on the feature data of the sample screw, the labeling result corresponding to the feature data of the sample screw, and the category of the sample screw. The category of the sample screw includes negative sample screws and positive sample screws. The category of the sample screws is determined based on their tightening data, including: Based on the torque data of the sample screws, determine the mean torque, maximum torque, torque distribution kurtosis, and torque distribution skewness of the sample screws. Based on the three-standard-deviation method, the first outlier sample screws with abnormal torque mean and / or abnormal torque maximum were identified from all the sample screws. Based on cluster analysis, a second outlier sample screw with abnormal torque distribution kurtosis and / or abnormal torque distribution skewness was identified from all the sample screws. The first outlier screw and the second outlier screw are identified as the negative sample screws, and the remaining sample screws among all sample screws, excluding the first outlier screw and the second outlier screw, are identified as the positive sample screws.
2. The screw tightening abnormality identification method according to claim 1, characterized in that, Before acquiring the tightening data of the screw under test during the tightening process, the method further includes: The architecture of the anomaly detection model is built based on the CART decision tree; Obtain the tightening data of the sample screws; Based on the tightening data of the sample screws, the category of the sample screws is determined, and the category of the sample screws includes negative sample screws and positive sample screws; Feature extraction and anomaly marking are performed on the tightening data of the sample screws to obtain the feature data of the sample screws and the marking results corresponding to the feature data; Based on the feature data of the sample screws, the labeling results corresponding to the feature data, and the category of the sample screws, the anomaly recognition model is trained and validated, and the trained anomaly recognition model is obtained.
3. The screw tightening abnormality identification method according to claim 2, characterized in that, The tightening data includes torque data and angle data; feature extraction and anomaly marking are performed on the tightening data of the sample screw to obtain the feature data of the sample screw and the marking results corresponding to the feature data, including: Based on the torque data and angle data of the sample screw, feature data of the sample screw is extracted, and the feature data includes multiple feature values; Each of the aforementioned feature values is marked as an anomaly, and the marking result corresponding to each of the aforementioned feature values is determined. The marking result includes normal and abnormal.
4. The screw tightening abnormality identification method according to claim 3, characterized in that, The tightening process includes a screwing-in stage and a tightening stage. The multiple characteristic values include the maximum torque value of the tightening process, the tightening angle difference value of the tightening process, the climbing angle value of the tightening process, the maximum torque value of the screwing-in stage, the average torque value of the screwing-in stage, and the torque distribution kurtosis of the tightening stage. The step of marking each feature value as an anomaly and determining the marking result corresponding to each feature value includes: Based on the comparison results of the maximum torque value, the tightening angle difference value, and the climbing angle value of the tightening process with the corresponding preset thresholds, the marking result corresponding to each of the feature values in the tightening process is determined. Based on the maximum torque value and the mean torque value of the screw-in stage corresponding to all the sample screws, the labeling result corresponding to each feature value in the maximum torque value and the mean torque value of the screw-in stage is determined by the three-standard deviation method. Based on the torque distribution kurtosis of all the fastening stages, the labeling result corresponding to each feature value in the torque distribution kurtosis of all the fastening stages is determined by cluster analysis.
5. The screw tightening abnormality identification method according to claim 2, characterized in that, Before training and validating the anomaly recognition model based on the feature data of the sample screws, the labeling results corresponding to the feature data, and the category of the sample screws, the method further includes: Based on the feature data of the negative sample screws and the labeling results corresponding to the feature data, the negative sample screws are oversampled to obtain the feature data of the newly added negative sample screws and the labeling results corresponding to the feature data. The deviation between the sum of the number of negative sample screws and the number of newly added negative sample screws and the number of positive sample screws satisfies a preset condition.
6. The screw tightening abnormality identification method according to claim 2, characterized in that, Before determining the category of the sample screw based on the tightening data of the sample screw, the method further includes: Data cleaning is performed on the tightening data of the sample screws to remove abnormal samples from the sample screws.
7. The screw tightening abnormality identification method according to claim 2, characterized in that, The feature data includes multiple feature values; the method further includes: If the identification result indicates that there is an abnormality in the tightening process of the screw under test, then the decision path information of the feature data in the abnormality identification model is obtained; Based on the decision path information, feature values in the feature data that are marked as abnormal are determined.
8. A screw tightening abnormality identification device, characterized in that, The device includes: The data acquisition module is used to acquire tightening data of the screw under test during the tightening process; The data cleaning module is used to remove abnormal data from the tightening data and determine the data to be tested; The feature extraction module is used to extract features from the data to be tested and determine the feature data; An anomaly detection module is used to input the feature data into an anomaly detection model to obtain the detection result of the screw under test. The detection result is used to characterize whether there is an anomaly in the tightening process of the screw under test. The anomaly detection model is trained based on the feature data of the sample screw, the labeling result corresponding to the feature data of the sample screw, and the category of the sample screw. The category of the sample screw includes positive sample screws and negative sample screws. The model training module is used to determine the category of the sample screws based on the tightening data of the sample screws, including: Based on the torque data of the sample screws, determine the mean torque, maximum torque, torque distribution kurtosis, and torque distribution skewness of the sample screws. Based on the three-standard-deviation method, the first outlier sample screw with abnormal torque mean and / or abnormal torque maximum was identified from all the sample screws. Based on cluster analysis, a second outlier sample screw with abnormal torque distribution kurtosis and / or abnormal torque distribution skewness was identified from all the sample screws. The first outlier screw and the second outlier screw are identified as the negative sample screws, and the remaining sample screws among all sample screws, excluding the first outlier screw and the second outlier screw, are identified as the positive sample screws.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor; The memory stores a computer program executable by the processor, which, when executed by the processor, performs the method as described in any one of claims 1-1.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Tightening technology online fault detector based on process data analysis and method of detector
CN107576435A
Product badness prediction method and device, electronic equipment and storage medium
CN114492898A