GRU-CAE-based abnormal data identification method and device for multi-vehicle-type mixed-flow production line

By combining the dual prediction layer and attention mechanism of GRU gated cyclic unit and convolutional autoencoder on the multi-model hybrid flow production line, the problem of low abnormal detection accuracy caused by data complexity is solved, and higher abnormal data is achieved Identify accuracy and robustness.

CN119128741APending Publication Date: 2024-12-13XIAN UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411112011.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Due to the large amount of data, many types and differences and relationships between data at different times, existing abnormality detection methods have low accuracy in identifying abnormal data in the production line.

Method used

Using a multi-model hybrid flow production line abnormal data recognition method based on GRU-CAE, the multi-variable time series data is predicted by combining GRU-gated cyclic unit and convolutional autoencoder, and the multi-variable time series data is predicted using a dual prediction layer and attention mechanism, and the error threshold is passed. Select the module to determine the data abnormality.

Benefits of technology

The accuracy and robustness of abnormal data recognition are improved. By capturing time dimensions and characteristic information, the prediction ability of production data is enhanced and the accuracy of abnormal judgment is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128741A_ABST
    Figure CN119128741A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a GRU-CAE-based abnormal data identification method and device for a multi-vehicle-type mixed flow production line. The method comprises the following steps: preprocessing collected production data to obtain multivariable time sequence data; inputting the multivariable time series data into an abnormal data identification model; according to the abnormal data identification model, a first prediction module based on GRU-CAE predicts multivariable time series data and outputs first prediction data, and a second prediction module based on an attention mechanism predicts the multivariable time series data and outputs second prediction data. Obtaining a prediction result based on the combination of the first prediction data and the second prediction data; the abnormal data identification model determines an error threshold value by using an error threshold value selection module based on a prediction result and real production data so as to judge whether the production data is abnormal or not. According to the embodiment of the invention, two aspects of time and features are combined to analyze and process the production data, and the accuracy and robustness of abnormal data identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method and device for identifying abnormal data in a multi-model mixed production line based on GRU-CAE. Background Art

[0002] With the diversification of social needs, more industries have begun to transform from large-scale assembly line production to multi-variety small-batch production, especially the automotive industry, which needs to produce customized products to meet user needs. At present, automobile manufacturers generally produce different types of automobile products through multi-model mixed production lines, which not only have high production efficiency, but also can flexibly adjust the production line according to market demand.

[0003] However, compared with ordinary production lines, multi-model mixed-flow production lines can produce different types of products or perform production tasks with different processes on the same production line. Therefore, the production tasks of multi-model mixed-flow production lines are more diverse and complex, and are more prone to abnormal situations such as chaotic production rhythm or chaotic assembly sequence.

[0004] At present, in the production workshop, production anomaly detection is generally carried out by collecting and analyzing the real-time production data of the production line, such as collecting and analyzing important parameters such as temperature, pressure, and current collected by sensors, to predict whether the production line will be abnormal. However, since the production data of the mixed production workshop of multiple models is not only large in volume and variety, but also has both differences and certain relationships between the production data at different times, the difficulty in data processing and anomaly detection is relatively large, resulting in the low accuracy of existing anomaly detection methods in identifying abnormal data of the production line.

[0005] Therefore, it is necessary to improve one or more problems existing in the above-mentioned related technical solutions.

[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0007] The purpose of the disclosed embodiment is to provide a method for identifying abnormal data in a multi-model mixed production line based on GRU-CAE, combining time and features to analyze and process production data, thereby improving the accuracy and robustness of abnormal data identification.

[0008] According to a first aspect of an embodiment of the present disclosure, a method for identifying abnormal data of a multi-model mixed production line based on GRU-CAE is provided, comprising:

[0009] Preprocess the collected production data to obtain multivariate time series data;

[0010] Inputting the multivariate time series data into an abnormal data identification model;

[0011] The abnormal data recognition model predicts the multivariate time series data using a first prediction module based on GRU-CAE and outputs first prediction data, predicts the multivariate time series data using a second prediction module based on an attention mechanism and outputs second prediction data, and obtains a prediction result based on a combination of the first prediction data and the second prediction data;

[0012] The abnormal data identification model uses an error threshold selection module to determine an error threshold, and determines whether the production data is abnormal based on the error threshold.

[0013] In an exemplary embodiment of the present disclosure, the abnormal data recognition model predicts the multivariate time series data based on the first prediction module of GRU-CAE and outputs the first prediction data, including the following steps:

[0014] Encode the multivariate time series data through the encoding layer of the first prediction module, and input the encoding result as an input vector and the hidden state of the previous moment into the GRU gated recurrent unit to obtain the hidden state information corresponding to each moment in the encoding layer;

[0015] Based on the hidden state information, calculating corresponding reconstructed data through the encoding layer;

[0016] Based on the reconstructed data corresponding to the coding layer and the hidden state information corresponding to each moment in the coding layer, the first prediction data is calculated and output through the decoding layer.

[0017] In an exemplary embodiment of the present disclosure, the multivariate time series data is encoded by the encoding layer of the first prediction module, and the encoding result is input as an input vector and the hidden state of the previous moment into the GRU gated recurrent unit to obtain the hidden state information corresponding to each moment in the encoding layer, including the following steps:

[0018] The multivariate time series data is encoded by the CAE encoding layer network of the encoding layer to obtain an input vector, which is expressed as:

[0019] I (t+i) =σ e (W h S (t+i) +b h ) (1)

[0020] Among them, I (t+i) represents the input vector obtained after CAE coding layer network coding, σ eRepresents the sigmoid nonlinear activation function, S (t+i) represents multivariate time series data, W h and b h Represent the weight matrix and bias vector of the CAE coding layer network respectively;

[0021] The input vector is calculated by the GRU gated recurrent unit of the encoding layer to obtain the hidden state information corresponding to each moment in the encoding layer, and the hidden state information is expressed as:

[0022]

[0023] in, represents the hidden state information expression, GRU represents the GRU neural network model, W e and b e Respectively represent the weight matrix and bias vector of the GRU neural network of the encoding layer, h (t+i-1) Represents the hidden state information corresponding to time t+i-1 in the coding layer.

[0024] In an exemplary embodiment of the present disclosure, the reconstructed data is represented as:

[0025]

[0026] Among them, S `(t+T-1) represents the reconstructed data corresponding to the coding layer, σ d represents the sigmoid nonlinear activation function, W y and b y Respectively represent the weight matrix and bias vector of the CAE decoding layer network, h D (t+T-1) Represents the hidden state information corresponding to the last time (t+T-1) in the coding layer.

[0027] In an exemplary embodiment of the present disclosure, in the step of calculating and outputting the first prediction data through the decoding layer, the decoding layer calculates the first prediction data through formula (4) and formula (5), and the first prediction data is expressed as:

[0028]

[0029] in, represents the hidden state information expression of the decoding layer, GRU represents the GRU neural network model, and W d and b d Represent the weight matrix and bias vector of the GRU neural network of the decoding layer, S `(t+i-1) represents the reconstructed data corresponding to the coding layer, Represents the hidden state information corresponding to the time (t+i+1) in the coding layer, R (t+i) represents the first prediction data, σ d Represents the sigmoid nonlinear activation function.

[0030] In an exemplary embodiment of the present disclosure, the method of using a second prediction module based on an attention mechanism to predict the multivariate time series data and output second prediction data includes the following steps:

[0031] Performing a convolution operation on the multivariate time series data through the convolution layer of the second prediction module to obtain an output variable;

[0032] A score function corresponding to the output variable is determined, and an inner product operation is performed on the output variable and the corresponding score function to obtain the second prediction data.

[0033] In an exemplary embodiment of the present disclosure, the abnormal data recognition model uses an error threshold selection module to determine the error threshold, and further includes the following steps:

[0034] Calculate the root mean square error based on the prediction result and the corresponding actual value of the production data to obtain a root mean square error sequence;

[0035] The POT model is used to select the root mean square error sequence to obtain the error threshold.

[0036] In an exemplary embodiment of the present disclosure, the preprocessing of the collected production data includes the following steps:

[0037] Calling the production data of the multi-model mixed production line;

[0038] Using a sliding window algorithm to perform partitioning processing on the production data;

[0039] The divided production data is subjected to z-score standardization.

[0040] In an exemplary embodiment of the present disclosure, the GRU-CAE-based method for identifying abnormal data of a multi-model mixed production line further includes:

[0041] The abnormal data recognition model is constructed, and the abnormal data recognition model is trained and optimized using normal production data.

[0042] According to a second aspect of an embodiment of the present disclosure, a method for identifying abnormal data of a multi-model mixed production line based on GRU-CAE is provided, comprising:

[0043] Data collector, used to obtain production data of mixed-model production lines;

[0044] A data preprocessor, connected to the data collector, for preprocessing the production data to obtain multivariate time series data;

[0045] The abnormal data identification processor includes a prediction module and an error threshold selection module respectively connected to the data preprocessor, the prediction module is used to process the multivariate time series data to obtain a prediction result, and the error threshold selection module is connected to the prediction module to determine the error threshold and judge whether the production data is abnormal according to the error threshold.

[0046] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0047] In the embodiment of the present disclosure, through the above-mentioned GRU-CAE-based multi-model mixed production line abnormal data identification method, a dual prediction layer is used in the prediction part, namely a first prediction module based on GRU-CAE and a second prediction module based on the attention mechanism, to realize time-based prediction and feature-based prediction of production data. The first prediction module can capture the deep information of multivariate time series data in the time dimension, and the second prediction module can find the weight of each feature in the multivariate time series data based on the attention mechanism, and combine the information of time and feature to obtain the final prediction result, thereby improving the accuracy of the abnormal data identification model in the prediction result; in the abnormal data judgment part, the error threshold is determined by the error threshold selection module, and the abnormal judgment of the production data is realized according to the error threshold, thereby improving the accuracy and robustness of abnormal data recognition.

[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0050] Figure 1 A flowchart showing a method for identifying abnormal data of a multi-model mixed production line based on GRU-CAE in an exemplary embodiment of the present disclosure;

[0051] Figure 2 A flowchart showing the steps of preprocessing the collected production data in an exemplary embodiment of the present disclosure is shown;

[0052] Figure 3A schematic diagram showing a structural unit of a GRU gated recurrent unit in an exemplary embodiment of the present disclosure;

[0053] Figure 4 A simplified structural diagram of a GRU-CAE model in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0054] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0055] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0056] In the existing technology, the production data of the workshop production line is generally collected by monitoring equipment such as wireless sensors. In the production process of a multi-model mixed workshop, it is necessary to aggregate different sensor data for analysis, but since the production data is not only large in volume and variety, but also has differences and certain relationships between production data at different times, the difficulty of data processing and anomaly detection is further increased.

[0057] In the prior art, the sigmoid function is often used as an activation function of a neural network due to its monotonically increasing and inverse monotonically increasing properties. It maps variables to between 0 and 1, and works better when the feature differences are complex or not particularly large. The ReLu function is a linear rectifier function, a commonly used activation function in artificial neural networks, usually referring to nonlinear functions represented by ramp functions and their variants. The tanh function is a hyperbolic tangent function, a type of hyperbolic function.

[0058] In the prior art, recurrent neural networks, as a neural network architecture widely used to process sequence data, have powerful feature extraction and expression capabilities and have achieved good results in various fields. Autoencoders correspond to an unsupervised learning method that can be trained without marking abnormal data, and the network structure of autoencoders can introduce multiple different types of encoders and decoders to build a diverse model set. The self-attention mechanism can dynamically allocate attention weights according to the importance of different positions in the input sequence and effectively extract important features.

