Model training method, product quality prediction method and device

By clustering samples with similar production processes and constructing independent models for each subset, the method addresses inefficiencies in product quality prediction, enhancing accuracy and reducing resource use in manufacturing environments.

CN119204763APending Publication Date: 2024-12-27ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310753725.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing product quality prediction methods face challenges due to varying production processes and large volumes of data with null values, leading to inefficient resource usage and inaccurate predictions, especially in manufacturing environments with high data confidentiality requirements.

Method used

A method for training product quality prediction models by clustering samples based on feature data to form subsets with similar production processes, processing null values, and constructing independent models for each subset, which are then used for accurate quality prediction.

Benefits of technology

The approach enhances prediction accuracy and reduces computational resources by automating the clustering process, ensuring models adapt to diverse manufacturing processes without requiring domain knowledge, thus improving product quality prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119204763A_ABST
    Figure CN119204763A_ABST
Patent Text Reader

Abstract

The invention provides a product quality prediction model training method, a product quality prediction method and a product quality prediction device. The training method comprises the steps that a training data set is obtained, and the training data set comprises feature data of a plurality of samples collected at a plurality of workstations on a production line and a label which represents whether the quality of each sample is qualified or not; according to the feature data of the multiple samples, the multiple samples in the training data set are clustered to form multiple training data subsets, and each training data subset comprises the feature data of the corresponding number of samples and the labels of the corresponding number of samples; respectively constructing corresponding product quality prediction models for the plurality of training data subsets; and training the corresponding product quality prediction model based on each training data subset to obtain a plurality of trained product quality prediction models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of production line product quality prediction, and in particular to a product quality prediction model training method, a product quality prediction method and prediction device, a computer program product and a computer device. Background Art

[0002] In the field of manufacturing, with the development of industrial Internet of Things, the manufacturing process and life cycle of products have begun to be monitored to varying degrees, generating a large number of monitoring records. At present, all data sets from the production line are usually used to predict product quality, and the entire data set records the production data of multiple products. Different types of products may have different production and manufacturing processes, which makes the collected production data of various types of products quite different, and puts forward higher requirements for product quality prediction. In addition, the amount of collected data often reaches tens of thousands or even higher orders of magnitude. How to improve the product quality prediction performance based on a large amount of data and a wide variety of production and manufacturing data sets is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The inventors have found that different types of products have different production processes, which results in a large number of null values ​​in the data set that brings together multiple production lines. If the null value data is not processed, product quality prediction based on the original production and manufacturing data set will take up a lot of computing resources, and the performance of the product quality prediction model established based on the production and manufacturing sample data set containing a large number of null values ​​is also difficult to achieve the expected effect. If all null value data are to be deleted, the distribution of null value data for different types of products varies greatly, making it difficult to automatically process all null value data. Furthermore, due to the confidentiality requirements of the production and manufacturing process, it is usually difficult to obtain sufficient domain or background knowledge about the attributes of the collected product production data and the manufacturing process. Therefore, it is desirable to provide an improved solution to at least solve the above technical problems.

[0004] The present invention provides a product quality prediction model training method, a product quality prediction method and prediction device, a computer program product and a computer device.

[0005] According to one aspect of the present invention, there is provided a method for training a product quality prediction model, comprising: obtaining a training data set, the training data set comprising feature data of a plurality of samples collected at a plurality of workstations on a production line, and a label of each sample indicating whether its quality is qualified; clustering the plurality of samples in the training data set according to the feature data of the plurality of samples to form a plurality of training data subsets, each training data subset comprising feature data of a corresponding number of samples and the labels of the corresponding number of samples; constructing corresponding product quality prediction models for the plurality of training data subsets respectively; and training the corresponding product quality prediction model based on each training data subset to obtain a plurality of trained product quality prediction models.

[0006] The training method of the product quality prediction model of the embodiment of the present invention automatically clusters the multiple samples in the training data set according to the similarity between the feature data of multiple samples collected at multiple workstations on the production line to form multiple training data subsets, so that the multiple samples in each training data subset obtained have the same or similar production and manufacturing process. The product quality prediction model independently trained for each training data subset can predict whether the quality of products with the same or similar production and manufacturing process is qualified. The multiple trained product quality prediction models can be used for quality prediction of products with different production and manufacturing processes. Therefore, the product quality prediction model obtained by the training method of the embodiment of the present invention has a more accurate prediction result for product quality. In addition, the process of clustering multiple samples can be fully automated without manual operation, and does not require field or background knowledge about the feature data of the collected samples, which is suitable for the field of production and manufacturing technology with high data confidentiality requirements.

[0007] Optionally, clustering the multiple samples in the training data set according to the characteristic data of the multiple samples to form multiple training data subsets, including: judging whether there is a first workstation that meets preset conditions among the multiple workstations according to the characteristic data of the multiple samples; and clustering the multiple samples in the training data set to form multiple training data subsets based on the judgment result.

[0008] Optionally, based on the judgment result, clustering multiple samples in the training data set to form multiple training data subsets includes: if the judgment result is yes, classifying the training data set into a first training data set and a second training data set, the feature data corresponding to the first workstation of each sample in the first training data set are all non-null values, and the feature data corresponding to the first workstation of each sample in the second training data set are all null values; and clustering multiple samples in the first training data set to form multiple first training data subsets, and clustering multiple samples in the second training data set to form multiple second training data subsets.

[0009] Optionally, judging, based on the characteristic data of the multiple samples, whether there is a first workstation satisfying a preset condition among the multiple workstations includes: judging, based on the characteristic data of the multiple samples, whether there are one or more first workstations among the multiple workstations whose quality failure rate of passed samples is higher than a first threshold; or judging, based on the characteristic data of the multiple samples, whether there are one or more first workstations with a quality detection function among the multiple workstations.

