Manufacturing industry data monitoring frequency adjustment method based on time sequence diagram prediction
Through the method based on timing chart prediction, the multi-channel data of the manufacturing industry is preprocessed and trend analysis using graph attention network and multi-layer perceptron model, which solves the problems of lag in monitoring frequency adjustment and the inability to uniformly adjust in the existing technology, and realizes the problem of Accurate prediction of multi-channel data in manufacturing and rapid response and adjustment of monitoring frequency.
Patent Information
- Application Number
- CN202411533360.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The existing multi-channel data monitoring frequency adjustment method in manufacturing has lag and the problem of being unable to accurately predict complex multi-channel data, and it is impossible to uniformly adjust the monitoring frequency of all variables.
Using a time-series graph prediction method, by constructing a multi-channel data set and pre-processing, the data trend changes are predicted using graph attention network and multi-layer perceptron model, and the overall monitoring frequency is adjusted.
It has achieved accurate trend prediction and rapid response and adjustment of monitoring frequency for multi-channel data in manufacturing, and can deeply perceive the overall trend of all variables and accurately focus on trend changes.
Smart Images

Figure CN119046670A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of dynamic adaptive monitoring of multi-channel data in manufacturing industry, and in particular to a method for adjusting the frequency of manufacturing industry data monitoring based on time series diagram prediction. Background Art
[0002] The security of the manufacturing industry chain is an important part of helping the country's high-quality industrial development, ensuring the stable operation of the real economy, and building a new development pattern. However, the potential risk factors in the manufacturing industry chain are complex and changeable and difficult to determine, so it is very necessary to monitor multi-channel data in the manufacturing industry and collaboratively perceive the trend changes of the data. Dynamic adaptive data monitoring at the top and bottom of the form refers to a data monitoring model that can dynamically adjust the sampling frequency according to changes in data trends to reduce the amount of data and thus save data transmission overhead. In the field of multi-channel data monitoring in the manufacturing industry, the adjustment of the monitoring frequency is not only to reduce the amount of data transmission, but also to focus on the risks hidden in the multi-channel data of the manufacturing industry.
[0003] The existing monitoring frequency adjustment model generally adjusts the monitoring frequency according to the existing changes, and the prediction module adopts an estimation model based on moving weighted average. The existing monitoring frequency adjustment method is generally based on sensor data, and the monitoring frequency will be adjusted separately for each variable.
[0004] Most of the existing monitoring frequency adjustment models adjust the monitoring frequency according to existing changes, which has the disadvantage of lag. In addition, multi-channel manufacturing data is multivariate data, which is characterized by the fact that the value of the variable is not only related to its own historical value, but also needs to consider the impact of other variables on it. The prediction module of the model based on prediction for frequency adjustment uses an estimation model based on moving weighted average, which makes it difficult to accurately predict complex multi-channel manufacturing data.
[0005] In addition, most existing methods make adjustments to each variable separately, while the monitoring of multi-channel data in the manufacturing industry requires that the monitoring granularity of all variables be kept uniform, and the overall monitoring frequency needs to be adjusted, which current methods cannot do. Summary of the invention
[0006] In view of the shortcomings of the prior art, the purpose of the present invention is to propose a method for adjusting the monitoring frequency of manufacturing data based on time series graph prediction, use graph data related deep learning methods to accurately predict the trend changes of data, and adjust the overall monitoring frequency according to the trend changes.
[0007] The technical solution of the present invention is:
[0008] A method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction comprises the following steps:
[0009] Step 1: Construct a manufacturing multi-channel data set and preprocess and divide the manufacturing channel data in the manufacturing multi-channel data set to obtain a training set, a validation set, and a test set; the preprocessing includes data cleaning, interpolation, and timestamp unification to obtain manufacturing multi-channel data with the same timestamp, unified granularity, and complete content.
[0010] Step 1.1: Obtain a manufacturing multi-channel data set; the manufacturing multi-channel data set includes a number of manufacturing channel data, each manufacturing channel data is a time series, representing the data values of various attributes in a certain channel of the manufacturing industry at different timestamps.
[0011] Step 1.2: Perform data cleaning on the manufacturing channel data in the manufacturing multi-channel data set to obtain the cleaned manufacturing channel data.
[0012] Step 1.3: According to the attribute characteristics of the manufacturing channel data, an interpolation filling algorithm is used to supplement the missing values in the manufacturing channel data after data cleaning; the interpolation filling algorithm includes linear interpolation, polynomial interpolation and smoothing interpolation.
[0013] Step 1.4: Use a timestamp resampling algorithm to unify the timestamps of the manufacturing channel data of each channel after supplementing the missing values, so as to obtain the manufacturing channel data with aligned timestamps and uniform granularity; the timestamp resampling algorithm includes an aggregation algorithm based on a sliding window and an interpolation resampling algorithm.
[0014] Step 1.5: Normalize the manufacturing channel data with aligned timestamps and uniform granularity to obtain normalized manufacturing channel data.
[0015] Step 1.6: Divide the normalized manufacturing channel data into training set, validation set and test set according to the set ratio.
[0016] Step 2: Divide the manufacturing channel data in the training set, validation set, and test set according to the capture window and prediction step size, and divide the manufacturing channel data into prediction samples and true value labels; the true value label is the true value of each prediction sample at a future moment.
[0017] The method for dividing the manufacturing channel data in the training set, validation set and test set according to the interception window and prediction step size is as follows: Assume that the number of attributes is , the size of the time window is , the prediction step length is b , using the size The interception window intercepts the manufacturing channel data along the timestamp sequence, and each interception obtains A set of prediction samples corresponding to all attributes within a moment and the following The real value label at the moment, then the interception window slides back along the timestamp by one prediction step and continues to intercept until the interception window reaches the last timestamp, that is, Prediction samples at time Predict this After a moment The true value label corresponding to the predicted sample at the moment .
[0018] Step 3: Perform graph structure modeling on the prediction samples in the training set, validation set, and test set to obtain a multi-channel data graph structure.
[0019] Specifically: for each prediction sample, The data value of the attribute is independent nodes, the node embedding representation The corresponding attribute of the node The vector formed by concatenating the data values at each moment in time order, that is, ,The edges between nodes are calculated by correlation and stored using the adjacency matrix.
[0020] The method for determining the edges between nodes by correlation calculation is:
[0021] According to the embedding representation of each node , calculate the Pearson correlation coefficient between each node, and set a retention threshold. If the Pearson correlation coefficient between two nodes is higher than the retention threshold, there is an edge between the two nodes, and the edge is stored in the adjacency matrix Otherwise, there is no edge.
[0022] Step 4: Establish a node value prediction model based on graph attention network and multi-layer perceptron.
[0023] The node value prediction model based on graph attention network and multi-layer perceptron includes a graph attention feature extraction module, a feature mixing module, a time mixing module and a time projection module.
[0024] The graph attention feature extraction module is used to extract all nodes of the multi-channel data graph structure according to Figure 1: Principle of attention mechanism, several layers Graph attention feature aggregation, each layer Graph feature graph attention feature aggregation calculates the attention weights between nodes, and performs weighted aggregation on the nodes according to the attention weights, aggregates the information of neighboring nodes to the current node, so that the information of each node is fully propagated in the entire multi-channel data graph structure, thereby strengthening the feature information of each node, and finally obtaining the graph attention feature extraction output , and used as the input of the feature mixing module.
[0025] The feature mixing module is used to extract and output the input graph attention features Flatten, that is, flatten into a vector and concatenate static covariates at the end of the vector Get the concatenated vector, and then perform feature fusion Layer implements static covariates Output of graph attention feature extraction The feature fusion vector is obtained by fusion, the feature fusion vector is residually connected with the concatenated vector and normalized, and the normalized vector is reconstructed to make it consistent with the output of the graph attention feature extraction. The dimensions are consistent, and the output result of the final feature mixing module is obtained , and used as the input of the time mixing module.
[0026] The time mixing module is used to use time mixing The output result of the feature mixing module of the layer input The historical data values of each attribute in the linear combination are combined to fully integrate the time series information and obtain the time mixture. Layer output, the output result of the feature mixing module Mixed with time The layer output is residually connected and then normalized to output the data after time mixing. ; The data after time mixing Output of the feature mixing module The dimensions are consistent.
[0027] The time projection module is used to utilize The fully connected layer mixes the input data over time. Projected to the output dimension of the target, that is, the prediction step length, we get The output of the fully connected layer will be The output of the fully connected layer is normalized to obtain the prediction results of each node value; the node value is the data value of each attribute.
[0028] Furthermore, the specific processing steps of the graph attention feature extraction module are:
[0029] The embedding representation of each node is based on The principle of the graph attention mechanism is to take a node as the center and calculate the attention weights between the node and all neighboring nodes.
[0030] For a node , remember the node The set of neighbor nodes is , With neighbor nodes The attention weight is calculated as:
[0031] Using a set of trainable weight matrices The embedding representation of the two nodes respectively and Perform matrix product and project it into the same feature space to obtain two result vectors. Concatenate the result vectors and use an attention kernel The concatenated result vector Do the dot product, and the dot product calculation result passes through the activation function , and then use Function to get the node and neighbor nodes The attention weight.
[0032] node and nodes The attention weight between As shown in formula (1): (1)
[0033] in, is the trainable weight matrix, and Node and nodes The embedding representation of For Node The embedding representation of the neighbor nodes of is a learnable attention kernel, is the activation function.
[0034] The method for weighted aggregation of nodes according to attention weights is specifically as follows:
[0035] For each node in the multi-channel data graph structure, the embedding representations of all its neighboring nodes are weighted summed, and the calculation result is used to update the embedding representation of the node itself. The embedding representation update method of is shown in formula (2): (2)
[0036] The input multi-channel data graph structure is , for the entire multi-channel data graph structure layer The output of graph feature graph attention feature aggregation is recorded as , No. Layer The graph feature graph attention feature aggregation process is shown in formula (3): (3)
[0037] in, is the attention weight adjacency matrix, For the layer The input of the graph feature graph attention feature aggregation, that is, layer The output of graph feature graph attention feature aggregation; For the layer Graph Features The output of graph attention feature aggregation.
[0038] Furthermore, the feature fusion The layer consists of a series of layer, Linear layers and Dropout layer.
[0039] Furthermore, the time mixing The layer consists of a series of Fully connected layer, Layer and Dropout layer.
[0040] Step 5: Use the multi-channel data graph structure corresponding to the training set and the validation set to train and adjust the node value prediction model based on the graph attention network and the multi-layer perceptron to obtain a trained node value prediction model based on the graph attention network and the multi-layer perceptron.
[0041] Step 6: Input the multi-channel data graph structure corresponding to the test set into the trained node value prediction model based on graph attention network and multi-layer perceptron to obtain the prediction result of the node value.
[0042] Step 7: Calculate the trend change confidence based on the prediction results of the node value, and adjust the monitoring frequency based on the trend change confidence.
[0043] Step 7.1: Based on the prediction results of the node value, calculate the trend change confidence of each node.
[0044] remember For Node The sample observation value, that is, the true value of the node value in the test set, is obtained arrive The sample observation value at time is , for The sample observation value at time For Node The trend change of for The trend change at a certain moment, defined as The calculation formula is shown in (4): (4)
[0045] According to the sample observation The node value is calculated at arrive The trend change at time is , and then according to the standard deviation calculation formula, the standard deviation is ,in, is the average value of the trend change, and .
[0046] According to the node exist The predicted sample value at time , which is the prediction result of the node value obtained in step 6, and the estimated value of the trend change is calculated to be .
[0047] Calculate an estimate of the amount of trend change and before The standard deviation of the true value of the trend change at each moment ,Right now The standard deviation of Confidence of trend change of nodes at the moment: (5)
[0048] in, For Node exist The confidence level of trend change at a given moment.
[0049] Step 7.2: Calculate the overall trend change confidence based on the trend change confidence of each node.
[0050] Take the square root of the trend change confidence of each node and get the final overall trend change confidence. , the calculation formula is shown in (6): (6)
[0051] Step 7.3: Based on the overall trend change confidence calculation results, update the monitoring frequency interval within the set range to adjust the monitoring frequency.
[0052] The maximum monitoring frequency interval is , the minimum monitoring frequency interval is The frequency interval can be adjusted within the range of between, Monitoring frequency interval at all times , set the maximum acceptable inaccuracy .
[0053] if , increase the monitoring frequency and reduce the monitoring interval. If , reduce the monitoring frequency, increase the time interval, and the formula for updating the monitoring frequency interval is: (7)
[0054] if The maximum monitoring frequency interval is exceeded, i.e. Since the monitoring interval range is set, the monitoring frequency interval is adjusted to .
[0055] Compared with the prior art, the beneficial effects of the present invention are:
[0056] The technical solution proposed in the present invention takes into account the data characteristics of multi-channel variables in the manufacturing industry, and performs data processing based on its characteristics, which can maximize the restoration of the characteristics of the original data; the node value prediction model designed based on graph attention network and multi-layer perceptron can fully learn the time series information of each variable and take into account the mutual influence between variables, and can achieve more accurate variable trend prediction; the monitoring frequency adjustment designed based on trend change confidence has the ability to deeply perceive the overall trend of all variables, thereby realizing rapid response adjustment of monitoring frequency and precise focusing on trend changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flowchart of a method for adjusting manufacturing data monitoring frequency based on time series diagram prediction in an embodiment of the present invention.
[0058] Figure 2 Schematic diagram of manufacturing multi-channel dataset input and label division in an embodiment of the present invention.
[0059] Figure 3 Schematic diagram of a graph construction method based on correlation coefficient calculation in an embodiment of the present invention.
[0060] Figure 4 A structural diagram of a node value prediction model based on a graph attention network and a multi-layer perceptron in an embodiment of the present invention.
[0061] Figure 5 Schematic diagram of a feature aggregation method based on a graph attention network in an embodiment of the present invention.
[0062] Figure 6 A structural diagram of a feature mixing module in an embodiment of the present invention.
[0063] Figure 7A structural diagram of a time mixing module in an embodiment of the present invention.
[0064] Figure 8 A structural diagram of a time projection module in an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0066] A method for adjusting the frequency of manufacturing data monitoring based on time series graph prediction, such as Figure 1 As shown, the following steps are included:
[0067] Step 1: Construct a manufacturing multi-channel data set and preprocess and divide the manufacturing channel data in the manufacturing multi-channel data set to obtain a training set, a validation set, and a test set; the preprocessing includes data cleaning, interpolation, and timestamp unification to obtain manufacturing multi-channel data with the same timestamp, unified granularity, and complete content.
[0068] Step 1.1: Obtain a manufacturing multi-channel data set; the manufacturing multi-channel data set includes a number of manufacturing channel data, each manufacturing channel data is a time series, representing the data values of various attributes in a certain channel of the manufacturing industry at different timestamps.
[0069] The manufacturing multi-channel data set in this embodiment includes manufacturing channel data of seven channels: warehousing, carriage, transaction, entrustment, settlement, tax payment and transportation. The manufacturing channel data of each channel includes different attributes. For example, the transportation channel includes attributes such as transportation efficiency, accurate delivery rate, and transportation raw material control rate. Each attribute has a data value.
[0070] Step 1.2: Perform data cleaning on the manufacturing channel data in the manufacturing multi-channel data set to obtain the cleaned manufacturing channel data.
[0071] Step 1.3: According to the attribute characteristics of the manufacturing channel data, an interpolation filling algorithm is used to supplement the missing values in the manufacturing channel data after data cleaning; the interpolation filling algorithm includes linear interpolation, polynomial interpolation and smoothing interpolation.
[0072] If there is a linear relationship between the data values of a certain attribute, or the trend of the data values is a straight line or an approximate straight line, use linear interpolation. Linear interpolation is one of the simplest interpolation methods. If there is a linear relationship between the missing data values, the missing values can be estimated by linear interpolation through the known data values.
[0073] If the trend of changes between the data values of a certain attribute can be approximately described by a polynomial of a lower degree, or the trend of changes in the data values is not linear but still relatively smooth, use polynomial interpolation for fitting. The polynomial interpolation method uses polynomial functions to fit known data values, and then estimates the missing values through these polynomials. The specific polynomial interpolation method can use Lagrange interpolation.
[0074] If the data value of a certain attribute has a certain amount of noise or fluctuation, and it is necessary to remove the noise and retain the trend, or when the data value has large fluctuations or noise, using smooth interpolation can help smooth the data and retain the trend, making the interpolation result more interpretable and predictable. Smooth interpolation methods use smoothing techniques (such as moving average or local regression) to estimate missing values to reduce the noise introduced by interpolation.
[0075] Step 1.4: Use a timestamp resampling algorithm to unify the timestamps of the manufacturing channel data of each channel after supplementing the missing values, so as to obtain the manufacturing channel data with aligned timestamps and uniform granularity; the timestamp resampling algorithm includes an aggregation algorithm based on a sliding window and an interpolation resampling algorithm.
[0076] There are two situations in timestamp resampling. The first is the conversion from a finer time granularity to a coarser time granularity, for example, the original data with a daily granularity is converted to data with a monthly granularity. The second is the conversion of data with a coarser time granularity to a finer time granularity.
[0077] For the first case, the data needs to be compressed and a sliding window-based aggregation algorithm is used. This method divides the time series data into windows of fixed size and then aggregates the data in each window using average aggregation. This way, the original time series data can be compressed to a higher level of time interval.
[0078] For the second case, the data needs to be expanded and an interpolation resampling algorithm is used. This algorithm refers to the several interpolation algorithms in step 1.3. Different interpolation algorithms are also selected according to different data characteristics. Ultimately, manufacturing channel data with aligned timestamps and uniform granularity can be obtained.
[0079] Step 1.5: Normalize the manufacturing channel data with aligned timestamps and uniform granularity to obtain normalized manufacturing channel data.
[0080] The normalization method in this implementation is: for each attribute data value, find the maximum and minimum values, and project all data values into the range of 0-1 through the normalization calculation formula. The normalization formula of each attribute data value is shown in (8): (8)
[0081] in, is the normalized data value of a certain attribute at a certain moment, is the data value of a certain attribute before normalization at a certain moment, The minimum value of the data value of a certain attribute; The maximum value of the data value of a certain attribute.
[0082] Step 1.6: Divide the normalized manufacturing channel data into training set, validation set and test set according to the set ratio.
[0083] In this implementation, the training set, validation set, and test set are divided in a ratio of 8:1:1.
[0084] Step 2: Divide the manufacturing channel data in the training set, validation set, and test set according to the capture window and prediction step size, and divide the manufacturing channel data into prediction samples and true value labels; the true value label is the true value of each prediction sample at a future moment.
[0085] The method for dividing the manufacturing channel data in the training set, the validation set and the test set according to the interception window and the prediction step size is specifically as follows:
[0086] like Figure 2 As shown, let the number of attributes be , the size of the time window is , the prediction step length is b , using the size The interception window intercepts the manufacturing channel data along the timestamp sequence, and each interception obtains A set of prediction samples corresponding to all attributes within a moment and the following The real value label at the moment, then the interception window slides back along the timestamp by one prediction step and continues to intercept until the interception window reaches the last timestamp, that is, Prediction samples at time Predict this After a moment The true value label corresponding to the predicted sample at the moment .
[0087] In this embodiment, the prediction step length is .
[0088] Step 3: If Figure 3 As shown, graph structure modeling is performed on the prediction samples in the training set, validation set, and test set to obtain a multi-channel data graph structure.
[0089] Specifically: for each prediction sample, The data value of the attribute is independent nodes, the node embedding representation The corresponding attribute of the node The vector formed by concatenating the data values at each moment in time order, that is, ,The edges between nodes are calculated by correlation and stored using the adjacency matrix.
[0090] The method for determining the edges between nodes by correlation calculation is:
[0091] According to the embedding representation of each node , calculate the Pearson correlation coefficient between each pair, and set a retention threshold. If the Pearson correlation coefficient between two nodes is higher than the retention threshold, it is considered that there is a significant association between them, and there is an edge between the two nodes, and the edge is stored in the adjacency matrix Otherwise, there is no edge.
[0092] The retention threshold in this embodiment is 0.6.
[0093] Assume that the embedding representations of the two nodes are and , and the calculation formula of their Pearson correlation coefficient is shown in formula (9): (9)
[0094] in, represents the Pearson correlation coefficient, and Represents the embedding representation of two nodes respectively. The value of the dimension, Represents the value in the embedding representation of the node The average value of Represents the value in the embedding representation of the node The average value of .
[0095] After completing this operation for all node pairs, the complete multi-channel data graph structure can be obtained, including node embedding representation and edge adjacency matrix representation, which can be used as input for subsequent prediction models.
[0096] Step 4: Establish a node value prediction model based on graph attention network and multi-layer perceptron; The node value prediction model based on graph attention network and multi-layer perceptron includes a graph attention feature extraction module, a feature mixing module, a time mixing module and a time projection module. The structure diagram of the node value prediction model based on graph attention network and multi-layer perceptron is as follows: Figure 4 shown.
[0097] The graph attention feature extraction module is used to extract all nodes of the multi-channel data graph structure according to Figure 1: Principle of attention mechanism, several layers Graph feature graph attention feature aggregation, each layer Graph feature graph attention feature aggregation calculates the attention weights between nodes, and performs weighted aggregation on the nodes according to the attention weights, aggregates the information of neighboring nodes to the current node, so that the information of each node is fully propagated in the entire multi-channel data graph structure, thereby strengthening the feature information of each node, and finally obtaining the graph attention feature extraction output , and used as the input of the feature mixing module.
[0098] The specific processing steps are: embedding representation of each node, according to The principle of the graph attention mechanism is to take a node as the center and calculate the attention weights between the node and all neighboring nodes.
[0099] For a node , remember the node The set of neighbor nodes is , With neighbor nodes The attention weight is calculated as:
[0100] Using a set of trainable weight matrices The embedding representation of the two nodes respectively and Perform matrix product, project it into the same feature space to get two result vectors, concatenate the result vectors, and use an attention kernel The concatenated result vector Do the dot product, and the dot product calculation result passes through the activation function , and then use Function to get the node and neighbor nodes The attention weight.
[0101] node and nodes The attention weight between As shown in formula (10): (10)
[0102] in, is the trainable weight matrix, and Node and nodes The embedding representation of For Node The embedding representation of the neighbor nodes of is a learnable attention kernel, is the activation function.
[0103] The method for weighted aggregation of nodes according to attention weights is specifically as follows:
[0104] For each node in the multi-channel data graph structure, the embedding representations of all its neighboring nodes are weighted summed, and the calculation result is used to update the embedding representation of the node itself. The embedding representation update method of is as follows: Figure 5 As shown: (11)
[0105] The input multi-channel data graph structure is , for the entire multi-channel data graph structure layer The output of graph feature graph attention feature aggregation is recorded as , No. Layer The graph-to-graph attention feature aggregation process is shown in formula (12): (12)
[0106] in, is the attention weight adjacency matrix, For the layer The input of the graph feature graph attention feature aggregation, that is, layer The output of graph feature graph attention feature aggregation; For the layer Graph Features The output of graph attention feature aggregation.
[0107] By stacking multiple layers Graph feature graph attention feature aggregation allows the information of all nodes to be fully disseminated in the multi-channel data graph structure. Corresponding to the multi-channel manufacturing channel data, it takes into account the mutual influence between different variables. The final graph attention feature extraction output can be described as formula (13): (13)
[0108] in, is the output of graph attention feature extraction, Indicates several layers Graph feature graph attention feature aggregation.
[0109] like Figure 6 As shown, the feature mixing module is used to extract the input graph attention feature and output Flatten, that is, flatten into a vector and concatenate static covariates at the end of the vector Get the concatenated vector, static covariate It can be all supplementary knowledge for auxiliary prediction. The normalized RMB / USD exchange rate at the moment is taken as the static covariate, that is, (If there is no suitable covariate, it can be omitted.) Then, after feature fusion Layer implements static covariates Output of graph attention feature extraction The feature fusion vector is obtained by fusion, and the feature fusion vector is residually connected with the concatenated vector to prevent gradient explosion during training and normalized. The normalized vector is reconstructed to make it consistent with the output of graph attention feature extraction. The dimensions are consistent, and the output result of the final feature mixing module is obtained , and used as the input of the time mixing module.
[0110] The feature fusion The layer consists of a series of layer, Linear layers and Dropout layer.
[0111] Said Layers are used to enhance model stability.
[0112] Said Linear layers are used to incorporate static covariates Output of graph attention feature extraction .
[0113] Said Dropout layers are used to prevent overfitting.
[0114] Output of the feature mixing module and the flattened vector The dimension is consistent with that of the feature mixing module, and the output result of the feature mixing module is reconstructed into the output of the graph attention feature extraction The dimensions are consistent, denoted as , the process can be summarized as formula (14) (14)
[0115] in, is a static covariate, is the output result of the feature mixing module, It is a feature mixing module.
[0116] like Figure 7 As shown, the time mixing module is used to use time mixing The output result of the feature mixing module of the layer input The historical data values of each attribute in the linear combination are combined to fully integrate the time series information and obtain the time mixture. Layer output, the output result of the feature mixing module Mixed with time The layer output is residually connected and then normalized to output the data after time mixing. ; Data after time mixing Output of the feature mixing module The dimensions are consistent.
[0117] The time mixing The layer consists of a series of Fully connected layer, Layer and Dropout layer.
[0118] Data after time blending It is expressed as formula (15): (15)
[0119] in, It is the time mixing module.
[0120] like Figure 8 As shown, the time projection module is used to utilize The fully connected layer mixes the input data over time. Projected to the output dimension of the target, that is, the prediction step length, we get The output of the fully connected layer will be The output of the fully connected layer is normalized to obtain the prediction results of each node value; the node value is the data value of each attribute.
[0121] The dimension of the prediction result should be consistent with the dimension of the corresponding label, that is, , expressed as: (16)
[0122] in, To predict the results, It is the time projection module.
[0123] Step 5: Use the multi-channel data graph structure corresponding to the training set and the validation set to train and adjust the node value prediction model based on the graph attention network and the multi-layer perceptron to obtain a trained node value prediction model based on the graph attention network and the multi-layer perceptron.
[0124] Set various training parameters for node value prediction based on graph attention network and multi-layer perceptron, select the minimization loss function, and the loss function uses the predicted value and true value of each node The mean square error is used to train all the parameters to be trained in the node value prediction model based on the graph attention network and the multi-layer perceptron, as shown in (17). The prediction model is obtained by minimizing the loss function: (17)
[0125] in, is the mean square error.
[0126] Step 6: Input the multi-channel data graph structure corresponding to the test set into the trained node value prediction model based on graph attention network and multi-layer perceptron to obtain the prediction result of the node value.
[0127] Step 7: Calculate the trend change confidence based on the prediction results of the node value, and adjust the monitoring frequency based on the trend change confidence.
[0128] The standard deviation of trend changes of each node is calculated from the training set data, and then the standard deviation of the current trend change prediction value is calculated based on the prediction results. The current trend change confidence is calculated based on the two standard deviations.
[0129] Step 7.1: Since the change trend of each node is different, first calculate the trend change confidence of each node based on the prediction result of the node value.
[0130] remember For Node The sample observation value, that is, the true value of the node value in the test set, can be obtained arrive The sample observation value at time is , for The sample observation value at time For Node The trend change of for The trend change at a certain moment, defined as The calculation formula is shown in (18): (18)
[0131] According to the sample observation The node value is calculated at arrive The trend change at time is , and then according to the standard deviation calculation formula, the standard deviation can be obtained as ,in, is the average value of the trend change, and .
[0132] According to the node exist The predicted sample value at time , which is the prediction result of the node value obtained in step 6, and the estimated value of the trend change is calculated to be .
[0133] Calculate an estimate of the amount of trend change and before The standard deviation of the true value of the trend change at each moment ,Right now The standard deviation of Confidence of trend change of nodes at the moment: (19)
[0134] in, For Node exist The confidence level of the trend change at the moment; in this implementation Take 5.
[0135] Step 7.2: Calculate the overall trend change confidence based on the trend change confidence of each node.
[0136] Since the final frequency adjustment can only select an overall value, and each node has a trend change confidence, the square sum square root method is used. This method can further amplify the dimensions with large trend changes, does not rely on weight calculation, and has good robustness.
[0137] Take the square root of the trend change confidence of each node and get the final overall trend change confidence. , as the input of monitoring frequency adjustment, the calculation formula is shown in (20): (20)
[0138] Step 7.3: Based on the overall trend change confidence calculation results, update the monitoring frequency interval within the set range to adjust the monitoring frequency.
[0139] The maximum monitoring frequency interval is , the minimum monitoring frequency interval is The frequency interval adjustment range must be within between, Monitoring frequency interval at the moment (the inverse of the monitoring frequency) , set the maximum acceptable inaccuracy .
[0140] The overall steps can be summarized as formula (21): (twenty one)
[0141] Specifically: If , indicating that the confidence of trend change is lower than the acceptable threshold, indicating that the predicted trend changes greatly. At this time, the monitoring frequency should be increased and the monitoring interval should be reduced to ensure that the key change trend can be sampled. In this implementation, the next monitoring frequency interval is directly adjusted to the minimum value, that is, .
[0142] if , indicating that the confidence exceeds the acceptance threshold, indicating that the predicted trend changes little, the monitoring frequency can be reduced, and the "reward" increases the time interval. The formula for updating the monitoring frequency interval is: (twenty two)
[0143] if The maximum monitoring frequency interval is exceeded, i.e. Since the monitoring interval range is set, the monitoring frequency interval is adjusted to
Claims
1. A method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction, characterized in that: The steps include: Step 1: Construct a manufacturing multi-channel dataset and preprocess and divide the manufacturing channel data in the manufacturing multi-channel dataset to obtain a training set, a validation set, and a test set; The preprocessing includes data cleaning, interpolation and time stamp unification to obtain multi-channel manufacturing data with the same time stamp, unified granularity and complete content; Step 1 specifically includes: Step 1.1: Obtain a multi-channel data set for manufacturing industry; the multi-channel data set for manufacturing industry includes a number of manufacturing industry channel data, each manufacturing industry channel data is a time series, representing the data values of various attributes in a certain channel of manufacturing industry at different time stamps; Step 1.2: Perform data cleaning on the manufacturing channel data in the manufacturing multi-channel data set to obtain the cleaned manufacturing channel data; Step 1.3: Based on the attribute characteristics of the manufacturing channel data, the missing values in the manufacturing channel data after data cleaning are supplemented by using an interpolation filling algorithm; the interpolation filling algorithm includes linear interpolation, polynomial interpolation and smoothing interpolation; Step 1.4: Use a timestamp resampling algorithm to unify the timestamps of the manufacturing channel data of each channel after supplementing the missing values, so as to obtain the manufacturing channel data with aligned timestamps and uniform granularity; the timestamp resampling algorithm includes an aggregation algorithm based on a sliding window and an interpolation resampling algorithm; Step 1.5: Normalize the manufacturing channel data with aligned timestamps and uniform granularity to obtain normalized manufacturing channel data; Step 1.6: Divide the normalized manufacturing channel data into training set, validation set and test set according to the set ratio; Step 2: Divide the manufacturing channel data in the training set, validation set, and test set according to the interception window and prediction step size, and divide the manufacturing channel data into prediction samples and true value labels; the true value label is the true value at the future moment corresponding to each prediction sample; Step 3: Perform graph structure modeling on the prediction samples in the training set, validation set, and test set to obtain a multi-channel data graph structure; Step 4: Establish a node value prediction model based on graph attention network and multi-layer perceptron; Step 5: Use the multi-channel data graph structure corresponding to the training set and the validation set to train and adjust the node value prediction model based on the graph attention network and the multi-layer perceptron to obtain a trained node value prediction model based on the graph attention network and the multi-layer perceptron; Step 6: Input the multi-channel data graph structure corresponding to the test set into the trained node value prediction model based on graph attention network and multi-layer perceptron to obtain the prediction result of the node value; Step 7: Calculate the trend change confidence based on the prediction results of the node value, and adjust the monitoring frequency according to the trend change confidence; Step 7 specifically includes: Step 7.1: Calculate the trend change confidence of each node based on the prediction results of the node value; remember For Node The sample observation value, that is, the true value of the node value in the test set, is obtained arrive The sample observation value at time is , for The sample observation value at time For Node The trend change of for The trend change at a certain moment, defined as The calculation formula is shown in (1): (1) According to the sample observation The node value is calculated at arrive The trend change at time is , and then according to the standard deviation calculation formula, the standard deviation is ,in, is the average value of the trend change, and ; According to the node exist The predicted sample value at time , which is the prediction result of the node value obtained in step 6, and the estimated value of the trend change is calculated to be ; Calculate an estimate of the amount of trend change and before The standard deviation of the true value of the trend change at each moment ,Right now The standard deviation of Confidence of trend change of nodes at the moment: (2) in, For Node exist Confidence of trend change at each moment; Step 7.2: Calculate the overall trend change confidence based on the trend change confidence of each node; Take the square root of the trend change confidence of each node and get the final overall trend change confidence. , the calculation formula is shown in (3): (3) Step 7.3: Based on the overall trend change confidence calculation results, the monitoring frequency interval is updated within the set range to adjust the monitoring frequency; The maximum monitoring frequency interval is , the minimum monitoring frequency interval is The frequency interval can be adjusted within the range of between, Monitoring frequency interval at all times , set the maximum acceptable inaccuracy ; if , increase the monitoring frequency and reduce the monitoring interval. If , reduce the monitoring frequency, increase the time interval, and the formula for updating the monitoring frequency interval is: (4) if The maximum monitoring frequency interval is exceeded, i.e. Since the monitoring interval range is set, the monitoring frequency interval is adjusted to .
2. According to the method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction according to claim 1, it is characterized in that: The method for dividing the manufacturing channel data in the training set, validation set, and test set according to the interception window and prediction step size described in step 2 is as follows: Assume that the number of attributes is , the size of the time window is , the prediction step length is b , using the size The interception window intercepts the manufacturing channel data along the timestamp sequence, and each interception obtains A set of prediction samples corresponding to all attributes within a moment and the following The real value label at the moment, then the interception window slides back along the timestamp by one prediction step and continues to intercept until the interception window reaches the last timestamp, that is, Prediction samples at time Predict this After a moment The true value label corresponding to the predicted sample at the moment .
3. The method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction according to claim 1 is characterized in that: Step 3 is as follows: for each prediction sample, The data value of the attribute is independent nodes, and the node embedding representation The corresponding attribute of the node The vector formed by concatenating the data values at each moment in time order, that is, ,The edges between nodes are obtained by correlation calculation and stored using the adjacency matrix; The method for determining the edges between nodes by correlation calculation is: According to the embedding representation of each node , calculate the Pearson correlation coefficient between each node, and set a retention threshold. If the Pearson correlation coefficient between two nodes is higher than the retention threshold, there is an edge between the two nodes, and the edge is stored in the adjacency matrix Otherwise, there is no edge.
4. The method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction according to claim 1, characterized in that: The node value prediction model based on the graph attention network and the multi-layer perceptron described in step 4 includes a graph attention feature extraction module, a feature mixing module, a time mixing module and a time projection module; The graph attention feature extraction module is used to extract all nodes of the multi-channel data graph structure according to Figure 1: Principle of attention mechanism, several layers Graph attention feature aggregation, each layer Graph feature graph attention feature aggregation calculates the attention weights between nodes, and performs weighted aggregation on the nodes according to the attention weights, aggregates the information of neighboring nodes to the current node, so that the information of each node is fully propagated in the entire multi-channel data graph structure, thereby strengthening the feature information of each node, and finally obtaining the graph attention feature extraction output , and used as the input of the feature mixing module; The feature mixing module is used to extract and output the input graph attention features Flatten, that is, flatten into a vector and concatenate static covariates at the end of the vector Get the concatenated vector, and then perform feature fusion Layer implements static covariates Output of graph attention feature extraction The feature fusion vector is obtained by fusion, the feature fusion vector is residually connected with the concatenated vector and normalized, and the normalized vector is reconstructed to make it consistent with the output of the graph attention feature extraction. The dimensions are consistent, and the output result of the final feature mixing module is obtained , and used as the input of the time mixing module; The time mixing module is used to use time mixing The output result of the feature mixing module of the layer input The historical data values of each attribute in the linear combination are combined to fully integrate the time series information and obtain the time mixture. Layer output, the output result of the feature mixing module Mixed with time The layer output is residually connected and then normalized to output the data after time mixing. ; The data after time mixing Output of the feature mixing module The dimensions are consistent; The time projection module is used to utilize The fully connected layer inputs the time-mixed data Projected to the output dimension of the target, that is, the prediction step length, we get The output of the fully connected layer will be The output of the fully connected layer is normalized to obtain the prediction results of each node value; the node value is the data value of each attribute.
5. The method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction according to claim 4 is characterized in that: The specific processing steps of the graph attention feature extraction module are: The embedding representation of each node is based on The principle of graph attention mechanism is to take a node as the center and calculate the attention weight between the node and all neighboring nodes; For a node , remember the node The set of neighbor nodes is , With neighbor nodes The attention weight is calculated as: Using a set of trainable weight matrices The embedding representation of the two nodes respectively and Perform matrix product, project it into the same feature space to get two result vectors, concatenate the result vectors, and use an attention kernel The concatenated result vector Do the dot product, and the dot product calculation result passes through the activation function , and then use Function to get the node and neighbor nodes The attention weight of node and nodes The attention weight between As shown in formula (5): (5) in, is the trainable weight matrix, and Node and nodes The embedding representation of For Node The embedding representation of the neighbor nodes of is a learnable attention kernel, is the activation function; The method for weighted aggregation of nodes according to attention weights is specifically as follows: For each node in the multi-channel data graph structure, the embedding representations of all its neighboring nodes are weighted summed, and the calculation result is used to update the embedding representation of the node itself. The embedding representation update method of is shown in formula (6): (6) The input multi-channel data graph structure is , for the entire multi-channel data graph structure layer The output of graph feature graph attention feature aggregation is recorded as , No. Layer The graph feature graph attention feature aggregation process is shown in formula (7): (7) in, is the attention weight adjacency matrix, For the layer The input of the graph feature graph attention feature aggregation, that is, layer The output of graph feature graph attention feature aggregation; For the layer Graph Features The output of graph attention feature aggregation.
6. The method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction according to claim 4 is characterized in that: The feature fusion The layer consists of a series of layer, Linear layers and Random dropout layer; the time mixing The layer consists of sequentially connected Fully connected layer, Layer and Dropout layer.
Citation Information
Patent Citations
Deep learning-based key path aging time sequence prediction method under time-varying load
CN118673856A
Collective configuration of systems using trustworthy graph artificial intelligence with uncertainty propagation
US20230244970A1
