A method for adjusting the frequency of manufacturing data monitoring based on time series graph prediction

Through the method based on timing chart prediction, the multi-channel data of manufacturing industry is predicted using graph attention network and multi-layer perceptron model, which solves the problems of monitoring frequency adjustment lag and difficulty in accurate prediction in the existing technology, and achieves more accurate Trend prediction and monitoring frequency adjustment.

CN119046670BActive Publication Date: 2025-02-11NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411533360.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The existing multi-channel data monitoring frequency adjustment model in manufacturing has lag and is difficult to accurately predict complex multi-channel data, and it is impossible to uniformly adjust the overall monitoring frequency.

Method used

Using a time series graph prediction method, by constructing multi-channel data sets in manufacturing and pre-processing, the node value prediction model of graph attention network and multi-layer perceptron is accurately predicted for data trend changes, and then the overall monitoring frequency is adjusted. .

Benefits of technology

It has achieved more 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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046670B_ABST
    Figure CN119046670B_ABST
Patent Text Reader

Abstract

The present invention provides a method for adjusting the monitoring frequency of manufacturing data based on time series graph prediction, and relates to the technical field of dynamic adaptive monitoring of multi-channel data in manufacturing. The technical solution proposed by 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 the graph attention network and the multi-layer perceptron can fully learn the time series information of each variable and consider the mutual influence between the variables, so as to achieve more accurate variable trend prediction; the monitoring frequency adjustment designed based on the confidence of trend change has the ability to deeply perceive the overall trend of all variables, thereby achieving rapid response adjustment of the monitoring frequency and precise focus on trend changes.
Need to check novelty before this filing date? Find Prior Art

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 to collaboratively perceive the trend changes in the data. Dynamic adaptive data monitoring 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 assume the function of focusing on the hidden risks 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 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;