[0010] In this way, the first workstations with a high quality failure rate of samples passing through the station or with a quality inspection function can be screened out, because these workstations are usually key links in the production line or positions that have an important impact on product quality. The training data set containing multiple samples is first roughly classified according to whether the samples have passed through the first workstation. For example, samples that have passed through key links or important positions on the production line, or passed through workstations with a high failure rate are classified into the first training data set, and other samples are classified into the second training data set; then, according to the similarity between the feature data of different samples, the first training data set and the second training data set are further subclassified, that is, clustered into multiple first training data subsets and multiple second training data subsets, so that the feature values ​​and data structures of the feature data of a corresponding number of samples in each training data subset have a high similarity, which usually represents samples with the same or similar production and manufacturing processes. This is very helpful for uniformly processing null value feature data for multiple samples in each training data subset before model training, and performing model training based on multiple training data subsets after processing null value features, which greatly reduces the amount of calculation, shortens the calculation time, accelerates the model convergence speed, and is conducive to training product quality prediction models with more accurate prediction results and more suitable for diversified production and manufacturing process products.

[0011] Optionally, before clustering the feature data of the multiple samples included in each of the first training data set and the second training data set, the method further includes: performing a dimensionality reduction operation on the feature data of the samples in the first training data set and the second training data set, respectively, and then clustering the samples in the first training data set and the second training data set according to the feature data of the samples after the dimensionality reduction. Thus, the dimensionality reduction operation can significantly reduce the computation time for clustering the samples in the first training data set and the second training data set without reducing the useful information of the data set. Each first training data subset and each second training data subset are composed of the feature data of the corresponding samples before the dimensionality reduction, so as not to affect the subsequent prediction of the sample quality based on the product quality prediction model.

[0012] Optionally, before training the corresponding product quality prediction model based on each training data subset, the method also includes: preprocessing the feature data of the workstation whose null value sample rate is higher than the second threshold in each training data subset, wherein the preprocessing includes deleting the feature data of the workstation whose null value sample rate is higher than the second threshold from the multiple samples, or filling the feature data of the workstation whose null value sample rate is higher than the second threshold.

[0013] Therefore, deleting empty-value feature data can reduce the computing resources occupied by a large amount of empty-value feature data contained in the feature data of the sample, retain the feature data with information, and accelerate the training process of the model; compared with the filling method, deleting empty-value feature data can reduce the introduction of additional information, which is more conducive to ensuring the accuracy of subsequent classification results.

[0014] On the other hand, an embodiment of the present invention also provides a method for predicting product quality, comprising obtaining feature data of a product collected at multiple workstations on a production line; determining a sample data subset that is closest to the product from multiple sample data subsets based on the feature data of the product; using a product quality prediction model corresponding to the closest sample data subset to predict the quality of the product based on the feature data of the product; wherein the multiple sample data subsets are pre-formed by clustering multiple samples based on the feature data of multiple samples, and the feature data of the multiple samples include feature data collected at the multiple workstations on the production line, and the multiple sample data subsets have respective corresponding pre-trained product quality prediction models.

[0015] The prediction method of the embodiment of the present invention, based on the characteristic data of any product, determines that the sample in a sample data subset with the highest similarity to the product has the same or similar production and manufacturing process as the product. The product quality prediction model parameters obtained by training the sample data subset have been optimized and configured using multiple samples with the same or similar production and manufacturing processes during the training phase. Therefore, the product quality prediction model has a high degree of adaptability to the product, and the quality prediction result of the product is more accurate, which is beneficial for enterprises to improve their production and manufacturing processes based on more accurate prediction results.

[0016] Optionally, there is a first workstation among the multiple workstations that meets preset conditions, and determining a sample data subset that is closest to the product from the multiple sample data subsets based on the characteristic data of the product includes: judging whether the product has passed through the first workstation based on the characteristic data of the product; and determining a sample data subset that is closest to the product from multiple first sample data subsets or multiple second sample data subsets based on the judgment result.

[0017] Optionally, the multiple sample data subsets include: the multiple first sample data subsets and the multiple second sample data subsets, wherein the feature data corresponding to the first workstation for each sample in each first sample data subset is a non-null value, and the feature data corresponding to the first workstation for each sample in each second sample data subset is a null value, and determining a sample data subset closest to the product from the multiple sample data subsets based on the judgment result includes: if the judgment result is yes, determining a first sample data subset closest to the product from the multiple first sample data subsets; if the judgment result is no, determining a second sample data subset closest to the product from the multiple second sample data subsets.

[0018] Therefore, according to whether the product passes through a key link or an important position on the production line, or whether it passes through a workstation with a high quality failure rate, the feature data of the product is classified into one of the multiple first sample data subsets or one of the multiple second sample data subsets.

[0019] On the other hand, an embodiment of the present invention also provides a product quality prediction device, comprising: an acquisition module, used to acquire feature data of a product collected at multiple workstations on a production line; a calculation module, used to determine a sample data subset that is closest to the product from multiple sample data subsets based on the feature data of the product; a prediction module, used to use a product quality prediction model corresponding to the closest sample data subset to predict the quality of the product based on the feature data of the product; wherein the multiple sample data subsets are pre-formed by clustering multiple samples based on the feature data of multiple samples, and the feature data of the multiple samples include the feature data collected at the multiple workstations on the production line, and the multiple sample data subsets have respective corresponding pre-trained product quality prediction models.

[0020] On the other hand, an embodiment of the present invention also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements a training method for a product quality prediction model according to an embodiment of the present invention, or implements a method for predicting product quality according to an embodiment of the present invention.

[0021] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium storing executable code, which, when executed, implements a training method for a product quality prediction model according to an embodiment of the present invention, or implements a method for predicting product quality according to an embodiment of the present invention.

[0022] On the other hand, an embodiment of the present invention also provides a computer device, including a processor, a memory, and a computer program stored in the memory. When the computer program is executed by the processor, it implements a training method for a product quality prediction model according to an embodiment of the present invention, or implements a method for predicting product quality according to an embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The following describes the embodiments of the present invention in more detail with reference to the accompanying drawings, so that the principles, features and advantages of the present invention can be better understood. The accompanying drawings include:

[0024] Figure 1 A schematic diagram showing a flow chart of a method for training a product quality prediction model according to an embodiment of the present invention;

[0025] Figure 2 A schematic flow chart of a method for training a product quality model according to another embodiment of the present invention is shown;

[0026] Figure 3 A schematic diagram showing a data structure of feature data of multiple samples in a training data set according to an embodiment of the present invention;