[0059] In the prior art, an autoencoder is a neural network that aims to copy its input to its output. It works by compressing the input into a latent space representation and then reconstructing the output of this representation. The autoencoder consists of an encoder and a decoder. Convolutional Auto-Encoder (CAE) is a special case of an autoencoder. The encoder of the convolutional autoencoder consists of a convolutional layer and a pooling layer, and the decoder only includes a deconvolution layer. The convolutional layer acts as a filter. The convolutional autoencoder finds an excellent basic framework by adjusting the hyperparameters corresponding to the convolutional layer and the pooling layer. The Gated Recurrent Unit (GRU) is a variant of the Recurrent Neural Network (RNN). It introduces important gating units, namely the reset gate and the update gate. By introducing the gating mechanism, the flow of information can be better controlled, the gradient vanishing and gradient exploding problems can be effectively alleviated, and the network can better capture the long-term dependencies between information, improving the performance and generalization ability of the model.

[0060] In this example implementation, a method for identifying abnormal data in a multi-model mixed production line based on GRU-CAE is first provided. Figure 1 As shown in , the method may include the following steps:

[0061] Step S101: preprocessing the collected production data to obtain multivariate time series data;

[0062] Step S102: inputting the multivariate time series data into an abnormal data recognition model;

[0063] Step S103: the abnormal data recognition model predicts the multivariate time series data using a first prediction module based on GRU-CAE and outputs first prediction data, predicts the multivariate time series data using a second prediction module based on an attention mechanism and outputs second prediction data, and obtains a prediction result based on the combination of the first prediction data and the second prediction data;

[0064] Step S104: the abnormal data identification model uses the error threshold selection module to determine the error threshold, and determines whether the production data is abnormal based on the error threshold.

[0065] Through the above-mentioned GRU-CAE-based multi-model mixed production line abnormal data identification method, a dual prediction layer is used in the prediction part, namely, the first prediction module based on GRU-CAE and the second prediction module based on the attention mechanism, to realize time-based prediction and feature-based prediction of production data. The first prediction module can capture the deep information of multivariate time series data in the time dimension, and the second prediction module can find the weight of each feature in the multivariate time series data based on the attention mechanism, and combine the information of time and feature to obtain the final prediction result, thereby improving the accuracy of the abnormal data identification model in the prediction results; in the abnormal data judgment part, the error threshold is determined by the error threshold selection module, and the abnormal judgment of the production data is realized according to the error threshold, thereby improving the accuracy and robustness of abnormal data recognition.

[0066] It should be noted that the GRU-CAE mentioned in this application can be understood as the introduction of the GRU gated recurrent unit on the basis of the CAE convolutional autoencoder network architecture, that is, based on the excellent basic framework of CAE, the GRU gated recurrent unit is introduced on the basis of CAE encoding and decoding to better control the flow of information and capture the long-term dependencies between information, thereby improving the performance and generalization ability of the model.

[0067] Next, we will refer to Figures 1 to 4 Each step of the above method in this example implementation is described in more detail.

[0068] In one embodiment, reference Figure 2 In step S101, preprocessing the collected production data may include the following sub-steps:

[0069] Step S1011: calling the production data of the multi-model mixed production line;

[0070] Step S1012: using a sliding window algorithm to perform partitioning processing on the production data;

[0071] Step S1013: Perform z-score standardization on the divided production data.

[0072] By preprocessing the collected production data through the above step S101 and dividing the production data through the sliding window algorithm, the temporal dependency between the production data of the mixed flow production line can be obtained; by performing z-score standardization on the divided production data, the dimensional differences between the features can be eliminated.

[0073] In step S1012, a reasonable window width is set, and the original data set X of the production data is divided using the sliding window algorithm to obtain an augmented data set Y containing the historical moment information of each variable. Specifically, the specific method of dividing the production data using the sliding window algorithm is:

[0074] Use a sliding window with a width of ω to divide the original data set X, and move it with a sliding step of 1;

[0075] The vector composed of the ith sensor eigenvalues ​​recorded in the tth window sequence can be expressed as:

[0076] S i (t) =[x i (t) x i (t+1) …x i (t+ω-1) ] T (6)

[0077] Among them, x i (t) represents the eigenvalue of the i-th sensor recorded in the t-th window sequence, ω is the sliding window width, S i (t) Represents the vector composed of the eigenvalues ​​of the i-th sensor recorded in the t-th window sequence;

[0078] The data set of t window sequence records is:

[0079] S (t) =[S1 (t) ,S2 (t) …S m (t) ] T (7)

[0080] Among them, S i (t) represents the vector composed of the eigenvalues ​​of the i-th sensor recorded in the t-th window sequence, S (t) Represents a data set of t window sequence records;

[0081] All window sequences constitute an augmented dataset:

[0082] Y=[S (1) s (2) …S (T) ]∈R M×T (8)

[0083] Where M = m × ω and M represents the data dimension in the augmented state, T = n-ω + 1 and T represents the total number of sliding windows, ω represents the sliding window width, and m represents xi (t) The dimension of n is the length of the original data set X, S (t) represents the data set of t window sequence records, and Y represents the augmented data set.

[0084] Each of the above sliding windows contains the current information and historical information of the variable, that is, when the original data set X of the production data is divided by the sliding window algorithm, the temporal correlation of each sensor variable in multiple continuous measurement values ​​is fully considered.

[0085] In step S1013, the divided production data is subjected to z-score standardization, wherein the specific method of processing the data using the z-score standardization method is as follows:

[0086] Based on the multiple data sets obtained by the sliding window algorithm, in order to further eliminate the dimensional differences between the multiple data sets, the Z-score standardization method is used to standardize the data according to the different physical characteristic values ​​generated by each sensor, so that the original production data of the mixed production line conforms to the normal distribution after processing. Among them, the data is standardized by formula (9):