[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: Based on the attribute characteristics of the manufacturing channel data, the missing values ​​in the cleaned manufacturing channel data are supplemented by using an interpolation filling algorithm; 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 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;

[0017] 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 is as follows: assuming that the number of attributes is N, the size of the time window is T, and the prediction step is b, the manufacturing channel data is intercepted in the order of timestamps using an interception window of size T+b, and a set of prediction samples corresponding to all attributes within T moments and the true value labels of the next b moments are obtained each time the interception is performed, and then the interception window slides backward along the timestamp by one prediction step to continue intercepting until the interception window reaches the last timestamp, that is, the prediction samples X of T moments are used.input ∈R N ×T Predict the true value label X corresponding to the predicted sample at b moments after these T moments label ∈R N×b ;

[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 values ​​of the N attributes are taken as N independent nodes, and the node embedding representation h is a vector of the data values ​​of the corresponding attributes of the node at T moments concatenated in chronological order, that is, h∈R 1×T ,The edges between nodes are obtained by correlation calculation 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 h of each node, the Pearson correlation coefficient is calculated between two nodes, and a retention threshold is set. 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 E, 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 perform several layers of GAT graph attention feature aggregation on all nodes of the multi-channel data graph structure according to the GAT graph attention mechanism principle, calculate the attention weights between nodes according to each layer of GAT graph attention feature aggregation, and perform weighted aggregation on the nodes according to the attention weights, aggregate the information of neighboring nodes to the current node, so that the information of each node is fully propagated in the entire graph, thereby strengthening the feature information of each node, and finally obtaining the graph attention feature extraction output X GAT , and used as the input of the feature mixing module;

[0025] The feature mixing module is used to extract the input graph attention features and output X GAT Flatten, that is, flatten into a vector, and concatenate the static covariate s at the end of the vector to obtain the concatenated vector, and then pass the feature fusion MLP layer to realize the static covariate s and the graph attention feature extraction output X GATThe 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 graph attention feature extraction output X GAT The dimensions are consistent, and the final output result of the feature mixing module is obtained. f , and used as the input of the time mixing module;

[0026] The time mixing module is used to use the time mixing MLP layer to input the output result X of the feature mixing module f The historical data values ​​of each attribute in the linear combination are combined to fully integrate the time series information and obtain the output of the time mixing MLP layer. The output result of the feature mixing module X f Perform residual connection with the output of the time-mixed MLP layer, and then normalize it to output the time-mixed data X t ; The data X after time mixing t The output of the feature mixing module X f The dimensions are consistent;

[0027] The time projection module is used to use the FullConnection layer to transform the input time-mixed data X t Projecting to the output dimension of the target, i.e., the prediction step length, obtains the output of the FullConnection layer, normalizes the output of the FullConnection layer, and obtains the prediction result 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] For the embedding representation of each node, according to the principle of GAT graph attention mechanism, with one node as the center, the attention weight between the node and all neighboring nodes is calculated;

[0030] For a node i , record the node i The set of neighbor nodes is N i ,Node i With neighboring nodes j The attention weight is calculated as:

[0031] Use a set of trainable weight matrices W to represent the embeddings h of the two nodes respectively. i and h j Perform matrix product, project it into the same feature space to get two result vectors, concatenate the result vectors, and use an attention kernel a with the concatenated result vector [Wh i ||Whj ]Dot product, the dot product calculation result passes through the activation function ReLU, and then uses the softmax function to get the node Node i and neighbor node Node j The attention weight of

[0032] Node i and Node j The attention weight α between ij As shown in formula (1):

[0033]

[0034] Among them, W is the trainable weight matrix, h i and h j Node i and Node j The embedding representation of h k Node i The embedding representation of the neighbor nodes of , a is the learnable attention kernel, and ReLU is the activation function;

[0035] The method for weighted aggregation of nodes according to attention weights is specifically as follows:

[0036] 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. i The embedding representation update method of is shown in formula (2):

[0037]

[0038] The input multi-channel data graph structure is X input′ , the output of the l-layer GAT graph attention feature aggregation for the entire multi-channel data graph structure is recorded as The GAT graph attention feature aggregation process at layer l is shown in formula (3):

[0039]

[0040] Among them, A t is the attention weight adjacency matrix, is the input of the attention feature aggregation of the GAT graph at the lth layer, i.e., the output of the attention feature aggregation of the GAT graph at the l-1th layer; is the output of the GAT graph attention feature aggregation at the lth layer;

[0041] Furthermore, the feature fusion MLP layer includes a ReLU layer, a Linear layer and a dropout random inactivation layer connected in sequence;

[0042] Furthermore, the time-mixed MLP layer includes a FullConnection layer, a ReLU layer, and a dropout random inactivation layer connected in sequence;

[0043] 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;

[0044] 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;

[0045] 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;

[0046] Step 7.1: Calculate the trend change confidence of each node based on the prediction results of the node value;

[0047] Let z be the node i The sample observation value, that is, the true value of the node value in the test set, is Z = (z0, z1, ..., z q , ..., z t ), z q is the sample observation value at time q, and r is the node Node i The trend change, r q is the trend change at time q, and r is defined q The calculation formula is shown in (4):

[0048] r q =z q+1 -z q (4)

[0049] According to the sample observation value Z=(z0,z1,…,z q ,…,z t ) The trend change of the node value from time 0 to time t-1 is calculated as R = (r0, r1, ..., r q ,…,r t-1 ), and then according to the standard deviation calculation formula, the standard deviation is in, is the average value of the trend change, and

[0050] According to the node i The predicted sample value at time t+1 That is, the prediction result of the node value obtained in step 6, and the estimated value of the trend change is calculated as

[0051] Calculate an estimate of the amount of trend change and the standard deviation of the true value of the trend change in the previous w moments Right now The standard deviation of is calculated, and the confidence of the trend change of the node at time t is calculated by formula (5):

[0052]

[0053] in, Node i Confidence of trend change at time t;

[0054] Step 7.2: Calculate the overall trend change confidence based on the trend change confidence of each node;

[0055] Take the square root of the trend change confidence of each node and get the final overall trend change confidence c. t , the calculation formula is shown in (6):

[0056]

[0057] 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;

[0058] The maximum monitoring frequency interval is T max , the minimum monitoring frequency interval is T min The frequency interval can be adjusted within the range of T min With T max The monitoring frequency interval at time t is T t , set the maximum acceptable inaccuracy γ;

[0059] If c t <1-γ, increase the monitoring frequency and reduce the monitoring interval. If c t ≥1-γ, reduce the monitoring frequency, increase the time interval, and the formula for updating the monitoring frequency interval is:

[0060]

[0061] If T t+1 Exceeds the maximum monitoring frequency interval, i.e. T t+1 >T max Since the monitoring interval range is set, the monitoring frequency interval is adjusted to T t+1 =T max.

[0062] Compared with the prior art, the beneficial effects of the present invention are:

[0063] 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

[0064] Figure 1 A flowchart of a method for adjusting the frequency of manufacturing data monitoring based on time series diagram prediction in an embodiment of the present invention;

[0065] Figure 2 Schematic diagram of manufacturing multi-channel data set input and label division in an embodiment of the present invention;

[0066] Figure 3 Schematic diagram of a graph construction method based on correlation coefficient calculation in an embodiment of the present invention;

[0067] 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;

[0068] Figure 5 Schematic diagram of a feature aggregation method based on a graph attention network in an embodiment of the present invention;

[0069] Figure 6 A structural diagram of a feature mixing module in an embodiment of the present invention;

[0070] Figure 7 A structural diagram of a time mixing module in an embodiment of the present invention;

[0071] Figure 8 A structural diagram of a time projection module in an embodiment of the present invention. DETAILED DESCRIPTION

[0072] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0073] 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:

[0074] 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;

[0075] 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;

[0076] The manufacturing multi-channel data set in this embodiment includes manufacturing channel data of seven channels: warehousing, transportation, 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.

[0077] 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;

[0078] 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;

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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;

[0083] 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.

[0084] 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.

[0085] For the second case, the data needs to be expanded and an interpolation resampling algorithm is used. The algorithm refers to the several interpolation algorithms in step 1.3. Different interpolation algorithms are also selected according to different data characteristics. Finally, the manufacturing channel data with aligned timestamps and uniform granularity can be obtained.

[0086] Step 1.5: Normalize the manufacturing channel data with aligned timestamps and uniform granularity to obtain normalized manufacturing channel data;

[0087] 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 a normalization calculation formula. The normalization formula for each attribute data value is shown in (8):

[0088]

[0089] Among them, x′ is the data value of a certain attribute after normalization at a certain time, x is the data value of a certain attribute before normalization at a certain time, and x min is the minimum value of the data value of a certain attribute; x max The maximum value of the data value of a certain attribute;

[0090] Step 1.6: Divide the normalized manufacturing channel data into training set, validation set and test set according to the set ratio;

[0091] In this implementation, the training set, validation set, and test set are divided in a ratio of 8:1:1;

[0092] 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;

[0093] 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:

[0094] like Figure 2 As shown in the figure, let the number of attributes be N, the size of the time window be T, and the prediction step be b. Use a capture window of size T+b to capture the manufacturing channel data in the order of timestamps. Each capture will obtain a set of prediction samples corresponding to all attributes within T moments and the true value labels of the next b moments. Then, the capture window will slide back along the timestamp by one prediction step and continue to capture until the capture window reaches the last timestamp, that is, the prediction samples X at T moments are used. input ∈R N ×T Predict the true value label X corresponding to the predicted sample at b moments after these T moments label ∈R N×b ;

[0095] In this implementation, the prediction step length is b=1;

[0096] 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;