[0027] Figure 4 A schematic diagram showing three first training data subsets and one second training data subset obtained based on sample clustering;

[0028] Figure 5 A schematic diagram showing a process of deleting feature data of workstations in each training data subset where the null value sample rate is higher than a second threshold value according to an embodiment of the present invention;

[0029] Figure 6 A schematic flow chart of a method for predicting product quality according to an embodiment of the present invention is shown;

[0030] Figure 7 A schematic flow chart of a method for predicting product quality according to another embodiment of the present invention is shown;

[0031] Figure 8 A structural block diagram of a device for predicting product quality according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0032] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0033] It should be understood that, in this document, the expressions "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance, nor should they be understood as implicitly indicating the number of technical features indicated. Features defined as "first" or "second" may explicitly or implicitly indicate that at least one of the features is included.

[0034] refer to Figure 1 , Figure 1 A schematic flow chart of a method for training a product quality prediction model according to an embodiment of the present invention is shown.

[0035] In some embodiments, the training method may include:

[0036] Step 11, obtaining a training data set, wherein the training data set includes feature data of multiple samples collected at multiple workstations on a production line, and a label of each sample indicating whether its quality is qualified;

[0037] Step 13, clustering the multiple samples in the training data set according to the feature data of the multiple samples to form multiple training data subsets, each training data subset including the feature data of a corresponding number of samples and the labels of the corresponding number of samples;

[0038] Step 15, constructing corresponding product quality prediction models for the multiple training data subsets respectively;

[0039] Step 17: training the corresponding product quality prediction model based on each training data subset to obtain a plurality of trained product quality prediction models.

[0040] In some embodiments, in step 11, the production line includes one or more production lines. The multiple samples may include samples of multiple products, and the number of samples of each product is one or more. The samples of different products pass through different workstations on the production line due to different production processes. The "passing through" any workstation described in the embodiments of the present application means that the sample has completed the corresponding process at the workstation. The product or sample may be a component, or a semi-finished product or finished product composed of components.

[0041] In some embodiments, the characteristic data of the sample may include but is not limited to the parameters or test results of the sample itself, and may also include, for example, the environmental parameters (such as temperature, humidity, etc.) when the sample passes through a workstation, and / or the setting parameters of the production and processing machine during the sample production process, because these parameters may affect the quality of the products produced.

[0042] In some embodiments, each sample has a unique sample ID, the number of sample features collected at each of the multiple workstations may be one or more, the feature data of the multiple samples may be represented by a two-dimensional matrix, the multiple rows of the two-dimensional matrix may respectively correspond to the sample IDs of the multiple samples, the multiple columns of the two-dimensional matrix may respectively correspond to the multiple sample features collected at the multiple workstations, each column of the two-dimensional matrix corresponds to a sample feature collected at one of the multiple workstations, for example, if three features of the sample are collected at workstation S_2, then the three features correspond to three columns in the two-dimensional matrix. Usually, the multiple columns of the two-dimensional matrix are arranged in the order of the multiple workstations on the production line. If multiple features of the sample are collected at a certain workstation, then the multiple features occupy multiple consecutive columns in the two-dimensional matrix.

[0043] In some embodiments, in step 13, multiple samples in the training data set are clustered according to the feature data of the multiple samples, and multiple samples can be clustered according to the data structure and feature values ​​of the feature data of the multiple samples. The data structure includes the distribution of workstations corresponding to the null value feature data in the feature data of the sample, which can be reflected in the feature data of the sample as the distribution of null value elements in the feature vector of the sample. Because there are a large number of null value data in the product feature data set collected on the actual production line, these null values ​​often represent that the product has not passed through a certain workstation, so the distribution of null value features reflects the production and manufacturing process of the product. The more similar the null value feature distribution is, the closer the feature values ​​of the non-null values ​​are, the more similar the production and manufacturing processes of the products are, and the more likely they are products of the same type or batch. Therefore, in the embodiment of the present invention, clustering multiple samples based on the data structure and feature values ​​of the feature data of multiple samples is conducive to clustering products with similar production and manufacturing processes into the same cluster, that is, the same training data subset.

[0044] In some embodiments, the "corresponding number" refers to the number of samples included in each training data subset. Multiple samples are clustered through a clustering algorithm to form multiple clusters, i.e., multiple training data subsets. The number of samples included in each cluster can be the same or different.

[0045] In some embodiments, in step 13, the algorithm for clustering the multiple samples in the training data set may include: K-means algorithm, hierarchical clustering algorithm, density clustering algorithm such as DBSCAN and OPTICS, Gaussian mixture model (GMM), etc.

[0046] In some embodiments, when setting the number of clusters (i.e., training data subsets) formed by clustering, it is necessary to balance the variance of samples within the cluster and the distance between clusters (e.g., the centers of adjacent clusters) so that the variance of samples in each cluster (i.e., each training data subset) formed after clustering is as small as possible and the distance between adjacent clusters is as large as possible, so as to facilitate distinguishing different types of products.

[0047] In some embodiments, in step 15, the constructed product quality prediction model adopts the architecture of a machine learning model (e.g., a deep learning model). Specifically, AdaBoost (Adaptive Boosting), XGBoost (eXtreme Gradient Boosting), a multi-layer perceptron MLP, a logistic regression model, a support vector machine (SVM) model, a random forest model, or a convolutional neural network (CNN), etc. may be used.

[0048] In some embodiments, in step 17, the corresponding product quality prediction model is trained based on the feature data of the corresponding number of samples included in each training data subset and the labels of the corresponding number of samples to obtain multiple trained product quality prediction models. The multiple product quality prediction models obtained through training have good adaptability to the multiple sample types contained in the multiple training data subsets, and are suitable for quality prediction of products with different production and manufacturing processes, because during the machine learning process, each product quality prediction model will learn the relative importance of each feature in the feature data of the sample when learning based on the feature data of the corresponding number of samples in the corresponding training data subset. Different products have different production and manufacturing processes, and the relative importance of features is different, so the parameters of the product quality prediction model obtained through training are different. For example, products with different production and manufacturing processes will have different workstations that have an important impact on their quality.

