A cloud-edge collaborative quality prediction method
By constructing a Koopman-constrained hierarchical deep state-space model in a cloud-edge collaborative environment and simplifying its deployment to edge devices, the problem of insufficient modeling and prediction accuracy and adaptability in cloud manufacturing systems is solved, achieving efficient and accurate quality prediction and adaptive updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2023-10-17
- Publication Date
- 2026-05-26
Smart Images

Figure CN117333069B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a cloud-edge collaborative quality prediction method. Background Technology
[0002] Currently, the integration of cloud computing and manufacturing has sparked growing interest in Cloud Manufacturing (CMfg) as an emerging manufacturing paradigm. Cloud Manufacturing integrates manufacturing resources, services, and information onto a unified cloud platform, providing manufacturing enterprises with a flexible, efficient, and sustainable production method. Within this manufacturing ecosystem, product quality indicators are key factors in measuring the operational status and production efficiency of CMfg production systems. Optimizing product quality not only reduces defect rates and improves production efficiency but also helps reduce resource waste, enhances enterprise competitiveness, and promotes sustainable development.
[0003] Therefore, real-time perception of product quality is crucial. However, product quality test values typically require laboratory analysis, leading to significant time lags and hindering timely assessment and guidance of the production process. Thus, online prediction of quality indicators is essential in industrial CMfg production systems. Timely aggregation of data from numerous manufacturing devices connected to the cloud manufacturing system, and the construction of models linking device data with quality indicators to predict quality variables in real time, are particularly critical.
[0004] Although quality prediction in CMfg systems has been extensively studied, two pressing issues remain to be addressed: 1) Industrial processes can be viewed as complex nonlinear dynamic systems, with data exhibiting nonlinear dynamic characteristics and high noise, making it difficult for existing recurrent neural networks and variational autoencoders (VAEs) to capture the uncertainties in industrial processes. State-space model-based methods, such as NDS, DMM, and KVAE, incorporate both dynamics and noise into the modeling process. However, they fail to guarantee that latent variables accurately represent the fundamental dynamics of the system, leading to insufficient interpretability and low prediction accuracy. 2) Models deployed at the edge cannot be applied to quality prediction under all operating conditions. Therefore, a strategy is needed to accurately detect model mismatches and update the model in a timely manner. Unfortunately, widely used error-based update strategies suffer from latency. Error-driven model update strategies rely on labels for training, which may lead to abnormally high classification confidence under unknown operating conditions, resulting in false triggers and missed triggers.
[0005] It is evident that there is an urgent need for an adaptive cloud-edge collaborative quality prediction method that can accurately model the complex dynamics of industrial systems and enable on-site deployment of models. Summary of the Invention
[0006] In view of this, the present disclosure provides a cloud-edge collaborative quality prediction method, which at least partially solves the problems of poor modeling and prediction accuracy and adaptability in the prior art.
[0007] This disclosure provides a cloud-edge collaborative quality prediction method, including:
[0008] Step 1: Obtain historical industrial process data within a preset time period;
[0009] Step 2: Preprocess the historical industrial process data and divide the preprocessed historical industrial process data into time windows to obtain time window data. The preprocessing includes outlier removal, missing value completion, and data normalization.
[0010] Step 3: Construct a Koopman-constrained hierarchical deep state-space model in the cloud and train it using time window data;
[0011] Step 4: Simplify and retrain the deep state space model in the cloud;
[0012] Step 5: Calculate the statistic T based on the latent variables of the simplified model and the predicted observed values. z 2 ,T x 2 ;
[0013] Step 6: Determine the statistic T using kernel density estimation. z 2 ,T x 2 Monitoring threshold η z ,η x ;
[0014] Step 7: Deploy the simplified model to the edge device;
[0015] Step 8: At the edge device, preprocess the online data of the actual industrial process to obtain new time window data, input it into the simplified model, perform online quality prediction, and calculate statistics. like and If the model is found to match the current working conditions, it is determined that the model is mismatched and a model update is triggered in the cloud. In the cloud, process data uploaded from the edge is received and stored in real time.
[0016] According to a specific implementation of this disclosure, the deep state space model includes a generative model and an inference model. The generative model includes a transmission network, a transmission network, an observation network, a Koopman operator, a prediction network, and a decoding network. The inference model includes a bidirectional recurrent neural network.
[0017] According to a specific implementation of an embodiment of this disclosure, step 3 specifically includes:
[0018] Step 3.1: Parameterize the nonlinear mapping of the system state at two adjacent time points using the transfer network;
[0019] Step 3.2: Parameterize the nonlinear mapping of latent variables and observed variables at the same time using the transmission network;
[0020] Step 3.3: Using the observation network as an encoder, the latent variables in the state space are mapped to the high-dimensional measurement space.
[0021] Step 3.4: Model the evolution of the system in the observation space using the Koopman operator;
[0022] Step 3.5: Use a prediction network to predict quality variables based on stratified latent variables;
[0023] Step 3.6: Calculate the parameterized variational posterior distribution using a bidirectional recurrent neural network;
[0024] Step 3.7: Use the decoding network as the decoder to learn the inverse function of the observation network, and map the latent variables in the observation space back to the state space;
[0025] Step 3.8: Fuse the reconstruction loss and linear dynamic constraints to obtain the state prediction loss. Combine the state prediction loss and reconstruction loss to form the overall loss function and train it using time window data.
[0026] According to a specific implementation of this disclosure, the expression for the observation network is:
[0027]
[0028]
[0029]
[0030] Among them, z t This represents the latent variable at time t. Indicated by The mean, The covariance follows a normal distribution. This represents a deep network that takes the current hidden variable as input and is used for parameterizing the mean. This represents a deep network that takes the latent variables at the current time as input and is used to parameterize the covariance matrix. μ represents the mean of the latent variables, ∑ represents the covariance of the latent variables, and the latent variables... It is considered to reflect the dynamics of the system from another perspective. This represents the parameter matrix used for feature mapping. Represents the bias vector;
[0031] The definition of the decoding network is
[0032]
[0033]
[0034]
[0035] in, This represents the distribution of latent variables in the reconstructed state space. Indicates the current time For input, a deep network used for parameterized mean, Indicated by For input, a deep network used to parameterize the covariance matrix, This represents the parameter matrix used for feature mapping. Represents the bias vector;
[0036] The definition of the Koopman operator is...
[0037]
[0038]
[0039] The expression for the overall loss function is as follows:
[0040]
[0041] in, L represents the log-likelihood variational lower bound derived using the variational Bayesian method. rec L represents the reconstruction loss. st This represents the state prediction loss. Represents the optimization of θ and To minimize the training loss, θ represents the learnable parameters of the generator network. This represents the learnable parameters of the inference network.
[0042] According to a specific implementation of an embodiment of this disclosure, step 4 specifically includes:
[0043] Step 4.1: After training is complete, retain the transit network and the emitter network as the simplified generative model and fix the parameters of the transit network;
[0044] Step 4.2: Remove the inverted recurrent neural network from the inference model and simplify the inference model to a causal form;
[0045] Step 4.3: Remove the Koopman constraints and hierarchical latent variables from the overall loss function to obtain a new training objective, and use this objective to train the simplified generation module and inference model.
[0046] According to a specific implementation of an embodiment of this disclosure, step 5 specifically includes:
[0047] Step 5.1: Assuming the posterior distribution of the previous time step has been obtained, calculate the prior distribution of the current time step based on it.
[0048] Step 5.2: Obtain the posterior distribution of the latent variables at the current time using the simplified inference model;
[0049] Step 5.3: By quantifying the difference between the estimated value and the true value, it is determined whether the system evolves according to the original state or has a serious deviation, resulting in two monitoring indicators, including the KL divergence term in the training loss and the reconstruction term in the training loss.
[0050] Step 5.4: Calculate the statistic T based on the two monitoring indicators. z 2 ,T x 2 .
[0051] According to a specific implementation of an embodiment of this disclosure, step 6 specifically includes:
[0052] Step 6.1, convert the statistic T z 2 ,T x 2 Sort the data separately and use kernel density estimation to calculate the probability density function of the statistic for each data point;
[0053] Step 6.2: Calculate the probability density distribution for each probability density sequence, and determine the monitoring threshold based on the probability density distribution and the set false alarm rate.
[0054] According to a specific implementation of an embodiment of this disclosure, the step of performing online quality prediction includes:
[0055] Predict the quality variable at the current time step based on the posterior distribution of the latent variables at the current time, wherein the expression for the quality variable is:
[0056]
[0057] in Let f represent the estimated quality variable, and f be a deep network used to learn the nonlinear relationship between the latent variables and the quality variable.
[0058] The cloud-edge collaborative quality prediction scheme in this embodiment includes: Step 1, acquiring historical industrial process data within a preset time period; Step 2, preprocessing the historical industrial process data and segmenting the preprocessed historical industrial process data according to time windows to obtain time window data, wherein the preprocessing includes outlier removal, missing value completion, and data normalization; Step 3, constructing a Koopman-constrained hierarchical deep state space model in the cloud and training it using the time window data; Step 4, simplifying the deep state space model in the cloud and retraining it; Step 5, calculating the statistic T based on the latent variables of the simplified model and the predicted observations. z 2 ,T x 2 Step 6: Determine the statistic T using kernel density estimation. z 2 ,T x 2 Monitoring threshold η z ,η x Step 7: Deploy the simplified model to the edge device; Step 8: On the edge device, preprocess the online data of the actual industrial process to obtain new time window data, input it into the simplified model, perform online quality prediction, and calculate statistics. like and If the model is found to match the current working conditions, it is determined that the model is mismatched and a model update is triggered in the cloud. In the cloud, process data uploaded from the edge is received and stored in real time.
[0059] The beneficial effects of the embodiments disclosed herein are as follows: (1) A novel cloud-edge collaborative method is proposed, including training and simplifying KHSSM in the cloud and adopting an adaptive triggering model update strategy at the edge to ensure the accuracy of quality prediction. (2) KHSSM uses the Koopman operator to constrain latent variables, ensuring that the latent variables are meaningful and expressive, thereby enhancing the interpretability of the model. (3) Considering the limited computing and storage capabilities of edge devices, a model simplification strategy specifically designed for KHSSM is proposed to reduce the parameter size while maintaining accuracy. (4) An anomaly-based adaptive model update strategy is proposed and deployed at the edge layer to monitor model mismatch in an unsupervised manner. Attached Figure Description
[0060] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 A flowchart illustrating a cloud-edge collaborative quality prediction method provided in this embodiment of the disclosure;
[0062] Figure 2 This is a schematic diagram illustrating the specific implementation process of a cloud-edge collaborative quality prediction method provided in this embodiment of the disclosure;
[0063] Figure 3 A schematic diagram of a structure for building a Koopman-constrained hierarchical deep state space model provided in this embodiment of the disclosure;
[0064] Figure 4 This is a comparison chart of quality prediction results provided in an embodiment of this disclosure. Detailed Implementation
[0065] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0066] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0067] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0068] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0069] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0070] With the continuous development of cutting-edge technologies such as big data and artificial intelligence, data-driven methods for predicting quality indicators have been widely researched and applied in industry. These methods can extract valuable information from massive amounts of real-time measurable data, providing manufacturing enterprises with critical decision support and promoting the optimization and refined management of production processes.
[0071] In the CMfg environment, various deep learning models have been applied for quality prediction. However, how to deploy these models in the industrial field is a key issue. Traditional online quality prediction methods in industrial fields typically deploy models directly on edge devices close to the data source, leading to limitations in handling large-scale data and deploying complex models. Furthermore, these models can only be updated manually, which is very inconvenient. CMfg provides a new paradigm for online quality prediction in industrial processes. The integration of traditional edge intelligence with cloud computing has given rise to the concept of cloud-edge collaboration. Industrial data processing methods based on cloud-edge collaboration have attracted significant attention in CMfg and have garnered important interest in academia. This method involves storing and managing industrial big data in the cloud, while the edge is responsible for data preprocessing, data transmission, and real-time inference. The cloud-edge collaboration method effectively reduces prediction latency and alleviates the burden on the edge, thus having significant implications for industrial processes.
[0072] Although quality prediction in CMfg systems has been extensively studied, two pressing issues remain to be addressed: 1) Industrial processes can be viewed as complex nonlinear dynamic systems, with data exhibiting nonlinear dynamic characteristics and high noise, making it difficult for existing recurrent neural networks and variational autoencoders (VAEs) to capture the uncertainties in industrial processes. State-space model-based methods, such as NDS, DMM, and KVAE, incorporate both dynamics and noise into the modeling process. However, they fail to guarantee that latent variables accurately represent the fundamental dynamics of the system, leading to insufficient interpretability and low prediction accuracy. 2) Models deployed at the edge cannot be applied to quality prediction under all operating conditions. Therefore, a strategy is needed to accurately detect model mismatches and update the model in a timely manner. Unfortunately, widely used error-based update strategies suffer from latency. Error-driven model update strategies rely on labels for training, which may lead to abnormally high classification confidence under unknown operating conditions, resulting in false triggers and missed triggers.
[0073] This disclosure provides a cloud-edge collaborative quality prediction method, which can be applied to cloud manufacturing monitoring in industrial manufacturing scenarios.
[0074] See Figure 1 This is a flowchart illustrating a cloud-edge collaborative quality prediction method provided in an embodiment of this disclosure. Figure 1 and Figure 2 As shown, the method mainly includes the following steps:
[0075] Step 1: Obtain historical industrial process data within a preset time period;
[0076] In a specific implementation, this embodiment of the invention takes the industrial scenario of potassium salt flotation as an example. In this embodiment of the invention, 1241 time-based industrial process sample points were obtained, and each sample point contains 39-dimensional features.
[0077] Step 2: Preprocess the historical industrial process data and divide the preprocessed historical industrial process data into time windows to obtain time window data. The preprocessing includes outlier removal, missing value completion, and data normalization.
[0078] In practice, the historical data undergoes preprocessing such as outlier removal, missing value completion, and data normalization. The preprocessed industrial process data is then divided into time windows, with a time window length T = 20 and a window sliding step size of 1. The first 70% of the samples are used as the training set, and the remaining 30% are used as the test set.
[0079] Step 3: Construct a Koopman-constrained hierarchical deep state-space model in the cloud and train it using time window data;
[0080] Furthermore, the deep state space model includes a generative model and an inference model. The generative model includes a transmission network, a transmission network, an observation network, a Koopman operator, a prediction network, and a decoding network. The inference model includes a bidirectional recurrent neural network.
[0081] Furthermore, step 3 specifically includes:
[0082] Step 3.1: Parameterize the nonlinear mapping of the system state at two adjacent time points using the transfer network;
[0083] Step 3.2: Parameterize the nonlinear mapping of latent variables and observed variables at the same time using the transmission network;
[0084] Step 3.3: Using the observation network as an encoder, the latent variables in the state space are mapped to the high-dimensional measurement space.
[0085] Step 3.4: Model the evolution of the system in the observation space using the Koopman operator;
[0086] Step 3.5: Use a prediction network to predict quality variables based on stratified latent variables;
[0087] Step 3.6: Calculate the parameterized variational posterior distribution using a bidirectional recurrent neural network;
[0088] Step 3.7: Use the decoding network as the decoder to learn the inverse function of the observation network, and map the latent variables in the observation space back to the state space;
[0089] Step 3.8: Fuse the reconstruction loss and linear dynamic constraints to obtain the state prediction loss. Combine the state prediction loss and reconstruction loss to form the overall loss function and train it using time window data.
[0090] Furthermore, the expression for the observation network is as follows:
[0091]
[0092]
[0093]
[0094] Among them, z t This represents the latent variable at time t. Indicated by The mean, The covariance follows a normal distribution. This represents a deep network that takes the current hidden variable as input and is used for parameterizing the mean. This represents a deep network that takes the latent variables at the current time as input and is used to parameterize the covariance matrix. μ represents the mean of the latent variables, ∑ represents the covariance of the latent variables, and the latent variables... It is considered to reflect the dynamics of the system from another perspective. This represents the parameter matrix used for feature mapping. Represents the bias vector;
[0095] The definition of the decoding network is
[0096]
[0097]
[0098]
[0099] in, This represents the distribution of latent variables in the reconstructed state space. Indicates the current time For input, a deep network used for parameterized mean, Indicated by For input, a deep network used to parameterize the covariance matrix, This represents the parameter matrix used for feature mapping. Represents the bias vector;
[0100] The definition of the Koopman operator is...
[0101]
[0102]
[0103] The expression for the overall loss function is as follows:
[0104]
[0105] in, L represents the log-likelihood variational lower bound derived using the variational Bayesian method. rec L represents the reconstruction loss. st This represents the state prediction loss. Represents the optimization of θ and To minimize the training loss, θ represents the learnable parameters of the generator network. This represents the learnable parameters of the inference network.
[0106] like Figure 3As shown, the Koopman-constrained hierarchical deep state-space model (KHSSM) can be mainly divided into two parts: the generative model and the inference model. The generative model defines the general structure of variable dependencies, forming the basic structure of the KHSSM. The figure above uses black solid lines to represent the generative model of the KHSSM, which mainly includes: the propagation network, the emission network, the observation network, the Koopman operator, the prediction network, and the decoding network.
[0107] In practical implementation, the transmission network (MLPs) are used to parameterize z t-1 To z t The nonlinear evolution law is defined as follows:
[0108]
[0109] Among them, the latent variable z t This represents the state of the system at time t. and Represents the parameterization of the normal distribution A neural network with mean μ. Let represent a neural network used to parameterize the covariance matrix ∑ of a normal distribution. This represents a normal distribution with mean μ and covariance ∑. It's important to note that the input to all neural networks is a vector sampled from a normal distribution. It inherits the gating structure defined in DMM, and its detailed definition is as follows:
[0110]
[0111]
[0112]
[0113] in, Represents the gating feature, z t-1 h represents the latent variable at time t-1. t σ represents the candidate features extracted by MLP. r,s σ represents the activation function r ,σ s These are applied sequentially to the hidden layers of the MLP; σ r ,σ s ,σ t These represent "ReLU", "Sigmoid", and "Tanh" respectively; weight matrix and Used to map hidden layer features to mean and covariance; b μ and b ∑ It is a bias term. The addition of gating mechanism makes... It retains certain linear characteristics, which is beneficial for flexible modeling of dynamic systems, especially when linear and nonlinear dynamics coexist. It is worth noting that if g t If all elements are equal to 1, the system can degenerate into a linear system. The dimension of the latent variables is usually smaller than the dimension of the observed variables; in this embodiment, the dimension of the latent variables is defined as 25. The specific structure is The specific structure is in The numbers represent the connections in a neural network, and the numbers represent the number of neurons.
[0114] Launch network: Used to parameterize z t To x t The nonlinear mapping relationship is defined as follows:
[0115]
[0116]
[0117] in, Indicates the transmission network. This represents a deep network that takes the latent variables at the current time as input and is used to parameterize and reconstruct the mean of the observation distribution.
[0118] As can be seen, the transmitting network only parameterizes the mean in the output distribution. The covariance matrix is not used for subsequent training and is therefore not considered. The specific structure is
[0119] Observation network: As an encoder, it maps latent variables in the state space to a high-dimensional measurement space, which is defined as follows:
[0120]
[0121]
[0122]
[0123] Among them, z t This represents the latent variable at time t. Indicated by The mean, The covariance follows a normal distribution. This represents a deep network that takes the current hidden variable as input and is used for parameterizing the mean. This represents a deep network that takes the latent variables at the current time as input and is used to parameterize the covariance matrix. μ represents the mean of the latent variables, ∑ represents the covariance of the latent variables, and the latent variables... It is considered to reflect the dynamics of the system from another perspective. This shows the parameter matrix used for feature mapping. Indicates the bias vector.
[0124] The resulting new latent variables It is considered to reflect the dynamics of the system from another perspective. The specific structure is According to the theory of the Koopman operator, the matrix required to linearly represent the dynamics of a nonlinear system is infinite-dimensional. Therefore, only one invariant subspace can be obtained through deep learning, and the higher the dimension, the higher the accuracy. The dimension is set to 100. and All are 100×100 parameter matrices.
[0125] Koopman operator: It is parameterized by a 100×100 weight matrix. It models the evolution of the system in the observation space. Based on the fundamental assumptions of the Koopman operator, the system evolves linearly in the measurement space, therefore... An analytical form exists. Assume... The distribution of then can be expressed as
[0126]
[0127]
[0128] Predictive network: f(MLP) predicts quality variables based on stratified latent variables, and is defined as follows:
[0129]
[0130] in This represents the concatenation operation of latent variables, σ l,l This indicates that the "leakyrelu" activation function was used in both hidden layers. The specific structure is
[0131] The above formula assumes that the current quality variable is highly correlated with the latent variable at the current time step.
[0132] In this embodiment of the invention, the inference model aims to parameterize the necessary variational posterior distribution. During training, our focus is on... The factorization of can be expressed as
[0133]
[0134]
[0135] Using bidirectional RNN pairs and Parameterization is performed to accurately approximate the true posterior. Based on the assumption that the posterior distribution is... It is z through Obtained through mapping. Based on... Figure 3 The inference model proposed in [the paper] can be simplified to the above equation as follows:
[0136]
[0137] A bidirectional recurrent neural network (RNN) was used to parameterize the variational posterior distribution. Figure 3 The dashed line in the middle represents the rnn used to parameterize the variational posterior distribution, which is specifically defined as:
[0138]
[0139]
[0140]
[0141] in This represents the features extracted by the feedforward recurrent neural network at time t. This represents a feedforward recurrent neural network. This represents the features extracted by the feedforward recurrent neural network at time t+1. This represents the features extracted by the feedforward recurrent neural network at time t. This represents a feedforward recurrent neural network. σ represents the features extracted by the feedforward recurrent neural network at time t-1. s,t σ represents the activation function s ,σ t These are applied sequentially to the hidden layers of the MLP. Indicated by The mean, The covariance follows a normal distribution, and the arrow above indicates the direction of the recurrent neural network. This represents the concatenation of the hidden layer features of the feedforward recurrent neural network, the hidden layer features of the backward recurrent neural network, and the observation value at the current time step. and This represents the feature a extracted by the MLP. t Perform a linear mapping, where Among them, W μ Let b represent the parameter matrix used for feature mapping. μ W represents the bias vector.∑ Let b represent the parameter matrix used for feature mapping. ∑ Let represent the bias vector. Based on the above equation, it can be easily obtained that...
[0142]
[0143] The hidden layer of an RNN contains 100 neurons, and the arrow above indicates the direction of the recurrent neural network. This represents the concatenation of the hidden layer features of the feedforward recurrent neural network, the hidden layer features of the backward recurrent neural network, and the observation value at the current time step. The specific structure is and Represents h t A linear mapping, where
[0144] Decoding the network: As a decoder, with Correspondingly, since deep networks are irreversible, therefore Intended to learn The inverse function of the state space maps the latent variables in the observation space back to the state space. Specifically, it is defined as follows:
[0145]
[0146]
[0147]
[0148] in This represents the distribution of latent variables in the reconstructed state space. Indicates the current time For input, a deep network used for parameterized mean, Indicated by A deep network used as input for parameterizing the covariance matrix. This represents the parameter matrix used for feature mapping. This represents the bias vector.
[0149] The specific structure can be and All are parameter matrices of 50×25.
[0150] The training of the model mainly includes two aspects: (1) maximizing the log-likelihood of the observations and labels, and (2) minimizing the constraints introduced by the Koopman operator. Maximizing the log-likelihood of the observations and labels is the core of the entire model. By using z t and As a unified entity, it is denoted as A log-likelihood variational lower bound can be derived using the variational Bayesian method.
[0151]
[0152] in Represents the network parameters of the inference model.
[0153] To facilitate the optimization of log-likelihood using gradient descent, log-likelihood can be expressed in another form through factorization:
[0154]
[0155] The above equation is a general form applicable to all state-space models. For specific models, the equation can be simplified. For example... Figure 2 As shown, the proposed model is based on the following basic assumptions: (1) the latent variables have first-order Markov properties, that is (2) The current observations depend entirely on the current latent variables, i.e. (3) The current label depends entirely on the current latent variable. Therefore, the log-likelihood after factorization can be further simplified to:
[0156]
[0157] The prediction term aims to predict the current label based on the current state. The reconstruction term aims to reconstruct the current observation based on the current state. The KL divergence term, regularization, aims to minimize the difference between the prior distribution and the variant posterior distribution. As training progresses, the variational posterior gradually converges to the true posterior.
[0158] In our proposed model, the latent variables are hierarchical, consisting of two parts: z t and Therefore, we need to partition the variables in the above equation into z as represented in the following equation. t and The KL term can be factored for more direct calculation.
[0159]
[0160] The KL divergence term is decomposed into two terms. One of these terms calculates z. t The prior distribution of z t The KL divergence between the variational posterior distributions; another calculation prior distribution and variational posterior distribution The KL divergence between them, where Depend on and The above equation has an analytical form, and can be directly optimized using gradient descent to maximize the log-likelihood, based on the proposed generative and inference models.
[0161] Furthermore, three loss functions based on the Koopman operator for data-driven state estimation were introduced during the training process.
[0162] The first loss guarantee The ability to reconstruct z is called the reconstruction loss. An encoder-decoder method was defined above, where the encoder... Its function is to map z to the observation space; the decoder Its function is to Mapping back to the state space. Specifically, the reconstruction loss is defined as...
[0163]
[0164] Where ||·|| represents the L2 norm of the interior vector.
[0165] The second loss relies on the Koopman operator in the observation space. The dynamics of a modeling system are called linear dynamic constraints. In the observation space, we enforce... The linear transfer of z matches the nonlinear transfer of z. Specifically, the linear dynamic constraint is defined as...
[0166]
[0167] The last item was calculated The KL divergence between the prior distribution and the variational posterior, i.e. Its purpose is consistent with that of linear dynamic constraints. In summary, linear dynamic constraints are already reflected in the likelihood function, so there is no need to introduce an additional loss function here.
[0168] The third loss combines the first two constraints, performing state prediction in the state space; this is called the state prediction loss. This is equivalent to decoding all the measured states from the previous constraint into the state space. Specifically, the state prediction loss is defined as...
[0169]
[0170] The losses from these two aspects together constitute the objective of network optimization, which can be expressed as:
[0171]
[0172] During training, the resulting hierarchical latent variables are more expressive and more accurately represent the system dynamics, which is more beneficial for subsequent prediction.
[0173] Step 4: Simplify and retrain the deep state space model in the cloud;
[0174] Based on the above embodiments, step 4 specifically includes:
[0175] Step 4.1: After training is complete, retain the transit network and the emitter network as the simplified generative model and fix the parameters of the transit network;
[0176] Step 4.2: Remove the inverted recurrent neural network from the inference model and simplify the inference model to a causal form;
[0177] Step 4.3: Remove the Koopman constraints and hierarchical latent variables from the overall loss function to obtain a new training objective, and use this objective to train the simplified generation module and inference model.
[0178] In practice, the deep state space model consists of two parts: a generation model and an inference model. Therefore, we simplify them separately.
[0179] The introduced Koopman operator is used to constrain the likelihood function to identify more reasonable system parameters and better estimate the system dynamics. On the other hand, the latent variables in the observation space, based on Koopman operator theory, are another expression of the system dynamics, partially overlapping with the latent variable information in the state space. Therefore, we believe that after training, the part of the network related to the Koopman operator can be removed, i.e., the Koopman operator-related part can be removed. And fixed transmission network The parameters are used to predict the quality variables using only the latent variables in the state space. As shown in the figure below, the simplified generative model degenerates into a basic nonlinear Gaussian state-space model, whose basic structure is consistent with that of the DMM.
[0180] The inference model provides an exact approximation of the true posterior, i.e., all information is extracted by a bidirectional RNN to obtain a non-causal variational posterior. However, non-causal inference is discouraged in practical applications because future information is often unknown. Therefore, we simplify the inference model to a causal form, i.e., by removing the inverse RNN. Furthermore, z t-1 Includes X 1:t-1 All information can be removed from the forward RNN to simplify the network. Thus, the variational posterior distribution is defined as...
[0181]
[0182] In the simplified inference model, the features extracted by the original bidirectional RNN are z t-1 and x t Alternative. The simplification of the inference model not only eliminates the bidirectional RNN but also reduces the complexity of the original MLP. Specifically, the inference model is simplified to...
[0183] h t =MLP([z t-1 ;x t ]),
[0184]
[0185] Because the generative and inference models have been simplified, the models need to be retrained. The Koopman constraints and hierarchical latent variables have been removed from the model's training objective, which is defined as follows:
[0186]
[0187] During the training process, The parameters remain unchanged.
[0188] Step 5: Calculate the statistic T based on the latent variables of the simplified model and the predicted observed values. z 2 ,T x 2 ;
[0189] Based on the above embodiments, step 5 specifically includes:
[0190] Step 5.1: Assuming the posterior distribution of the previous time step has been obtained, calculate the prior distribution of the current time step based on it.
[0191] Step 5.2: Obtain the posterior distribution of the latent variables at the current time using the simplified inference model;
[0192] Step 5.3: By quantifying the difference between the estimated value and the true value, it is determined whether the system evolves according to the original state or has a serious deviation, resulting in two monitoring indicators, including the KL divergence term in the training loss and the reconstruction term in the training loss.
[0193] Step 5.4: Calculate the statistic T based on the two monitoring indicators. z 2 ,T x 2 .
[0194] In practical implementation, the proposed simplified KHSSM model is a state estimator. It assumes that the posterior distribution of the previous time step has already been obtained. zt The prior distribution can be expressed as
[0195]
[0196] The posterior distribution z of the latent variables at the current time t|t It can be obtained through a reasoning model, and can be represented as follows:
[0197]
[0198] in The specific structure is The difference between the quantified estimated value and the actual value can be used to determine whether the system is evolving according to its original state or has deviated significantly. Therefore, the two monitoring indicators can be defined as follows:
[0199]
[0200]
[0201] Where u t|t It is the mean of the variational posterior distribution of the inference network output, u t|t-1 It is the mean of the prior distribution obtained through the transmission network. The difference between the prior and posterior distributions of the quantified latent variables corresponds to the KL divergence term in the training loss. When the system can accurately build a dynamic model... The difference between the reconstructed observations and the actual observations is quantized, corresponding to the reconstruction term in the training loss. When the system can accurately build a dynamic model, therefore, and It is a suitable indicator to reflect the adaptability of the model.
[0202] Based on these detection metrics, test statistics are constructed to further evaluate the system's performance:
[0203]
[0204]
[0205] Where ∑ z and ∑ x Represent and The covariance matrix. In fact, the above formula calculates the Mahalanobis distance between the estimated and true values.
[0206] Step 6: Determine the statistic T using kernel density estimation. z 2 ,T x2 Monitoring threshold η z ,η x ;
[0207] Furthermore, step 6 specifically includes:
[0208] Step 6.1, convert the statistic T z 2 ,T x 2 Sort the data separately and use kernel density estimation to calculate the probability density function of the statistic for each data point;
[0209] Step 6.2: Calculate the probability density distribution for each probability density sequence, and determine the monitoring threshold based on the probability density distribution and the set false alarm rate.
[0210] In practice, the kernel density estimation method is used to determine the control limits η of the two statistics. z ,η x The goal is to achieve a false alarm rate of 0.5% on the training set when using two statistical measures for fault diagnosis. Kernel density estimation is a nonparametric statistical method used to estimate the probability density function from sample data. In the threshold determination process, kernel density estimation is used to model the probability density function of the test statistic on the training set and obtain the corresponding distribution function. The test statistic is based on... or It is obtained by calculating the Mahalanobis distance from the origin, while under normal circumstances... and Therefore, the evaluation statistic for a normal industrial system should be less than the monitoring threshold of the aforementioned statistic. This embodiment uses 869 samples as the training set, but the threshold determination is only related to the target domain samples.
[0211] Step S61: Input the samples in the training set into the trained deep state space model to obtain the prior latent variables, posterior latent variables, and estimated observations.
[0212] Step S62: Calculate two test statistics based on the differences between the prior latent variables and the posterior latent variables, and the differences between the estimated observed values and the actual observed values.
[0213] Step S63: Sort the two test statistics separately and use kernel density estimation to calculate the probability density function of the test statistic corresponding to each sample.
[0214] Step S64: Calculate the probability density distribution for each probability density sequence, and determine the control limit based on the probability density distribution and the set false alarm rate.
[0215] Step S65: Input the five types of fault samples in the test set into the common feature extraction network and the special feature extraction network to calculate two test statistics respectively.
[0216] Step 7: Deploy the simplified model to the edge device;
[0217] Step 8: At the edge device, preprocess the online data of the actual industrial process to obtain new time window data, input it into the simplified model, perform online quality prediction, and calculate statistics. like and If the model is found to match the current working conditions, it is determined that the model is mismatched and a model update is triggered in the cloud. In the cloud, process data uploaded from the edge is received and stored in real time.
[0218] Furthermore, the step of performing online quality prediction includes:
[0219] Predict the quality variable at the current time step based on the posterior distribution of the latent variables at the current time, wherein the expression for the quality variable is:
[0220]
[0221] in Let f represent the estimated quality variable, and f be a deep network used to learn the nonlinear relationship between the latent variables and the quality variable.
[0222] In practical implementation, for actual industrial process online data, preprocessing is performed at the edge using the method described above to obtain new time window data, which is then input into the simplified model. Based on the posterior distribution of the latent variables at the current time, the quality variable at the current time step is predicted, and the statistic is calculated. like and It then determines whether the currently deployed model matches the current operating conditions; otherwise, it indicates a model mismatch and triggers a model update in the cloud. In the cloud, process data uploaded from the edge is received and stored in real time.
[0223] The cloud-edge collaborative quality prediction method provided in this embodiment proposes a novel cloud-edge collaborative approach, including training and simplifying KHSSM in the cloud and adopting an adaptive triggering model update strategy at the edge to ensure the accuracy of quality prediction. KHSSM uses the Koopman operator to constrain latent variables, ensuring that the latent variables are meaningful and expressive, thus enhancing the interpretability of the model. Considering the limited computing and storage capabilities of edge devices, a model simplification strategy specifically designed for KHSSM is proposed to reduce the parameter size while maintaining accuracy. An anomaly-based adaptive model update strategy is proposed and deployed at the edge layer to monitor model mismatch in an unsupervised manner, thereby improving the accuracy and adaptability of modeling and prediction.
[0224] The following will further illustrate this solution with a specific embodiment. In this embodiment, some baseline prediction methods, including Gaussian Process Regression (GPR), Variational Autoencoder (VAE), Deep Autoregressive (DeepAR), Kalman Variational Autoencoder (KVAE), and Deep Markov Model (DMM), are used for comparison to demonstrate the effectiveness of the proposed method. In the cloud-edge collaborative method, the edge device is an NVIDIA Jetson Nano B01. The cloud model is trained on an RTX 2080 GPU. Figure 4 The comparison between the prediction curves of the six methods and the actual data is shown in detail. The solid black line represents the predicted value, the dashed black line represents the actual value, and the thin line indicates the upper and lower bounds of the 90% confidence interval. The comparison results of the six methods are shown in Table 1, where Covered indicates the percentage of actual values included in the confidence interval.
[0225] Table 1
[0226] Model <![CDATA[R 2 ]]> RMSE Covered GPR 0.8323 0.0719 77.65% VAE 0.8410 0.0700 95.36% DeepAR 0.9425 0.0421 80.92% KVAE 0.8498 0.0681 82.56% DMM 0.9455 0.0410 99.18% This invention 0.9631 0.0337 99.45%
[0227] In this embodiment of the invention, the proposed KHSSM model achieved the best prediction performance in terms of R² and RMSE. DMM and DeepAR performed similarly, but KVAE's experimental results were poor, essentially on par with VAE. GPR achieved relatively good prediction performance, reflecting that using only static features for prediction is insufficient. This may be because KVAE's dynamics are based on the evolution of a linear transfer matrix; although parameterized by LSTM, it cannot effectively model the nonlinear evolution in this experiment, hence its performance is basically consistent with VAE. Furthermore, compared to DMM, KHSSM improved the RMSE by 17.8%, validating the effectiveness of our method. We can conclude that the introduction of the Koopman operator can effectively constrain the system's evolution, thereby estimating accurate latent variables. Furthermore, Figure 4 The graphs specifically illustrate the comparison between the prediction curves and actual data for six different methods. (a) shows the comparison between the GPR prediction and the actual value; (b) shows the comparison between the VAE prediction and the actual value; (c) shows the comparison between the DeepAR prediction and the actual value; (d) shows the comparison between the KVAE prediction and the actual value; (e) shows the comparison between the DMM prediction and the actual value; and (f) shows the comparison between the KHSSM prediction and the actual value. The interval between the two thin dashed lines represents the 90% confidence interval. Clearly, Figure 4 The black dashed line in (f) shows the best fit, and almost 100% of the true values are contained within the 90% confidence interval.
[0228] Table 2
[0229]
[0230]
[0231] The trained model was simplified and deployed to edge devices. Table 2 shows the performance comparison of the model before and after simplification on edge devices, where inference time represents the time taken to infer a single sample. After simplification, the number of parameters was reduced by 71%, while the R-value only decreased from 0.922 to 0.911. The proposed model simplification method can significantly reduce the number of model parameters and accelerate inference speed without significantly reducing accuracy.
[0232] It should be understood that the various parts of this disclosure can be implemented in hardware, software, firmware, or a combination thereof.
[0233] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A cloud-edge collaborative quality prediction method, characterized in that, include: Step 1: Obtain historical industrial process data within a preset time period; Step 2: Preprocess the historical industrial process data and divide the preprocessed historical industrial process data into time windows to obtain time window data. The preprocessing includes outlier removal, missing value completion, and data normalization. Step 3: Construct a Koopman-constrained hierarchical deep state-space model in the cloud and train it using time window data; Step 4: Simplify and retrain the deep state space model in the cloud. The deep state space model includes a generative model and an inference model. The generative model includes a propagation network, a transmission network, an observation network, a Koopman operator, a prediction network, and a decoding network. The inference model includes a bidirectional recurrent neural network. Step 5: Calculate the statistics based on the latent variables of the simplified model and the predicted observed values. : Step 5 specifically includes: Step 5.1: Assuming the posterior distribution of the previous time step has been obtained, calculate the prior distribution of the current time step based on it. Step 5.2: Obtain the posterior distribution of the latent variables at the current time using the simplified inference model; Step 5.3: By quantifying the difference between the estimated value and the actual value, determine whether the system is evolving according to the original state or has deviated significantly, and obtain two monitoring indicators. and The monitoring metrics include the KL divergence term and the reconstruction term in the training loss. Step 5.4: Calculate the statistics based on the two monitoring indicators. : in, and Represent and The covariance matrix; Step 6: Determine the statistics using kernel density estimation. Monitoring threshold ; Step 7: Deploy the simplified model to the edge device; Step 8: At the edge device, preprocess the online data of the actual industrial process to obtain new time window data, input it into the simplified model, perform online quality prediction, and calculate statistics. ,like and If the model matches the current working condition, it is determined that the model is mismatched and a model update is triggered in the cloud. In the cloud, process data uploaded from the edge is received and stored in real time.
2. The method according to claim 1, characterized in that... Step 3 specifically includes: Step 3.1: Parameterize the nonlinear mapping of the system state at two adjacent time points using the transfer network; Step 3.2: Parameterize the nonlinear mapping of latent variables and observed variables at the same time using the transmission network; Step 3.3: Using the observation network as an encoder, the latent variables in the state space are mapped to the high-dimensional measurement space. Step 3.4: Model the evolution of the system in the observation space using the Koopman operator; Step 3.5: Use a prediction network to predict quality variables based on stratified latent variables; Step 3.6: Calculate the parameterized variational posterior distribution using a bidirectional recurrent neural network; Step 3.7: Use the decoding network as the decoder to learn the inverse function of the observation network, and map the latent variables in the observation space back to the state space; Step 3.8: Fuse the reconstruction loss and linear dynamic constraints to obtain the state prediction loss. Combine the state prediction loss and reconstruction loss to form the overall loss function and train it using time window data.
3. The method according to claim 2, characterized in that... The expression for the observation network is: in, express Latent variables at time, Indicated by The mean, The covariance follows a normal distribution. This represents a deep network that takes the current hidden variable as input and is used for parameterizing the mean. This represents a deep network that takes the current time-instance latent variables as input and is used to parameterize the covariance matrix. This represents the mean of the latent variable. Represents the covariance of latent variables, latent variables It is considered to reflect the dynamics of the system from another perspective. , This represents the parameter matrix used for feature mapping. , Represents the bias vector; The definition of the decoding network is in, This represents the distribution of latent variables in the reconstructed state space. Indicates the current time For input, a deep network used for parameterized mean, Indicated by For input, a deep network used to parameterize the covariance matrix, , This represents the parameter matrix used for feature mapping. , Represents the bias vector; The definition of the Koopman operator is... The expression for the overall loss function is as follows: in, This represents the log-likelihood variational lower bound derived using the variational Bayesian method. Indicates the reconstruction loss. This represents the state prediction loss. Indicates optimization and To minimize training loss, This represents the learnable parameters of the generator network. This represents the learnable parameters of the inference network.
4. The method according to claim 3, characterized in that... Step 4 specifically includes: Step 4.1: After training is complete, retain the transit network and the emitter network as the simplified generative model and fix the parameters of the transit network; Step 4.2: Remove the inverted recurrent neural network from the inference model and simplify the inference model to a causal form; Step 4.3: Remove the Koopman constraints and hierarchical latent variables from the overall loss function to obtain a new training objective, and use this objective to train the simplified generation module and inference model.
5. The method according to claim 4, characterized in that... Step 6 specifically includes: Step 6.1, convert the statistics Sort the data separately and use kernel density estimation to calculate the probability density function of the statistic for each data point; Step 6.2: Calculate the probability density distribution for each probability density sequence, and determine the monitoring threshold based on the probability density distribution and the set false alarm rate.
6. The method according to claim 5, characterized in that... The steps for online quality prediction include: Predict the quality variable at the current time step based on the posterior distribution of the latent variables at the current time, wherein the expression for the quality variable is: in This represents the estimated quality variable. This is a deep network used to learn the nonlinear relationship between latent variables and quality variables.