[0097] Specifically, for each prediction sample, the data values ​​of the N attributes are taken as N independent nodes, and the node embedding representation h is a vector of the data values ​​of the corresponding attributes of the node at T moments concatenated in chronological order, that is, h∈R 1×T ,The edges between nodes are obtained by correlation calculation and stored using the adjacency matrix;

[0098] The method for determining the edges between nodes by correlation calculation is:

[0099] According to the embedding representation h of each node, the Pearson correlation coefficient is calculated between two nodes, and a retention threshold is set. If the Pearson correlation coefficient between two nodes is higher than the retention threshold, it is considered that there is a significant correlation between them, and there is an edge between the two nodes, and the edge is stored in the adjacency matrix E, otherwise there is no edge;

[0100] The retention threshold in this implementation is 0.6;

[0101] Assume that the embedding representations of the two nodes are [x1, x2, ..., x T] and [y1, y2, ..., y T ], and the calculation formula of their Pearson correlation coefficient is shown in formula (9):

[0102]

[0103] Among them, Pearson represents the Pearson correlation coefficient, x m and m Respectively represent the value of the mth dimension in the embedding representation of the two nodes, represents the value x in the embedding representation of the node m The average value of represents the value y in the embedding representation of the node m The average value of

[0104] After completing this operation for all node pairs, we can obtain the complete multi-channel data graph structure, including node embedding representation and edge adjacency matrix representation, which is used as the input of the subsequent prediction model;

[0105] Step 4: Establish a node value prediction model based on graph attention network and multi-layer perceptron;

[0106] 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 As shown;

[0107] The graph attention feature extraction module is used to perform several layers of GAT graph attention feature aggregation on all nodes of the multi-channel data graph structure according to the GAT graph attention mechanism principle, calculate the attention weights between nodes according to each layer of GAT graph attention feature aggregation, and perform weighted aggregation on the nodes according to the attention weights, aggregate the information of neighboring nodes to the current node, so that the information of each node is fully propagated throughout the graph, thereby strengthening the feature information of each node, and finally obtaining the graph attention feature extraction output x GAT , and used as the input of the feature mixing module;

[0108] The specific processing steps are as follows: for each node’s embedded representation, based on the GAT graph attention mechanism principle, with one node as the center, calculate the attention weights between the node and all neighboring nodes;

[0109] For a node i , record the node i The set of neighbor nodes is N i ,Node i With neighboring nodes jThe attention weight is calculated as:

[0110] Use a set of trainable weight matrices W to represent the embeddings h of the two nodes respectively. i and h j Perform matrix product, project it into the same feature space to get two result vectors, concatenate the result vectors, and use an attention kernel a with the concatenated result vector [Wh i ||Wh j ]Dot product, the dot product calculation result passes through the activation function ReLU, and then uses the softmax function to get the node Node i and neighbor node Node j The attention weight of

[0111] Node i and Node j The attention weight α between ij As shown in formula (10):

[0112]

[0113] Among them, W is the trainable weight matrix, h i and h j Node i and Node j The embedding representation of h k Node i The embedding representation of the neighbor nodes of , a is the learnable attention kernel, and ReLU is the activation function;

[0114] The method for weighted aggregation of nodes according to attention weights is specifically as follows:

[0115] 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. i The embedding representation update method of is as follows: Figure 5 As shown:

[0116]

[0117] The input multi-channel data graph structure is X input′ , the output of the l-layer GAT graph attention feature aggregation for the entire multi-channel data graph structure is recorded as The GAT graph attention feature aggregation process at the lth layer is shown in formula (12):

[0118]

[0119] Among them, At is the attention weight adjacency matrix, is the input of the attention feature aggregation of the GAT graph at the lth layer, i.e., the output of the attention feature aggregation of the GAT graph at the l-1th layer; is the output of the GAT graph attention feature aggregation at the lth layer;