[0049] It should be noted that the clustering in step 13 of the embodiment of the present invention may be unsupervised, while the training process of the product quality prediction model in step 17 is supervised.

[0050] refer to Figure 2 , Figure 2 A schematic flow chart of a method for training a product quality model according to another embodiment of the present invention is shown.

[0051] In some embodiments, the training method may include: step 21, step 23, step 25, step 27, and step 29; or the training method may include: step 21, step 23, step 31, step 33, and step 35.

[0052] In step 21, a training data set is obtained, where the training data set includes feature data of multiple samples collected at multiple workstations on a production line, and a label of each sample indicating whether its quality is qualified.

[0053] In step 23, based on the characteristic data of the multiple samples, it is determined whether there is a first workstation that meets a preset condition among the multiple workstations.

[0054] In some embodiments, step 23 may include: judging, based on the feature data of the plurality of samples, whether there are one or more first workstations among the plurality of workstations whose quality unqualified rate of samples passing through the station is higher than a first threshold. Specifically, for a single feature collected at any workstation, first delete the sample recorded as a null value under the single feature, and then calculate the proportion of unqualified samples in the remaining samples under the single feature (i.e., the sample corresponding to the data of the single feature is a non-null value) according to the sample label, and obtain the unqualified sample rate of each feature collected at each workstation among the plurality of workstations according to this method, and compare the unqualified sample rates of all features. If there is at least one feature among the features collected at a certain workstation that shows an unqualified sample rate higher than the first threshold, then the workstation is identified as the first workstation. In the production line, the first workstation may be a workstation for product quality re-inspection. The first threshold may be, for example, 2%. The "passing station sample" refers to at least one feature data of the sample collected at the workstation that is a non-null value, that is, the sample has a production and manufacturing process at the workstation.

[0055] In some other embodiments, step 23 may include: judging whether there are one or more first workstations with quality detection function among the multiple workstations based on the feature data of the multiple samples. Specifically, the workstation with quality detection function may be predefined, and then it can be judged whether there is the first workstation among the multiple workstations corresponding to the feature data in the acquired training data set based on whether there is at least one non-null value record in the feature data corresponding to the first workstation. If there is at least one non-null value record in the feature data corresponding to the first workstation, it is judged that the first workstation exists, otherwise it does not exist. Here, the workstation with quality detection function may be equipped with fault detection equipment, such as sensors, monitoring systems or automation equipment for real-time collection of feature data of the workstation and / or real-time collection of feature data of the product at the workstation, and the feature data can be directly used to detect product quality, because not all feature data collected at the workstation may be directly used for product quality detection.

[0056] It should be noted that the “first workstation” does not refer to the first workstation, but is an identification of a workstation that meets preset conditions.

[0057] If the result of the judgment is yes, step 25 is executed to classify the training data set into a first training data set 251 and a second training data set 252, wherein the feature data corresponding to the first workstation of each sample in the first training data set 251 are all non-null values, and the feature data corresponding to the first workstation of each sample in the second training data set 252 are all null values. In this way, the samples can be roughly classified according to whether the multiple samples in the training data set have passed through the first workstation. The first training data set 251 and the second training data set 252 both include the feature data and labels of the corresponding samples.

[0058] In step 27, multiple samples in the first training data set 251 are clustered to form multiple first training data subsets 2511, 2512, ..., 251N, and multiple samples in the second training data set 252 are clustered to form multiple second training data subsets 2521, 2522, ..., 252N.

[0059] Similar to the above-mentioned embodiment, the algorithms for clustering the multiple samples in the first training data set 251 and the second training data set 252 may include: K-means algorithm, hierarchical clustering algorithm, density clustering algorithm such as DBSCAN and OPTICS, Gaussian mixture model (GMM), spectral clustering algorithm, affinity propagation, etc. When setting the number of clusters formed by clustering (i.e., multiple first training data subsets 2511, 2512, ..., 251N and multiple second training data subsets 2521, 2522, ..., 252N), it is necessary to balance the variance of samples within the cluster and the distance between clusters (e.g., the center of adjacent clusters), so that the variance of samples in each cluster (i.e., each training data subset) formed after clustering is as small as possible, and the distance between adjacent clusters is as large as possible, so as to distinguish different types of products well.

[0060] In some embodiments, the training method may further include executing step 26 before step 27: performing dimensionality reduction operations on the feature data of the samples in the first training data set 251 and the second training data set 252, respectively. Then, in step 27, the samples in the first training data set 251 and the second training data set 252 may be clustered according to the feature data of the samples after dimensionality reduction, so as to form the multiple first training data subsets 2511, 2512, ..., 251N and the multiple second training data subsets 2521, 2522, ..., 252N, wherein each first training data subset and each second training data subset are composed of the feature data of the corresponding samples before dimensionality reduction (i.e., the feature data of the samples obtained in step 21), so as to subsequently predict the sample quality based on the original feature data of the samples.

[0061] Specifically, meaningful features can be extracted through feature engineering to reduce the dimension of the data, such as selecting features related to the product quality prediction task, discarding irrelevant or redundant features, and / or using dimensionality reduction methods (such as principal component analysis PCA, linear discriminant analysis LDA, t-distribution neighborhood embedding t-SNE, random projection, local linear embedding LLE, non-negative matrix decomposition NMF, etc.) to map the original features to a low-dimensional space and extract representative features. Thus, the dimensionality reduction operation can significantly reduce the computational time for clustering samples in the first training data set and the second training data set.

[0062] In some embodiments, before step 26, the method may further include: preprocessing the null-value feature data corresponding to the first workstation for each sample in the second training data set 252, wherein the preprocessing includes deleting or filling the null-value feature data. Deleting the null-value data corresponding to the first workstation can reduce the data volume of the second training data set 252 to a certain extent. If the null-value feature data is filled, it needs to be filled with a value significantly different from the non-null-value feature data. If the value range of the non-null-value feature data is large and it is difficult to determine the filling value of the null-value feature data, the null-value feature data can be deleted, or the non-null-value feature data can be normalized first and then the null-value feature data can be filled with a suitable value.

