Complex industrial process monitoring method and system based on cloud-edge collaborative dictionary learning
Through cloud-edge collaborative dictionary learning, cloud update and edge-end real-time monitoring, the model mismatch problem caused by time-varying of industrial processes is solved, and accurate and efficient monitoring and smooth operation of industrial processes are achieved.
Patent Information
- Application Number
- CN202111554287.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-12-17
AI Technical Summary
Model mismatch caused by time-varying phenomena in complex industrial processes leads to the inability of traditional process monitoring methods to continuously match when real-time data changes, resulting in monitoring failure and edge devices lack the ability to update models.
Using cloud-edge collaborative dictionary learning method, the cloud uses label-consistent dictionary to learn to establish and update the monitoring model, and send the simplified model to the edge end, which conducts online monitoring and fault detection, and judges model mismatch through real-time data and triggers the cloud end. renew.
It realizes accurate and efficient monitoring of industrial processes, ensures the smooth and healthy operation of industrial processes, solves the problem of model mismatch, and improves the accuracy and real-time monitoring.
Smart Images

Figure CN115840419B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of process monitoring technology, and specifically relates to a complex industrial process monitoring method and system based on cloud-edge collaborative dictionary learning, which can be applied to monitoring multi-condition time-varying industrial processes. Background Art
[0002] With the development of industrial production technology, modern industrial processes are becoming more and more complex, and the scale of production is also increasing. This leads to any small fault in the industrial process causing immeasurable losses to the entire system. In addition, due to factors such as changes in raw materials, parameter settings, and market demand, there are frequent operating condition switching in industrial systems. These changes in conditions cause industrial processes to usually operate in different operating modes. For different modes, the adjustment strategies are also different, and the wrong approach may reduce the performance of the system and even lead to significant economic losses. Therefore, it is very important to propose advanced process monitoring methods for fault detection and operating condition identification of complex industrial processes.
[0003] Data-driven process monitoring methods use data collected from industrial processes to establish mathematical models. The models are simple and versatile, so they have been widely studied and applied. Typical data-driven process monitoring methods include some multivariate statistical process monitoring (MSPM) methods such as PCA and PLS. With the development of artificial intelligence, some machine learning methods have also been applied to process monitoring, such as SVM-based methods and Bayesian analysis methods.
[0004] Dictionary learning is a powerful machine learning method. The goal of dictionary learning is to train a dictionary with data representation capabilities. The dictionary is composed of atoms, and a small number of atoms are used to linearly represent a piece of data. However, traditional dictionary learning cannot be applied to multimodal data, that is, the learned dictionary is not discriminative. To solve this problem, Jiang et al. proposed the LC-KSVD method, which can jointly learn a single overcomplete dictionary and an optimal linear classifier. This provides an effective reference for using a model for fault detection and condition identification of industrial processes.
[0005] Traditional process monitoring methods often include two stages: offline learning and online monitoring. In the offline learning stage, the corresponding model is trained using the collected historical data of the industrial process. The model is deployed to the edge device close to the industrial site. In the online monitoring stage, the edge device collects real-time data of the industrial process and monitors the industrial process based on the deployed model. However, complex industrial processes often have time-varying phenomena, that is, as the process proceeds, the distribution and characteristics of the data will change. This will cause the model trained based on historical data to not always match the current real-time data, resulting in monitoring failure. The most effective way to solve model mismatch is to update the model using real-time data, but most of the current edge devices do not have the ability to update the model. The development of cloud-edge collaborative technology provides a new idea for solving this problem. The edge monitors the collected real-time data and uploads it to the cloud. The cloud stores a large amount of data of the industrial process. When a model mismatch occurs, the cloud uses its powerful computing power to update the training model and send the model to the edge so that the model on the edge can always match the current data. Summary of the invention
[0006] The present invention provides a complex industrial process monitoring method and system based on cloud-edge collaborative dictionary learning. Through cloud-edge collaboration, the industrial process monitoring model is kept matching process data, so as to achieve accurate and efficient monitoring of the industrial process and ensure the smooth and healthy operation of the industrial process.
[0007] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0008] A complex industrial process monitoring method based on cloud-edge collaborative dictionary learning, including:
[0009] The cloud uses a label-consistent dictionary learning method to establish a monitoring model for the industrial process, simplifies the established monitoring model, and sends the simplified monitoring model to the edge.
[0010] The edge uses a simplified monitoring model to monitor the industrial process online, including fault detection and operating condition identification, and determines whether the simplified monitoring model has a model mismatch; when the simplified monitoring model mismatches, it triggers the cloud to update the monitoring model and the corresponding simplified monitoring model.
[0011] In a more optimal technical solution, the method of using label consistent dictionary learning method to establish a monitoring model for industrial processes is:
[0012] Step a1, obtain the historical monitoring data of the industrial process Y = [y1, y2, ..., y M ]∈R m×M and the corresponding label matrix H = [h1,h2,…,h M ]∈R n×M, M represents the number of monitoring data samples, m represents the dimension of each monitoring data sample; n represents that there are n types of working conditions for the monitoring data samples, that is, the label of each monitoring data sample is a column vector with a dimension of n. If the monitoring data sample belongs to the jth type of working condition, the jth element of the monitoring data sample label is 1, and the remaining elements are 0;
[0013] Step a2, construct the following dictionary learning model:
[0014]
[0015] Where D = [d1, d2, ... d K ]∈R m×K To learn a complete dictionary, d1, d2, …d K is the K atoms in the complete dictionary D;
[0016] Q=[q1,q2,…,q M ]∈R K×M is the discriminant matrix, where the column vector Indicates q i The kth element of the discriminant matrix is determined by the category label of the monitoring data sample and the category label of the atom in the dictionary. i With the dictionary atom d k When they belong to the same category, otherwise
[0017] A∈R K×K Represents a linear transformation matrix that transforms the original sparse code x into a discriminative feature space R through linear transformation Ax K ;
[0018] W∈R n×K Represents a linear classifier, which reconstructs the category label h of the data through Wx;
[0019] X=[x1,x2,…x M ]∈R K×M is the sparse coding matrix, x i is the monitoring data sample y i Sparse coding using complete dictionary representation, i = 1, 2, ..., M;
[0020] and is the weight coefficient of the relevant item ratio, is to find the F-norm of the matrix, and ||·||1 is to find the l1 norm of the matrix.
[0021] Step a3, set intermediate variables and The dictionary learning model of formula (0-1) is simplified as follows:
[0022]
[0023] Step a4: Use the K-SVD method to solve the dictionary learning optimization function shown in equation (0-2) to obtain the intermediate variable D c , decomposition D c The obtained D and W are respectively l2-normed and normalized to obtain the final complete dictionary D and the classifier W for working condition identification;
[0024] In step a5, the complete dictionary D and the classifier W are saved in the cloud as a high-precision industrial process monitoring model.
[0025] In a more optimal technical solution, the method for simplifying the established monitoring model is:
[0026] Step b1: Count the number of times each atom in the complete dictionary D is used in the historical monitoring data Y, and record the kth atom d k The number of times used is
[0027] Step b2, determine whether the number of times each dictionary atom is used is less than a preset threshold τ: if so, delete the dictionary atom from the complete dictionary D, and delete the column corresponding to the dictionary atom in the classifier W from the classifier W; after processing all dictionary atoms according to step b2, a simplified dictionary D is obtained. sim and classifier W sim ;
[0028] Step b3, use the simplified dictionary D sim Represents historical monitoring data, and obtains the sparse coding matrix X sim for:
[0029]
[0030] Step b4, according to the simplified dictionary D sim Calculate the reconstruction error of each monitoring data sample and use the kernel density estimation method to calculate the control limit R of fault detection tr ;
[0031] Step b5, simplify the dictionary D sim , classifier W sim and control limit D sim It is stored at the edge as a simplified and high-speed industrial process monitoring model.
[0032] In a more optimal technical solution, the preset method of the preset threshold τ is:
[0033]
[0034] Where ω represents a weight coefficient, M represents the number of samples of historical monitoring data, sparsity represents the sparsity when the monitoring data is sparsely represented, and K represents the number of atoms in the complete dictionary.
[0035] In a more optimal technical solution, the reconstruction error calculation formula for each historical monitoring data sample in step b4 is:
[0036]
[0037] The probability density of the reconstruction error is calculated as follows:
[0038]
[0039] Where M represents the number of training samples, f(R) is the probability density function with reconstruction error as the independent variable R, h is the bandwidth; K(x) is the kernel function, which is required to be non-negative and integral is 1, R i represents the reconstruction error of the i-th historical monitoring data sample;
[0040] After obtaining the probability density function of the reconstruction error, the control limit of the reconstruction error is calculated according to the preset confidence level α.
[0041] In a better technical solution, the method of using a simplified monitoring model at the edge to monitor the industrial process online is:
[0042] Step c1, when receiving online monitoring data y, use the simplified dictionary D sim Compute the sparse code x of y new :
[0043]
[0044] Step c2, calculate the reconstruction value of the simplified dictionary for the online data:
[0045]
[0046] Step c3, based on the reconstruction value of online data Calculate the reconstruction error RE new :
[0047]
[0048] Step c4: The obtained reconstruction error RE new and control limit R tr Compare, if RE new Greater than R tr , the online monitoring data y is judged to be fault data, that is, a fault has occurred in the current industrial process; otherwise, the online monitoring data y is normal data;
[0049] Step c5: If the line monitoring data y is normal data, according to the simplified classifier W sim and sparse coding x new Calculate the label vector of online monitoring data y:
[0050] label=W sim x new (0-10)
[0051] Step c6, select the maximum element value in the label vector label calculated by the edge end, and determine the position of the element as the current working condition of the industrial process.
[0052] In a more optimal technical solution, after the label vector label of the online monitoring data is obtained in step c5, the subject of the working condition identification is first determined by calculating the label quality, and then the working condition identification is performed by the determined working condition identification subject, specifically:
[0053] Step c6.1, sort all elements of the label vector label in descending order, l 1 Indicates the first element in the sort, that is, the largest element in label, l 2 The second element in the sorting order is calculated according to the following formula:
[0054] q=||l 1 |-|l 2 || (0-11)
[0055] Step c6.2, determine whether the label quality is greater than a preset threshold σ, if so, the label quality is qualified, otherwise the label quality is unqualified;
[0056] Step c6.3: If step c6.2 determines that the label quality is qualified, the maximum element value in the label vector calculated by the edge is directly used at the edge to determine the position of the element as the current working condition of the industrial process; if step c6.2 determines that the label quality is unqualified, the online monitoring data y is uploaded to the cloud and executed on the cloud: the sparse coding of y is calculated using the complete dictionary D, and the label vector is calculated by the classifier W, the maximum element value in the label vector calculated by the cloud is selected, and the position of the element is determined as the current working condition of the industrial process.
[0057] In a more optimal technical solution, the method for determining whether a simplified monitoring model has a model mismatch is as follows: determining whether the number of unqualified labels is greater than a preset unqualified label number threshold μ. If so, it is considered that the simplified monitoring model at the edge is mismatched.
[0058] A complex industrial process monitoring system based on cloud-edge collaborative dictionary learning, including cloud and edge;
[0059] The cloud uses a label consistent dictionary learning method to establish a monitoring model for the industrial process, simplifies the established monitoring model, and sends the simplified monitoring model to the edge end;
[0060] The edge uses a simplified monitoring model to perform online monitoring of the industrial process, including fault detection and operating condition identification, and determines whether a model mismatch occurs in the simplified monitoring model; when a simplified monitoring model mismatch occurs, the cloud is triggered to update the monitoring model and the corresponding simplified monitoring model.
[0061] Beneficial Effects
[0062] The present invention is based on a cloud-edge collaborative framework. The cloud is responsible for the training, updating and simplification of the dictionary learning model and the storage of process data. The edge is responsible for monitoring the real-time data of the process, including fault detection and working condition identification, and judging whether the model matches the current data based on the quality of the label given by the model. When a model mismatch occurs, the cloud is triggered to update the model, and the updated model is sent to the edge. The present invention realizes online inference on the edge and model update on the cloud, which solves the problem that the model cannot be updated due to model mismatch caused by time-varying industrial processes, improves the accuracy of monitoring the operating status of industrial processes, and ensures the safe and stable operation of industrial production processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is an overall framework diagram of the method and system described in the embodiments of the present application. DETAILED DESCRIPTION
[0064] The following is a detailed description of an embodiment of the present invention. This embodiment is based on the technical solution of the present invention, and provides a detailed implementation method and a specific operation process to further explain the technical solution of the present invention.
[0065] The complex industrial process monitoring method and system based on cloud-edge collaborative dictionary learning proposed in the present invention include two parts: the establishment of a dictionary learning model and online monitoring. In the first part, the cloud uses a label-consistent dictionary learning method to establish a monitoring model for the industrial process, simplifies the established monitoring model, and sends the simplified monitoring model to the edge. In the second part, the edge continuously uploads the online monitoring data of the industrial process to the cloud, and uses a simplified monitoring model to monitor the industrial process online, including fault detection and operating condition identification, and determines whether the simplified monitoring model has a model mismatch; when the simplified monitoring model mismatches, it triggers the cloud to update the monitoring model and the corresponding simplified monitoring model. The overall framework is as follows: Figure 1 shown.
[0066] 1. Cloud Model Training and Simplification
[0067] 1. Model the industrial process using a label-consistent dictionary learning model in the cloud.
[0068] Step a1, obtain the historical monitoring data of the industrial process Y = [y1, y2, ..., y M ]∈R m×M and the corresponding label matrix H = [h1,h2,…,h M ]∈R n×M , M represents the number of monitoring data samples, m represents the dimension of each monitoring data sample; n represents that there are n types of working conditions for the monitoring data samples, that is, the label of each monitoring data sample is a column vector with a dimension of n. If the monitoring data sample belongs to the jth type of working condition, the jth element of the monitoring data sample label is 1, and the remaining elements are 0;
[0069] Step a2, build a dictionary learning model:
[0070] The basic principle of dictionary learning is to use a small number of dictionary atoms to linearly and sparsely represent data. Dictionary learning can learn a dictionary D = [d1, d2, ... d K ]∈R m×K , where K represents the number of atoms in the dictionary. For the convenience of calculation, each atom is normalized. In order to realize the dictionary representation of data, we have Y≈DX, where X=[x1,x2,…x M ]∈R K×M is a sparse coding matrix. Since only a few atoms are used in data representation, X is sparse. In order to train the dictionary and sparse coding matrix in the data set, dictionary learning can be transformed into the following optimization problem:
[0071]
[0072] In order to make the dictionary discriminative, an optimization term is added to formula (1) to obtain the following optimization function:
[0073]
[0074] where Q = [q1,q2,…,q M ]∈R K×M This is called discriminative sparse coding. This places requirements on the category characteristics of dictionary atoms. That is, when the dictionary atoms are related to the data y i When they belong to the same category, q i The corresponding element is 1. On the contrary, if the atom is i do not belong to the same category, then q i The corresponding element is 0. This makes the dictionary try to use atoms of the same category to represent this type of data.
[0075] In order to make dictionary learning have classification effect while representing data, a linear classifier is used to reconstruct the category label of the data, and the following optimization function is obtained:
[0076]
[0077] The optimization function model of label consistent dictionary learning is shown in formula (3). This enables the model to have the ability of data representation and classification at the same time, so it is very suitable for solving the problems of industrial process fault detection and working condition identification in the present invention.
[0078] After obtaining the optimized function, it is also necessary to optimize the variables such as dictionary and classifier, so formula (3) can be rewritten as:
[0079]
[0080] The above formula (4) is the dictionary learning model established by the present invention.
[0081] Step a3, simplify the dictionary learning model: In order to optimize the variables such as dictionary and classifier, set the intermediate variables and The dictionary learning model of formula (4) is simplified as follows:
[0082]
[0083] Step a4, formula (5) is a basic dictionary learning optimization function, which can be solved using the K-SVD method. After optimization, we get D c , D c After decomposition, we can get D and W. However, since the K-SVD algorithm uses the joint l2 norm normalization, that is, Therefore, after decomposition, D and W need to be normalized by l2 norm respectively, as follows:
[0084]
[0085] In step a5, the complete dictionary D and classifier W obtained by standardization in step a4 are stored in the cloud as a high-precision industrial process monitoring model.
[0086] 2. Simplify the established high-precision industrial process monitoring model.
[0087] Since the computing power and computing resources at the edge are often limited, the edge model should be as simple as possible to enhance the real-time performance of edge inference. However, a simple model may reduce the accuracy of edge inference. Therefore, the dictionary D and classifier W are trained in the cloud, and simplified to obtain the simplified model D sim and W sim, keep the original model in the cloud, and send the simplified model to the edge. When the edge inference is inaccurate, use the high-precision model in the cloud for inference, and ensure the accuracy of the inference through the collaboration of both sides.
[0088] Step b1: After training D using training data Y, count the number of times each atom in the complete dictionary D is used in historical monitoring data Y, and record the kth atom d k The number of times used is
[0089] Step b2, determine whether the number of times each dictionary atom is used is less than a preset threshold τ: if so, delete the dictionary atom from the complete dictionary D, and delete the column corresponding to the dictionary atom in the classifier W from the classifier W; after processing all dictionary atoms according to step b2, a simplified dictionary D is obtained. sim and classifier W sim ;
[0090] The preset method of the preset threshold τ is:
[0091]
[0092] In the formula, ω represents a weight coefficient, M represents the number of samples of historical monitoring data, sparsity represents the sparsity when the monitoring data is sparsely represented, and sparsity is set in the K-SVD algorithm used in training the model. K represents the number of atoms in the complete dictionary.
[0093] The threshold τ in formula (7) affects the size of the simplified model. If τ is large, more atoms are deleted, and D sim will be smaller, whereas D sim It will be bigger. sim The size of will have a certain impact on the effect of edge monitoring, so it is necessary to find a suitable τ by adjusting ω so that the edge can have a reliable monitoring effect while using a simplified model to save computing time.
[0094] Step b3, obtain the simplified dictionary D sim Afterwards, use the simplified dictionary D sim Represents historical monitoring data, and obtains the sparse coding matrix X sim for:
[0095]
[0096] Specifically, the commonly used OMP method can be used to solve the sparse coding matrix of formula (8).
[0097] Step b4, get the sparse coding matrix X sim Then, according to the simplified dictionary D simCalculate the reconstruction error of each monitoring data sample and use the kernel density estimation method to calculate the control limit R of fault detection tr ;
[0098] Among them, the reconstruction error calculation formula for each historical monitoring data sample is:
[0099]
[0100] R i represents the reconstruction error of the i-th data, y i represents the i-th data in the historical monitoring data Y, Represents X sim The i-th column of , that is, the sparse coding of the i-th data.
[0101] After calculating the reconstruction error of all monitoring data samples in Y, the control limit R of the reconstruction error is calculated using the kernel density estimation (KDE) method. tr The present invention uses a univariate kernel estimator, which is defined as follows:
[0102]
[0103] Where M represents the number of training samples, f(R) is the probability density function with reconstruction error as the independent variable R, h is the bandwidth; K(x) is the kernel function, which is required to be non-negative and integral is 1, R i represents the reconstruction error of the i-th historical monitoring data sample;
[0104] After obtaining the probability density function of the reconstruction error, the control limit of the reconstruction error is calculated according to the preset confidence level α, that is, the value of the probability density function under the preset confidence level is used as the control limit.
[0105] Step b5, simplify the dictionary D sim , classifier W sim and control limit D sim It is stored at the edge as a simplified and high-speed industrial process monitoring model.
[0106] 2. Online Monitoring at the Edge and Model Mismatch Judgment
[0107] After the simplified high-speed industrial process monitoring model is deployed on the edge, the simplified dictionary D sim , simplified classifier W sim and the control limit D sim Afterwards, when the edge receives online monitoring data of the industrial process, the present invention performs fault detection and working condition identification on the monitoring data, and determines whether a model mismatch occurs based on the label quality.
[0108] 1. Use simplified models at the edge to monitor industrial processes online.
[0109] Step c1, when receiving online monitoring data y, use the simplified dictionary D sim Compute the sparse code x of y new :
[0110]
[0111] Step c2, calculate the reconstruction value of the simplified dictionary for the online data:
[0112]
[0113] Step c3, based on the reconstruction value of online data Calculate the reconstruction error RE new :
[0114]
[0115] Step c4: The obtained reconstruction error RE new and control limit R tr Compare, if RE new Greater than R tr , the online monitoring data y is judged to be fault data, that is, a fault has occurred in the current industrial process; otherwise, the online monitoring data y is normal data;
[0116] Step c5: If the line monitoring data y is normal data, according to the simplified classifier W sim and sparse coding x new Calculate the label vector of online monitoring data y:
[0117] label=W sim x new (15)
[0118] Step c6, select the maximum element value in the label vector label calculated by the edge end, and determine the position of the element as the current working condition of the industrial process.
[0119] In a more optimal technical solution, the above step c6 is replaced by first determining the subject of working condition identification by calculating the label quality, and then the working condition identification is performed by the determined working condition identification subject, specifically:
[0120] Step c6.1, sort all elements of the label vector label in descending order, l 1 Indicates the first element in the sort, that is, the largest element in label, l 2 The second element in the sorting order is calculated according to the following formula:
[0121] q=||l 1 |-|l2 || (16)
[0122] If the label is normal, the value of q will be large. When the label quality deteriorates, l 1 and l 2 The values of will be relatively close, resulting in a smaller value of q.
[0123] Step c6.2, setting a threshold σ of the label quality q, when q>σ, the label quality is qualified, otherwise the label quality is unqualified;
[0124] Step c6.3: If step c6.2 determines that the label quality is qualified, the maximum element value in the label vector calculated by the edge is directly used at the edge to determine the position of the element as the current working condition of the industrial process; if step c6.2 determines that the label quality is unqualified, the online monitoring data y is uploaded to the cloud and executed on the cloud: the sparse coding of y is calculated using the complete dictionary D, and the label vector is calculated by the classifier W, the maximum element value in the label vector calculated by the cloud is selected, and the position of the element is determined as the current working condition of the industrial process.
[0125] 2. Simplify the mismatch judgment of the monitoring model
[0126] Since the dictionary and classifier are jointly optimized during label consistent dictionary learning optimization, the joint optimization ensures that the features extracted by the model meet both the needs of data representation and the needs of working condition identification. When the label quality deteriorates and the working condition identification fails, it reflects that the data representation ability of the model has also deteriorated, that is, model mismatch has occurred. It is reasonable to judge whether model mismatch occurs by label quality.
[0127] Therefore, the label quality judgment of step c6.2 can be statistically analyzed. If the number of unqualified labels is greater than the preset unqualified label number threshold μ, the simplified industrial process monitoring model at the edge is considered to be mismatched. At this time, the edge triggers the cloud to update the monitoring model and the corresponding simplified monitoring model, that is, triggers the cloud to use the current and most recent historical monitoring data to re-establish, simplify, and distribute the monitoring model according to the above process.
[0128] The present invention also provides a complex industrial process monitoring system based on cloud-edge collaborative dictionary learning, corresponding to the above-mentioned complex industrial process monitoring method, including a cloud end and an edge end;
[0129] The cloud uses a label consistent dictionary learning method to establish a monitoring model for the industrial process, simplifies the established monitoring model, and sends the simplified monitoring model to the edge end;
[0130] The edge uses a simplified monitoring model to perform online monitoring of the industrial process, including fault detection and operating condition identification, and determines whether a model mismatch occurs in the simplified monitoring model; when a simplified monitoring model mismatch occurs, the cloud is triggered to update the monitoring model and the corresponding simplified monitoring model.
[0131] The above embodiments are preferred embodiments of the present application. Ordinary technicians in this field can also make various changes or improvements on this basis. Without departing from the overall concept of the present application, these changes or improvements should fall within the scope of protection required by the present application.
Claims
1. A complex industrial process monitoring method based on cloud-edge collaborative dictionary learning, characterized in that: include: The cloud uses a label-consistent dictionary learning method to establish a monitoring model for the industrial process, simplifies the established monitoring model, and sends the simplified monitoring model to the edge. The edge uses a simplified monitoring model to monitor the industrial process online, including fault detection and working condition identification, and determines whether the simplified monitoring model has a model mismatch. When the simplified monitoring model mismatches, the cloud is triggered to update the monitoring model and the corresponding simplified monitoring model. Among them, the method of using label consistent dictionary learning method to establish a monitoring model for industrial processes is: Step a1, obtain the historical monitoring data Y = [y1, y2, ..., y M ]∈R m×M and the corresponding label matrix H = [h1,h2,…,h M ]∈R n×M , M represents the number of monitoring data samples, m represents the dimension of each monitoring data sample; n represents that there are n types of working conditions for the monitoring data samples, that is, the label of each monitoring data sample is a column vector with a dimension of n. If the monitoring data sample belongs to the jth type of working condition, the jth element of the monitoring data sample label is 1, and the remaining elements are 0; Step a2, construct the following dictionary learning model: Where D = [d1, d2, ... d K ]∈R m×K To learn a complete dictionary, d1, d2, …d K is the K atoms in the complete dictionary D; Q=[q1,q2,…,q M ]∈R K×M is the discriminant matrix, where the column vector Indicates q i The kth element of the discriminant matrix is determined by the category label of the monitoring data sample and the category label of the atom in the dictionary. i With the dictionary atom d k When they belong to the same category, otherwise A∈R K×K Represents a linear transformation matrix that transforms the original sparse code x into a discriminative feature space R through linear transformation Ax K ; W∈R n×K Represents a linear classifier, which reconstructs the category label h of the data through Wx; X=[x1,x2,…x M ]∈R K×M is the sparse coding matrix, x i is the monitoring data sample y i Sparse coding using complete dictionary representation, i = 1, 2, ..., M; and is the weight coefficient of the relevant item ratio, is to find the F-norm of the matrix, ||·||1 is to find the l1 norm of the matrix; Step a3, set intermediate variables and The dictionary learning model of formula (0-1) is simplified as follows: Step a4: Use the K-SVD method to solve the dictionary learning optimization function shown in equation (0-2) to obtain the intermediate variable D c , decomposition D c The obtained D and W are respectively l2-normed and normalized to obtain the final complete dictionary D and the classifier W for working condition identification; Step a5, saving the complete dictionary D and classifier W as a high-precision industrial process monitoring model in the cloud; The method to simplify the established monitoring model is: Step b1: Count the number of times each atom in the complete dictionary D is used in the historical monitoring data Y, and record the kth atom d k The number of times used is Step b2, determine whether the number of times each dictionary atom is used is less than a preset threshold τ: if so, delete the dictionary atom from the complete dictionary D, and delete the column corresponding to the dictionary atom in the classifier W from the classifier W; after processing all dictionary atoms according to step b2, a simplified dictionary D is obtained. sim and classifier W sim ; Step b3, use the simplified dictionary D sim Represents historical monitoring data, and obtains the sparse coding matrix X sim for: Step b4, according to the simplified dictionary D sim Calculate the reconstruction error of each monitoring data sample and use the kernel density estimation method to calculate the control limit R of fault detection tr ; Step b5, simplify the dictionary D sim , classifier W sim and control limit D sim Stored at the edge as a simplified and high-speed industrial process monitoring model; The method of using a simplified monitoring model at the edge to monitor industrial processes online is: Step c1, when receiving online monitoring data y, use the simplified dictionary D sim Compute the sparse code x of y new : Step c2, calculate the reconstruction value of the simplified dictionary for the online data: Step c3, based on the reconstruction value of online data Calculate the reconstruction error RE new : Step c4: The obtained reconstruction error RE new and control limit R tr Compare, if RE new Greater than R tr , the online monitoring data y is judged to be fault data, that is, a fault has occurred in the current industrial process; otherwise, the online monitoring data y is normal data; Step c5: If the line monitoring data y is normal data, according to the simplified classifier W sim and sparse coding x new Calculate the label vector of online monitoring data y: label=W sim x new (0-10) Step c6, selecting the maximum element value in the label vector label calculated by the edge end, and determining the position of the element as the current working condition of the industrial process; The method for judging whether a simplified monitoring model has a model mismatch is as follows: when the simplified monitoring model is deployed at the edge and starts to monitor process data, the label quality of each online data is calculated and the number of unqualified labels is accumulated to determine whether the number of unqualified labels is greater than the preset unqualified label number threshold μ. If so, the simplified monitoring model at the edge is considered to be mismatched.
2. The method according to claim 1, characterized in that: The preset method of the preset threshold τ is: Where ω represents a weight coefficient, M represents the number of samples of historical monitoring data, sparsity represents the sparsity when the monitoring data is sparsely represented, and K represents the number of atoms in the complete dictionary.
3. The method according to claim 1, characterized in that The reconstruction error calculation formula for each historical monitoring data sample in step b4 is: The probability density of the reconstruction error is calculated as follows: Where M represents the number of training samples, f(R) is the probability density function with reconstruction error as the independent variable R, h is the bandwidth; K(x) is the kernel function, which is required to be non-negative and integral is 1, R i represents the reconstruction error of the i-th historical monitoring data sample; After obtaining the probability density function of the reconstruction error, the control limit of the reconstruction error is calculated according to the preset confidence level α.
4. The method according to claim 1, characterized in that: After the label vector label of the online monitoring data is obtained in step c5, the subject of the working condition identification is determined by calculating the label quality, and then the working condition identification is performed by the determined working condition identification subject, specifically: Step c6.1, sort all elements of the label vector label in descending order, l 1 Indicates the first element in the sort, that is, the largest element in label, l 2 The second element in the sorting order is calculated according to the following formula: q=||l 1 |-|l 2 || (0-11) Step c6.2, determine whether the label quality is greater than a preset threshold σ, if so, the label quality is qualified, otherwise the label quality is unqualified; Step c6.3: If step c6.2 determines that the label quality is qualified, the maximum element value in the label vector calculated by the edge is directly used at the edge to determine the position of the element as the current working condition of the industrial process; if step c6.2 determines that the label quality is unqualified, the online monitoring data y is uploaded to the cloud and executed on the cloud: the sparse coding of y is calculated using the complete dictionary D, and the label vector is calculated by the classifier W, the maximum element value in the label vector calculated by the cloud is selected, and the position of the element is determined as the current working condition of the industrial process.
5. A complex industrial process monitoring system based on cloud-edge collaborative dictionary learning, characterized in that: Including cloud and edge; The cloud uses a label consistent dictionary learning method to establish a monitoring model for the industrial process, simplifies the established monitoring model, and sends the simplified monitoring model to the edge end; The edge uses a simplified monitoring model to perform online monitoring of the industrial process, including fault detection and working condition identification, and determines whether a model mismatch occurs in the simplified monitoring model; When the simplified monitoring model is mismatched, the cloud is triggered to update the monitoring model and the corresponding simplified monitoring model; Among them, the method of using label consistent dictionary learning method to establish a monitoring model for industrial processes is: Step a1, obtain the historical monitoring data Y = [y1, y2, ..., y M ]∈R m×M and the corresponding label matrix H = [h1,h2,…,h M ]∈R n×M , M represents the number of monitoring data samples, m represents the dimension of each monitoring data sample; n represents that there are n types of working conditions for the monitoring data samples, that is, the label of each monitoring data sample is a column vector with a dimension of n. If the monitoring data sample belongs to the jth type of working condition, the jth element of the monitoring data sample label is 1, and the remaining elements are 0; Step a2, construct the following dictionary learning model: Where D = [d1, d2, ... d K ]∈R m×K To learn a complete dictionary, d1, d2, …d K is the K atoms in the complete dictionary D; Q=[q1,q2,…,q M ]∈R K×M is the discriminant matrix, where the column vector Indicates q i The kth element of the discriminant matrix is determined by the category label of the monitoring data sample and the category label of the atom in the dictionary. i With the dictionary atom d k When they belong to the same category, otherwise A∈R K×K Represents a linear transformation matrix that transforms the original sparse code x into a discriminative feature space R through linear transformation Ax K ; W∈R n×K Represents a linear classifier, which reconstructs the category label h of the data through Wx; X=[x1,x2,…x M ]∈R K×M is the sparse coding matrix, x i is the monitoring data sample y i Sparse coding using complete dictionary representation, i = 1, 2, ..., M; and is the weight coefficient of the relevant item ratio, is to find the F-norm of the matrix, ||·||1 is to find the l1 norm of the matrix; Step a3, set intermediate variables and The dictionary learning model of formula (0-1) is simplified as follows: Step a4: Use the K-SVD method to solve the dictionary learning optimization function shown in equation (0-2) to obtain the intermediate variable D c , decomposition D c The obtained D and W are respectively l2-normed and normalized to obtain the final complete dictionary D and the classifier W for working condition identification; Step a5, saving the complete dictionary D and classifier W as a high-precision industrial process monitoring model in the cloud; The method to simplify the established monitoring model is: Step b1: Count the number of times each atom in the complete dictionary D is used in the historical monitoring data Y, and record the kth atom d k The number of times used is Step b2, determine whether the number of times each dictionary atom is used is less than a preset threshold τ: if so, delete the dictionary atom from the complete dictionary D, and delete the column corresponding to the dictionary atom in the classifier W from the classifier W; after processing all dictionary atoms according to step b2, a simplified dictionary D is obtained. sim and classifier W sim ; Step b3, use the simplified dictionary D sim Represents historical monitoring data, and obtains the sparse coding matrix X sim for: Step b4, according to the simplified dictionary D sim Calculate the reconstruction error of each monitoring data sample and use the kernel density estimation method to calculate the control limit R of fault detection tr ; Step b5, simplify the dictionary D sim , classifier W sim and control limit D sim Stored at the edge as a simplified and high-speed industrial process monitoring model; The method of using a simplified monitoring model at the edge to monitor industrial processes online is: Step c1, when receiving online monitoring data y, use the simplified dictionary D sim Compute the sparse code x of y new : Step c2, calculate the reconstruction value of the simplified dictionary for the online data: Step c3, based on the reconstruction value of online data Calculate the reconstruction error RE new : Step c4: The obtained reconstruction error RE new and control limit R tr Compare, if RE new Greater than R tr , the online monitoring data y is judged to be fault data, that is, a fault has occurred in the current industrial process; otherwise, the online monitoring data y is normal data; Step c5: If the line monitoring data y is normal data, according to the simplified classifier W sim and sparse coding x new Calculate the label vector of online monitoring data y: label=W sim x new (0-10) Step c6, selecting the maximum element value in the label vector label calculated by the edge end, and determining the position of the element as the current working condition of the industrial process; The method for judging whether a simplified monitoring model has a model mismatch is as follows: when the simplified monitoring model is deployed at the edge and starts to monitor process data, the label quality of each online data is calculated and the number of unqualified labels is accumulated to determine whether the number of unqualified labels is greater than the preset unqualified label number threshold μ. If so, the simplified monitoring model at the edge is considered to be mismatched.