[0120] By stacking multiple layers of GAT graph attention feature aggregation, the information of all nodes can be fully propagated in the multi-channel data graph structure. Corresponding to the multi-channel manufacturing channel data, the mutual influence between different variables is taken into account. The final graph attention feature extraction output can be described as formula (13):

[0121] X GAT =GAT(X input′ ) (13)

[0122] Among them, X GAT is the output of graph attention feature extraction, GAT represents the aggregation of several layers of GAT graph attention features;

[0123] like Figure 6 As shown, the feature mixing module is used to extract the input graph attention feature and output X GAT Flattening, that is, flattening into a vector, and concatenating the static covariate s at the end of the vector to obtain the concatenated vector. The static covariate s can be the supplementary knowledge for all auxiliary predictions. Here, the normalized RMB / USD exchange rate at the input time T is used as the static covariate, that is, s∈R 1×T (If there is no suitable covariate, it can be omitted.) Then, the static covariate s and the graph attention feature extraction output X are realized through the feature fusion MLP layer. GAT 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 normalize it. The normalized vector is reconstructed to make it consistent with the graph attention feature extraction output X GAT The dimensions are consistent, and the final output result of the feature mixing module is obtained. f , and used as the input of the time mixing module;

[0124] The feature fusion MLP layer includes a ReLU layer, a Linear layer and a dropout random inactivation layer connected in sequence;

[0125] The ReLU layer is used to enhance the stability of the model;

[0126] The Linear layer is used to fuse the static covariate s with the graph attention feature extraction output X GAT ;

[0127] The dropout random inactivation layer is used to prevent overfitting;

[0128] The output of the feature mixing module is consistent with the dimension of the flattened vector X. The output of the feature mixing module is reconstructed into the output of the graph attention feature extraction X GAT The dimensions are consistent, denoted as X f , the process can be summarized as formula (14):

[0129] X f =FeatureMix(X GAT ,s) (14)

[0130] Among them, s is a static covariate, X f is the output result of the feature mixing module, FeatureMix is ​​the feature mixing module;

[0131] like Figure 7 As shown, the time mixing module is used to use the time mixing MLP layer to input the output result X of the feature mixing module f The historical data values ​​of each attribute in the linear combination are combined to fully integrate the time series information and obtain the output of the time mixing MLP layer. The output result of the feature mixing module X f Perform residual connection with the output of the time-mixed MLP layer, and then normalize it to output the time-mixed data X t ; Data X after time mixing t The output of the feature mixing module X f The dimensions are consistent;

[0132] The time-mixed MLP layer includes a FullConnection layer, a ReLU layer, and a dropout random inactivation layer connected in sequence;

[0133] The data after time mixing X t It is expressed as formula (15):

[0134] X t =TimeMix(X f ) (15)

[0135] Among them, TimeMix is ​​a time mixing module;

[0136] like Figure 8 As shown, the time projection module is used to use the FullConnection layer to input the time-mixed data X tProjecting to the output dimension of the target, i.e., the prediction step length, obtains the output of the FullConnection layer, normalizes the output of the FullConnection layer, and obtains the prediction result of each node value; the node value is the data value of each attribute;

[0137] The dimension of the prediction result should be consistent with the dimension of the corresponding label, that is, X output ∈R N×1 , expressed as:

[0138] X output =TimeProject(X t ) (16)

[0139] Among them, X output To predict the results, TimeProject is the time projection module;

[0140] 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;

[0141] Set various training parameters for node value prediction based on graph attention network and multi-layer perceptron, select the minimization loss function, the loss function uses the mean square error (MSE) of the predicted value and the true value of each node to train all the parameters to be trained in the node value prediction model based on graph attention network and multi-layer perceptron, as shown in (17), and minimize the loss function to obtain the prediction model:

[0142] MSE=||X label -X output ||2 (17)

[0143] Among them, MSE is the mean square error;

[0144] 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;

[0145] 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;

[0146] 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.

[0147] 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;