[0087]

[0088] Among them, μ(·) and σ(·) represent the mean function and standard deviation function respectively, S i (t) represents the vector composed of the eigenvalues ​​of the i-th sensor recorded in the t-th window sequence, T represents the total number of sliding windows, 1≤t≤T, Represents the standardized multivariate time series data.

[0089] The Z-score normalization operation in step S1013 above scales the features so that the sensor variables in each sliding window obey a univariate Gaussian distribution with a mean of 0 and a standard deviation of 1. Mapping features of different magnitudes to the same scale improves the accuracy of the data comparison results.

[0090] It should be noted that the multivariate time series data obtained through the preprocessing in step S101 is stored in a database for subsequent use.

[0091] The mixed-flow production data of multiple models is in the processing stage on the workshop production line. During the mixed-line production process, the production data increases or decreases continuously with the change of time, that is, the mixed-line production data depends on time to a certain extent and belongs to time series data. In order to reflect the characteristics of time series data, this application uses a sliding window algorithm for the original production data. For multi-dimensional time series, different variables have different dimensions. The z-score standardization processing method is used for preprocessing, which can prevent the difference in numerical values ​​from affecting model prediction and error threshold selection, thereby improving the effect of abnormal data identification.

[0092] In one embodiment, before preprocessing the collected production data in step S101, the following steps may also be included:

[0093] The production data on the mixed-flow production line is collected using the built-in production line sensors and instrument arrays in the production workshop, and the analog signals collected by the data acquisition source are converted into digital signals that can be read and processed by the computer using a data acquisition card connected to the production line sensors and instrument arrays, making it convenient for centralized processing and transmission of production data.

[0094] Specifically, production line sensors are installed on production equipment and production lines to collect production data in real time. Production line sensors monitor the operating status of production equipment, production parameters, etc., and use data acquisition cards to convert analog signals collected from various data sources into digital signals that can be read and processed by computers, facilitating centralized data processing and transmission, and sending the converted data to a data processing system or cloud platform for storage and analysis. The above-mentioned production line sensors, instrument arrays, and data acquisition cards built into the production workshop work together to complete data collection tasks.

[0095] Optionally, production line sensors include temperature sensors, pressure sensors and vibration sensors to monitor the operating status of production equipment, production parameters, etc. in real time.

[0096] It should be noted that the first prediction module is built based on the GRU-CAE model, that is, the GRU gated recurrent unit is introduced on the basis of the CAE convolutional autoencoder network architecture to complete the encoding and decoding process.

[0097] The first prediction module of the abnormal data recognition model uses the GRU gated recurrent unit as the main unit structure. The unit structure of the GRU gated recurrent unit can be found in Figure 3 as shown in .

[0098] It should be noted that the update process corresponding to the GRU gated recurrent unit is:

[0099] The reset gate expression of the GRU gated recurrent unit is shown in formula (10):

[0100] rt =σ(x t W xr +h t-1 W hr +b r ) (10)

[0101] Among them, x t is the input vector of the t-th time step, that is, the t-th component of the input sequence X, r t represents the reset gate, σ(·) represents the standard deviation function, W xr , W hr represents the weight coefficient, b r represents the bias vector, h t-1 Indicates the information saved at the previous time step t-1;

[0102] The update gate expression of the GRU gated recurrent unit is shown in formula (11):

[0103] z t =σ(x t W xz +h t-1 W hz +b z ) (11)

[0104] Among them, x t is the input vector of the t-th time step, that is, the t-th component of the input sequence X, z t represents the update gate, σ(·) represents the standard deviation function, W xz , W ht represents the weight coefficient, b z represents the bias vector, h t-1 Indicates the information saved at the previous time step t-1;

[0105] The above t-1 The information of the previous time step t-1 is saved, h t-1 and x t Both are multiplied by the corresponding weight coefficients, and the update gate adds these two pieces of information and inputs them into the activation function, thus compressing the activation function result to between 0 and 1. The expressions of the above reset gate and update gate are the same, and the reset gate and update gate only differ in the parameters and uses of the linear transformation;

[0106] Next, the new memory content will use the reset gate to store the relevant information in the past, and calculate the reset gate r t With h t-1 The Hadamard product of t and h t-1The reset gate calculated above is a vector consisting of 0 to 1, which measures the size of the gate switch. For example, if the gate value corresponding to an element is 0, then the information of this element is completely forgotten. t And determine the previous information to be retained and forgotten, and obtain the current memory content through linear transformation:

[0107]

[0108] Where tanh(·) represents the hyperbolic tangent function, W xh , W hh represents the weight coefficient, b h represents the bias vector, ⊙ represents the product processing, Indicates updated information;

[0109] In the last step, we need to calculate h t , which retains the information of the current unit and passes it to the next unit. In this process, the update gate is used to determine, which also controls the inflow of information in the form of gating, z t With h t-1 The Hadamard product of represents the information retained in the final memory at the previous time step. This information plus the information retained in the final memory of the current memory is equal to the information output by the final gated recurrent unit. The information output by the final gated recurrent unit is expressed by formula (13):

[0110]

[0111] Among them, z t represents the update gate, h t-1 Indicates the information saved at the previous time step t-1, h t Represents the information output by the final gated recurrent unit, and ⊙ represents the product processing.

[0112] Compared with other recurrent neural network structures in RNN, the GRU gated recurrent unit used in the first prediction module of this embodiment can simplify the complex internal structure while ensuring accuracy and computational efficiency, has good nonlinear fitting ability, and can track the long-term changes of eigenvalues, and can achieve relatively ideal results when processing time series data.

[0113] In one embodiment, the abnormal data recognition model in step S103 uses the first prediction module based on GRU-CAE to predict the multivariate time series data and output the first prediction data, which may include the following sub-steps:

