Production quality prediction method based on kernel principal component analysis and multivariate linear regression
Through nuclear principal component analysis and multivariate linear regression methods, preprocessing and screening of key variables on biological products production data, establishing a prediction model, solving the problem of low production quality prediction accuracy in the existing technology, and improving product quality control and prediction accuracy sex.
Patent Information
- Application Number
- CN202411252701.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-09
AI Technical Summary
The existing production quality prediction methods based on neural networks have low prediction accuracy, making it difficult to effectively deal with the influence of multivariables in the production process of biological products, resulting in product quality differences and high defect rate.
Using methods based on core principal component analysis and multivariate linear regression, the historical data set is preprocessed and key variable screening, nonlinear or linear prediction models are established, key production variables are identified and quality warning is provided, and prediction accuracy and generalization are improved. ability.
By eliminating data noise and outliers and identifying key variables that affect product quality, the prediction accuracy and product quality control of future batch production quality are improved, and the defective rate is reduced.
Smart Images

Figure CN118761522B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of data processing, and in particular to a production quality prediction method based on kernel principal component analysis and multivariate linear regression. Background Art
[0002] In the batch production of biological products, companies need to add raw materials to unit equipment tanks, mixers and reactors to process them into new products or states, and then discharge them to another unit for further processing or place them in another tank for storage. In each batch operation, the company's goal is to obtain the ideal product. However, many environmental variables, material conditions, operating parameters, etc. will cause differences in product quality between different batches, such as boundary temperature, additive brand, water content of a certain ingredient, or any other measurable variables that may affect the output product. At the same time, over time, the values of many variables will also change, affecting product quality. For example, in the reactor, as the material ages, the insulation effect of the entire reaction stage begins to deteriorate.
[0003] With the research on deep reinforcement learning of neural networks, a large number of methods have emerged to predict production quality by training neural network models. However, in these methods, the neural network models are trained directly with production parameters as input and quality as output, and the prediction accuracy of the final model is not high.
[0004] Therefore, it is necessary to provide a production quality prediction method based on kernel principal component analysis and multivariate linear regression to improve the accuracy of production quality prediction. Summary of the invention
[0005] The present invention provides a production quality prediction method based on kernel principal component analysis and multiple linear regression, comprising: obtaining a historical data set, wherein the historical data set includes production data and inspection data of multiple historical batches; preprocessing the historical data set to obtain a preprocessed historical data set; based on the preprocessed historical data set, determining the correlation of multiple production inspection indicator pairs, wherein one of the production inspection indicator pairs includes a production variable and a product quality detection indicator; based on the correlation of the multiple production inspection indicator pairs, determining a key variable screening method, wherein the key variable screening method is a kernel principal component analysis screening method or a multiple linear regression screening method; when the key variable screening method is a kernel principal component analysis screening method, based on In the kernel principal component analysis screening method, the key production variable sequence is screened, and based on the key production variable sequence, a nonlinear prediction model is established to obtain the production data of future batches, and the production quality of the future batches is predicted based on the production data of the future batches through the nonlinear prediction model; when the key variable screening method is the multiple linear regression screening method, the key production variable sequence is screened based on the multiple linear regression screening method, and a linear prediction model is established based on the key production variable sequence, and the production quality of the future batches is predicted based on the production data of the future batches through the linear prediction model; based on the preprocessed historical data set, the golden batch is determined; and based on the production quality of the golden batch and the future batches, a quality warning is issued.
[0006] Furthermore, the historical data set is preprocessed to obtain a preprocessed historical data set, including: determining invalid historical batches among the multiple historical batches, deleting the production data and inspection data of the invalid historical batches from the historical data set to obtain a cleaned historical data set; and filling missing data, normalizing and standardizing the production data and inspection data of the historical batches included in the cleaned historical data set.
[0007] Furthermore, based on the correlation of the multiple production inspection indicator pairs, a key variable screening method is determined, including: for each of the production inspection indicator pairs, calculating the absolute value of the correlation of the production inspection indicator pairs; when the absolute value of the correlation of the production inspection indicator pairs is less than or equal to a preset threshold, marking the production inspection indicator pair as a first production inspection indicator pair; when the absolute value of the correlation of the production inspection indicator pairs is greater than the preset threshold, marking the production inspection indicator pair as a second production inspection indicator pair; when the number of the first production inspection indicator pairs is greater than the number of the second production inspection indicator pairs, the key variable screening method is a kernel principal component analysis screening method; when the number of the first production inspection indicator pairs is less than or equal to the number of the second production inspection indicator pairs, the key variable screening method is a multiple linear regression screening method.
[0008] Furthermore, based on the kernel principal component analysis screening method, the key production variable sequence is screened, including: selecting a target kernel function; calculating a kernel matrix based on the target kernel function and the preprocessed historical data set; calculating a centralized kernel matrix based on the kernel matrix; performing eigenvalue decomposition on the centralized kernel matrix to obtain eigenvalues; and screening the key production variable sequence based on the eigenvalues.
[0009] Furthermore, based on the eigenvalues, the key production variable sequence is screened, including: calculating the variance contribution rate of a single principal component; determining the number of principal components based on the cumulative variance contribution rate method and the variance contribution rate of a single principal component; and screening the key production variable sequence based on the number of principal components and the eigenvalues.
[0010] Furthermore, based on the key production variable sequence, a nonlinear prediction model is established, including: based on the key production variable sequence, a support vector machine-kernel principal component analysis model is constructed.
[0011] Further, based on the multivariate linear regression screening method, a key production variable sequence is screened, including: for each of the product quality detection indicators, constructing a multivariate linear regression equation corresponding to the product quality detection indicator; calculating a regression coefficient matrix based on the least squares method, wherein the regression coefficient matrix includes the regression coefficients of each of the multivariate linear regression equations; for each of the production variables, based on the regression coefficients of the multivariate linear regression equation corresponding to each of the product quality detection indicators, calculating the sum of the absolute values of the regression coefficients corresponding to the production variable; based on the sum of the absolute values of the regression coefficients corresponding to each of the production variables, calculating the mean of the sum of the absolute values of the regression coefficients; for each of the production variables, based on the sum of the absolute values of the regression coefficients corresponding to the production variable and the sum of the absolute values of the regression coefficients corresponding to each of the production variables, calculating the indicator weight corresponding to the production variable, and calculating the mean of the indicator weight based on the mean of the sum of the absolute values of the regression coefficients and the sum of the absolute values of the regression coefficients corresponding to each of the production variables; based on the indicator weight corresponding to each of the production variables and the mean of the indicator weight, a key production variable sequence is screened.
[0012] Further, based on the indicator weight corresponding to each of the production variables and the indicator weight mean, a key production variable sequence is screened, including: S21, sorting the multiple production variables in ascending order according to the sum of the absolute values of the regression coefficients to form a production variable sequence X 0 ; S22, average the sum of the absolute values of the regression coefficients of multiple production variables , get the average value ,in, is the sum of the absolute values of the regression coefficients corresponding to the ith production variable, and n is the total number of production variables; S23, for the production variable sequenceX 0 , calculate the first screening parameter for each production variable , calculate the average The corresponding second screening parameter ; S24, according to the production variable sequence X 0 The order of the elements in the production variable sequence X 0 Read the production variables in sequence and determine the first screening parameter of the currently read production variable Is it greater than the average value? If the first screening parameter of the currently read production variable is less than or equal to the average value, the sorting order is from the production variable sequence X 0 Read the next generated variable in the current production variable. If the first filter parameter of the currently read production variable Greater than the second filter parameter , to determine whether the sort position i of the currently read production variable is greater than , if yes, then Round up to the integer value and use it as the target sorting position k; otherwise, use the sorting position of the currently read production variable as the target sorting position k; S25, in the production variable sequence X 0 Select the production variables from the kth sort position to the nth sort position to form a key variable sequence X 1 : ,in, To produce a sequence of variables X 0 The production variable at the kth sorted position in , To produce a sequence of variables X 0 The production variable at the k+1th sort position in , To produce a sequence of variables X 0 The production variable at the nth sorted position in .
[0013] Furthermore, based on the key production variable sequence, a linear prediction model is established, including: for each of the product quality detection indicators, based on the key production variable sequence, a multivariate linear regression equation corresponding to the product quality detection indicator is constructed, and the regression constant and regression coefficient of the multivariate linear regression equation are calculated based on the least squares method.
[0014] Further, determining the golden batch based on the preprocessed historical data set includes: determining the golden batch based on the preprocessed historical data set by using a hierarchy analysis method and / or an entropy method.
[0015] Compared with the prior art, the production quality prediction method based on kernel principal component analysis and multivariate linear regression provided by the present invention has at least the following beneficial effects:
[0016] By preprocessing historical data sets, noise, outliers, and missing values in the data can be eliminated or reduced, thereby improving data quality. Prediction models based on preprocessed high-quality data can more accurately reflect the relationship between production variables and product quality, thereby improving the accuracy of predictions for future batch production quality. By determining the correlation of multiple production inspection indicator pairs, the production variables (i.e., key variables) that have the greatest impact on product quality can be identified. This helps to focus on these variables during the production process and conduct refined control to achieve the goal of improving product quality and reducing defective rates. Different data sets may have different characteristics. Based on the correlation of multiple production inspection indicator pairs, determining the key variable screening method can ensure that the prediction model matches the data characteristics, thereby improving the generalization ability and prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0018] Figure 1 It is a flowchart of a production quality prediction method based on kernel principal component analysis and multivariate linear regression according to some embodiments of this specification;
[0019] Figure 2 It is a schematic diagram of prediction results shown in some embodiments of this specification. DETAILED DESCRIPTION
[0020] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.
[0021] Figure 1 is a flow chart of a production quality prediction method based on kernel principal component analysis and multivariate linear regression according to some embodiments of this specification, such as Figure 1 As shown, the production quality prediction method based on kernel principal component analysis and multivariate linear regression may include the following steps.
[0022] Step 110, obtaining a historical data set.
[0023] Among them, the historical data set includes production data and inspection data of multiple historical batches. The historical data set includes production data involved in each process step starting from the material. These data can be collected by management software such as material management system, production management system (Manufacturing Execution System, MES), laboratory information management system (Laboratory Information Management System, LIMIS), quality management system (Quality Management System, QMS), batch release system, etc., including production data such as material components, production process parameters, intermediate product inspection and testing, and finished product inspection of each production batch. Taking the alcohol precipitation production of Danhong injection as an example, the inspection data of historical batches can at least include total solid removal rate, hydroxysafflor yellow A (HSYA) removal rate, salvianolic acid B (SaB) removal rate, total phenolic acid removal rate, total sugar removal rate, and solid removal rate.
[0024] Step 120, preprocessing the historical data set to obtain a preprocessed historical data set.
[0025] Specifically include:
[0026] Determine invalid historical batches among multiple historical batches, delete production data and inspection data of the invalid historical batches from the historical data set, and obtain a cleaned historical data set;
[0027] The cleaned historical data set includes the production data and inspection data of historical batches, and performs missing data filling, normalization and standardization.
[0028] For example:
[0029] Compare with the production control conditions or required range, if there are batches that exceed the condition range and have no product qualified index data, they will be deleted as invalid historical batches. If the scan finds that a historical batch has multiple (can be set to more than 3) missing data, and it is confirmed that it cannot be compensated, the historical batch will be regarded as an invalid historical batch.
[0030] If there is a single missing data, it is handled in the following two cases:
[0031] If it is discrete data, fill it with the mode and update the data set;
[0032] If it is continuous, use the mean value to fill and update the data set.
[0033] The updated production data set X and the test data set Y are normalized to eliminate the dimension difference so that different indicators can affect the results more equally. The normalization process uses the following formula:
[0034] ,
[0035] In the formula, For the A certain production data or inspection data of a valid historical batch, is the minimum value of the production data or inspection data in all valid historical batches. It is the maximum value of the production data or inspection data in all valid historical batches; This is the production data or inspection data of the valid historical batch after normalization calculation. .
[0036] After calculation according to the above formulas, the data table is updated to obtain new normalized production data set X and test data set Y.
[0037] The updated X and Y are standardized to reduce the impact of different data scales, and the following formula is used for calculation:
[0038] ,
[0039] In the formula, The first Data values of valid historical batches, is the mean of the finished product evaluation index data , Standards for finished product evaluation index data , The production data and inspection data are standardized and calculated.
[0040] Step 130, determining the correlation between multiple production inspection indicator pairs based on the preprocessed historical data set.
[0041] Among them, a production inspection index pair includes a production variable and a product quality inspection index. If there are n production variables and m product quality inspection indicators, the number of production inspection index pairs is n×m. The correlation values of production inspection index pairs are all in [-1, 1].
[0042] Preferably, the correlation of the production inspection index pair is calculated based on the following formula:
[0043] ,
[0044] in, is the correlation between the e-th production variable and the f-th product quality inspection index, For the The value corresponding to the e-th production variable in the historical batch, is the mean value of the value corresponding to the e-th production variable in all historical batches, is the total number of historical batches, For the The value corresponding to the fth product quality inspection index in the historical batches, It is the mean of the values corresponding to the f-th product quality inspection index in all historical batches.
[0045] Step 140, determining a key variable screening method based on the correlation of multiple production inspection index pairs.
[0046] Among them, the key variable screening method is the kernel principal component analysis screening method or the multiple linear regression screening method.
[0047] Specifically include:
[0048] For each production inspection indicator pair, the absolute value of the correlation of the production inspection indicator pair is calculated. When the absolute value of the correlation of the production inspection indicator pair is less than or equal to a preset threshold, the production inspection indicator pair is marked as a first production inspection indicator pair. When the absolute value of the correlation of the production inspection indicator pair is greater than a preset threshold (for example, 0.5, etc.), the production inspection indicator pair is marked as a second production inspection indicator pair.
[0049] When the number of the first production inspection index pairs is greater than the number of the second production inspection index pairs, the key variable screening method is the kernel principal component analysis screening method;
[0050] When the number of the first production inspection indicator pairs is less than or equal to the number of the second production inspection indicator pairs, the key variable screening method is the multiple linear regression screening method.
[0051] Preferably, the correlation mean and correlation variance can be calculated based on the correlation of each pair of production inspection indicators, and the key variable screening method can be determined according to the correlation mean and correlation variance. For example, when the correlation mean is greater than the mean threshold and the correlation variance is less than the correlation variance threshold, the key variable screening method is the kernel principal component analysis screening method, otherwise the key variable screening method is the multiple linear regression screening method.
[0052] Step 150, when the key variable screening method is the kernel principal component analysis screening method, based on the kernel principal component analysis screening method, the key production variable sequence is screened, based on the key production variable sequence, a nonlinear prediction model is established, the production data of future batches is obtained, and the production quality of future batches is predicted based on the production data of future batches through the nonlinear prediction model.
[0053] As a preferred method, the key production variable sequence is screened based on the kernel principal component analysis screening method, including:
[0054] Select the target kernel function. Specifically, select a suitable kernel function to describe the nonlinear relationship between data. Common kernel functions include Gaussian kernel function, polynomial kernel, etc. In the case of multi-batch production, Gaussian kernel function can be selected;
[0055] Calculate the kernel matrix based on the target kernel function and the preprocessed historical data set;
[0056] Based on the kernel matrix, calculate the centralized kernel matrix;
[0057] Perform eigenvalue decomposition on the centralized kernel matrix to obtain the eigenvalue;
[0058] Based on the characteristic values, the key production variable sequences are screened.
[0059] Specifically, the Gaussian kernel function is:
[0060] ,
[0061] in, represents the production data of the i-th historical batch, represents the production data of the jth historical batch, It represents the square of the Euclidean distance between the production data of the i-th historical batch and the production data of the j-th historical batch. Its calculation formula is: , is the number of production variables. is a parameter of the Gaussian kernel function, called the bandwidth, The selection methods can be empirical selection, cross-validation, and adaptive adjustment.
[0062] The kernel matrix can be expressed as:
[0063] ,
[0064] in, Characterize the kernel function value between the production data of the i-th historical batch and the production data of the j-th historical batch, Characterize the kernel function value between the production data of the nth historical batch and the production data of the nth historical batch, is the total number of historical batches.
[0065] The centralized kernel matrix can be calculated based on the following formula :
[0066] ,
[0067] in, for -dimensional matrix (same dimension as the kernel matrix), all values of which are .
[0068] Performing eigenvalue decomposition on the centralized kernel matrix to obtain the eigenvalue may include the following steps:
[0069] S11. Solve the characteristic equation to obtain the eigenvalue λ, which is the eigenvalue of the kernel matrix:
[0070] ,
[0071] in, is the determinant function, used to calculate the determinant of the kernel matrix, is the identity matrix with the same dimensions as the kernel matrix;
[0072] S12. For each eigenvalue , by solving the equation The eigenvector can be solved .
[0073] Preferably, based on the characteristic values, the key production variable sequence is screened, including:
[0074] Calculate the variance contribution rate of a single principal component;
[0075] Determine the number of principal components based on the cumulative variance contribution rate method and the variance contribution rate of a single principal component;
[0076] Based on the number of principal components and eigenvalues, the key production variable sequence is screened. For example, the eigenvalues are sorted from large to small, and according to the size of the eigenvalues, the production variables corresponding to the first k eigenvalues are selected to form the key production variable sequence.
[0077] For example, the variance contribution of a single principal component can be calculated based on the following formula:
[0078] ,
[0079] in, is the variance contribution rate of the ith single principal component, is the eigenvalue corresponding to the i-th production variable.
[0080] When the cumulative variance contribution rate ,when The number of pivots is determined when .
[0081] Preferably, a nonlinear prediction model is established based on the key production variable sequence, including:
[0082] Based on the key production variable sequence, a support vector machine-kernel principal component analysis model is constructed.
[0083] Specifically, the following decision equation is established:
[0084] ,
[0085] in, represents the weight, represents the bias term, taking a constant, represents a nonlinear mapping from low-dimensional to high-dimensional space, The production data set representing the historical batches consists of the production data of multiple historical batches, that is, , is the jth product quality inspection indicator in the inspection data set of the golden batch.
[0086] The Gaussian kernel is selected as the kernel function. Please refer to the above and will not be repeated here.
[0087] Constructing an optimization problem: The goal of the kernel support vector machine is to find a hyperplane or surface that maximizes the interval between the plane or surface and the sample points, that is:
[0088] ,
[0089] Convert the objective function max into a minimum value problem, that is:
[0090] ,
[0091] Make .
[0092] Use the Lagrange multiplier method to construct the optimization problem and solve it:
[0093] ,
[0094] in, is the Lagrange multiplier corresponding to the i-th historical batch, represents the non-negative Lagrange multiplier. Taking the partial derivative of the above formula and setting it to 0, we can get:
[0095] ,
[0096] in, is the inspection data of the ith historical batch.
[0097] The obtained decision function will misclassify a small part of the data, resulting in a small amount of error. That is, the historical batch is considered to have a soft interval. Since it is not possible to achieve sample partition prediction by simply obtaining the maximum boundary, a slack variable is introduced. ,Right now:
[0098] ,
[0099] Make , is a regularization parameter (or penalty parameter) that controls the trade-off between the complexity of the model and the degree of fit to the training data.
[0100] ,
[0101] in, is the weight vector, is the bias, For the The slack variables for historical batches, , is the Lagrange multiplier, and the corresponding constraints are: .
[0102] Combined with the Sequential Minimal Optimization (SMO) algorithm, the dual function of the Lagrangian function is solved to obtain the optimal Lagrangian multiplier. , and slack variables , and then calculate the parameters and weight vector , determine the decision function, and thus complete the construction of the support vector machine-kernel principal component analysis model.
[0103] By bringing the production data of future batches into the vector machine-kernel principal component analysis model, the production quality of future batches can be obtained.
[0104] Step 160, when the key variable screening method is the multiple linear regression screening method, the key production variable sequence is screened based on the multiple linear regression screening method, and a linear prediction model is established based on the key production variable sequence. The production quality of future batches is predicted based on the production data of future batches through the linear prediction model.
[0105] Preferably, the key production variable sequence is screened based on the multivariate linear regression screening method, including:
[0106] For each product quality inspection index, construct a multivariate linear regression equation corresponding to the product quality inspection index;
[0107] Calculate the regression coefficient matrix based on the least square method, wherein the regression coefficient matrix includes the regression coefficients of each multivariate linear regression equation;
[0108] For each production variable, based on the regression coefficient of the multivariate linear regression equation corresponding to each product quality inspection indicator, calculate the sum of the absolute values of the regression coefficients corresponding to the production variable;
[0109] Based on the sum of the absolute values of the regression coefficients corresponding to each production variable, the mean of the sum of the absolute values of the regression coefficients is calculated;
[0110] For each production variable, the indicator weight corresponding to the production variable is calculated based on the sum of the absolute values of the regression coefficients corresponding to the production variable and the sum of the absolute values of the regression coefficients corresponding to each production variable. The mean of the indicator weight is calculated based on the mean of the sum of the absolute values of the regression coefficients and the sum of the absolute values of the regression coefficients corresponding to each production variable.
[0111] Based on the indicator weight corresponding to each production variable and the average indicator weight, the key production variable sequence is screened.
[0112] Specifically, the multivariate linear regression equation can be:
[0113] ,
[0114] in, is the jth product quality inspection index in the inspection data set of the golden batch, , is the total number of product quality testing indicators, is a constant, is the regression coefficient of the multivariate linear regression equation, the production quality index of all historical batches The corresponding regression coefficient is , the comprehensive multiple linear regression equation composed of multiple linear regression equations corresponding to multiple product quality inspection indicators can be expressed in matrix as follows:
[0115] ,
[0116] in, is the comprehensive multiple linear regression equation, is the constant matrix corresponding to the comprehensive multivariate linear regression equation, is the regression coefficient matrix corresponding to the comprehensive multiple linear regression equation, and X is the production data matrix established based on the production data of all historical batches.
[0117] Use the least squares method to calculate the regression coefficient matrix corresponding to the comprehensive multivariate linear regression equation , the calculation formula is as follows:
[0118] ,
[0119] Among them, Y is the product quality inspection indicator matrix established based on the inspection data set of the golden batch.
[0120] The formula for calculating the sum of the absolute values of the regression coefficients for a production variable is as follows:
[0121] ,
[0122] in, is the regression coefficient of the ith production variable on the product quality inspection index.
[0123] As a preferred method, the key variable sequence is determined according to the following process: X 1 :
[0124] S21. Sort multiple production variables by the sum of the absolute values of their regression coefficients from small to large to form a production variable sequence. X 0 ;
[0125] S22. Average the sum of the absolute values of the regression coefficients of multiple production variables , get the average value ,in, is the sum of the absolute values of the regression coefficients corresponding to the ith production variable, and n is the total number of production variables;
[0126] S23. For production variable sequence X 0 , calculate the first screening parameter for each production variable , calculate the average The corresponding second screening parameter ;
[0127] S24, according to the production variable sequence X 0 The order of the elements in the production variable sequence X 0 Read the production variables in sequence and determine the first screening parameter of the currently read production variable Is it greater than the average value? If the first screening parameter of the currently read production variable is less than or equal to the average value, the sorting order is from the production variable sequence X 0 Read the next generated variable in the current production variable. If the first filter parameter of the currently read production variable Greater than the second filter parameter , to determine whether the sort position i of the currently read production variable is greater than , if yes, then Round up to the integer and use it as the target sorting position k; otherwise, use the sorting position of the currently read production variable as the target sorting position k;
[0128] S25, in the production variable sequenceX 0 Select the production variables from the kth sort position to the nth sort position to form a key variable sequence X 1 : ,in, To produce a sequence of variables X 0 The production variable at the kth sorted position in , To produce a sequence of variables X 0 The production variable at the k+1th sort position in , To produce a sequence of variables X 0 The production variable at the nth sorted position in .
[0129] As a preferred method, the key variable sequence can also be determined based on the following process: X 1 :
[0130] S31. Average the sum of the absolute values of the regression coefficients of multiple production variables , get the average value ;
[0131] S32. Calculate the first screening parameter of each production variable , calculate the average The corresponding second screening parameter ;
[0132] S33. For each production variable, based on the first screening parameter and the second screening parameter of the production variable, calculate the screening parameter difference: ;
[0133] S34. For each product quality inspection indicator, based on the regression coefficient of each production variable with respect to the product quality inspection indicator, calculate the mean of the regression coefficient corresponding to the product quality inspection indicator: ;
[0134] S35. For each production variable, based on the regression coefficient of the production variable with respect to each product quality detection index and the mean of the regression coefficient corresponding to each product quality detection index, calculate the influencing parameter of the production variable;
[0135] S36. For each production variable, weighted sum of the screening parameter difference and the influencing parameter corresponding to the production variable is performed to obtain a key score of the production variable;
[0136] S37, based on the sum of the absolute values and average values of the regression coefficients of each production variable , calculate the standard deviation: ;
[0137] S38. Determine the number k of key generating variables based on the standard deviation;
[0138] S39. Sort multiple production variables according to the key score of each production variable, and select the first k production variables to form a key variable sequence according to the sorting results. X 1 : .
[0139] The impact parameters are calculated based on the following formula:
[0140] ,
[0141] in, is the influencing parameter of the i-th production variable.
[0142] The number of key generation variables k is determined based on the following formula:
[0143] ,
[0144] in, is the preset standard deviation, is the preset parameter, The number of generated variables for the preset key, To obtain The integer part of .
[0145] Preferably, a linear prediction model is established based on a sequence of key production variables, including:
[0146] For each product quality inspection indicator, a multivariate linear regression equation corresponding to the product quality inspection indicator is constructed based on the key production variable sequence, and the regression constant and regression coefficient of the multivariate linear regression equation are calculated based on the least squares method.
[0147] Specifically, the following regression equation is constructed, and the least squares method is used to solve the regression constant and regression coefficient:
[0148] ,
[0149] In the formula, The k key production variables included in the key production variable sequence obtained by screening, is the jth product quality inspection indicator. are k+1 unknown parameters, is the regression constant, is the regression coefficient, is a random error term.
[0150] For a certain product quality inspection indicator and multiple historical batches, an objective function SSR is constructed, that is, the residual sum of squares between the "actual observation value" and the "regression equation prediction value" is calculated, which is expressed in a matrix as follows:
[0151] ,
[0152] In the formula, is the actual observation vector, is the predicted value vector, then the estimated value of the regression coefficient can be solved by the following formula:
[0153] ,
[0154] In the formula, X 1 It is a key production variable containing several historical batches The matrix of The output is the variable value of a product quality inspection indicator, which is a single-column matrix. is the estimated value of the corresponding regression coefficient.
[0155] If there are k product quality inspection indicators that need to be predicted, the batch is marked with subscript i and the product quality inspection indicator is marked with superscript j, then Y can be expressed as follows:
[0156] ,
[0157] According to the above regression equation, the method of solving the regression constant and regression coefficient can be used to obtain the prediction model expressions of different quality index items one by one, that is, there are k items corresponding to , thus k fitting curves can be drawn as prediction reference curves, that is, when a certain prediction index is determined, the point connection diagram of the detection index values of different batches.
[0158] By substituting the production data of future batches into the multivariate linear regression equation, the production quality of future batches can be obtained.
[0159] Step 170, determine the golden batch based on the preprocessed historical data set.
[0160] Specifically include:
[0161] The golden batch is determined based on the pre-processed historical data set through the analytic hierarchy process and / or entropy method.
[0162] Step 180, based on the production quality of the golden batch and future batches, a quality warning is issued.
[0163] Construction of quality prediction and grading warning model:
[0164] (1) The grading criteria for quality warning values are shown in Table 1:
[0165] Table 1
[0166]
[0167] in, is the minimum standard value of the jth product quality inspection index, is the average value of the jth product quality inspection index is the value of the j-th product quality inspection index corresponding to the golden batch.
[0168] For k product quality inspection indicators, the quality segment value matrix can be defined as follows:
[0169] ,
[0170] in, is a component A j-row, single-column matrix is formed; is a component A j-row, single-column matrix is formed; is a component A single-column matrix with j rows.
[0171] (2) The calculation formula of the quality warning matrix is as follows:
[0172] ,
[0173] Will The element values in the matrix are judged according to the grading definition criteria of the quality warning value, so the quality level can be determined and displayed in different colors of red, yellow, blue and green to facilitate the realization of visual quality warning.
[0174] The specific steps are as follows:
[0175] S41, data initialization, input product quality inspection index number k, that is, determine the value range of j, which are respectively Assigning values to matrix elements;
[0176] S42. Calculate the quality prediction value matrix corresponding to k product quality inspection indicators ;
[0177] S43, calculated according to the quality warning matrix calculation formula Matrix, get the early warning value of k product quality inspection indicators;
[0178] S44. According to the grading criteria of quality warning values, By grading the matrix elements, we can get the early warning grades (A, B, C, D) for k product quality inspection indicators, which are marked with corresponding colors.
[0179] The present invention is described below in conjunction with experimental data.
[0180] The historical data set used in the experiment is shown in Table 2. The correlation of the calculated production inspection index pairs is shown in Table 3:
[0181] Table 2
[0182] ,
[0183] Table 3
[0184]
[0185] There are 4 pairs of production inspection indexes whose absolute values of correlation are less than or equal to 0.5, and 3 pairs whose absolute values are greater than 0.5. Therefore, a nonlinear prediction model is used for prediction. The experimental results are as follows: Figure 2 shown.
[0186] In order to verify the correlation based on multiple production inspection index pairs and determine the effectiveness of the key variable screening method, a quality prediction experiment was carried out using a linear prediction model. The experimental results showed that the prediction using a nonlinear prediction model was closer to the true value.
[0187] Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the embodiments explicitly introduced and described in this specification.
Claims
1. A production quality prediction method based on kernel principal component analysis and multivariate linear regression, characterized in that: include: Acquire a historical data set, wherein the historical data set includes production data and inspection data of multiple historical batches, the production data of the historical batches includes material components and production process parameters of the historical batches, and the inspection data of the historical batches includes intermediate product inspection data and finished product inspection data of the historical batches; Preprocessing the historical data set to obtain a preprocessed historical data set; Based on the preprocessed historical data set, determining the correlation of a plurality of production inspection indicator pairs, wherein one of the production inspection indicator pairs includes a production variable and a product quality detection indicator; Based on the correlation of the multiple production inspection index pairs, determine a key variable screening method, wherein the key variable screening method is a kernel principal component analysis screening method or a multivariate linear regression screening method; When the key variable screening method is a kernel principal component analysis screening method, based on the kernel principal component analysis screening method, a key production variable sequence is screened, based on the key production variable sequence, a nonlinear prediction model is established, production data of future batches are obtained, and the production quality of the future batches is predicted based on the production data of the future batches by the nonlinear prediction model; When the key variable screening method is a multiple linear regression screening method, based on the multiple linear regression screening method, a key production variable sequence is screened, based on the key production variable sequence, a linear prediction model is established, and the production quality of the future batch is predicted based on the production data of the future batch through the linear prediction model; Determining a golden batch based on the preprocessed historical data set; Based on the production quality of the golden batch and the future batches, quality warning is carried out; Wherein, based on the correlation of the plurality of production inspection index pairs, determining a key variable screening method includes: For each of the production inspection indicator pairs, calculate the absolute value of the correlation of the production inspection indicator pair; when the absolute value of the correlation of the production inspection indicator pair is less than or equal to a preset threshold, mark the production inspection indicator pair as a first production inspection indicator pair; when the absolute value of the correlation of the production inspection indicator pair is greater than the preset threshold, mark the production inspection indicator pair as a second production inspection indicator pair; When the number of the first production inspection index pairs is greater than the number of the second production inspection index pairs, the key variable screening method is a kernel principal component analysis screening method; When the number of the first production inspection index pairs is less than or equal to the number of the second production inspection index pairs, the key variable screening method is a multiple linear regression screening method; Based on the kernel principal component analysis screening method, the key production variable sequence is screened, including: Select the target kernel function; Calculating a kernel matrix based on the target kernel function and the preprocessed historical data set; Based on the kernel matrix, calculating a centralized kernel matrix; Performing eigenvalue decomposition on the centralized kernel matrix to obtain eigenvalues; Based on the characteristic value, screening the key production variable sequence; Based on the characteristic values, the key production variable sequences are screened, including: Calculate the variance contribution rate of a single principal component; Determine the number of principal components based on the cumulative variance contribution rate method and the variance contribution rate of a single principal component; Based on the number of principal components and the characteristic values, screening the key production variable sequence; Based on the multivariate linear regression screening method, the key production variable sequence is screened, including: For each of the product quality detection indicators, construct a multivariate linear regression equation corresponding to the product quality detection indicator; Calculating a regression coefficient matrix based on the least squares method, wherein the regression coefficient matrix includes the regression coefficients of each of the multiple linear regression equations; For each of the production variables, based on the regression coefficient of the multivariate linear regression equation corresponding to each of the product quality detection indicators, calculate the sum of the absolute values of the regression coefficients corresponding to the production variables; Calculate the mean of the sum of the absolute values of the regression coefficients based on the sum of the absolute values of the regression coefficients corresponding to each of the production variables; For each of the production variables, based on the sum of the absolute values of the regression coefficients corresponding to the production variable and the sum of the absolute values of the regression coefficients corresponding to each of the production variables, calculate the indicator weight corresponding to the production variable, and based on the mean of the sum of the absolute values of the regression coefficients and the sum of the absolute values of the regression coefficients corresponding to each of the production variables, calculate the mean of the indicator weight; Based on the indicator weight corresponding to each of the production variables and the average of the indicator weights, a key production variable sequence is screened; Based on the indicator weight corresponding to each of the production variables and the average of the indicator weights, the key production variable sequence is screened, including: S21. Sort multiple production variables by the sum of the absolute values of their regression coefficients from small to large to form a production variable sequence. X 0 ; S22. Average the sum of the absolute values of the regression coefficients of multiple production variables , get the average value ,in, is the sum of the absolute values of the regression coefficients corresponding to the ith production variable, and n is the total number of production variables; S23. For production variable sequence X 0 , calculate the first screening parameter for each production variable , calculate the average The corresponding second screening parameter ; S24, according to the production variable sequence X 0 The order of the elements in the production variable sequence X 0 Read the production variables in sequence and determine the first screening parameter of the currently read production variable Is it greater than the average value? If the first screening parameter of the currently read production variable is less than or equal to the average value, the sorting order is from the production variable sequence X 0 Read the next generated variable in the current production variable. If the first filter parameter of the currently read production variable Greater than the second filter parameter , to determine whether the sort position i of the currently read production variable is greater than , if yes, then Round up to the integer and use it as the target sorting position k. Otherwise, use the sorting position i of the currently read production variable as the target sorting position k. S25, in the production variable sequence X 0 Select the production variables from the kth sort position to the nth sort position to form a key variable sequence X 1 : ,in, To produce a sequence of variables X 0 The production variable at the kth sorted position in , To produce a sequence of variables X 0 The production variable at the k+1th sort position in , To produce a sequence of variables X 0 The production variable at the nth sorted position in .
2. The production quality prediction method based on kernel principal component analysis and multiple linear regression according to claim 1 is characterized in that: Preprocessing the historical data set to obtain a preprocessed historical data set includes: Determine invalid historical batches among the multiple historical batches, delete production data and inspection data of the invalid historical batches from the historical data set, and obtain a cleaned historical data set; The cleaned historical data set includes historical batch production data and inspection data, which are filled with missing data, normalized and standardized.
3. The production quality prediction method based on kernel principal component analysis and multiple linear regression according to claim 1 or 2, characterized in that: Based on the key production variable sequence, a nonlinear forecasting model is established, including: Based on the key production variable sequence, a support vector machine-kernel principal component analysis model is constructed.
4. The production quality prediction method based on kernel principal component analysis and multivariate linear regression according to claim 1 or 2, characterized in that: Based on the key production variable sequence, a linear forecasting model is established, including: For each of the product quality detection indicators, a multivariate linear regression equation corresponding to the product quality detection indicator is constructed based on a sequence of key production variables, and the regression constant and regression coefficient of the multivariate linear regression equation are calculated based on the least squares method.
5. The production quality prediction method based on kernel principal component analysis and multivariate linear regression according to claim 1 or 2, characterized in that: Based on the pre-processed historical data set, a golden batch is determined, including: The golden batch is determined based on the preprocessed historical data set by means of a hierarchy analysis method and / or an entropy method.
Citation Information
Cited By
Quality prediction method and device based on deep hidden feature fusion
CN122310432A