[0063] In some embodiments, the training method may further include: normalizing the non-null value feature data of each sample in the first training data set and the second training data set, that is, normalizing to a value between 0 and 1, or between -1 and 1.

[0064] In step 29, corresponding product quality prediction models 2911, 2912, ..., 291N, 2921, 2922, ..., 292N are constructed for the plurality of first training data subsets 2511, 2512, ..., 251N and the plurality of second training data subsets 2521, 2522, ..., 252N, respectively. The type or architecture of the constructed product quality prediction model can be referred to Figure 1The relevant description of the illustrated embodiment is not repeated here; and the corresponding product quality prediction model is trained based on the feature data and labels of the corresponding number of samples included in each training data subset to obtain multiple trained product quality prediction models 2911, 2912, ..., 291N, 2921, 2922, ..., 292N. Among them, the multiple trained product quality prediction models 2911, 2912, ..., 291N correspond one-to-one to the multiple first training data subsets 2511, 2512, ..., 251N, and the multiple trained product quality prediction models 2921, 2922, ..., 292N correspond one-to-one to the multiple second training data subsets 2521, 2522, ..., 252N. The multiple independent product quality prediction models obtained by the training have good adaptability to the multiple sample types contained in the multiple training data subsets, are suitable for the quality prediction of products in different production and manufacturing processes, and are conducive to obtaining a product quality prediction model with stronger robustness and higher prediction accuracy.

[0065] In step 23, if the judgment result is no, execute step 33: cluster the multiple samples in the training data set according to the feature data of the multiple samples obtained in step 21 to form multiple training data subsets 331, 332, ..., 33N, each training data subset includes a corresponding number of feature data of multiple samples and their labels (whether the quality is qualified).

[0066] In some embodiments, step 31 may be performed before step 33: a dimension reduction operation is performed on the feature data of the multiple samples in the training data set. Then, in step 33, the multiple samples in the training data set are clustered according to the feature data of the multiple samples after dimension reduction to form multiple training data subsets, each of which is composed of the feature data of the corresponding sample before dimension reduction, so as to subsequently predict the sample quality based on the original feature data of the sample. The dimension reduction operation can significantly reduce the computation time for clustering the samples in the training data set.

[0067] In step 35, corresponding product quality prediction models 351, 352, ..., 35N are constructed for the plurality of training data subsets 331, 332, ..., 33N. The type or architecture of the constructed product quality prediction model can be referred to Figure 1 The relevant description of the illustrated embodiment is not repeated here; and the corresponding product quality prediction model is trained based on the feature data and labels of the corresponding number of samples included in each training data subset to obtain multiple trained product quality prediction models 351, 352, ..., 35N. The multiple trained product quality prediction models 351, 352, ..., 35N correspond one-to-one to the multiple training data subsets 331, 332, ..., 33N.

[0068] In some embodiments, before the product quality prediction model training is performed in step 29 and step 35, the following may be included: preprocessing the feature data of the workstation whose null value sample rate is higher than the second threshold value (e.g., 95%) in each training data subset, wherein the preprocessing includes deleting the feature data of the workstation from the sample data in the training data subset, or filling the feature data of the workstation. Here, the "feature data of the workstation" refers to data of a feature of the sample collected at the workstation. As described in the above embodiment, the feature data of the sample can be represented by a two-dimensional matrix, and each column of the two-dimensional matrix represents data of a feature collected at the workstation, that is, the "feature data of the workstation" here. The two-dimensional matrix is ​​judged column by column to see whether there is a column whose null value sample rate is higher than the second threshold value. If so, the column is deleted from the two-dimensional matrix. In this way, the occupation of computing resources by a large amount of null value feature data contained in the feature data of the sample can be reduced, the feature data with values ​​can be retained, and the training process of the model can be accelerated.

[0069] refer to Figure 3 , Figure 3 A schematic diagram showing the data structure of feature data of multiple samples in the training data set obtained in step 21 according to an embodiment of the present invention is shown. The horizontal axis in the figure represents the sample ID, the vertical axis represents the feature of the workstation, and a non-null value (Not Null) indicates that the feature data of a certain sample at a certain workstation is a non-null value, and a null value (Null) indicates that the feature data of a certain sample at a certain workstation is a null value. If multiple features are collected at a workstation, the multiple features are arranged continuously along the horizontal axis. Figure 4 It can be seen that before clustering, the distribution of workstations corresponding to the null values ​​and non-null values ​​in the feature data of multiple samples is relatively messy and has no obvious rules.

[0070] refer to Figure 4 , Figure 4 The figure shows three first training data subsets 2511, 2512 and 2513 and one second training data subset 2521 obtained by clustering in step 27 according to one embodiment of the present invention. The non-null value (Not Null) indicates that the feature data of a certain sample at a certain workstation is a non-null value, and the null value (Null) indicates that the feature data of a certain sample at a certain workstation is a null value. It can be seen that the distribution of the workstations corresponding to the null values ​​and non-null values ​​in the feature data of the samples in each training data subset after clustering is compared with Figure 4There is a more obvious rule, that is, the null value and non-null value feature data of multiple samples are roughly distributed in the same workstation, for example, the features near the horizontal axis coordinate of 900 are all null values, while the non-null value ratio of the features near the horizontal axis coordinate of 700 to 800 is higher, so that samples with similar data structures of feature data are clustered into the same cluster (i.e., the same training data subset). The first workstation for classifying the first training data set 251 and the second training data set 252 can be located near the vertical coordinate of 750.

[0071] refer to Figure 5 , Figure 5 A schematic diagram of the data structure of a training data subset after deleting feature data of workstations whose null value sample rate in each training data subset is higher than a second threshold value according to an embodiment of the present invention is shown.

[0072] It can be seen that after deleting the empty value areas shown in the rectangular boxes 2514b and 2515b from the first training data subset 2514 and the second training data subset 2515 respectively, the first training data subset 2514a and the second training data subset 2515a with changed feature dimensions are obtained. Compared with before deletion, the feature dimensions are reduced, but the feature dimensions containing information are not lost.

[0073] It should be noted that Figure 3 , Figures 4 to 5 The clustering effect is only schematically shown with null values ​​(Null) and non-null values ​​(Not Null), without showing the size of the specific feature values. However, in the clustering operation, the samples will be clustered according to the feature values ​​and data structure of the samples.