[0114] Encode the multivariate time series data through the encoding layer of the first prediction module, and input the encoding result as an input vector and the hidden state of the previous moment into the GRU gated recurrent unit to obtain the hidden state information corresponding to each moment in the encoding layer;

[0115] Based on the hidden state information, calculating corresponding reconstructed data through the encoding layer;

[0116] Based on the reconstructed data corresponding to the coding layer and the hidden state information corresponding to each moment in the coding layer, the first prediction data is calculated and output through the decoding layer.

[0117] The above-mentioned first prediction module constructed based on the GRU-CAE model introduces the GRU gated recurrent unit on the basis of the CAE convolutional autoencoder network architecture to complete the encoding and decoding process, takes the multivariate time series data as the input information of the encoding layer, uses the encoding layer to encode the multivariate time series data, uses the decoding layer to decode the encoded information, and outputs the first prediction data.

[0118] For further reference, Figure 4 In the encoding and decoding process, the multivariate time series data is encoded by the encoding layer of the first prediction module, and the encoding result is used as an input vector and the hidden state of the previous moment is input into the GRU gated recurrent unit to obtain the hidden state information corresponding to each moment in the encoding layer, including the following steps:

[0119] The multivariate time series data is encoded by the CAE encoding layer network of the encoding layer to obtain an input vector, which is expressed as:

[0120] I (t+i) =σ e (W h S (t+i) +b h ) (1)

[0121] Among them, I (t+i) represents the input vector obtained after CAE coding layer network coding, σ e Represents the sigmoid nonlinear activation function, S (t+i) represents multivariate time series data, W h and b h Represent the weight matrix and bias vector of the CAE coding layer network respectively;

[0122] The input vector is calculated by the GRU gated recurrent unit of the encoding layer to obtain the hidden state information corresponding to each moment in the encoding layer, and the hidden state information is expressed as:

[0123]

[0124] in, represents the hidden state information expression, GRU represents the GRU gated recurrent unit, and W e and b e They represent the weight matrix and bias vector of the GRU gated recurrent unit of the encoding layer, respectively, and h (t+i-1) Represents the hidden state information corresponding to time t+i-1 in the coding layer.

[0125] The multivariate time series data obtained by preprocessing is input into the encoding layer of the first prediction module. After the multivariate time series data is encoded by the CAE encoding layer network, the current moment input vector I is (t+i) and the hidden state h at the previous moment (t+i-1) Input into the GRU gated recurrent unit together to obtain the hidden state information at that moment This cycle is repeated until the vector at the end of the input multivariate time series data (t+T-1) is obtained, and the final hidden state information of the encoding layer is obtained, and this hidden state information is used as the initial hidden state information of the decoding layer.

[0126] Further, in the above step of calculating the reconstructed data corresponding to the coding layer through the coding layer based on the hidden state information, the reconstructed data is expressed as:

[0127]

[0128] Among them, S `(t+T-1) represents the reconstructed data corresponding to the coding layer, σ d represents the sigmoid nonlinear activation function, W y and b y Respectively represent the weight matrix and bias vector of the CAE decoding layer network, h D (t+T-1) Represents the hidden state information corresponding to the last time (t+T-1) in the coding layer.

[0129] Furthermore, in the above step of calculating and outputting the first prediction data through the decoding layer, the decoding layer calculates the first prediction data through formula (4) and formula (5), and the first prediction data is expressed as:

[0130]

[0131] in, represents the hidden state information expression of the decoding layer, GRU represents the GRU gated recurrent unit, and W d and b d Represent the weight matrix and bias vector of the GRU gated recurrent unit of the decoding layer, S`(t+i-1) represents the reconstructed data corresponding to the coding layer, Represents the hidden state information corresponding to the time (t+i+1) in the coding layer, R (t+i) represents the first prediction data, σ d Represents the sigmoid nonlinear activation function.

[0132] The operation of the decoding layer is opposite to that of the encoding layer. The decoding layer uses the reconstructed data of the previous moment and the current hidden state to calculate the reconstructed data of the current moment. That is, the output result R of the first prediction module is obtained by formula (4) and formula (5): (t+i) , R (t+i) The first prediction data

[0133] In the prediction process of the first prediction module, the GRU-CAE model can obtain the current state information through the update gate and reset gate structure of the GRU gated recurrent unit in the process of encoding and decoding time series data, and retain the important part of the state information at the previous moment, while ignoring the unimportant part. The important part of the state information at the migration moment is retained in memory through the update gate and reset gate structure of the GRU gated recurrent unit, while ignoring the unimportant part, so as to comprehensively obtain the state information at the current moment.

[0134] Optionally, the GRU-CAE model used in the first prediction module above selects the ReLu function as the activation function. Compared with the general GRU gated recurrent unit, which uses the sigmoid function as the activation function to control the opening and closing of the gate, so that the output range of the function is between 0 and 1, the ReLu function can map the output value to a probability distribution to control the flow of information; further, the hyperbolic tangent function tanh is used to generate the candidate hidden state. The ReLu function is introduced in the first prediction module of the abnormal data recognition model as the activation function of the candidate hidden state, which not only simplifies the calculation process and improves efficiency, but also has biological principles, which is more in line with the actual biological expectations of the simulated neural network. The most important thing is that it can better avoid the gradient disappearance and gradient explosion problems, and effectively improve the efficiency of the back propagation process.

[0135] In one embodiment, the step S103 of using the second prediction module based on the attention mechanism to predict the multivariate time series data and output second prediction data includes the following steps:

[0136] Performing a convolution operation on the multivariate time series data through the convolution layer of the second prediction module to obtain an output variable;

[0137] A score function corresponding to the output variable is determined, and an inner product operation is performed on the output variable and the corresponding score function to obtain the second prediction data.