[0148] Let z be the node i The sample observation value, that is, the true value of the node value in the test set, can be obtained as Z = (z0, z1, ..., z q , ..., z t ), z q is the sample observation value at time q, and r is the node Node i The trend change, r q is the trend change at time q, and r is defined q The calculation formula is shown in (18):

[0149] r q =z q+1 -z q (18)

[0150] According to the sample observation value Z=(z0,z1,…,z q ,…,z t ) The trend change of the node value from time 0 to time t-1 is calculated as R = (r0, r1, ..., r q ,…,r t-1 ), 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

[0151] According to the node i The predicted sample value at time t+1 That is, the prediction result of the node value obtained in step 6, and the estimated value of the trend change is calculated as

[0152] Calculate an estimate of the amount of trend change and the standard deviation of the true value of the trend change in the previous w moments Right now The standard deviation of is calculated, and the confidence of the trend change of the node at time t is calculated by formula (19):

[0153]

[0154] in, Node i The confidence level of the trend change at time t; in this embodiment, w is 5;

[0155] Step 7.2: Calculate the overall trend change confidence based on the trend change confidence of each node;

[0156] 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.

[0157] Take the square root of the trend change confidence of each node and get the final overall trend change confidence c. t , as the input of monitoring frequency adjustment, the calculation formula is shown in (20):

[0158]

[0159] 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;

[0160] The maximum monitoring frequency interval is T max , the minimum monitoring frequency interval is T min The frequency interval adjustment range must be within T min With T max The monitoring frequency interval at time t (the inverse of the monitoring frequency) T t , set the maximum acceptable inaccuracy γ;

[0161] The overall steps can be summarized as formula (21):

[0162] T t+1 =f(T t ,c t ,γ) (21)

[0163] Specifically: If c t <1-γ, 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, T t+1 =T min .

[0164] If c t ≥1-γ, 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:

[0165]