[0074] The training method of the product quality prediction model of the embodiment of the present invention automatically clusters the multiple samples in the training data set according to the similarity between the feature data of multiple samples collected at multiple workstations on the production line to form multiple training data subsets, so that the corresponding number of multiple samples in each training data subset obtained have the same or similar production and manufacturing process. The product quality prediction model independently trained for each training data subset can predict whether the quality of products with the same or similar production and manufacturing process is qualified. The multiple trained product quality prediction models can be used for quality prediction of products with different production and manufacturing processes. Therefore, the product quality prediction model obtained by the training method of the embodiment of the present invention has higher robustness and improves the accuracy of the prediction results of product quality. In addition, the process of clustering multiple samples can be fully automated without manual operation, and does not require field or background knowledge about the feature data of the collected samples, which is suitable for the field of production and manufacturing technology with high data confidentiality requirements.

[0075] The embodiment of the present invention also provides a method for predicting product quality. Figure 6 , Figure 6 A schematic flow chart of a method for predicting product quality according to an embodiment of the present invention is shown.

[0076] In some embodiments, the prediction method further comprises:

[0077] Step 41, acquiring characteristic data of a product collected at multiple workstations on a production line;

[0078] Step 43, determining a sample data subset that is closest to the product from multiple sample data subsets based on the feature data of the product; wherein the multiple sample data subsets are pre-formed by clustering multiple samples based on the feature data of the multiple samples, and the feature data of the multiple samples include feature data collected at the multiple workstations on the production line, and the multiple sample data subsets have respective corresponding pre-trained product quality prediction models;

[0079] Step 45: Use a product quality prediction model corresponding to a determined sample data subset to predict the quality of the product based on the feature data of the product.

[0080] In some embodiments, each sample data subset includes feature data of a corresponding number of multiple samples, and a label for each sample in the corresponding number of multiple samples indicating whether its quality is qualified. Each product quality prediction model is obtained by training based on the feature data and labels of a corresponding number of multiple samples in the corresponding sample data subset.

[0081] In some embodiments, the product quality prediction model corresponding to each of the multiple sample data subsets is obtained by training using the feature data of the multiple samples and the label of each sample indicating whether its quality is qualified as a training data set, and is obtained by training according to the training method of the aforementioned embodiment of the present invention.

[0082] In some embodiments, in step 43, the similarity between the feature data that most closely represents the product and the feature data of the samples in the determined sample data subset is higher than the similarity between the product and other sample data subsets. Specifically, in step 43, a sample data subset that is closest to the product can be determined from the multiple sample data subsets based on the distance between the feature vector used to represent the feature data of the product and the average feature vector of each sample data subset.

[0083] refer to Figure 7 , Figure 7 A schematic flow chart of a method for predicting product quality according to another embodiment of the present invention is shown.

[0084] In some embodiments, the prediction method may include: step 51 , step 53 , one of steps 55 and 56 , step 58 , and step 59 .

[0085] In step 51, characteristic data of a product collected at multiple workstations on a production line is obtained;

[0086] In step 53, based on the characteristic data of the product, it is determined whether the product has passed through a first workstation among the plurality of workstations, and whether the first workstation meets a preset condition.

[0087] In some embodiments, the first workstation is one or more workstations whose quality failure rate of passed samples among the multiple workstations on the production line is higher than a first threshold value, determined according to the training data set during the training phase of multiple product quality prediction models; or, the first workstation is one or more workstations with quality inspection functions among the multiple workstations on the production line. For details, please refer to the description of the first workstation in the aforementioned embodiment, which will not be repeated here. The method of this embodiment is applicable to: if there is a first workstation that meets the preset conditions among the multiple workstations, and if not, it can be based on Figure 6 The method of the embodiment shown in the figure is used for prediction. Whether the information of the first workstation exists on certain production lines can be determined in the training stage of the product quality prediction model. The "passed-station sample" refers to at least one feature data of the sample collected at the workstation being a non-null value.

[0088] In some embodiments, the plurality of sample data subsets include: a plurality of first sample data subsets and a plurality of second sample data subsets, wherein the feature data corresponding to each sample in each first sample data subset and the first workstation are all non-null values, and the feature data corresponding to each sample in each second sample data subset and the first workstation are all null values. The method for forming the plurality of first sample data subsets and the plurality of second sample data subsets can refer to Figure 2 The descriptions of steps 21, 23, 25, 26 and 27 in the illustrated embodiment are not repeated here.

[0089] If the judgment result is yes, step 55 is executed to determine a first sample data subset that is closest to the product from the multiple first sample data subsets. Specifically, if the feature data corresponding to the first workstation in the feature data of the product is a non-null value, it is determined that the product has passed through the first workstation, otherwise the judgment result is no. The feature data corresponding to the first workstation in the feature data of the product is a non-null value includes at least one feature data corresponding to the first workstation in the feature data of the product is a non-null value, and multiple feature data of the product may be collected at the first workstation.

[0090] If the judgment result is no, step 56 is executed to determine a second sample data subset that is most similar to the product from the multiple second sample data subsets.

[0091] In some embodiments, in step 55, a first sample data subset closest to the product can be determined based on the distance between the feature vector representing the feature data of the product and the average feature vector of each first sample data subset, and in step 56, a second sample data subset closest to the product can be determined based on the distance between the feature vector representing the feature data of the product and the average feature vector of each second sample data subset. The average feature vector of each sample data subset can be the average of the same feature data corresponding to the same workstation of multiple samples in the data subset, and the distance between feature vectors can be calculated using a known method.

[0092] The prediction method may also include step 58, pre-processing the feature data of the product according to the feature data of one or more workstations whose null value sample rate is higher than the second threshold in the closest sample data subset, and the pre-processing includes deleting or filling the feature data of the one or more workstations of the product. "Null value sample rate" refers to the proportion of null value samples in all samples calculated for a single feature of any workstation. The feature data of the workstation refers to a single feature of any workstation, that is, a column in a two-dimensional matrix used to represent the sample data subset, and the rows correspond to samples with different IDs. There may be one or more workstations whose feature data has a null value sample rate higher than the second threshold, and for any sample data subset, which workstations and which features have a null value sample rate higher than the second threshold are determined in the training stage of the product quality prediction model corresponding to the sample data subset, and refer to the aforementioned embodiment for details, which will not be described here.