[0138] The above-mentioned attention mechanism is introduced in the second prediction module to make full use of the importance of each variable in the feature dimension, that is, the score of each variable is represented by a scoring function, which shows the importance of each variable to the prediction moment. The larger the score function, the greater the contribution of the variable to the prediction moment and the greater the impact. The introduction of the scoring function is conducive to improving the accuracy of the final prediction result of the prediction part.

[0139] Specifically, the specific process of performing a convolution operation on the multivariate time series data through the convolution layer of the second prediction module to obtain the output variable is as follows:

[0140] First, the original data X t ={x t-ω ,x t-ω+1 ,…x t-1, x t}∈R ω×m Input it into the GRU layer in the second prediction module to keep the feature dimension unchanged, and get the preliminary output data G t = {g t-ω ,g t-ω+1 ,…g t-1, g t}∈R ω×m , where g t is the output of the GRU layer at time t;

[0141] Then use k2 1×ω convolutional layers to process the preliminary output data G t The row vector of is convolved to obtain the deep features of each variable in the time dimension. The results of the convolution operation are represented by squares of different colors, where ω represents the sliding window size. After the above convolution operation, the output variable is obtained Output variables Indicates that the jth convolution kernel sweeps over g t-ω+1 ,g t-ω+2 ,…g t-1 The result of the i-th variable.

[0142] Optionally, in the above step of determining the score function corresponding to the output variable, in order to reduce parameters and improve calculation efficiency, the simplest point attention score function is selected in this embodiment. The score function can be expressed as:

[0143]

[0144] Among them, sigmoid(·) represents the activation function, Score(·) represents the score function, g t represents the output of the GRU layer at time t, It means that the convolution kernel sweeps over g t-ω+1 ,g t-ω+2,…g t-1 The result of the i-th variable, α i represents the score corresponding to the i-th variable.

[0145] It should be noted that, compared with the output of the softmax function, the output of the sigmoid function is not mutually exclusive, and multiple variables can be selected at the same time. In time series prediction, it is expected to obtain the importance of each variable, not just the most important variable, so this embodiment selects the sigmoid function as the activation function in determining the above score function.

[0146] Specifically, the output variable and the corresponding score function are inner-producted to obtain the second prediction data, which is implemented by formula (16) and formula (17):

[0147]

[0148] Among them, α i represents the score corresponding to the i-th variable, It means that the convolution kernel sweeps over g t-ω+1 ,g t-ω+2 ,…g t-1 The result of the i-th variable, Represents the convolution output The score α corresponding to the i-th vector i The result of the inner product operation is: Represents the second prediction data finally output by the second prediction module.

[0149] In one embodiment, the first prediction data output by the first prediction module is converted into and the second prediction data output by the second prediction module The final prediction result is obtained after linear transformation and splicing:

[0150]

[0151] in, Represents the prediction result, represents the first prediction data, Represents the second prediction data.

[0152] In one embodiment, the abnormal data recognition model in step S103 uses an error threshold selection module to determine the error threshold, and further includes the following steps:

[0153] Calculate the root mean square error based on the prediction result and the corresponding actual value of the production data to obtain a root mean square error sequence;

[0154] The POT model is used to select the root mean square error sequence to obtain the error threshold.

[0155] In the above-mentioned error threshold selection part using the error threshold selection module, the root mean square error obtained based on the prediction result and the actual value of the production data is input into the error threshold selection module, and the POT model in the extreme value theory is used to select a suitable error threshold. If the actual value of the production data exceeds the set error threshold, it is considered that the production line is abnormal at that moment.

[0156] Specifically, based on the prediction result and the corresponding actual value of production data, the root mean square error is calculated by formula (19):

[0157]

[0158] in, is the predicted value of the i-th feature at time t output by the model prediction part, x t,i is the actual value of the i-th feature at time t.

[0159] The root mean square error calculated by the above formula (19) is used as the loss function of the prediction part in the abnormal data recognition model to obtain the loss at time t. The smaller the root mean square error calculated by formula (19), that is, the smaller the loss function, the more accurate the prediction result output by the prediction part in the abnormal data recognition model is, and it fits the real production data.

[0160] Furthermore, in the step of selecting the root mean square error sequence using the POT model, the root mean square error between the predicted result value and the actual value of each observation point is recorded as a sequence {l1,l2,…,l Q}, and use the POT model in extreme value theory to analyze the sequence {l1,l2,…,l Q} is selected and the POT model is expressed by formula (20):

[0161]

[0162] Where th is the initial threshold and can be set empirically, γ and β represent the shape parameter and scale parameter in the generalized Pareto distribution, respectively, and L is the sequence {l1,l2,…l Q} any value, L-th refers to the part above the threshold th, Represents the POT model;

[0163] The error threshold is selected by formula (21):

[0164]

[0165] Among them, F represents the error threshold, th is the initial threshold, q is the sequence {l1,l2,…l Q}, the ratio of L>th, Q and Q th represents the number of observation points, and Denotes parameter estimates and is obtained using maximum likelihood estimation.

[0166] The prediction part of the abnormal data recognition model in this application is designed as a first prediction module based on GRU-CAE and a second prediction module based on the attention mechanism. Compared with the properties of spontaneously learning data using recurrent neural networks, this application has an improvement in the prediction effect of the abnormal data recognition method. The deep information of multivariate time series data in the time dimension is captured by combining a periodic GRU gated recurrent unit with a CAE convolutional autoencoder, and the weights for measuring each feature are found through the attention mechanism. The information from the two angles is then summarized as the multivariate time series prediction result, and the root mean square error is used to select the outlier threshold to improve the accuracy and robustness of abnormal data recognition.

[0167] In one embodiment, the GRU-CAE-based method for identifying abnormal data in a multi-model mixed production line further includes:

[0168] The abnormal data recognition model is constructed, and the abnormal data recognition model is trained and optimized using normal production data.

