Equipment defect prediction and model training method and device, equipment and storage medium
By introducing time and space attention modules into the equipment defect prediction model, combining the time and topological structure of the monitoring data, the problem of low equipment defect recognition accuracy in the prior art is solved, and high-precision and real-time equipment defect prediction are achieved.
Patent Information
- Application Number
- CN202411352793.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-27
AI Technical Summary
When predicting industrial equipment defects, the accuracy of identifying different types of defects is poor, and it is difficult to timely detect defects of high-complexity equipment, which affects the normal and safe operation of production operations.
The equipment defect prediction model is adopted for the encoder layer including the time attention module and the space attention module. Through the time attention module, the time characteristics of the monitoring sequence and the graph characteristics of the space attention module are learned, and the long-term and short-term time relationships and topological structure are integrated to train High-precision equipment defect prediction model to achieve real-time accurate prediction.
It improves the accuracy and real-time performance of equipment defect prediction, and can more accurately identify and predict equipment defects, ensuring the safety and stability of production operations.
Smart Images

Figure CN119202607A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for equipment defect prediction and model training. Background Art
[0002] Industrial equipment in production and operation often has many components and complex structures. Some equipment is even sealed internally, such as gas-insulated metal-enclosed switchgear. When such highly complex equipment has defects or fails, the defect types are diverse and difficult to detect directly and in time, thus affecting the normal and safe operation of production and operation. The existing methods for predicting equipment defects include prediction methods that rely on expert experience, prediction methods based on regular inspection results, and prediction methods using convolutional neural networks. However, the prediction methods in the existing technology have poor recognition accuracy when identifying different types of defects. Summary of the invention
[0003] The embodiments of the present invention provide a method, apparatus, device and storage medium for equipment defect prediction and model training, which can train a high-precision equipment defect prediction model and accurately predict equipment defects in real time.
[0004] In a first aspect, an embodiment of the present invention provides a method for training a device defect prediction model, comprising:
[0005] Inputting a sample monitoring sequence and a sample graph feature corresponding to the sample monitoring sequence into a device defect prediction model to be trained; the device defect prediction model comprises an encoder layer and a decoder layer, the encoder layer comprises: a time attention module and a space attention module; the sample monitoring sequence comprises a plurality of historical monitoring sequences, each of which is a time series of historical monitoring data obtained by continuously monitoring operating parameters related to device defects, and the continuous monitoring duration corresponding to each of the historical monitoring sequences is a preset duration;
[0006] Acquire the temporal attention features of the sample monitoring sequence through the temporal attention module, and acquire the spatial attention features of the sample monitoring sequence according to the sample graph features through the spatial attention module;
[0007] fusing the temporal attention feature and the spatial attention feature to obtain an encoder output feature;
[0008] Obtaining, by the decoder, a training prediction result of a device defect according to an output feature of the encoder; and
[0009] The function value of the training loss function is determined according to the training prediction result of the equipment defect, and the model parameters of the equipment defect prediction model are adjusted according to the function value of the training loss function.
[0010] In a second aspect, an embodiment of the present invention provides a method for predicting equipment defects, including:
[0011] The real-time monitoring sequence and the real-time graph features corresponding to the real-time monitoring sequence are input into the trained equipment defect prediction model; the equipment defect prediction model includes an encoder layer and a decoder layer, the encoder layer includes: a time attention module and a space attention module; the real-time monitoring sequence is a time series corresponding to the monitoring data obtained by monitoring the equipment operating parameters related to the equipment defects from a preset time before to the current moment;
[0012] Acquire the time attention feature of the real-time monitoring sequence through the time attention module, and acquire the space attention feature of the real-time monitoring sequence according to the real-time graph feature through the space attention module;
[0013] fusing the temporal attention feature and the spatial attention feature to obtain an encoder output feature; and
[0014] The decoder obtains the real-time prediction result of the equipment defect according to the output feature of the encoder.
[0015] In a third aspect, an embodiment of the present invention provides a device for training a device defect prediction model, comprising:
[0016] A sample input module is used to input a sample monitoring sequence and a sample graph feature corresponding to the sample monitoring sequence into a device defect prediction model to be trained; the device defect prediction model includes an encoder layer and a decoder layer, the encoder layer includes: a time attention module and a space attention module; the sample monitoring sequence includes a plurality of historical monitoring sequences, each of which is a time series of historical monitoring data obtained by continuously monitoring operating parameters related to device defects, and the continuous monitoring time corresponding to each historical monitoring sequence is a preset time;
[0017] A sample attention feature acquisition module, used to acquire the time attention feature of the sample monitoring sequence through the time attention module, and acquire the space attention feature of the sample monitoring sequence according to the sample graph feature through the space attention module;
[0018] A sample attention feature fusion module, used for fusing the temporal attention feature and the spatial attention feature to obtain an encoder output feature;
[0019] a sample prediction module, configured to obtain a training prediction result of a device defect according to an output feature of the encoder through the decoder; and
[0020] The parameter adjustment module is used to determine the function value of the training loss function according to the training prediction result of the equipment defect, and adjust the model parameters of the equipment defect prediction model according to the function value of the training loss function.
[0021] In a fourth aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, an equipment defect prediction model training method or an equipment defect prediction method as described in any one of the embodiments of the present invention is implemented.
[0022] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an equipment defect prediction model training method or an equipment defect prediction method as described in any one of the embodiments of the present invention.
[0023] An embodiment of the present invention provides an equipment defect prediction and model training method, device, equipment and storage medium. By setting an encoder including a time attention module and a space attention module, the time attention module is further used to learn and obtain the time attention features of the monitoring sequence. It can combine the long-term and short-term time relationships of the monitoring sequence, and use the space attention module to learn and obtain the spatial attention features of the monitoring sequence based on the graph features corresponding to the monitoring sequence, and optimize the learning of the topological structure of each graph structure node of the monitoring data. In this way, it is possible to combine the long-term and short-term time relationships of the monitoring data and the topological structure of each graph structure node corresponding to the monitoring data, train a high-precision equipment defect prediction model, and use the trained equipment defect prediction model to accurately predict equipment defects in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 It is a flow chart of a method for training a device defect prediction model provided by an embodiment of the present invention;
[0026] Figure 2 is another flow chart of the equipment defect prediction model training method provided by an embodiment of the present invention;
[0027] Figure 3 is another flow chart of the equipment defect prediction model training method provided by an embodiment of the present invention;
[0028] Figure 4 is another flow chart of the equipment defect prediction model training method provided by an embodiment of the present invention;
[0029] Figure 5 It is a flow chart of a method for predicting equipment defects provided by an embodiment of the present invention;
[0030] Figure 6 It is a structural schematic diagram of the equipment defect prediction model training device provided by an embodiment of the present invention;
[0031] Figure 7 is a structural schematic diagram of an equipment defect prediction device provided by an embodiment of the present invention;
[0032] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] Figure 1 A flow chart of a method for training a device defect prediction model provided in an embodiment of the present invention is provided. The method can be performed by a device for training a device defect prediction model provided in an embodiment of the present invention. The device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated into an electronic device as an example. Reference Figure 1, the method may specifically include the following steps:
[0036] Step 101, input the sample monitoring sequence and the sample graph features corresponding to the sample monitoring sequence into the equipment defect prediction model to be trained, the equipment defect prediction model includes an encoder layer and a decoder layer, the encoder layer includes: a time attention module and a space attention module; the sample monitoring sequence includes multiple historical monitoring sequences, each historical monitoring sequence is a time series of historical monitoring data obtained by continuously monitoring the operating parameters related to the equipment defects, and the continuous monitoring time corresponding to each historical monitoring sequence is a preset time. This step can facilitate the acquisition of the time attention features of the sample monitoring sequence through the time attention module and the acquisition of the space attention features of the sample monitoring sequence through the space attention module.
[0037] Specifically, the encoder layer may include one encoder or multiple encoders.
[0038] Specifically, the above decoder layer may include one encoder or multiple decoders.
[0039] Specifically, the above-mentioned equipment defect prediction model can be an improved transformer model obtained by improving the encoder structure in the transformer network structure.
[0040] Specifically, the above-mentioned equipment defect-related parameters can be understood as operating parameters related to the equipment defects of the equipment, and the above-mentioned equipment can be understood as highly complex industrial equipment, specifically internally sealed equipment, such as gas insulated metal enclosed switchgear (GIS).
[0041] Optionally, the device defect-related parameters include multiple operating parameters of the device, which may specifically include: temperature, humidity, operating voltage, and operating current when the device is running.
[0042] Specifically, the above-mentioned equipment defect-related parameters may also include only one operating parameter.
[0043] Specifically, the preset duration can be determined according to the monitoring and collection frequency of the equipment defect-related parameters. For example, when the monitoring and collection frequency of the equipment defect-related parameters is high, the preset duration can be set to a smaller value to avoid excessive monitoring data in the sample monitoring sequence, which affects the accuracy of model training; when the collection frequency of equipment-related parameters is low, the preset duration can be set to a larger value to obtain sufficient sample monitoring sequences.
[0044] Optionally, a sample monitoring sequence corresponding to a continuous monitoring period includes multiple simultaneous period sequences corresponding one-to-one to multiple operating parameters.
[0045] Specifically, the sample monitoring sequence corresponding to a continuous monitoring period may also include a monitoring sequence that integrates the information of the above-mentioned multiple operating parameters, and specifically, for example, may be a time series composed of matrices.
[0046] Optionally, before step 101, original historical monitoring data is obtained and preprocessed such as deduplication and anomaly removal is performed on the original historical data to obtain preprocessed historical data, and the preprocessed historical data is used to generate the above-mentioned sample monitoring sequence.
[0047] Specifically, the above sample graph feature can be understood as the graph structure of the sample monitoring sequence represented by the adjacency matrix corresponding to the sample monitoring sequence.
[0048] Specifically, the adjacency matrix can be obtained by learning the time-dependent features of the sample monitoring sequence through a gated recurrent unit or a long short-term memory network, and adjusting the self-attention of the time-dependent features through a self-attention mechanism. For example, the last hidden state of the gated recurrent unit corresponding to the sample monitoring sequence can be obtained as the adjacency matrix.
[0049] Step 102, the temporal attention features of the sample monitoring sequence are obtained through the temporal attention module, and the spatial attention features of the sample monitoring sequence are obtained through the spatial attention module according to the sample graph features. This step can use the temporal attention module to learn and obtain the temporal attention features of the monitoring sequence, can combine the long-term and short-term time relationship of the monitoring sequence, and use the spatial attention module to learn and obtain the spatial attention features of the monitoring sequence based on the graph features corresponding to the monitoring sequence, optimize the topological structure of each graph structure node of the monitoring data, and can be conducive to the fusion of the temporal attention features and the spatial attention features to obtain the encoder output features.
[0050] Optionally, the encoder layer includes n encoders cascaded in series, the temporal attention module includes temporal attention sub-blocks corresponding one-to-one to each encoder, and the spatial attention module includes spatial attention sub-blocks corresponding one-to-one to each encoder, where n is a positive integer and n>1.
[0051] Optionally, the above process of obtaining the temporal attention features of the sample monitoring sequence through the temporal attention module includes: for each encoder of all or part of the n encoders, performing self-attention adjustment on the output features of the previous encoder based on the self-attention mechanism through the corresponding temporal attention sub-block to obtain the temporal attention features of the current encoder.
[0052] Optionally, the above process of obtaining the spatial attention features of the sample monitoring sequence based on the sample graph features includes: for each encoder of all or part of the n encoders, obtaining the graph features corresponding to the current encoder according to the output features of the previous encoder and the sample graph features through the corresponding spatial attention sub-block, and performing self-attention adjustment on the corresponding graph features of the current encoder based on the graph attention mechanism to obtain the spatial attention features of the current encoder.
[0053] Optionally, the equipment defect prediction model provided by the embodiment of the present invention further includes: an input layer. The training method provided by the embodiment of the present invention further includes: before step 102, obtaining input features of the encoder layer through the input layer according to the sample monitoring sequence.
[0054] Specifically, the input layer may include a text embedding layer and a position encoder, and the process of obtaining input features of the encoder layer according to the sample monitoring sequence through the input layer includes:
[0055] The sample monitoring sequence is converted into a word embedding vector through the text embedding layer, and the position information of the text content is added to the word vector through the position encoder.
[0056] In one specific example, for a sample monitoring sequence X=[x t-p+1 ,…x t ], which can generate the input feature H = [H t-p+1 ,…H t ].
[0057] Here, p can be understood as the aforementioned preset duration.
[0058] Step 103, fusing the temporal attention features and the spatial attention features to obtain encoder output features. This step can obtain encoder output features that combine the long-term and short-term temporal relationships of the monitoring data and the topological structures of the nodes of each graph structure corresponding to the monitoring data, and better extract the relationship between the temporal dependency features and spatial relationship features of the monitoring data and the training prediction results.
[0059] Optionally, all or part of the n encoders include fusion sub-blocks, which may be as follows: Figure 2 As shown, the process of fusing the temporal attention features and the spatial attention features to obtain the encoder output features includes: for each encoder of all or part of the n encoders, the temporal attention features and the spatial attention features of the current encoder are fused through the corresponding fusion sub-block to obtain the encoder output features corresponding to the current encoder.
[0060] Specifically, the process of fusing the temporal attention feature and the spatial attention feature to obtain the encoder output feature may include: fusing the kth temporal attention feature and the kth spatial attention feature to obtain the kth encoder output feature, where k is a positive integer, 1<k≤n, the kth temporal attention feature and the kth spatial attention feature correspond to the output features of the kth temporal attention sub-block and the kth spatial attention sub-block corresponding to the kth encoder, and the kth encoder output feature is the output feature of the kth encoder.
[0061] Step 104: Obtain the training prediction result of the equipment defect according to the output feature of the encoder through the decoder. This step can be helpful to adjust the model parameters based on the training prediction result.
[0062] Optionally, the process of obtaining the training prediction result of the equipment defect according to the encoder output feature through the decoder includes: obtaining the training prediction result of the equipment defect according to the nth encoder output feature through the decoder, and the nth encoder output feature is the output feature of the nth encoder.
[0063] Specifically, the decoder may also obtain the training prediction result of the equipment defect according to the fusion features of the output features of the n encoders.
[0064] Optionally, the equipment defect prediction model provided by an embodiment of the present invention also includes an output layer, and the process of obtaining the training prediction result of the equipment defect through the decoder according to the encoder output features includes: outputting the decoder output features according to the encoder output features through the decoder, and outputting the training prediction result according to the decoder output features through the output layer.
[0065] Specifically, the output layer may include a fully connected layer.
[0066] Step 105, determine the function value of the training loss function according to the training prediction result of the equipment defect, and adjust the model parameters of the equipment defect prediction model according to the function value of the training loss function. This step is based on steps 101 to 104, by setting an encoder including a time attention module and a space attention module, further using the time attention module to learn and obtain the time attention features of the monitoring sequence, and can combine the long-term and short-term time relationship of the monitoring sequence, and use the space attention module to learn and obtain the space attention features of the monitoring sequence based on the graph features corresponding to the monitoring sequence, and optimize the topological structure of each graph structure node of the monitoring data, so that it can combine the long-term and short-term time relationship of the monitoring data and the topological structure of each graph structure node corresponding to the monitoring data, and train to obtain a high-precision equipment defect prediction model.
[0067] Optionally, the above training loss function can be a mean square error loss function, which can be expressed as:
[0068] L(y′,Wθ )=‖y′(x t-p+1 ,…,x t ,W θ )-y t+1 ‖
[0069] Among them, W θ represents the adjustable model parameters, y′ represents the training prediction result of the equipment defect, and y represents the true value of the equipment defect.
[0070] Specifically, the above training loss function may also be other loss functions in the prior art, for example, a cross entropy loss function.
[0071] The following further introduces a method for training an equipment defect prediction model provided by another embodiment of the present invention.
[0072] Optionally, the kth temporal attention sub-block includes the kth self-attention unit and the kth feed-forward network, and the corresponding kth encoder structure is as follows Figure 2 shown.
[0073] Optional, such as Figure 3 As shown, Figure 1 Step 102 in may include the following steps:
[0074] Step 102a, obtain the kth self-attention feature based on the self-attention mechanism according to the k-1th encoder output feature through the kth self-attention unit, and obtain the kth multi-head self-attention feature based on the multi-head attention mechanism according to the first k-1 time attention features and the kth self-attention feature, and the first k-1 time attention features are the output features of the first k-1 time attention sub-blocks.
[0075] Specifically, the process of obtaining the kth self-attention feature based on the self-attention mechanism according to the output feature of the k-1th encoder includes:
[0076] Determine the query matrix Q, key matrix K, and value matrix V of each sub-feature in the k-1th encoder output feature, and update each sub-feature based on the query matrix Q, key matrix K, and value matrix V to obtain the kth self-attention feature t k , which can be based on the following formula:
[0077]
[0078] Among them, d k The square roots of the dimensions of the query matrix Q and the key matrix K.
[0079] Specifically, the process of obtaining the kth multi-head self-attention feature based on the multi-head attention mechanism according to the first k-1 time attention features and the kth self-attention feature can be performed based on the following formula:
[0080] Multihead(Q,K,V)=Concat(T1,T2,…T k-1 ,t k )
[0081] Among them, T1, T2, …T k-1 represents the output features of the first k-1 temporal attention sub-blocks.
[0082] Step 102b, obtaining the output feature of the kth time attention sub-block according to the kth multi-head self-attention feature through the kth feed-forward network to obtain the kth time attention feature.
[0083] Optionally, the process of obtaining the output feature of the kth time attention sub-block according to the kth multi-head self-attention feature through the kth feedforward network to obtain the kth time attention feature includes:
[0084] The kth feedforward network outputs the kth feedforward network output feature according to the kth multi-head self-attention feature, and a residual connection is added to the kth feedforward network output feature to obtain the kth temporal attention feature .
[0085] Specifically, adding residual connections can help avoid gradient disappearance.
[0086] Specifically, the k-th feedforward network can be composed of two linear transformations, which can be activated by a ReLU in the middle.
[0087] Specifically, the embodiment of the present invention captures the temporal relationship features based on the multi-head attention mechanism according to the first k-1 temporal attention features and the kth temporal attention features, so that the model can learn more feature representations, enhance the model's ability to capture complex information, improve the model's prediction accuracy, and help reduce the risk of overfitting.
[0088] The following further introduces a method for training an equipment defect prediction model provided by another embodiment of the present invention.
[0089] like Figure 4 As shown, Figure 1 Step 102 in may include the following steps:
[0090] Step 102A, through the kth spatial attention sub-block, learn the relationship between the sample graph feature and the k-1th encoder output feature to obtain the kth graph feature.
[0091] Specifically, the sample graph feature is represented as G, and the k-1th encoder output feature is represented as H(k-1). The relationship between the sample graph feature G and H(k-1) can be calculated by the following formula to obtain the kth graph feature R:
[0092] H1(k-1)=WH(k-1)
[0093] R=H1(k-1)H1(k-1) T
[0094] Where W represents the learning parameter.
[0095] Step 102B, using a convolution operation according to the kth graph feature to learn the relationship between each node in the kth graph feature and the input feature of the kth encoder, to obtain the node feature of each node.
[0096] Specifically, since the kth graph feature R contains the nodes and their hidden related information, which affect the spatial relationship of the nodes, a convolution operation is performed on R to obtain the hidden information, thereby completely extracting the spatial relationship of the nodes.
[0097] Specifically, the convolution operation can be performed on R by the following formula:
[0098]
[0099] Among them, H i,f represents the hidden information of the fth channel corresponding to the i-th node in H1(k-1), M i,f′ represents the node feature corresponding to the f'th channel of the i-th node in R, W f,f′ is a trainable parameter, which indicates the correlation between the f'th output channel and the f'th input channel. F indicates the number of input channels, F' indicates the number of output channels, and b F′ It represents the bias term of the F′th output convolution channel operation.
[0100] Specifically, the convolution operation can reduce the time dimension to the convolution kernel size, and the size of the convolution kernel can be set to be equal to the size of the sample monitoring sequence.
[0101] Step 102C, based on the node features of the dual nodes in each node, learn the node relationships between the dual nodes through a metric function, and determine the kth graph node relationship feature based on the node relationships between the dual nodes.
[0102] Specifically, the above-mentioned learning of the node relationship between the dual nodes through the metric function according to the node characteristics of the dual nodes in each node can be based on the following formula:
[0103]
[0104] in, represents the metric function, A[i,j] represents the relationship between node i and node j of the kth graph feature R, M i represents the node feature of node i, Mj represents the node feature of node j, and the metric learning function is expressed in the form of matrix multiplication: A = M·M T .
[0105] Step 102D, obtaining the output feature of the kth spatial attention sub-block according to the kth graph node relationship feature, and obtaining the kth spatial attention feature.
[0106] Optionally, the process of obtaining the output feature of the kth spatial attention sub-block according to the kth graph node relationship feature includes:
[0107] The kth graph attention feature is obtained based on the graph attention mechanism according to the kth graph node relationship feature; and the kth multi-head graph attention feature is obtained based on the multi-head attention mechanism according to the first k-1 spatial attention features and the kth graph attention feature, and the kth spatial attention feature is determined according to the kth multi-head graph attention feature; the first k-1 spatial attention features are the output features of the first k-1 spatial attention sub-blocks.
[0108] Specifically, the process of obtaining the kth multi-head image attention feature based on the multi-head attention mechanism according to the first k-1 spatial attention features and the kth image attention feature includes: calculating the average value of the first k-1 spatial attention features and the kth image attention feature to obtain the kth multi-head attention feature.
[0109] Optionally, the process of determining the kth spatial attention feature according to the kth multi-head image attention feature includes: adding a residual connection to the kth multi-head image attention feature to obtain the kth spatial attention feature .
[0110] Specifically, adding residual connections can help avoid gradient disappearance.
[0111] Optionally, the process of fusing the kth temporal attention feature and the kth spatial attention feature to obtain the kth encoder output feature includes: fusing the kth temporal attention feature through the fusion sub-block of the kth encoder and the kth spatial attention feature The kth encoder output feature H(k) is obtained.
[0112] Specifically, in graph theory algorithms, such as the shortest path algorithm and network flow algorithm, it is often necessary to traverse and calculate nodes. In a complex graph, there may be multiple subgraphs. The embodiment of the present invention calculates the similarity or distance between dual nodes through a metric function, and can identify the structural characteristics of these subgraphs, which is of great significance for the model to understand the overall structure and function of the graph. And by calculating the relevant attributes of the dual nodes (such as degree, centrality, etc.) through a metric function, effective heuristic information can be provided for the algorithm, thereby accelerating the execution process of the algorithm and improving the efficiency of the algorithm.
[0113] In addition, the embodiment of the present invention obtains the kth multi-head graph attention feature based on the multi-head attention mechanism according to the first k-1 spatial attention features and the kth graph attention feature, so that the model can learn more feature representations, enhance the model's ability to capture complex information, improve the model's prediction accuracy, and help reduce the risk of overfitting.
[0114] Figure 5 The present invention provides a flowchart of a device defect prediction method according to an embodiment of the present invention. The method can be performed by a device defect prediction apparatus according to an embodiment of the present invention. The apparatus can be implemented in software and / or hardware. In a specific embodiment, the apparatus can be integrated into an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated into an electronic device as an example. Figure 5 , the method may specifically include the following steps:
[0115] Step 501, input the real-time monitoring sequence and the real-time graph features corresponding to the real-time monitoring sequence into the trained equipment defect prediction model; the equipment defect prediction model includes an encoder layer and a decoder layer, and the encoder layer includes: a time attention module and a space attention module; the real-time monitoring sequence is a time series corresponding to the monitoring data obtained by monitoring the equipment operating parameters related to the equipment defects from a preset time before to the current moment.
[0116] Step 502, obtaining the temporal attention features of the real-time monitoring sequence through the temporal attention module, and obtaining the spatial attention features of the real-time monitoring sequence according to the real-time graph features through the spatial attention module.
[0117] Optionally, the encoder layer includes n encoders cascaded in series, where n is a positive integer.
[0118] Optionally, the temporal attention module includes temporal attention sub-blocks corresponding one-to-one to each encoder, and the spatial attention module includes spatial attention sub-blocks corresponding one-to-one to each encoder.
[0119] Optionally, the kth temporal attention sub-block corresponding to the kth encoder includes a kth self-attention unit and a kth feedforward network, where k is a positive integer, 1<k≤n.
[0120] Optionally, the above process of obtaining the temporal attention features of the real-time monitoring sequence through the temporal attention module includes: obtaining the kth self-attention feature based on the self-attention mechanism according to the k-1th encoder output feature through the kth self-attention unit, and obtaining the kth multi-head self-attention feature based on the multi-head attention mechanism according to the first k-1 temporal attention features and the kth self-attention feature, the first k-1 temporal attention features are the output features of the first k-1 temporal attention sub-blocks; and obtaining the kth temporal attention feature through the kth feedforward network according to the kth multi-head self-attention feature.
[0121] Optionally, the above-mentioned process of obtaining the spatial attention features of the real-time monitoring sequence according to the real-time graph features through the spatial attention module includes: learning the relationship between the real-time graph features and the output features of the k-1th encoder through the kth spatial attention sub-block corresponding to the kth encoder to obtain the kth graph feature; learning the relationship between each node in the kth graph feature and the input features of the kth encoder through a convolution operation according to the kth graph feature to obtain the node features of each node; learning the node relationship between the dual nodes through a metric function according to the node features of the dual nodes in each node, and determining the kth graph node relationship feature based on the node relationship between the dual nodes; obtaining the output feature of the kth spatial attention sub-block according to the kth graph node relationship feature to obtain the kth spatial attention feature.
[0122] Optionally, the above process of obtaining the output feature of the kth spatial attention sub-block according to the kth graph node relationship feature to obtain the kth spatial attention feature includes: obtaining the kth graph attention feature based on the graph attention mechanism according to the kth graph node relationship feature; and obtaining the kth multi-head graph attention feature based on the multi-head attention mechanism according to the first k-1 spatial attention features and the kth graph attention feature, and determining the kth spatial attention feature based on the kth multi-head graph attention feature; the first k-1 spatial attention features are the output features of the first k-1 spatial attention sub-blocks.
[0123] Step 503: Fuse the temporal attention features and the spatial attention features to obtain the encoder output features.
[0124] Optionally, the process of fusing the temporal attention feature and the spatial attention feature to obtain the encoder output feature includes: fusing the kth temporal attention feature and the kth spatial attention feature to obtain the kth encoder output feature, the kth temporal attention feature and the kth spatial attention feature corresponding to the output features of the kth temporal attention sub-block and the kth spatial attention sub-block corresponding to the kth encoder
[0125] Step 504: obtaining a real-time prediction result of the equipment defect according to the encoder output feature through the decoder.
[0126] Optionally, the above process of obtaining the real-time prediction result of the equipment defect through the decoder according to the encoder output feature includes: obtaining the real-time prediction result of the equipment defect through the decoder according to the nth encoder output feature, and the nth encoder output feature is the output feature of the nth encoder.
[0127] Optionally, the equipment defect prediction model also includes an input layer and an output layer.
[0128] Optionally, the equipment defect prediction method provided by an embodiment of the present invention further includes: before obtaining the time attention features of the real-time monitoring sequence through the time attention module, obtaining the input features of the encoder layer according to the real-time monitoring sequence through the input layer.
[0129] Optionally, the above process of obtaining the real-time prediction result of the equipment defect according to the encoder output feature through the decoder includes: outputting the decoder output feature according to the encoder output feature through the decoder, and outputting the real-time prediction result according to the decoder output feature through the output layer.
[0130] An equipment defect prediction method provided by an embodiment of the present invention, by setting an encoder including a time attention module and a space attention module, further using the time attention module to learn and obtain the time attention features of the monitoring sequence, can combine the long-term and short-term time relationships of the monitoring sequence, and use the space attention module to learn and obtain the spatial attention features of the monitoring sequence based on the graph features corresponding to the monitoring sequence, and optimize the learning of the topological structure of each graph structure node of the monitoring data, so as to combine the long-term and short-term time relationships of the monitoring data and the topological structure of each graph structure node corresponding to the monitoring data to accurately predict the equipment defects in real time.
[0131] Figure 6 is a structural diagram of a device for training a device defect prediction model provided by an embodiment of the present invention, and the device is suitable for executing a device defect prediction model training method provided by an embodiment of the present invention. Figure 6 As shown, the device may specifically include:
[0132] The sample input module 601 is used to input the sample monitoring sequence and the sample graph features corresponding to the sample monitoring sequence into the equipment defect prediction model to be trained; the equipment defect prediction model includes an encoder layer and a decoder layer, and the encoder layer includes: a time attention module and a space attention module; the sample monitoring sequence includes multiple historical monitoring sequences, each of which is a time series of historical monitoring data obtained by continuously monitoring the operating parameters related to the equipment defects, and the continuous monitoring time corresponding to each historical monitoring sequence is a preset time. It is beneficial to obtain the time attention features of the sample monitoring sequence through the time attention module and the space attention features of the sample monitoring sequence through the space attention module.
[0133] Optionally, the encoder layer includes n encoders cascaded in series, where n is a positive integer.
[0134] The sample attention feature acquisition module 602 is used to acquire the time attention feature of the sample monitoring sequence through the time attention module, and acquire the spatial attention feature of the sample monitoring sequence according to the sample graph feature through the space attention module. The time attention feature of the monitoring sequence can be learned and acquired by the time attention module, and the long-term and short-term time relationship of the monitoring sequence can be combined, and the spatial attention feature of the monitoring sequence can be learned and acquired based on the graph feature corresponding to the monitoring sequence by using the space attention module, and the topological structure of each graph structure node of the monitoring data is optimized and learned, which can be conducive to the fusion of the time attention feature and the space attention feature to obtain the encoder output feature.
[0135] Optionally, the temporal attention module includes temporal attention sub-blocks corresponding one-to-one to each encoder, and the spatial attention module includes spatial attention sub-blocks corresponding one-to-one to each encoder.
[0136] Optionally, the kth temporal attention sub-block corresponding to the kth encoder includes a kth self-attention unit and a kth feedforward network, where k is a positive integer, 1<k≤n.
[0137] Optionally, the sample attention feature acquisition module 602 can be specifically used to obtain the kth self-attention feature based on the self-attention mechanism according to the k-1th encoder output feature through the kth self-attention unit, and obtain the kth multi-head self-attention feature based on the multi-head attention mechanism according to the first k-1 time attention features and the kth self-attention feature, and the first k-1 time attention features are the output features of the first k-1 time attention sub-blocks; and
[0138] The kth temporal attention feature is obtained by obtaining the output feature of the kth temporal attention sub-block according to the kth multi-head self-attention feature through the kth feed-forward network.
[0139] Optionally, the sample attention feature acquisition module 602 can be specifically used to learn the relationship between the sample graph feature and the output feature of the k-1th encoder through the kth spatial attention sub-block corresponding to the kth encoder to obtain the kth graph feature;
[0140] According to the k-th graph feature, a convolution operation is used to learn the relationship between each node in the k-th graph feature and the input feature of the k-th encoder to obtain the node feature of each node;
[0141] According to the node features of the dual nodes in each node, the node relationships of the dual nodes are learned through the metric function, and the kth graph node relationship feature is determined based on the node relationships of the dual nodes;
[0142] The output feature of the kth spatial attention sub-block is obtained according to the kth graph node relationship feature to obtain the kth spatial attention feature.
[0143] Optionally, the sample attention feature acquisition module 602 can be specifically used to acquire the kth graph attention feature based on the graph attention mechanism according to the kth graph node relationship feature; and
[0144] The kth multi-head image attention feature is obtained based on the multi-head attention mechanism according to the first k-1 spatial attention features and the kth image attention feature, and the kth spatial attention feature is determined according to the kth multi-head image attention feature; the first k-1 spatial attention features are the output features of the first k-1 spatial attention sub-blocks.
[0145] The sample attention feature fusion module 603 is used to fuse the time attention feature and the space attention feature to obtain the encoder output feature. It is possible to obtain the encoder output feature combining the long-term and short-term time relationship of the monitoring data and the topological structure of each graph structure node corresponding to the monitoring data, so as to better extract the relationship between the time relationship feature and the space relationship feature of the monitoring data and the training prediction result.
[0146] Optionally, the above-mentioned sample attention feature fusion module 603 can be specifically used to fuse the kth temporal attention feature and the kth spatial attention feature to obtain the kth encoder output feature, and the kth temporal attention feature and the kth spatial attention feature correspond to the output features of the kth temporal attention sub-block and the kth spatial attention sub-block corresponding to the kth encoder.
[0147] The sample prediction module 604 is used to obtain the training prediction results of the equipment defects according to the encoder output features through the decoder, which can be used to adjust the model parameters based on the training prediction results.
[0148] Optionally, the sample prediction module 604 can be specifically used to obtain a training prediction result of a device defect according to an nth encoder output feature through a decoder, where the nth encoder output feature is an output feature of the nth encoder.
[0149] The parameter adjustment module 605 is used to determine the function value of the training loss function according to the training prediction results of the equipment defects, and adjust the model parameters of the equipment defect prediction model according to the function value of the training loss function. In combination with modules 601 to 605, by setting an encoder including a time attention module and a space attention module, the time attention module is further used to learn and obtain the time attention features of the monitoring sequence, and the topological structure of each graph structure node of the monitoring data can be optimized and learned by combining the long-term and short-term time relationship of the monitoring sequence and the topological structure of each graph structure node corresponding to the monitoring data, so that a high-precision equipment defect prediction model can be trained and obtained.
[0150] Optionally, the equipment defect prediction model also includes an input layer and an output layer. The equipment defect prediction model training device provided by an embodiment of the present invention also includes: a first encoder input feature acquisition module, which is used to obtain the input features of the encoder layer through the input layer according to the sample monitoring sequence before obtaining the time attention features of the sample monitoring sequence through the time attention module.
[0151] Optionally, the sample prediction module 604 can be specifically used to output a decoder output feature according to the encoder output feature through a decoder, and output a training prediction result according to the decoder output feature through an output layer.
[0152] Figure 7 is a structural diagram of a device for predicting equipment defects provided by an embodiment of the present invention, and the device is suitable for executing the device defect prediction method provided by an embodiment of the present invention. Figure 7 As shown, the device may specifically include:
[0153] The real-time input module 701 is used to input the real-time monitoring sequence and the real-time graph features corresponding to the real-time monitoring sequence into the trained equipment defect prediction model; the equipment defect prediction model includes an encoder layer and a decoder layer, and the encoder layer includes: a time attention module and a space attention module; the real-time monitoring sequence is a time series corresponding to the monitoring data obtained by monitoring the equipment operating parameters related to the equipment defects from a preset time before to the current moment.
[0154] The real-time attention feature acquisition module 702 is used to acquire the time attention feature of the real-time monitoring sequence through the time attention module, and acquire the space attention feature of the real-time monitoring sequence according to the real-time graph feature through the space attention module.
[0155] The real-time attention feature fusion module 703 is used for the real-time attention feature fusion module, which is used to fuse the temporal attention feature and the spatial attention feature to obtain the encoder output feature.
[0156] The real-time prediction module 704 is used to obtain the real-time prediction result of the equipment defect according to the output characteristics of the encoder through the decoder.
[0157] An embodiment of the present invention provides an equipment defect prediction device, which, by setting an encoder including a time attention module and a space attention module, further utilizes the time attention module to learn and obtain the time attention features of the monitoring sequence, and can combine the long-term and short-term time relationships of the monitoring sequence, and utilize the space attention module to learn and obtain the space attention features of the monitoring sequence based on the graph features corresponding to the monitoring sequence, and optimize the learning of the topological structure of each graph structure node of the monitoring data, thereby being able to combine the long-term and short-term time relationships of the monitoring data and the topological structure of each graph structure node corresponding to the monitoring data to accurately predict the equipment defects in real time.
[0158] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0159] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the device defect prediction model training method or the device defect prediction method provided in any of the above embodiments is implemented.
[0160] An embodiment of the present invention further provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the device defect prediction model training method or the device defect prediction method provided in any of the above embodiments is implemented.
[0161] The embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the equipment defect prediction model training method or equipment defect prediction method as described in any one of the embodiments of the present invention.
[0162] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of an electronic device suitable for implementing an embodiment of the present invention. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0163] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0164] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0165] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.
[0166] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0168] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be set in a processor, for example, it may be described as: a processor including a sample input module, a sample attention feature acquisition module, a sample attention feature fusion module, a sample prediction module and a parameter adjustment module; or, it may be described as: a processor including a real-time input module, a real-time attention feature acquisition module, a real-time attention feature fusion module and a real-time prediction module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0169] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the device includes: inputting a sample monitoring sequence and a sample graph feature corresponding to the sample monitoring sequence into a device defect prediction model to be trained; the device defect prediction model includes an encoder layer and a decoder layer, and the encoder layer includes: a time attention module and a space attention module; the sample monitoring sequence includes a plurality of historical monitoring sequences, each of which is a time series of historical monitoring data obtained by continuously monitoring operating parameters related to equipment defects, and the continuous monitoring duration corresponding to each historical monitoring sequence is a preset duration; the time attention feature of the sample monitoring sequence is obtained through the time attention module, and the space attention feature of the sample monitoring sequence is obtained according to the sample graph feature through the space attention module; the encoder output feature is obtained by fusing the time attention feature and the space attention feature; the training prediction result of the equipment defect is obtained according to the encoder output feature through the decoder; and the function value of the training loss function is determined according to the training prediction result of the equipment defect, and the model parameters of the equipment defect prediction model are adjusted according to the function value of the training loss function.
[0170] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for training a device defect prediction model, characterized in that: include: Inputting a sample monitoring sequence and a sample graph feature corresponding to the sample monitoring sequence into a device defect prediction model to be trained; The equipment defect prediction model includes an encoder layer and a decoder layer, wherein the encoder layer includes: a time attention module and a space attention module; the sample monitoring sequence includes a plurality of historical monitoring sequences, each of which is a time series of historical monitoring data obtained by continuously monitoring operating parameters related to equipment defects, and the continuous monitoring time corresponding to each historical monitoring sequence is a preset time; Acquire the temporal attention features of the sample monitoring sequence through the temporal attention module, and acquire the spatial attention features of the sample monitoring sequence according to the sample graph features through the spatial attention module; fusing the temporal attention feature and the spatial attention feature to obtain an encoder output feature; Obtaining, by the decoder, a training prediction result of a device defect according to the encoder output feature; and The function value of the training loss function is determined according to the training prediction result of the equipment defect, and the model parameters of the equipment defect prediction model are adjusted according to the function value of the training loss function.
2. The equipment defect prediction model training method according to claim 1, characterized in that: The encoder layer includes n encoders cascaded in series, the temporal attention module includes temporal attention sub-blocks corresponding to each encoder one by one, and the spatial attention module includes spatial attention sub-blocks corresponding to each encoder one by one; The fusing the temporal attention feature and the spatial attention feature to obtain an encoder output feature comprises: fusing the kth temporal attention feature and the kth spatial attention feature to obtain a kth encoder output feature; The obtaining, by the decoder, a training prediction result of a device defect according to the output feature of the encoder, comprises: obtaining, by the decoder, a training prediction result of a device defect according to the output feature of the nth encoder; Wherein n and k are both positive integers, 1<k≤n, the kth temporal attention feature and the kth spatial attention feature correspond to the output features of the kth temporal attention sub-block and the kth spatial attention sub-block corresponding to the kth encoder, and the kth encoder output feature and the nth encoder output feature correspond to the output features of the kth encoder and the nth encoder.
3. The equipment defect prediction model training method according to claim 2, characterized in that: The kth time attention sub-block includes a kth self-attention unit and a kth feedforward network; the step of obtaining the time attention feature of the sample monitoring sequence through the time attention module includes: Obtaining a kth self-attention feature based on a self-attention mechanism according to the k-1th encoder output feature through the k-th self-attention unit, and obtaining a kth multi-head self-attention feature based on a multi-head attention mechanism according to the first k-1 time attention features and the k-th self-attention feature, wherein the first k-1 time attention features are output features of the first k-1 time attention sub-blocks; and The kth temporal attention feature is obtained by obtaining the output feature of the kth temporal attention sub-block according to the kth multi-head self-attention feature through the kth feed-forward network.
4. The equipment defect prediction model training method according to claim 2, characterized in that: The obtaining, by the spatial attention module, the spatial attention feature of the sample monitoring sequence according to the sample graph feature comprises: Through the kth spatial attention sub-block, learning the relationship between the sample graph feature and the k-1th encoder output feature to obtain the kth graph feature; Using a convolution operation according to the kth graph feature, learn the relationship between each node in the kth graph feature and the input feature of the kth encoder to obtain the node features of each node; According to the node features of the dual nodes in the nodes, learning the node relationships of the dual nodes through a metric function, and determining the kth graph node relationship feature based on the node relationships of the dual nodes; The output feature of the kth spatial attention sub-block is obtained according to the kth graph node relationship feature to obtain the kth spatial attention feature.
5. The equipment defect prediction model training method according to claim 4, characterized in that: The step of acquiring the output feature of the kth spatial attention sub-block according to the kth graph node relationship feature to obtain the kth spatial attention feature comprises: Obtaining a kth graph attention feature based on the graph attention mechanism according to the kth graph node relationship feature; and According to the first k-1 spatial attention features and the k-th image attention feature, the k-th multi-head image attention feature is obtained based on the multi-head attention mechanism, and the k-th spatial attention feature is determined according to the k-th multi-head image attention feature; the first k-1 spatial attention features are the output features of the first k-1 spatial attention sub-blocks.
6. The equipment defect prediction model training method according to claim 1, characterized in that: The equipment defect prediction model also includes an input layer and an output layer; The model training method further comprises: before acquiring the temporal attention features of the sample monitoring sequence through the temporal attention module, acquiring the input features of the encoder layer according to the sample monitoring sequence through the input layer; The obtaining, by the decoder, a training prediction result of a device defect according to the output feature of the encoder includes: The decoder outputs a decoder output feature according to the encoder output feature, and the output layer outputs the training prediction result according to the decoder output feature.
7. A method for predicting equipment defects, characterized in that: include: Inputting the real-time monitoring sequence and the real-time graph features corresponding to the real-time monitoring sequence into the trained equipment defect prediction model; The equipment defect prediction model includes an encoder layer and a decoder layer, wherein the encoder layer includes: a time attention module and a space attention module; the real-time monitoring sequence is a time sequence corresponding to the monitoring data obtained by monitoring the equipment operating parameters related to the equipment defect from a preset time before to the current moment; Acquire the time attention feature of the real-time monitoring sequence through the time attention module, and acquire the space attention feature of the real-time monitoring sequence according to the real-time graph feature through the space attention module; fusing the temporal attention feature and the spatial attention feature to obtain an encoder output feature; and The decoder obtains the real-time prediction result of the equipment defect according to the output feature of the encoder.
8. A device for training equipment defect prediction model, characterized in that: include: A sample input module, used to input a sample monitoring sequence and sample graph features corresponding to the sample monitoring sequence into a device defect prediction model to be trained; The equipment defect prediction model includes an encoder layer and a decoder layer, wherein the encoder layer includes: a time attention module and a space attention module; the sample monitoring sequence includes a plurality of historical monitoring sequences, each of which is a time series of historical monitoring data obtained by continuously monitoring operating parameters related to equipment defects, and the continuous monitoring time corresponding to each historical monitoring sequence is a preset time; A sample attention feature acquisition module, used to acquire the time attention feature of the sample monitoring sequence through the time attention module, and acquire the space attention feature of the sample monitoring sequence according to the sample graph feature through the space attention module; A sample attention feature fusion module, used for fusing the temporal attention feature and the spatial attention feature to obtain an encoder output feature; a sample prediction module, configured to obtain a training prediction result of a device defect according to an output feature of the encoder through the decoder; and The parameter adjustment module is used to determine the function value of the training loss function according to the training prediction result of the equipment defect, and adjust the model parameters of the equipment defect prediction model according to the function value of the training loss function.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the equipment defect prediction model training method as described in any one of claims 1 to 6 or implements the equipment defect prediction method as described in claim 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the equipment defect prediction model training method as described in any one of claims 1 to 6 or implements the equipment defect prediction method as described in claim 7.
Citation Information
Patent Citations
Pipeline defect and pipeline assembly detection method based on depth space-time characteristics
CN111815561A
Internet of Things time sequence anomaly detection method and system under high-dimension characteristic
CN115018012A
Complex industrial process fault detection method based on space-time variation graph attention auto-encoder
CN116520799A