[0093] In step 59, the product quality prediction model corresponding to the closest sample data subset is used to predict the quality of the product based on the preprocessed feature data of the product. Specifically, the feature data of the product is input into the selected product quality prediction model, and a prediction result of whether the quality of the product is qualified is output.

[0094] The embodiment of the present invention also provides a device for predicting product quality. Figure 8 , Figure 8 A structural block diagram of a device for predicting product quality according to an embodiment of the present invention is shown.

[0095] In some embodiments, the product quality prediction device may include:

[0096] An acquisition module 61 is used to acquire characteristic data of a product collected at multiple workstations on a production line;

[0097] A calculation module 63, configured to determine a sample data subset that is most similar to the product from multiple sample data subsets according to the feature data of the product;

[0098] A prediction module 65, configured to use a product quality prediction model corresponding to the closest sample data subset to predict the quality of the product based on the feature data of the product;

[0099] Among them, the multiple sample data subsets are pre-formed by clustering multiple samples based on feature data of the multiple samples, and the feature data of the multiple samples include feature data collected at the multiple workstations on the production line, and the multiple sample data subsets have their own corresponding pre-trained product quality prediction models.

[0100] For other functions of each module of the prediction device, reference may be made to the prediction method of the aforementioned embodiment of the present invention, which will not be described in detail here.

[0101] The samples and products in the aforementioned embodiments of the present invention may be parts, or semi-finished products or products composed of parts.

[0102] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the training method described in the aforementioned embodiment of the present invention, or implements the prediction method described in the aforementioned embodiment of the present invention.

[0103] An embodiment of the present invention also provides a computer-readable storage medium storing executable code, which, when executed, implements a method for training a product quality prediction model according to an embodiment of the present invention, or implements a method for predicting product quality according to an embodiment of the present invention.

[0104] An embodiment of the present invention also provides a computer device, including a processor, a memory, and a computer program stored in the memory. When the computer program is executed by the processor, it implements the training method described in the aforementioned embodiment of the present invention, or implements the prediction method described in the aforementioned embodiment of the present invention.

[0105] For example, computer-readable storage media may include, but are not limited to, random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), static random access memory (SRAM), hard disk, flash memory, and the like.

[0106] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order from that in the embodiments and still achieve the desired results. In addition, the process depicted in the drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-tasking and parallel processing are also possible or may be advantageous. Not all steps and units in the above-mentioned processes and system structure diagrams are necessary, and some steps or units can be omitted according to actual needs. The device structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some units may be implemented by the same physical entity, some units may be implemented by multiple physical entities respectively, or may be implemented by some components in multiple independent devices. The dotted boxes in the drawings of the specification represent optional steps or modules. The above explanation of the implementation method only describes the present invention within the framework of the example. Of course, as long as it is technically meaningful, the various features of the implementation method can be freely combined with each other, and similar parts between different embodiments can refer to each other without departing from the framework of the present invention. The above is a detailed description of the present application in conjunction with specific embodiments. Obviously, the above description and the embodiments shown in the drawings should be understood as exemplary and not to limit the present application. For those skilled in the art, various modifications or changes can be made to the present application without departing from the spirit of the present application, and these modifications or changes do not depart from the scope of the present application.

Claims

1. A method for training a product quality prediction model, characterized in that: include: Acquire a training data set, wherein the training data set includes feature data of multiple samples collected at multiple workstations on a production line, and a label of each sample indicating whether its quality is qualified; Clustering the multiple samples in the training data set according to the feature data of the multiple samples to form multiple training data subsets, each training data subset including the feature data of a corresponding number of samples and the labels of the corresponding number of samples; Constructing corresponding product quality prediction models for the multiple training data subsets respectively; The corresponding product quality prediction model is trained based on each training data subset to obtain multiple trained product quality prediction models.

2. The training method according to claim 1, characterized in that: Clustering the multiple samples in the training data set according to the feature data of the multiple samples to form multiple training data subsets includes: Determining, based on the characteristic data of the plurality of samples, whether there is a first workstation that meets a preset condition among the plurality of workstations; and Based on the judgment result, multiple samples in the training data set are clustered to form multiple training data subsets.

3. The training method according to claim 2, characterized in that: Determining, according to the characteristic data of the multiple samples, whether there is a first workstation that meets a preset condition among the multiple workstations includes: According to the characteristic data of the plurality of samples, it is determined whether there are one or more first workstations among the plurality of workstations whose quality failure rate of the passed samples is higher than a first threshold; or, According to the characteristic data of the multiple samples, it is determined whether there are one or more first workstations with a quality detection function among the multiple workstations.

4. The training method according to claim 2, characterized in that: Based on the judgment result, multiple samples in the training data set are clustered to form multiple training data subsets including: If the judgment result is yes, the training data set is classified into a first training data set and a second training data set, the feature data corresponding to the first workstation of each sample in the first training data set are all non-null values, and the feature data corresponding to the first workstation of each sample in the second training data set are all null values; and Clustering multiple samples in the first training data set to form multiple first training data subsets, and clustering multiple samples in the second training data set to form multiple second training data subsets.

5. The training method according to claim 4, characterized in that: Clustering a plurality of samples in the first training data set to form a plurality of first training data subsets, and clustering a plurality of samples in the second training data set to form a plurality of second training data subsets comprises: Performing dimensionality reduction operations on feature data of samples in the first training data set and the second training data set respectively; According to the characteristic data of the samples after dimensionality reduction, the samples in the first training data set and the second training data set are clustered respectively to form the multiple first training data subsets and the multiple second training data subsets, wherein each first training data subset and each second training data subset is composed of the characteristic data of the corresponding samples before dimensionality reduction.

6. The training method according to claim 5, characterized in that: Before performing a dimensionality reduction operation on the feature data of the samples in the second training data set, the method further includes: Preprocessing is performed on the null-value feature data corresponding to the first workstation of each sample in the second training data set, wherein the preprocessing includes deleting or filling the null-value feature data.