[0169] In the process of using normal production data to train and optimize the abnormal data recognition model, the model is continuously optimized based on continuous learning, evaluation and parameter adjustment. After the abnormal data recognition model is trained, an abnormal data recognition model with good generalization ability is obtained. The trained abnormal data recognition model is used to determine whether the production data is abnormal, which is conducive to ensuring the accuracy and robustness of abnormal data recognition.

[0170] Optionally, metrics are used to evaluate the abnormal data recognition model during the training process to facilitate parameter adjustment of the abnormal data recognition model, where the metrics include recall rate, precision rate, F1 score, G-mean value and misjudgment rate.

[0171] Specifically, the recall rate reflects the proportion of abnormal points detected by the abnormal data recognition model to all real abnormal points. The calculation formula is as follows:

[0172]

[0173] Among them, Recall represents the recall rate, TP represents the number of normal production data predicted as normal by the abnormal data recognition model, and FN represents the number of normal production data predicted as abnormal by the abnormal data recognition model.

[0174] Specifically, the precision rate reflects how many abnormal points detected by the abnormal data recognition model are real abnormal points. The calculation formula is as follows:

[0175]

[0176] Wherein, Precision represents the accuracy rate, TP represents the number of normal production data predicted as normal by the abnormal data recognition model, and FP represents the number of abnormal production data predicted as normal by the abnormal data recognition model.

[0177] Specifically, the F1 score represents the weighted harmonic mean of precision and recall, which is used to evaluate the overall performance of anomaly detection. The calculation formula is as follows:

[0178]

[0179] Among them, Recall represents the recall rate, Precision represents the precision rate, and score represents the score function.

[0180] Specifically, the G-mean value indicates that there is a serious imbalance between positive and negative samples in the experimental data. The G-mean value is added as a comprehensive evaluation indicator. This indicator has a reference significance when evaluating the performance of the classification algorithm under unbalanced data. The calculation formula is as follows:

[0181]

[0182] Among them, TP represents the number of normal production data predicted as normal by the abnormal data recognition model, FN represents the number of normal production data predicted as abnormal by the abnormal data recognition model, TN represents the number of abnormal production data predicted as abnormal by the abnormal data recognition model, and FP represents the number of abnormal production data predicted as normal by the abnormal data recognition model.

[0183] Specifically, the misjudgment rate reflects how many samples are misjudged as outliers by the algorithm, which can reflect the robustness of the model to a certain extent. The calculation formula is as follows:

[0184]

[0185] Among them, FPR represents the false positive rate, FP represents the number of abnormal production data predicted as normal by the abnormal data recognition model, and TN represents the number of abnormal production data predicted as abnormal by the abnormal data recognition model.

[0186] Optionally, 60% of the data is retrieved from the augmented data set Y divided by the sliding window algorithm in step S101 in chronological order as the training set data, 20% of the data is retrieved as the validation set data, and 20% of the data constitutes the test set data. The training set data and the validation set data are used to train and optimize the abnormal data recognition model. During the training optimization process, the abnormal data recognition model is continuously self-learned based on the training set data and the validation set data, and the abnormal data recognition model in the training process is evaluated by measuring indicators. Based on the evaluation results, the abnormal data recognition model is adjusted to achieve continuous iterative update and optimization of the model. Finally, the trained abnormal data recognition model can be tested using the test set data to verify whether the model has good generalization ability.

[0187] Traditional anomaly detection usually faces the problem of scarcity of anomaly label data and ever-changing abnormal behavior patterns. This application uses normal data to build and train an abnormal data recognition model, so that the neural network of the model learns the characteristics of normal data, and then uses the model to realize abnormal pattern recognition, which is conducive to solving the problem of relatively few and unlabeled abnormal data faced by production data.

[0188] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc. In addition, it is also easy to understand that these steps may be, for example, executed synchronously or asynchronously in multiple modules / processes / threads.

[0189] Furthermore, in the present example implementation, there is also provided an abnormal data identification device for a multi-model mixed production line based on GRU-CAE, the device comprising a data collector, a data preprocessor and an abnormal data identification processor, wherein the data collector is used to obtain production data of the multi-model mixed production line; the data preprocessor is connected to the data collector, and is used to preprocess the production data to obtain multivariate time series data; the abnormal data identification processor comprises a prediction module and an error threshold selection module respectively connected to the data preprocessor, the prediction module is used to process the multivariate time series data to obtain a prediction result, and the error threshold selection module is connected to the prediction module, and is used to determine the error threshold and judge whether the production data is abnormal according to the error threshold.

[0190] Through the above-mentioned GRU-CAE-based multi-model mixed production line abnormal data identification device, through the mutual cooperation between the data collector, the data preprocessor and the abnormal data identification processor, the production data on the multi-model mixed production line can be collected, preprocessed, predicted and abnormal production data can be identified, so as to warn the user of abnormal production conditions in advance.

[0191] Optionally, the prediction module includes a first prediction module based on GRU-CAE, a second prediction module based on an attention mechanism, and a data processing module, wherein the first prediction module is used to predict the multivariate time series data and output first prediction data, and the second prediction module is used to predict the multivariate time series data and output second prediction data. The data processing module of the prediction module can process the first prediction data and the second prediction data and output a final prediction result.

[0192] Optionally, the data acquisition module includes production line sensors, an instrument array and a data acquisition card. The production line sensors and instrument array are used to collect production data on the mixed flow production line. The data acquisition card is connected to the production line sensors and instrument array and is used to convert the analog signals collected by the data acquisition source into digital signals that can be read and processed by a computer.

[0193] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0194] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units for concretization. The components displayed as modules or units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed scheme. Those of ordinary skill in the art can understand and implement it without paying creative work.

