Workpiece tightening defect classification method, system, controller and storage medium
Patent Information
- Application Number
- CN202510249224.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2026-09-04
AI Technical Summary
[0003]本申请所要解决的技术问题在于,提供一种工件拧紧缺陷分类方法、工件拧紧缺陷分类系统及控制器和计算机可读存储介质,以解决现有技术中无法识别新的缺陷类型,导致出现缺陷分类错误的问题
[0053] Compared with existing technologies, this application has significant advantages and beneficial effects. Through the above technical solutions, the workpiece tightening defect classification method, workpiece tightening defect classification system and controller, and computer-readable storage medium of this application achieve considerable technological advancement and practicality, and have broad industrial application value. They possess at least the following advantages:
Smart Images

Figure CN122695293A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of workpiece processing quality inspection technology, specifically involving a workpiece tightening defect classification method, a workpiece tightening defect classification system and controller, and a computer-readable storage medium. Background Technology
[0002] When performing quality inspection on workpiece tightening data, some defect data may be found. By classifying this defect data, the cause of the defect can be quickly determined, which is beneficial for targeted prevention and process improvement. However, in defect data classification, existing classification methods usually extract features from the collected data to train a classification model. This method can only classify existing defect data and ignores the identification of new types of data. It cannot handle newly emerging defects, thus leading to classification errors. Summary of the Invention
[0003] The technical problem to be solved by this application is to provide a method, system and controller for classifying workpiece tightening defects, and a computer-readable storage medium, so as to solve the problem that the prior art cannot identify new defect types, resulting in defect classification errors.
[0004] To solve or improve the aforementioned technical problems to some extent, according to one aspect of this application, a method for classifying workpiece tightening defects is provided, comprising:
[0005] Obtain the first tightening defect curve and preprocess the first tightening defect curve;
[0006] The preprocessed first tightening defect curve is trimmed according to preset rules to obtain the target tightening defect curve.
[0007] Extract the time-domain features from the target tightening defect curve;
[0008] The time-domain features are input into multiple pre-trained defect recognition models to obtain recognition results. The multiple defect recognition models correspond to different defect types. The recognition results include the target defect type corresponding to the first tightening defect curve or the first tightening defect curve belonging to an undetermined defect type.
[0009] In some embodiments, the step of inputting the multiple time-domain features into multiple pre-trained defect recognition models to obtain recognition results includes:
[0010] The time-domain features are input into multiple defect identification models respectively to obtain the feature hit rate output by each defect identification model;
[0011] Determine whether the feature hit rate reaches or exceeds the corresponding hit rate threshold of the defect identification model;
[0012] When the hit rate of the features does not reach the corresponding hit rate threshold, the first tightening defect curve is determined to be an undetermined defect type.
[0013] When at least one of the feature hit rates reaches or exceeds the corresponding hit rate threshold, the target defect type of the first tightening defect curve is determined according to the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold.
[0014] In some embodiments, the step of determining the target defect type of the first tightening defect curve based on the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold includes:
[0015] The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate;
[0016] When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve;
[0017] When there are multiple target feature hit rates, the defect types corresponding to the multiple defect identification models corresponding to the target feature hit rates are determined as multiple target defect types of the first tightening defect curve.
[0018] In some embodiments, the step of determining the target defect type of the first tightening defect curve based on the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold includes:
[0019] The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate;
[0020] When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve;
[0021] When there are multiple target feature hit rates, the defect type corresponding to the defect identification model with the highest target feature hit rate is determined as the target defect type of the first tightening defect curve.
[0022] In some implementations, the defect identification model is a Bloom filter;
[0023] The steps for pre-training the Bloom filter include:
[0024] The temporal features of multiple second tightening defect curves corresponding to various defect types are extracted respectively to form training datasets for each defect type;
[0025] Bloom filters are built for each defect type based on a portion of the training dataset for each defect type.
[0026] Another portion of the training dataset for each defect type is input into the corresponding Bloom filter, and the hit rate threshold of each Bloom filter is obtained through training.
[0027] In some implementations, the preset rule is to remove the portion of the first tightening defect curve with a torque value of zero after preprocessing.
[0028] According to one embodiment of this application, a workpiece tightening defect classification system is provided, comprising:
[0029] The preprocessing module is configured to acquire a first tightening defect curve and preprocess the first tightening defect curve.
[0030] The trimming module is configured to trim the preprocessed first tightening defect curve based on preset rules to obtain the target tightening defect curve;
[0031] The feature extraction module is configured to extract the temporal features from the target tight defect curve;
[0032] The type recognition module is configured to input the time-domain features into multiple pre-trained defect recognition models to obtain recognition results. The multiple defect recognition models correspond to different defect types, and the recognition results include the target defect type corresponding to the first tightening defect curve or the first tightening defect curve belonging to an undetermined defect type.
[0033] In some implementations, the type identification module includes:
[0034] The output unit is configured to input the time-domain features into multiple defect recognition models respectively, and obtain the feature hit rate output by each defect recognition model respectively;
[0035] The judgment unit is configured to judge whether the feature hit rate reaches the hit rate threshold of the corresponding defect recognition model.
[0036] The type identification unit is configured to determine that the first tightening defect curve belongs to an undetermined defect type when none of the feature hit rates reach or exceed the corresponding hit rate threshold; and to determine the target defect type of the first tightening defect curve according to the defect identification model corresponding to the feature hit rates that reach or exceed the corresponding hit rate threshold when at least one of the feature hit rates reaches or exceeds the corresponding hit rate threshold.
[0037] In some implementations, the type identification unit is configured as follows:
[0038] The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate;
[0039] When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve;
[0040] When there are multiple target feature hit rates, the defect types corresponding to the multiple defect identification models corresponding to the target feature hit rates are determined as multiple target defect types of the first tightening defect curve.
[0041] In some implementations, the type identification unit is configured as follows:
[0042] The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate;
[0043] When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve;
[0044] When there are multiple target feature hit rates, the defect type corresponding to the defect identification model with the highest target feature hit rate is determined as the target defect type of the first tightening defect curve.
[0045] In some implementations, the defect identification model is a Bloom filter;
[0046] The system also includes a model training module, which is configured as follows:
[0047] The temporal features of multiple second tightening defect curves corresponding to various defect types are extracted respectively to form training datasets for each defect type;
[0048] Bloom filters are built for each defect type based on a portion of the training dataset for each defect type.
[0049] Another portion of the training dataset for each defect type is input into the corresponding Bloom filter, and the hit rate threshold of each Bloom filter is obtained through training.
[0050] In some implementations, the preset rule is to remove the portion of the first tightening defect curve with a torque value of zero after preprocessing.
[0051] According to one embodiment of this application, a controller is provided, which includes a memory and a processor. The memory stores a computer program that, when executed by the processor, can implement the steps of the workpiece tightening defect classification method described in any of the above embodiments.
[0052] According to one embodiment of this application, a computer-readable storage medium is provided for storing a computer program that, when executed by a computer or processor, implements the steps of the workpiece tightening defect classification method described in any of the above embodiments.
[0053] Compared with existing technologies, this application has significant advantages and beneficial effects. Through the above technical solutions, the workpiece tightening defect classification method, workpiece tightening defect classification system and controller, and computer-readable storage medium of this application achieve considerable technological advancement and practicality, and have broad industrial application value. They possess at least the following advantages:
[0054] This application, in the process of classifying workpiece tightening defects, removes invalid curve segments from the tightening defect curve by trimming it, thereby reducing the amount of data processing during classification and effectively minimizing the interference of invalid curve segments on data processing in defect classification, thus improving the accuracy of defect classification. It also solves the problem of interference to the defect recognition model caused by the different lengths of the tightening defect curves. This application pre-trains multiple defect type recognition models, with each model corresponding to only one defect type, enabling rapid classification of workpiece tightening defects and the identification of new defect types, avoiding classification errors due to the inability to identify newly emerging defect types.
[0055] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0056] Figure 1 This is a flowchart illustrating a workpiece tightening defect classification method according to an embodiment of this application;
[0057] Figure 2 This is a flowchart illustrating a workpiece tightening defect classification method according to another embodiment of this application;
[0058] Figure 3 for Figure 1 The flowchart of step S40 of the workpiece tightening defect classification method is shown.
[0059] Figure 4 This is a schematic block diagram of a workpiece tightening defect classification system according to an embodiment of this application;
[0060] Figure 5 This is a schematic block diagram of a workpiece tightening defect classification system according to another embodiment of this application;
[0061] Figure 6 This is a schematic block diagram of the type identification module according to an embodiment of this application;
[0062] Figure 7 This is a schematic block diagram of the controller according to an embodiment of this application. Detailed Implementation
[0063] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0064] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “the,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0065] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0066] To further illustrate the technical means and effects adopted by this application to achieve the intended purpose, the following detailed description, in conjunction with the accompanying drawings and preferred embodiments, explains the specific implementation methods and effects of the workpiece tightening defect classification method, workpiece tightening defect classification system and controller and readable storage medium proposed in this application.
[0067] In the equipment manufacturing process, the assembly quality of each component directly determines the quality of the entire equipment. The connection between components usually needs to be achieved by tightening the workpieces. Therefore, the tightening quality of the workpieces is directly related to the quality of the entire equipment.
[0068] For example, in the production of automobile engines, the assembly quality directly affects the final product quality. In the engine assembly workshop, fully automated assembly, where machines completely replace human labor, is not feasible. Most workstations still rely on manual labor to tighten bolts using hand-held electric tightening guns. Therefore, the quality of bolt tightening directly impacts the overall engine assembly quality, necessitating effective monitoring of bolt tightening quality. When tightening quality issues arise, timely analysis of the fault type is crucial for developing targeted solutions.
[0069] However, some new types of faults may occur during engine tightening, and most existing defect classification methods cannot identify these new types of faults, leading to classification errors.
[0070] Based on this, one embodiment of this application provides a method for classifying workpiece tightening defects, such as... Figure 1 As shown, the method for classifying tightening defects in this workpiece includes:
[0071] Step S10: Obtain the first tightening defect curve and preprocess the first tightening defect curve.
[0072] The first tightening defect curve obtained in this step is the tightening curve when a tightening defect occurs during the tightening process of the workpiece. This curve is the torque and angle curve during the tightening process of the workpiece.
[0073] After obtaining the first tightening defect curve, the first tightening defect curve is preprocessed to remove noise points on the first tightening defect curve in order to ensure the accuracy of subsequent feature extraction.
[0074] Optionally, a mean filtering technique is used to smooth the first tightening defect curve. Specifically, multiple pixel values surrounding a pixel on the first tightening defect curve are selected, the average value of these multiple pixel values is calculated, and the calculated average value is used to replace the selected pixel on the first tightening defect curve. This method is then used to iterate through each pixel on the first tightening defect curve, thereby achieving a smoothing operation on the first tightening defect curve.
[0075] Step S20: Based on preset rules, the preprocessed first tightening defect curve is trimmed to obtain the target tightening defect curve.
[0076] In this step, the pre-processed first tightening defect curve is cut according to a preset rule to obtain the curve segment required for the classification of workpiece tightening defects. That is, the useless curve segment in the first tightening defect curve is removed by cutting, and the curve segment retained after cutting is used as the target tightening defect curve.
[0077] In the workpiece tightening process, as the tightening progresses, the torque increases from zero to its maximum value, and then decreases back to zero. During defect classification, there are curve segments that are useless for defect classification, such as the segment in the tightening defect curve where the torque is zero. Removing these useless curve segments can effectively reduce the amount of data processing during defect classification and eliminate their interference with the classification process.
[0078] In one embodiment, the preset rule is to remove the portion of the first tightening defect curve with a torque value of zero after preprocessing, so as to obtain the portion of the first tightening defect curve with a torque value of non-zero. That is, the curve segment from the non-zero torque to the maximum torque value in the first tightening defect curve is taken as the target tightening defect curve.
[0079] Of course, in practical applications, the curve segment corresponding to any torque value range can be selected as the target tightening defect curve according to actual needs.
[0080] Step S30: Extract the time-domain features from the target tightening defect curve.
[0081] It is known that different workpieces will have different tightening times, which will result in target tightening defect curves of different lengths. In the defect type identification process, the different lengths of the target tightening defect curves will affect the accuracy of defect identification.
[0082] Based on this, the time-domain features of the target tightening defect curve are extracted in this step, and the extracted time-domain features are used as input data for the defect identification model. On the one hand, this can reduce the data processing volume of the defect identification model, and on the other hand, it can solve the impact of different lengths of the target tightening defect curve on defect identification.
[0083] The extraction of time-domain features from the target tightening defect curve is achieved using methods in the prior art, which will not be elaborated upon in this application.
[0084] Optionally, the time-domain features of the extracted target tightening defect curve include, but are not limited to, mean, maximum, peak-to-peak value, standard deviation, variance, maximum descent of the curve, maximum ascent of the curve, and slope of the curve.
[0085] Preferably, the time-domain characteristics of the extracted target tightening defect curve are the mean, the maximum descent of the curve, and the slope of the curve.
[0086] Step S40: Input the time-domain features into multiple pre-trained defect recognition models to obtain the recognition results.
[0087] Among them, multiple defect identification models correspond to different defect types, and the identification results include the target defect type corresponding to the first tightening defect curve or the first tightening defect curve belonging to an undetermined defect type.
[0088] In this step, multiple defect identification models can not only identify the already determined defect types (i.e., target defect types), but also identify new defect types (i.e., undetermined defect types), effectively solving the problem of misclassification caused by the inability to identify new defect types.
[0089] In this step, each of the multiple pre-trained defect recognition models corresponds to a specific defect type. This approach allows for the training of only a new defect recognition model when a new defect type emerges, eliminating the need to retrain all existing models and effectively improving the flexibility and scalability of workpiece tightening defect classification.
[0090] In one embodiment, the defect identification model is a Bloom filter. During the training process of the Bloom filter, a Bloom filter is built using a portion of the temporal features of the training dataset. A corresponding Bloom filter is built for each defect type. The temporal features of another portion of the training dataset are input into the Bloom filter. The number of input temporal features in the set of Bloom filters is checked, and then the hit rate threshold of the defect type corresponding to each Bloom filter is trained.
[0091] In one embodiment, such as Figure 2 As shown, the steps for training a Bloom filter include:
[0092] Step S50: Extract the time-domain features of multiple second tightening defect curves corresponding to various defect types, and construct training datasets for each defect type.
[0093] In this step, multiple second tightening defect curves are provided for each defect type, and the time-domain features of the second tightening defect curves corresponding to each defect type are extracted to form the training dataset corresponding to each defect type. That is, each defect type corresponds to a set of training datasets.
[0094] During the extraction of time-domain features of the second tightening defect curve, preprocessing and cropping based on preset rules are performed on the second tightening defect curve. The preprocessing and cropping operations have been described in detail above and will not be repeated here.
[0095] Step S60: Bloom filters corresponding to each defect type are built based on a portion of the training dataset for each defect type.
[0096] In this step, a portion of the training dataset corresponding to each defect type is selected to build a Bloom filter, and the multiple Bloom filters built correspond to different defect types.
[0097] Step S70: Input another part of the training dataset for each defect type into the corresponding Bloom filter, and obtain the hit rate threshold for each Bloom filter through training.
[0098] In this step, another portion of the training dataset corresponding to each defect type (i.e., the data remaining in the training dataset after removing the data used to build the Bloom filter) is input into the corresponding Bloom filter. The hit rate threshold of the Bloom filter is trained by determining how many temporal features in the input data exist in the set of Bloom filters. It should be noted that each trained Bloom filter corresponding to each defect type has its own corresponding hit rate threshold, and these hit rate thresholds can be the same or different.
[0099] In one embodiment, such as Figure 3 As shown, step S40 includes:
[0100] Step S400: Input the time-domain features into multiple defect recognition models respectively to obtain the feature hit rate output by each defect recognition model.
[0101] In this step, the temporal features extracted from the target tightening defect curve are input into each of multiple defect identification models. Each defect identification model queries whether the input temporal features exist in its set and outputs a feature hit rate based on the query result. Each defect identification model outputs a feature hit rate.
[0102] Step S402: Determine whether the feature hit rate reaches or exceeds the hit rate threshold of the corresponding defect recognition model.
[0103] As can be seen from the above description, each defect identification model has its corresponding hit rate threshold. When each defect identification model outputs a feature hit rate, it is compared with the hit rate threshold of each corresponding defect identification model to determine whether the feature hit rate output by the defect identification model reaches or exceeds the hit rate threshold of the defect identification model.
[0104] When the hit rate of the determined features does not reach the hit rate threshold of the corresponding defect identification model, step S404 is executed. When at least one of the determined feature hit rates reaches or exceeds the hit rate threshold of the corresponding defect identification model, step S406 is executed.
[0105] Step S404: When the feature hit rate does not reach the corresponding hit rate threshold, the first tightening defect curve is determined to be an undetermined defect type.
[0106] In this step, when the feature hit rate output by each defect identification model does not reach the hit rate threshold of its corresponding defect identification model, it indicates that the defect type of the first tightening defect curve does not belong to the defect type corresponding to multiple defect identification models. That is, the defect type corresponding to the first tightening defect curve is a new defect type (i.e., an undetermined defect type).
[0107] Step S406: When at least one of the feature hit rates reaches or exceeds the corresponding hit rate threshold, the target defect type of the first tightening defect curve is determined according to the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold.
[0108] In this step, the feature hit rate that reaches or exceeds the hit rate threshold of the corresponding defect identification model is taken as the target feature hit rate. It should be noted that the naming of the target feature hit rate is only for the purpose of clearly describing the technical solution, and is not intended to limit the scope of protection of this application.
[0109] In this step, when one of the feature hit rates output by each defect identification model reaches or exceeds the hit rate threshold of its corresponding defect identification model, that is, when the target feature hit rate is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the defect type of the first tightening curve (i.e., the target defect type).
[0110] In one embodiment, when there are multiple target feature hit rates, the defect types corresponding to the defect identification models corresponding to the multiple target feature hit rates are all determined as the defect types of the first tightening defect curve, that is, the first tightening defect curve has multiple defect types (i.e., multiple target defect types).
[0111] In another embodiment, when there are multiple target feature hit rates, the target feature hit rate with the highest hit rate value among the multiple target feature hit rates is selected, and the defect type corresponding to the defect identification model corresponding to the selected target feature hit rate with the highest hit rate value is determined as the defect type of the first tightening defect curve (i.e., the target defect type).
[0112] Another embodiment of this application provides a workpiece tightening defect classification system, such as Figure 4 As shown, the workpiece tightening defect classification system includes: a preprocessing module 10, a cutting module 20, a feature extraction module 30, and a type recognition module 40.
[0113] The preprocessing module 10 is configured to acquire the first tightening defect curve and preprocess the first tightening defect curve.
[0114] The first tightening defect curve obtained by the preprocessing module 10 is the tightening curve when a tightening defect occurs during the tightening process of the workpiece. This curve is the torque and angle curve during the tightening process of the workpiece.
[0115] After acquiring the first tightening defect curve, the preprocessing module 10 preprocesses the first tightening defect curve to remove noise points on the first tightening defect curve, so as to ensure the accuracy of subsequent feature extraction.
[0116] Optionally, a mean filtering technique is used to smooth the first tightening defect curve. Specifically, multiple pixel values surrounding a pixel on the first tightening defect curve are selected, the average value of these multiple pixel values is calculated, and the calculated average value is used to replace the selected pixel on the first tightening defect curve. This method is then used to iterate through each pixel on the first tightening defect curve, thereby achieving a smoothing operation on the first tightening defect curve.
[0117] The cutting module 20 is configured to cut the pre-processed first tightening defect curve based on preset rules to obtain the target tightening defect curve.
[0118] The cutting module 20 cuts the pre-processed first tightening defect curve according to preset rules to obtain the curve segment required for the classification of workpiece tightening defects. That is, by cutting out the useless curve segment in the first tightening defect curve, the curve segment retained after cutting is used as the target tightening defect curve.
[0119] In the workpiece tightening process, as the tightening progresses, the torque increases from zero to its maximum value, and then decreases back to zero. During defect classification, there are curve segments that are useless for defect classification, such as the segment in the tightening defect curve where the torque is zero. Removing these useless curve segments can effectively reduce the amount of data processing during defect classification and eliminate their interference with the classification process.
[0120] In one embodiment, the preset rule is to remove the portion of the first tightening defect curve with a torque value of zero after preprocessing, so as to obtain the portion of the first tightening defect curve with a torque value of non-zero. That is, the curve segment from the non-zero torque to the maximum torque value in the first tightening defect curve is taken as the target tightening defect curve.
[0121] Of course, in practical applications, the curve segment corresponding to any torque value range can be selected as the target tightening defect curve according to actual needs.
[0122] The feature extraction module 30 is configured to extract the temporal features from the target tightening defect curve.
[0123] It is known that different workpieces will have different tightening times, which will result in target tightening defect curves of different lengths. In the defect type identification process, the different lengths of the target tightening defect curves will affect the accuracy of defect identification.
[0124] Based on this, the feature extraction module 30 extracts the time-domain features of the target tightening defect curve, and uses the extracted time-domain features as input data for the defect identification model. On the one hand, this can reduce the data processing volume of the defect identification model, and on the other hand, it can solve the impact of different lengths of the target tightening defect curve on defect identification.
[0125] The extraction of time-domain features from the target tightening defect curve is achieved using methods in the prior art, which will not be elaborated upon in this application.
[0126] Optionally, the time-domain features of the extracted target tightening defect curve include, but are not limited to, mean, maximum, peak-to-peak value, standard deviation, variance, maximum descent of the curve, maximum ascent of the curve, and slope of the curve.
[0127] Preferably, the time-domain characteristics of the extracted target tightening defect curve are the mean, the maximum descent of the curve, and the slope of the curve.
[0128] The type recognition module 40 is configured to input time-domain features into multiple pre-trained defect recognition models to obtain recognition results.
[0129] Among them, multiple defect identification models correspond to different defect types, and the identification results include the target defect type corresponding to the first tightening defect curve or the first tightening defect curve belonging to an undetermined defect type.
[0130] The type identification module 40 can identify not only the already determined defect types (i.e. target defect types) through multiple defect identification models, but also new defect types (i.e. undetermined defect types), effectively solving the problem of misclassification caused by the inability to identify new defect types.
[0131] In this system, multiple pre-trained defect identification models are used, each corresponding to a specific defect type. This approach allows for the training of a new defect identification model only when a new defect type emerges, eliminating the need to retrain all existing models and effectively enhancing the flexibility and scalability of the workpiece tightening defect classification system.
[0132] In one embodiment, the defect identification model is a Bloom filter. During the training process of the Bloom filter, a Bloom filter is built using a portion of the temporal features of the training dataset. A corresponding Bloom filter is built for each defect type. The temporal features of another portion of the training dataset are input into the Bloom filter. The number of input temporal features in the set of Bloom filters is checked, and then the hit rate threshold of the defect type corresponding to each Bloom filter is trained.
[0133] In one embodiment, such as Figure 5 As shown, the workpiece tightening defect classification system also includes a model training module 50, which is configured to: extract the time-domain features of multiple second tightening defect curves corresponding to multiple defect types respectively, and form training datasets for each defect type respectively; establish Bloom filters corresponding to each defect type based on a part of the training dataset for each defect type; input the other part of the training dataset for each defect type into the corresponding Bloom filter, and obtain the hit rate threshold of each Bloom filter through training.
[0134] During the training of the Bloom filter, multiple second tightening defect curves are provided for each defect type, and the temporal features of the second tightening defect curves corresponding to each defect type are extracted to form the training dataset corresponding to each defect type. That is, each defect type corresponds to a set of training datasets.
[0135] During the extraction of time-domain features of the second tightening defect curve, preprocessing and cropping based on preset rules are performed on the second tightening defect curve. The preprocessing and cropping operations have been described in detail above and will not be repeated here.
[0136] The model training module 50 selects a portion of the training dataset corresponding to each defect type to build a Bloom filter. The multiple Bloom filters built correspond to different defect types.
[0137] The model training module 50 inputs another portion of the training dataset corresponding to each defect type (i.e., the data remaining in the training dataset after removing the data used to build the Bloom filter) into the corresponding Bloom filter. It trains the Bloom filter's hit rate threshold by determining how many temporal features from the input data exist in the Bloom filter set. It should be noted that each trained Bloom filter for each defect type has its own corresponding hit rate threshold, which can be the same or different.
[0138] In one embodiment, such as Figure 6 As shown, the type recognition module 40 includes: an output unit 400, a judgment unit 402, and a type recognition unit 404.
[0139] The output unit 400 is configured to input time-domain features into multiple defect recognition models to obtain the feature hit rate output by each defect recognition model.
[0140] The temporal features extracted from the target tightening defect curve are input into each of multiple defect identification models. The output unit 400 queries whether the input temporal features exist in the set of defect identification models based on the defect identification model, and outputs a feature hit rate based on the query result. Each defect identification model outputs a feature hit rate.
[0141] The judgment unit 402 is configured to judge whether the feature hit rate reaches or exceeds the hit rate threshold of the corresponding defect recognition model.
[0142] As can be seen from the above description, each defect identification model has its corresponding hit rate threshold. When each defect identification model outputs a feature hit rate, it is compared with the hit rate threshold of each corresponding defect identification model to determine whether the feature hit rate output by the defect identification model reaches or exceeds the hit rate threshold of the defect identification model.
[0143] The type identification unit 404 is configured to determine that the first tightening defect curve belongs to an undetermined defect type when none of the feature hit rates reach the corresponding hit rate threshold; and to determine the target defect type of the first tightening defect curve according to the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold when at least one of the feature hit rates reaches or exceeds the corresponding hit rate threshold.
[0144] When the feature hit rate output by each defect identification model does not reach the hit rate threshold of its corresponding defect identification model, it indicates that the defect type of the first tightening defect curve does not belong to the defect type corresponding to multiple defect identification models. That is, the defect type corresponding to the first tightening defect curve is a new defect type (i.e., an undetermined defect type).
[0145] The feature hit rate that reaches or exceeds the hit rate threshold of the corresponding defect identification model is taken as the target feature hit rate. It should be noted that the naming of the target feature hit rate is only for the purpose of clearly describing the technical solution, and is not intended to limit the scope of protection of this application.
[0146] When the feature hit rate output by each defect identification model reaches or exceeds the hit rate threshold of its corresponding defect identification model, i.e. when the target feature hit rate is one, the type identification unit 404 determines the defect type corresponding to the defect identification model corresponding to the target feature hit rate as the defect type of the first tightening curve (i.e., the target defect type).
[0147] In one embodiment, when the number of target feature hit rates is multiple, the type identification unit 404 determines the defect type corresponding to the defect identification model corresponding to the multiple target feature hit rates as the defect type of the first tightening defect curve, that is, the first tightening defect curve has multiple defect types (i.e. multiple target defect types).
[0148] In another embodiment, when there are multiple target feature hit rates, the type identification unit 404 selects the target feature hit rate with the highest hit rate value among the multiple target feature hit rates, and determines the defect type corresponding to the defect identification model corresponding to the selected target feature hit rate with the highest hit rate value as the defect type of the first tightening defect curve (i.e., the target defect type).
[0149] According to another embodiment of this application, a controller is provided. For example... Figure 7 As shown, the components of the controller 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.
[0150] The controller 700 also includes an access device 740 that enables the controller 700 to communicate via one or more networks 760. Examples of these networks 760 include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Networks (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0151] In one embodiment, the aforementioned components of the controller 700 and Figure 7 Other components, not shown, can also be connected to each other, for example, via bus 730. It should be understood that... Figure 7 The block diagram of the controller 700 shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0152] The controller 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The controller 700 can also be a mobile or stationary server.
[0153] The processor 720 is used to execute the following computer-executable instructions to implement the steps of the above-mentioned workpiece tightening defect classification method.
[0154] The above is a schematic diagram of a controller according to this application. It should be noted that the technical solution of this controller and the technical solution of the workpiece tightening defect classification method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the workpiece tightening defect classification method described above.
[0155] Another embodiment of this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are used to implement the steps of the above-described workpiece tightening defect classification method.
[0156] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the workpiece tightening defect classification method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the control method of the conveying device in the production line described above.
[0157] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0158] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0159] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this specification is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this specification. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0160] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0161] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of this specification, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for classifying workpiece tightening defects, characterized in that, include: Obtain the first tightening defect curve and preprocess the first tightening defect curve; The preprocessed first tightening defect curve is trimmed according to preset rules to obtain the target tightening defect curve. Extract the time-domain features from the target tightening defect curve; The time-domain features are input into multiple pre-trained defect recognition models to obtain recognition results. The multiple defect recognition models correspond to different defect types. The recognition results include the target defect type corresponding to the first tightening defect curve or the first tightening defect curve belonging to an undetermined defect type.
2. The method for classifying workpiece tightening defects according to claim 1, characterized in that, The step of inputting the multiple time-domain features into multiple pre-trained defect recognition models to obtain recognition results includes: The time-domain features are input into multiple defect identification models respectively to obtain the feature hit rate output by each defect identification model; Determine whether the feature hit rate reaches or exceeds the corresponding hit rate threshold of the defect identification model; When the hit rate of the features does not reach the corresponding hit rate threshold, the first tightening defect curve is determined to be an undetermined defect type. When at least one of the feature hit rates reaches or exceeds the corresponding hit rate threshold, the target defect type of the first tightening defect curve is determined according to the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold.
3. The method for classifying workpiece tightening defects according to claim 2, characterized in that, The step of determining the target defect type of the first tightening defect curve based on the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold includes: The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate; When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve; When there are multiple target feature hit rates, the defect types corresponding to the multiple defect identification models corresponding to the target feature hit rates are determined as multiple target defect types of the first tightening defect curve.
4. The method for classifying workpiece tightening defects according to claim 2, characterized in that, The step of determining the target defect type of the first tightening defect curve based on the defect identification model corresponding to the feature hit rate that reaches or exceeds the corresponding hit rate threshold includes: The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate; When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve; When there are multiple target feature hit rates, the defect type corresponding to the defect identification model with the highest target feature hit rate is determined as the target defect type of the first tightening defect curve.
5. The method for classifying workpiece tightening defects according to claim 1 or 2, characterized in that, The defect identification model is a Bloom filter; The steps for pre-training the Bloom filter include: The temporal features of multiple second tightening defect curves corresponding to various defect types are extracted respectively to form training datasets for each defect type; Bloom filters are built for each defect type based on a portion of the training dataset for each defect type. Another portion of the training dataset for each defect type is input into the corresponding Bloom filter, and the hit rate threshold of each Bloom filter is obtained through training.
6. The method for classifying workpiece tightening defects according to claim 1, characterized in that, The preset rule is to remove the portion of the first tightening defect curve with a torque value of zero after preprocessing.
7. A workpiece tightening defect classification system, characterized in that, include: The preprocessing module is configured to acquire a first tightening defect curve and preprocess the first tightening defect curve. The trimming module is configured to trim the preprocessed first tightening defect curve based on preset rules to obtain the target tightening defect curve; The feature extraction module is configured to extract the temporal features from the target tight defect curve; The type recognition module is configured to input the time-domain features into multiple pre-trained defect recognition models to obtain recognition results. The multiple defect recognition models correspond to different defect types, and the recognition results include the target defect type corresponding to the first tightening defect curve or the first tightening defect curve belonging to an undetermined defect type.
8. The workpiece tightening defect classification system according to claim 7, characterized in that, The type identification module includes: The output unit is configured to input the time-domain features into multiple defect recognition models respectively, and obtain the feature hit rate output by each defect recognition model respectively; The judgment unit is configured to judge whether the feature hit rate reaches the hit rate threshold of the corresponding defect recognition model. The type identification unit is configured to determine that the first tightening defect curve belongs to an undetermined defect type when none of the feature hit rates reach or exceed the corresponding hit rate threshold; and to determine the target defect type of the first tightening defect curve according to the defect identification model corresponding to the feature hit rates that reach or exceed the corresponding hit rate threshold when at least one of the feature hit rates reaches or exceeds the corresponding hit rate threshold.
9. The workpiece tightening defect classification system according to claim 8, characterized in that, The type identification unit is configured as follows: The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate; When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve; When there are multiple target feature hit rates, the defect types corresponding to the multiple defect identification models corresponding to the target feature hit rates are determined as multiple target defect types of the first tightening defect curve.
10. The workpiece tightening defect classification system according to claim 8, characterized in that, The type identification unit is configured as follows: The feature hit rate that reaches or exceeds the corresponding hit rate threshold is taken as the target feature hit rate; When the number of target feature hit rates is one, the defect type corresponding to the defect identification model corresponding to the target feature hit rate is determined as the target defect type of the first tightening defect curve; When there are multiple target feature hit rates, the defect type corresponding to the defect identification model with the highest target feature hit rate is determined as the target defect type of the first tightening defect curve.
11. The workpiece tightening defect classification system according to claim 7 or 8, characterized in that, The defect identification model is a Bloom filter; The system also includes a model training module, which is configured as follows: The temporal features of multiple second tightening defect curves corresponding to various defect types are extracted respectively to form training datasets for each defect type; Bloom filters are built for each defect type based on a portion of the training dataset for each defect type. Another portion of the training dataset for each defect type is input into the corresponding Bloom filter, and the hit rate threshold of each Bloom filter is obtained through training.
12. The workpiece tightening defect classification system according to claim 7, characterized in that, The preset rule is to remove the portion of the first tightening defect curve with a torque value of zero after preprocessing.
13. A controller comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, enables the workpiece tightening defect classification method according to any one of claims 1-6.
14. A computer-readable storage medium for storing a computer program that, when executed by a computer or processor, implements the steps of the workpiece tightening defect classification method according to any one of claims 1-6.