[0166] If Tt+1 Exceeds the maximum monitoring frequency interval, i.e. T t+1 >T max Since the monitoring interval range is set, the monitoring frequency interval is adjusted to T t+1 =T max .

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; 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 is as follows: assuming that the number of attributes is N, the size of the time window is T, and the prediction step is b, the manufacturing channel data is intercepted in the order of timestamps using an interception window of size T+b, and a set of prediction samples corresponding to all attributes within T moments and the true value labels of the next b moments are obtained each time the interception is performed, and then the interception window slides backward along the timestamp by one prediction step to continue intercepting until the interception window reaches the last timestamp, that is, the prediction samples X of T moments are used. input ∈R N×T Predict the true value label X corresponding to the predicted sample at b moments after these T moments label ∈R N×b ; 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; Specifically, for each prediction sample, the data values ​​of the N attributes are taken as N independent nodes, and the node embedding representation h is a vector of the data values ​​of the corresponding attributes of the node at T moments concatenated in chronological order, that is, h∈R 1×T ,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 h of each node, the Pearson correlation coefficient is calculated between two nodes, and a retention threshold is set. 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 E, otherwise there is no edge; 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 graph attention feature extraction module is used to perform several layers of GAT graph attention feature aggregation on all nodes of the multi-channel data graph structure according to the GAT graph attention mechanism principle, calculate the attention weights between nodes according to each layer of GAT graph attention feature aggregation, and perform weighted aggregation on the nodes according to the attention weights, aggregate 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 X GAT , and used as the input of the feature mixing module; The feature mixing module is used to extract the input graph attention features and output X GAT Flattening, that is, flattening into a vector, and concatenating the static covariate s at the end of the vector to obtain the concatenated vector, and then passing through the feature fusion MLP layer to realize the static covariate s and the graph attention feature extraction output X GAT 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 graph attention feature extraction output X GAT The dimensions are consistent, and the final output result of the feature mixing module is obtained. f , and used as the input of the time mixing module; The time mixing module is used to use the time mixing MLP layer to input the output result X of the feature mixing module f The historical data values ​​of each attribute in the linear combination are combined to fully integrate the time series information and obtain the output of the time mixing MLP layer. The output result of the feature mixing module X f Perform residual connection with the output of the time-mixed MLP layer, and then normalize it to output the time-mixed data X t ; The data X after time mixing t The output of the feature mixing module X f The dimensions are consistent; The time projection module is used to use the FullConnection layer to input the time-mixed data X t Projecting to the output dimension of the target, i.e., the prediction step length, obtains the output of the FullConnection layer, normalizes the output of the FullConnection layer, and obtains the prediction result of each node value; the node value is the data value of each attribute; The specific processing steps of the graph attention feature extraction module are: For the embedding representation of each node, according to the principle of GAT graph attention mechanism, with one node as the center, the attention weight between the node and all neighboring nodes is calculated; For a node i , record the node i The set of neighbor nodes is N i , using a set of trainable weight matrices W and the embedding representations h of the two nodes respectively i and h j Perform matrix product, project it into the same feature space to get two result vectors, concatenate the result vectors, and use an attention kernel a with the concatenated result vector [Wh i ||Wh j ] dot product, the dot product calculation result passes through the activation function ReLU, and then uses the softmax function to get the node Node i and neighbor node Node j The attention weight of Node i and node Ndoe j The attention weight α between ij As shown in formula (1): Among them, W is the trainable weight matrix, h i and h j Node i and Node j The embedding representation of h k Node i The embedding representation of the neighbor nodes of , a is the learnable attention kernel, and ReLU 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. i The embedding representation update method of is shown in formula (2): The input multi-channel data graph structure is X input′ , perform l-layer GAT graph attention feature aggregation on the entire multi-channel data graph structure, and its output is recorded as The GAT graph attention feature aggregation process at layer l is shown in formula (3): Among them, A t is the attention weight adjacency matrix, is the input of the attention feature aggregation of the GAT graph at the lth layer, i.e., the output of the attention feature aggregation of the GAT graph at the l-1th layer; is the output of the GAT graph attention feature aggregation at the lth layer; The feature fusion MLP layer includes a ReLU layer, a Linear layer, and a dropout random inactivation layer connected in sequence; the time mixing MLP layer includes a FullConnection layer, a ReLU layer, and a dropout random inactivation layer connected in sequence; 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; Let z be the node Ndoe i The sample observation value, that is, the true value of the node value in the test set, is Z=(z0,z1,…,z q ,…,z t ), z q is the sample observation value at time q, and r is the node Node i The trend change, r q is the trend change at time q, and r is defined q The calculation formula is shown in (4): r q =z q+1 -z q (4) According to the sample observation value Z=(z0,z1,…,z q ,…,z t ) The trend change of the node value from time 0 to time t-1 is calculated as R = (r0, r1, ..., r q ,…,r t-1 ), 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 i The predicted sample value at time t+1 That is, the prediction result of the node value obtained in step 6, and the estimated value of the trend change is calculated as Calculate an estimate of the amount of trend change and the standard deviation of the true value of the trend change in the previous w moments Right now r t-1 ,…,r t-w The standard deviation of is calculated, and the confidence of the trend change of the node at time t is calculated by formula (5): in, Node i Confidence of trend change at time t; 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 c. t , the calculation formula is shown in (6): 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 T max , the minimum monitoring frequency interval is T min The frequency interval can be adjusted within the range of T min With T max The monitoring frequency interval at time t is T t , set the maximum acceptable inaccuracy γ; If c t <1-γ, increase the monitoring frequency and reduce the monitoring interval. If c t ≥1-γ, reduce the monitoring frequency, increase the time interval, and the formula for updating the monitoring frequency interval is: If T t+1 Exceeds the maximum monitoring frequency interval, i.e. T t+1 >T max Since the monitoring interval range is set, the monitoring frequency interval is adjusted to T t+1 =T max .

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