[0195] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A method for identifying abnormal data in a mixed production line of multiple models based on GRU-CAE. It is characterized in that include: Preprocess the collected production data to obtain multivariate time series data; Inputting the multivariate time series data into an abnormal data identification model; The abnormal data recognition model predicts the multivariate time series data using a first prediction module based on GRU-CAE and outputs first prediction data, predicts the multivariate time series data using a second prediction module based on an attention mechanism and outputs second prediction data, and obtains a prediction result based on a combination of the first prediction data and the second prediction data; The abnormal data identification model uses an error threshold selection module to determine an error threshold, and determines whether the production data is abnormal based on the error threshold.

2. According to the GRU-CAE-based multi-model mixed production line abnormal data identification method of claim 1, It is characterized in that The abnormal data recognition model predicts the multivariate time series data based on the first prediction module of GRU-CAE and outputs first prediction data, including the following steps: Encode the multivariate time series data through the encoding layer of the first prediction module, and input the encoding result as an input vector and the hidden state of the previous moment into the GRU gated recurrent unit to obtain the hidden state information corresponding to each moment in the encoding layer; Based on the hidden state information, calculating corresponding reconstructed data through the encoding layer; Based on the reconstructed data corresponding to the coding layer and the hidden state information corresponding to each moment in the coding layer, the first prediction data is calculated and output through the decoding layer.

3. According to the GRU-CAE-based multi-model mixed production line abnormal data identification method of claim 2, It is characterized in that The multivariate time series data is encoded by the encoding layer of the first prediction module, and the encoding result is used as an input vector and the hidden state of the previous moment is input into the GRU gated recurrent unit to obtain the hidden state information corresponding to each moment in the encoding layer, including the following steps: The multivariate time series data is encoded by the CAE encoding layer network of the encoding layer to obtain an input vector, which is expressed as: I (t+i) =s e (W h S (t+i) +b h ) (1) Among them, I (t+i) represents the input vector obtained after CAE coding layer network coding, σ e Represents the sigmoid nonlinear activation function, S (t+i) represents multivariate time series data, W h and b h Represent the weight matrix and bias vector of the CAE coding layer network respectively; The input vector is calculated by the GRU gated recurrent unit of the encoding layer to obtain the hidden state information corresponding to each moment in the encoding layer, and the hidden state information is expressed as: in, represents the hidden state information expression, GRU represents the GRU neural network model, W e and b e Respectively represent the weight matrix and bias vector of the GRU neural network of the encoding layer, h (t+i-1) Represents the hidden state information corresponding to time t+i-1 in the coding layer.

4. According to the GRU-CAE-based method for identifying abnormal data of a multi-model mixed production line in claim 3, It is characterized in that The reconstructed data is represented as: Among them, S `(t+T-1) represents the reconstructed data corresponding to the coding layer, σ d represents the sigmoid nonlinear activation function, W y and b y Respectively represent the weight matrix and bias vector of the CAE decoding layer network, h D (t+T-1) Represents the hidden state information corresponding to the last time (t+T-1) in the coding layer.

5. According to the GRU-CAE-based method for identifying abnormal data of a multi-model mixed production line in claim 4, It is characterized in that In the step of calculating and outputting the first prediction data through the decoding layer, the decoding layer calculates the first prediction data through formula (4) and formula (5), and the first prediction data is expressed as: in, represents the hidden state information expression of the decoding layer, GRU represents the GRU neural network model, and W d and b d Respectively represent the weight matrix and bias vector of the GRU neural network of the decoding layer, S` (t+i-1) represents the reconstructed data corresponding to the coding layer, Represents the hidden state information corresponding to the time (t+i+1) in the coding layer, R (t+i) represents the first prediction data, σ d Represents the sigmoid nonlinear activation function.

6. The abnormal data identification method for a multi-model mixed production line based on GRU-CAE according to claim 1, It is characterized in that The method of using a second prediction module based on an attention mechanism to predict the multivariate time series data and outputting second prediction data comprises the following steps: Performing a convolution operation on the multivariate time series data through the convolution layer of the second prediction module to obtain an output variable; A score function corresponding to the output variable is determined, and an inner product operation is performed on the output variable and the corresponding score function to obtain the second prediction data.

7. The abnormal data identification method for a multi-model mixed production line based on GRU-CAE according to any one of claims 1 to 6, It is characterized in that The abnormal data recognition model uses an error threshold selection module to determine the error threshold, and also includes the following steps: Calculate the root mean square error based on the prediction result and the corresponding actual value of the production data to obtain a root mean square error sequence; The POT model is used to select the root mean square error sequence to obtain the error threshold.

8. The method for identifying abnormal data of a multi-model mixed production line based on GRU-CAE according to any one of claims 1 to 6, It is characterized in that The preprocessing of the collected production data comprises the following steps: Calling the production data of the multi-model mixed production line; Using a sliding window algorithm to perform partitioning processing on the production data; The divided production data is subjected to z-score standardization.

9. The method for identifying abnormal data of a multi-model mixed production line based on GRU-CAE according to any one of claims 1 to 6, It is characterized in that The GRU-CAE-based method for identifying abnormal data of a multi-model mixed production line also includes: The abnormal data recognition model is constructed, and the abnormal data recognition model is trained and optimized using normal production data.

10. A device for identifying abnormal data of mixed production lines of multiple models based on GRU-CAE. It is characterized in that include: Data collector, used to obtain production data of mixed-model production lines; A data preprocessor, connected to the data collector, for preprocessing the production data to obtain multivariate time series data; The abnormal data identification processor includes a prediction module and an error threshold selection module respectively connected to the data preprocessor, the prediction module is used to process the multivariate time series data to obtain a prediction result, and the error threshold selection module is connected to the prediction module to determine the error threshold and judge whether the production data is abnormal according to the error threshold.

Citation Information

Patent Citations

  • Temperature transmitter fault detection method based on unsupervised machine learning

    CN117725360A

  • Multi-dimensional time sequence anomaly detection method based on time variable double-attention mechanism

    CN118378139A

Cited By

  • Rural sewage treatment result prediction method and system

    CN119647701A