7. The training method according to claim 2, characterized in that: Based on the judgment result, multiple samples in the training data set are clustered to form multiple training data subsets including: If the judgment result is no, performing a dimensionality reduction operation on the feature data of the plurality of samples in the training data set; According to the feature data of the multiple samples after dimensionality reduction, the multiple samples in the training data set are clustered to form multiple training data subsets, each training data subset is composed of the feature data of the corresponding sample before dimensionality reduction.

8. The training method according to claim 1, characterized in that: Before training the corresponding product quality prediction model based on each training data subset, the following steps are also included: Preprocessing is performed on the feature data of the workstations whose null value sample rate is higher than the second threshold in each training data subset, wherein the preprocessing includes deleting the feature data of the workstations whose null value sample rate is higher than the second threshold from the multiple samples, or filling the feature data of the workstations whose null value sample rate is higher than the second threshold.

9. The training method according to claim 1, characterized in that: Include at least one of the following: The product quality prediction model adopts the architecture of a machine learning model; The multiple samples include samples of multiple products, the number of samples of each product is one or more, and the workstations that samples of different products pass through on the production line are not completely the same; The number of sample features collected at each of the plurality of workstations is one or more; Each sample has a unique sample number, the characteristic data of the plurality of samples are represented by a two-dimensional matrix, the plurality of rows of the two-dimensional matrix respectively correspond to the sample numbers of the plurality of samples, the plurality of columns of the two-dimensional matrix respectively correspond to the plurality of sample features collected at the plurality of workstations, and each column of the two-dimensional matrix corresponds to a sample feature collected at one of the plurality of workstations; The production line includes one or more production lines; The characteristic data include sample parameters, environmental parameters, and / or parameters of a production and processing machine.

10. A method for predicting product quality, characterized in that: include: Acquiring characteristic data of a product collected at a plurality of workstations on a production line; According to the characteristic data of the product, determining a sample data subset that is most similar to the product from multiple sample data subsets; Using a product quality prediction model corresponding to the most similar sample data subset, predicting the quality of the product based on the characteristic data of the product; Among them, the multiple sample data subsets are pre-formed by clustering multiple samples based on feature data of the multiple samples, and the feature data of the multiple samples include feature data collected at the multiple workstations on the production line, and the multiple sample data subsets have their own corresponding pre-trained product quality prediction models.

11. The prediction method according to claim 10, characterized in that: Each sample data subset includes feature data of a corresponding number of samples and a label for each sample in the corresponding number of samples indicating whether its quality is qualified. Each product quality prediction model is obtained by training based on the feature data of the corresponding number of samples in the corresponding sample data subset and the labels of the corresponding number of samples.

12. The prediction method according to claim 10, characterized in that: The product quality prediction models corresponding to each of the multiple sample data subsets are obtained by training according to any one of the training methods described in claims 1 to 9, using the feature data of the multiple samples and the label of each sample indicating whether its quality is qualified as a training data set.

13. The prediction method according to claim 12, characterized in that: There is a first workstation that meets a preset condition among the multiple workstations, and according to the feature data of the product, determining a sample data subset that is most similar to the product from the multiple sample data subsets includes: Determining, based on the characteristic data of the product, whether the product has passed through the first workstation; Based on the determination result, a sample data subset that is closest to the product is determined from the plurality of first sample data subsets or the plurality of second sample data subsets.

14. The prediction method according to claim 13, characterized in that: The first workstation is one or more workstations whose quality failure rate of passed samples among the multiple workstations on the production line determined according to the training data set during the training phase of the multiple product quality prediction models is higher than a first threshold; or, The first workstation is one or more workstations with a quality inspection function among the multiple workstations on the production line.

15. The prediction method according to claim 13, characterized in that: The multiple sample data subsets include: the multiple first sample data subsets and the multiple second sample data subsets, wherein the feature data corresponding to each sample in each first sample data subset and the first workstation are all non-null values, and the feature data corresponding to each sample in each second sample data subset and the first workstation are all null values, and determining a sample data subset that is most similar to the product from the multiple sample data subsets based on the judgment result includes: If the judgment result is yes, determining a first sample data subset that is most similar to the product from the multiple first sample data subsets; If the judgment result is no, a second sample data subset that is closest to the product is determined from the multiple second sample data subsets.

16. The prediction method according to claim 15, characterized in that: Based on the judgment result, a sample data subset closest to the product is determined from multiple sample data subsets, including: If the judgment result is yes, then determining a first sample data subset that is closest to the product according to the distance between the feature data of the product and the average feature vector of each first sample data subset; If the judgment result is no, then a second sample data subset that is closest to the product is determined based on the distance between the feature data of the product and the average feature vector of each second sample data subset.

17. The prediction method according to claim 10, characterized in that: Also includes: Preprocessing the feature data of the product according to the feature data of the workstation whose null value sample rate in the closest sample data subset is higher than the second threshold, wherein the preprocessing includes deleting or filling the feature data of the workstation of the product; as well as A product quality prediction model corresponding to a determined sample data subset is used to predict the quality of the product based on the preprocessed feature data of the product.

18. A device for predicting product quality, characterized in that: include: An acquisition module, used to acquire characteristic data of a product collected at multiple workstations on a production line; A calculation module, used for determining a sample data subset that is closest to the product from multiple sample data subsets according to the feature data of the product; A prediction module, configured to use a product quality prediction model corresponding to the closest sample data subset to predict the quality of the product based on the feature data of the product; Among them, the multiple sample data subsets are pre-formed by clustering multiple samples based on feature data of the multiple samples, and the feature data of the multiple samples include feature data collected at the multiple workstations on the production line, and the multiple sample data subsets have their own corresponding pre-trained product quality prediction models.

19. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the training method according to any one of claims 1 to 9, or implements the prediction method according to any one of claims 10 to 17.

20. A computer device comprising a processor, a memory and a computer program stored in the memory, characterized in that: When the computer program is executed by a processor, the computer program implements the training method according to any one of claims 1 to 9, or implements the prediction method according to any one of claims 10 to 17.