Production line fault detection method and device based on industrial Internet of Things
By constructing a fault detection model of feature extraction layer and autoencoder in the industrial Internet of Things, identifying production line equipment failures, the problem of inaccurate fault identification in the existing technology is solved, and the targetedness of fault handling and the stability of the production line is improved.
Patent Information
- Application Number
- CN202411337220.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-31
AI Technical Summary
The existing technology is difficult to effectively identify and classify industrial production line equipment failures, resulting in untargeted fault handling and affecting production stability and equipment life.
Using the production line fault detection method based on the Industrial Internet of Things, a fault detection model including a feature extraction layer and an autoencoder is constructed by collecting temperature, vibration and pressure data, and after preprocessing, the model is trained to identify the equipment fault category.
It improves the accuracy of equipment failure category detection, issues early warnings in advance, reduces unnecessary equipment detection times, reduces maintenance costs, and enhances the stability of the production line and the service life of the equipment.
Smart Images

Figure CN119225334A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of industrial automation technology, and specifically relates to a production line fault detection method and device based on industrial Internet of Things. Background Art
[0002] Industrial Internet of Things technology is widely used in the manufacturing industry, and it realizes intelligent management of the production process by connecting equipment, systems and personnel. However, in complex industrial environments, existing technologies are difficult to effectively detect equipment failures, and it is often difficult to effectively classify equipment failures, making it difficult to deal with failures in a targeted manner. Summary of the invention
[0003] In view of the deficiencies in the prior art, the purpose of the present application is to provide a production line fault detection method and device based on industrial Internet of Things. The present application aims to solve the problem in the prior art that it is difficult to effectively identify the fault type of the production line.
[0004] To achieve the above objectives, this application provides the following technical solutions:
[0005] A production line fault detection method based on industrial Internet of Things, the method comprising: collecting operation data of equipment to be detected on the production line, the operation data comprising temperature data, vibration data and pressure data; preprocessing the operation data; building a production line fault detection model, and training the production line fault detection model; inputting the preprocessed operation data into the trained production line fault detection model to output the fault category of the equipment to be detected on the production line.
[0006] Optionally, preprocessing the operating data includes: cleaning the operating data; standardizing the cleaned operating data; and fusing the standardized operating data.
[0007] Optionally, the fault detection model includes: an input layer, to which a feature extraction layer and an autoencoder are connected, and outputs of the feature extraction layer and the autoencoder are superimposed and connected to an output layer via a feature fusion layer.
[0008] Optionally, the feature extraction layer includes multiple stacked convolution layers with different convolution kernels.
[0009] Optionally, the autoencoder includes an encoder and a decoder, wherein the encoder is used to encode the preprocessed running data; and the decoder is used to reconstruct the running data from the encoding.
[0010] Optionally, the production line fault detection model is trained through the following steps: collecting historical normal operation data samples and fault data samples of the equipment to form a data set, and dividing the data set into a training set and a validation set in proportion after preprocessing; setting training parameters, using the training set to train the model, calculating the cross entropy loss function of the model during the training process, and using the Adam optimization algorithm to optimize the loss function until the loss function converges; using the validation set to verify the model, and during the verification process, using accuracy, recall rate and F1 score as evaluation indicators to evaluate the performance of the model. When all indicators reach the preset values, the model verification is passed; otherwise, adjusting the training parameters or expanding the training samples to re-train the model until the model verification is passed.
[0011] In addition, the present application also provides a production line fault detection device based on the industrial Internet of Things, the device comprising: an acquisition module, used to collect operating data of the equipment to be detected on the production line, the operating data including temperature data, vibration data and pressure data; a preprocessing module, used to preprocess the operating data; a model construction and training module, used to construct a production line fault detection model and train the production line fault detection model; the production line fault detection model introduces a feature extraction layer and an autoencoder arranged in parallel, the feature extraction layer and the autoencoder arranged in parallel extract features from the operating data of the equipment to be detected from different angles to obtain a comprehensive representation of the equipment status of the production line; a fault category identification module, used to input the preprocessed operating data into the trained production line fault detection model to output the fault category of the equipment to be detected on the production line.
[0012] Optionally, the preprocessing module includes: a cleaning submodule for cleaning the operating data; a standardization submodule for standardizing the cleaned operating data; and a fusion submodule for fusing the standardized operating data.
[0013] In addition, the present application also provides a storage medium, which includes instructions, and when the instructions are executed on a computer, the computer executes the method as described in any of the preceding items.
[0014] In addition, the present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any of the preceding items when executing the program.
[0015] Compared with the prior art, the beneficial effects brought by the present application are as follows: by combining the feature extraction layer and the autoencoder, the present application can extract and fuse the features of the equipment operation data on the production line from local and global multi-angles, so that the model can capture more comprehensive and rich feature information, thereby improving the accuracy of equipment fault category detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flowchart of a production line fault detection method based on industrial Internet of Things provided by an embodiment of the present application;
[0017] Figure 2 is a structural schematic diagram of a production line fault detection model provided by another embodiment of the present application;
[0018] Figure 3 is a schematic diagram of the structure of a feature extraction layer provided by another embodiment of the present application;
[0019] Figure 4 is a schematic diagram of the structure of an autoencoder provided by another embodiment of the present application;
[0020] Figure 5 is a schematic diagram of the structure of a feature fusion layer provided by another embodiment of the present application;
[0021] Figure 6 It is a structural schematic diagram of a production line fault detection device based on industrial Internet of Things provided by another embodiment of the present application;
[0022] Figure 7 is a schematic diagram of the structure of a computer medium provided by another embodiment of the present application;
[0023] Figure 8 It is a schematic diagram of the structure of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0024] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Although the specific embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0025] It should be noted that certain words are used in the specification and claims to refer to specific components. Those skilled in the art should understand that technicians may use different nouns to refer to the same component. This specification and claims do not use the difference in nouns as a way to distinguish components, but use the difference in the functions of the components as the criterion for distinction. As mentioned throughout the specification and claims, "including" or "comprising" is an open term, so it should be interpreted as "including but not limited to". The subsequent description of the specification is a preferred embodiment of the implementation of the present application, but the description is based on the general principles of the specification and is not used to limit the scope of the present application. The scope of protection of the present application shall be determined by the attached claims.
[0026] To facilitate understanding of the embodiments of the present application, further explanation will be given below using specific embodiments as examples in conjunction with the accompanying drawings, and the various drawings do not constitute a limitation on the embodiments of the present application.
[0027] Assume that on an assembly line in a manufacturing plant, a piece of equipment may fail due to wear and aging during long-term operation, thereby affecting the stability of the entire production line and product quality. To address this problem, the present application provides a production line fault detection method based on the industrial Internet of Things, which collects the operating data of the equipment to identify the possible fault types of the equipment, such as Figure 1 As shown, the method includes:
[0028] S100: Collecting operating data of the equipment to be tested on the production line, wherein the operating data includes temperature data, vibration data and pressure data;
[0029] S200: pre-processing the operation data;
[0030] S300: constructing a production line fault detection model, and training the production line fault detection model;
[0031] S400: Input the preprocessed operation data into the trained production line fault detection model to output the fault category of the equipment to be detected on the production line.
[0032] This embodiment can significantly improve the accuracy of production line fault detection by constructing a production line fault detection model, and can effectively identify the fault type of the equipment, thereby helping the factory to issue an early warning signal before the equipment fails, so as to help the factory take preventive measures to avoid production interruptions caused by sudden shutdowns. Furthermore, by effectively identifying the fault type of production line equipment, the number of unnecessary equipment inspections can be reduced, thereby avoiding excessive equipment maintenance and helping to control equipment maintenance costs.
[0033] In another exemplary embodiment, in step S200, preprocessing the operation data includes:
[0034] S201: Cleaning the operation data;
[0035] In this step, the cleaning of the operating data specifically includes: identifying outliers in the operating data through statistical methods (such as mean, standard deviation, interquartile range, etc.) (thresholds can be set, and data points exceeding or below these thresholds are regarded as outliers and marked); checking missing values in the operating data. For missing data points, they can be deleted or filled according to actual conditions (such as filling with mean, median, mode, model prediction value, etc.); checking and deleting duplicate records in the data to avoid unnecessary impact on model training.
[0036] S202: standardizing the operation data after the cleaning;
[0037] In this step, the running data can be standardized by Z-score standardization (zero mean standardization) and Min-Max standardization (minimum-maximum standardization). Through standardization, data of different dimensions and ranges can be converted into a unified standard form to eliminate the influence of dimensions and numerical ranges on model training, thereby improving the generalization ability of the model.
[0038] S203: Fusing the standardized operation data.
[0039] In this step, the fusion of the operation data can be achieved specifically by feature splicing or feature selection, wherein the feature splicing refers to directly splicing different types of features (such as temperature, vibration, pressure, etc.) into a new feature vector. The feature selection refers to the use of feature selection techniques (such as filtering, wrapping, embedding, etc.) to select the most useful features for fault detection from the original feature set, which helps to reduce the number of features and improve the model training efficiency and generalization ability.
[0040] Through data fusion, different types of standardized data can be merged into a unified data set to more comprehensively reflect the operating status of the equipment and improve the accuracy of fault detection.
[0041] In another exemplary embodiment, in step S300, Figure 2 As shown, the production line fault detection model includes:
[0042] An input layer, wherein a feature extraction layer and an autoencoder are connected in parallel after the input layer, and the outputs of the feature extraction layer and the autoencoder are superimposed and connected to the output layer through a feature fusion layer.
[0043] Among them, Figure 3As shown, the feature extraction layer includes a 3×3 convolution layer, a maximum pooling layer, a 5×5 convolution layer, a maximum pooling layer, a 7×7 convolution layer, and a maximum pooling layer. First, the input data is convolved by a 3×3 convolution layer, which generates multiple feature maps, each of which represents different local features in the input data. Next, the maximum pooling layer applies a maximum pooling operation to the feature map after the 3×3 convolution to reduce the size of the feature map while retaining the most significant features, thereby helping the model reduce the amount of calculation and prevent overfitting. Secondly, the pooled feature map is further convolved by a 5×5 convolution layer to capture larger local features from the input data. Then, the maximum pooling operation is performed again to further reduce the dimension and retain important features. Finally, the previously pooled feature map is convolved by a 7×7 convolution layer to capture features in a larger range, which helps the model recognize more complex patterns. The last maximum pooling layer further reduces the dimension by further maximum pooling. In this embodiment, the feature extraction layer composed of convolution layers with different convolution kernels can extract multi-level and multi-scale features from the original operation data, and these features can better characterize the operation status of the equipment. For example, a smaller convolution kernel (such as 3×3) can capture subtle changes in the operation of the equipment (if the temperature of a component of the equipment rises or falls slightly in a short period of time, this change can be captured by a 3×3 convolution kernel. For example, the bearing temperature increases by several degrees within an hour. This change may indicate increased friction or insufficient lubrication. In addition, there may be subtle periodic changes in the vibration signal of the equipment, which may be caused by wear or imbalance of parts. For example, a slight imbalance of the motor rotor will cause increased vibration at a specific frequency. This change can be captured by a 3×3 convolution kernel). Larger convolution kernels (such as 7×7) can capture a wider range of patterns (including periodic patterns and complex patterns in equipment operation, such as daily temperature changes of equipment or pressure changes during regular maintenance; complex patterns, such as mixed signals caused by switching between different operating modes of equipment) and long-term trends (gradual changes in temperature, vibration or pressure in equipment operation data, such as the trend of continuous increase in bearing temperature over a period of time, which may mean that the bearing is gradually wearing out). The combination of these multi-scale features helps the model to understand the operating status of the equipment more comprehensively and helps to detect potential faults more accurately. The feature extraction layer uses convolution layers with different convolution kernels to enable the model to analyze input data from multiple angles and capture different levels of information from local to overall, which can help the model identify various signs that may cause equipment failure. In addition, by using convolution kernels of different sizes, the model can learn more types of features from the operating data without over-relying on specific types of features, thereby helping to reduce the risk of overfitting.
[0044] The autoencoder includes an encoder and a decoder, wherein Figure 4 As shown, the encoder includes an input layer, a hidden layer, a hidden layer and an encoding layer; the decoder includes a hidden layer, a hidden layer and an output layer. In the encoder, the input layer is used to simultaneously receive the preprocessed running data. The hidden layer is transformed by a nonlinear activation function (such as ReLU, Sigmoid, etc.) to extract the abstract features of the data layer by layer. Each hidden layer will learn and extract a more advanced and more abstract feature representation from the input of the previous layer. The output of the encoding layer is a compressed representation of the data, the so-called code, which retains the key information in the input data while removing redundancy and noise. The decoder is used to restore the original input data as much as possible from the output of the encoding layer (i.e., the code), thereby helping the encoder learn an effective representation of the data. During the model training process, the autoencoder learns by minimizing the reconstruction error (such as mean square error MSE) between the input data and the decoder output. This optimization process forces the encoder to extract the key features in the input data so that the decoder can reconstruct the original input based on these features. In summary, the autoencoder can learn the compressed representation (i.e., encoding) of the operating data and reconstruct the original data from the compressed representation through its encoder and decoder structure. This self-supervised learning method enables the autoencoder to capture more abstract and advanced feature representations in the operating data of production line equipment.
[0045] It is worth noting that the innovation of the present application is that a parallel feature extraction layer and an autoencoder are introduced at the same time in the feature extraction stage, wherein the feature extraction layer and the autoencoder extract features from different angles respectively, the feature extraction layer focuses on extracting spatial features through convolution operations, and the autoencoder extracts the deep representation of the data, including potential features, through the encoding and decoding process. This parallel mechanism enables the two feature extraction methods to complement each other, and a richer and more comprehensive representation of the state of the production line equipment can be obtained, which helps the model to more accurately identify signs of equipment failure, thereby improving the accuracy and reliability of fault detection. In addition, the feature extraction layer and the autoencoder set in parallel can process the input operation data in parallel, thereby improving the efficiency of data processing. This parallel processing method helps to accelerate the training and reasoning process of the model, so that the model can respond to the real-time data changes of the production line equipment more quickly. Furthermore, by combining the feature extraction layer and the autoencoder in parallel, the model can learn richer and more diverse feature representations, which helps the model to better adapt to different operating environments and failure modes, thereby improving the generalization ability of the model.
[0046] Exemplarily, this application uses examples to illustrate what additional features can be extracted from the running data when the feature extraction layer and the autoencoder are used for feature extraction simultaneously compared to using them separately, as described below:
[0047] 1. Use the feature extraction layer alone
[0048] The feature extraction layer is mainly used to extract local features in space or time from the original running data. These features may include:
[0049] Subtle local features: such as slight changes in the temperature of a certain part of the equipment in a short period of time, or subtle periodic fluctuations in the vibration signal of the equipment. These features are often hidden in a large amount of raw data, but can be effectively captured by a small-sized convolution kernel (such as 3×3).
[0050] Larger local features: A larger convolution kernel size (e.g., 7×7) can capture a wider range of features, such as periodic patterns in equipment operation (e.g., daily temperature variations) or long-term trends in specific components (e.g., a continuous increase in bearing temperature).
[0051] However, when the feature extraction layer is used alone, it mainly focuses on local and short-term features and has limited ability to capture global and long-term dependencies.
[0052] 2. Using Autoencoder Alone
[0053] In production line fault detection, the autoencoder can learn the overall distribution and internal structure of the operating data, which helps to identify abnormal data that deviates from the normal pattern. In addition, the autoencoder can extract the nonlinear characteristics of the data through the nonlinear activation function of the hidden layer.
[0054] However, when used alone, the autoencoder cannot directly capture fine local features like the feature extraction layer, especially those with obvious spatial or temporal characteristics.
[0055] 3. Use feature extraction layers and autoencoders simultaneously
[0056] The feature extraction layer extracts multi-level and multi-scale local features through convolution kernels of different sizes, while the autoencoder is responsible for capturing the global structure and nonlinear characteristics of the data. By combining local and global features, the model can more accurately identify abnormal data of production line equipment during operation, and has stronger robustness and generalization capabilities for different equipment states and failure modes. In addition, since the autoencoder can learn the compressed representation of the data, it helps to reduce redundant information. At the same time, the multi-scale feature extraction of the feature extraction layer can also reduce the model's dependence on specific features, thereby reducing the risk of overfitting.
[0057] For example, there is a motor on the production line, whose operating data includes temperature, vibration and pressure data. This application extracts features from the data by using the feature extraction layer alone, the autoencoder alone, and the feature extraction layer and the autoencoder at the same time. The specific extraction results are as follows:
[0058] Using the feature extraction layer alone:
[0059] It can capture subtle periodic fluctuations in the motor vibration signal (such as vibration caused by rotor imbalance) or small temperature changes of a component (such as a bearing) in temperature data.
[0060] Using the autoencoder alone:
[0061] The overall characteristics of the motor under different operating conditions can be learned, including the data distribution under normal operating conditions and potential fault conditions.
[0062] Using feature extraction layers and autoencoders together:
[0063] It can not only capture the above-mentioned local features, such as subtle periodic fluctuations in vibration signals and small changes in temperature data, but also learn the global operating characteristics of the motor, such as overall temperature distribution and vibration trends. These features combined can more comprehensively reflect the operating status of the motor and help the model identify potential faults more accurately.
[0064] In summary, compared with using the feature extraction layer or autoencoder alone, using both can extract more comprehensive and rich features. These features contain both local details and global structures, which can more accurately reflect the operating status of the equipment and improve the accuracy and reliability of the production line fault classification detection model.
[0065] The feature fusion layer is used to fuse the multiple features extracted by the feature extraction layer to obtain multi-scale fusion features. Figure 5 As shown, the feature fusion layer includes multiple bidirectional long short-term memory networks (Bi-LSTM), each of which is composed of a forward LSTM and a backward LSTM, and the forward LSTM in each bidirectional long short-term memory network is connected in series (i.e. Figure 5 The arrow in the middle points to the right), and the backward LSTM in each bidirectional long short-term memory network is connected in series (i.e. Figure 5The arrow in the middle points to the left), that is, multiple bidirectional long short-term memory networks are connected in parallel. At the same time, the forward LSTM in the parallel multiple bidirectional long short-term memory networks is connected in series in sequence, and the backward LSTM is also connected in series in sequence, which can ensure that the features can be fully processed from front to back and from back to front in the time dimension, so that the model can not only capture the historical information in the sequence (for example, the temperature data of the production line equipment at the most recent time point, the vibration intensity and frequency of the production line equipment at each time point, and the pressure value of the production line equipment at different time points), but also capture the future information in the sequence (for example, based on the current and historical temperature data, predict the temperature change trend of the production line equipment at the next few time points, predict the vibration behavior of the equipment in the future time period, whether there will be regular enhancement or weakening, based on the existing pressure data, predict the pressure change in the next period of time, whether there is a potential pressure increase or pressure reduction phenomenon), thereby improving the model's ability to understand complex sequences, so that the model can more accurately detect the fault category of the production line equipment. . Specifically, the feature extraction layer first extracts relevant features from the original operation data, the autoencoder further refines the features, removes redundant information, and retains the most valuable parts. The extracted features are combined with the features generated by the autoencoder to form a combined feature. The combined feature enters each Bi-LSTM unit respectively, and the forward LSTM in each Bi-LSTM unit processes the features from front to back to capture the early information of the time series (for example, including the initial temperature after the equipment is started and its changes in the first hour. If the temperature is abnormally high or rises rapidly when the equipment is started, it may indicate that there is a problem with the cooling system; another example includes the vibration level and frequency at the beginning of the equipment startup. If the vibration is abnormally strong when the equipment is started, it may indicate an imbalance or mechanical problem). At the same time, the backward LSTM processes the features from back to front to capture the late information in the sequence (for example, including the temperature changes of the equipment at the last few time points. If the temperature of the equipment continues to rise in the recent period of time, it may indicate an overheating risk; another example includes the vibration level and frequency of the equipment in the recent time period. If the vibration is significantly enhanced in the recent time, it may indicate loose parts or wear). The captured early information and late information are integrated to form a multi-scale feature representation, which can not only capture subtle changes in production line equipment in the short term (such as temperature fluctuations in a short period of time or subtle periodic changes in vibration), but also identify trend changes in production line equipment over a longer period of time (such as a gradual increase in temperature or a gradual increase in vibration). Therefore, it can provide information about the health status of production line equipment based on a more comprehensive perspective, allowing the model to identify local and global anomalies, thereby enhancing the ability to detect different types of faults.
[0066] In this embodiment, the combined features are sent to the forward and backward LSTMs respectively, so that the model can extract features from two directions at the same time, so that the model can capture more complex and comprehensive sequence information.
[0067] Specifically, this embodiment fuses the combined features by the following method:
[0068] First, the combined features need to be encoded to convert them into digital form, wherein one-hot encoding is used for the discrete features in the combined features, and each category of each discrete value is converted into a binary vector with only one 1 and the rest are 0. Through feature encoding, the following two effects can be achieved: one is conversion and abstraction, that is, converting the original input data into a format that is easy for the machine learning model to recognize and process, so as to accurately capture and express the key information in the data, while eliminating useless or redundant parts, so that the model can work more focused; the second is dimensionality reduction and enhancement. This process not only reduces the complexity of the feature space, but also extracts more representative and descriptive features, which can effectively improve the efficiency and effectiveness of the model, and enhance its applicability and accuracy in complex environments.
[0069] Secondly, after the feature encoding is completed, it is necessary to further extract feature vectors, for example, feature vector A represents frequency domain features, feature vector B represents time domain features, and feature vector C represents time-frequency domain features. The extracted feature vectors A, B, and C are processed through a fully connected layer (FC). Each fully connected layer can further extract features and prepare them for fusion. For example, addition and subtraction can be used for fusion, that is:
[0070] Fusion features = α·FC(A)+β·FC(B)+γ·FC(C)
[0071] Among them, α, β, and γ represent weight coefficients, which are used to adjust the influence of different feature vectors on the final fusion features. These weights can be automatically learned through the model training process, or manually set based on prior knowledge.
[0072] Below, this application provides an exemplary description of the above feature fusion:
[0073] Assuming that there are frequency domain features F1, time domain features F2 and time-frequency domain features F3, the frequency domain feature F1 is passed through the fully connected layer to obtain the feature vector A', the time domain feature F2 is passed through the fully connected layer to obtain the feature vector B', and the time-frequency domain feature F3 is passed through the fully connected layer to obtain the feature vector C'. Set the weight coefficients α = 0.4, β = 0.3, γ = 0.3, then:
[0074] Multi-scale fusion feature E = 0.4·A'+0.3·B'+0.3·C'
[0075] Through the above method, the information in different feature domains can be effectively fused together to form a multi-scale fusion feature containing more comprehensive and richer information, thereby improving the accuracy and reliability of fault detection.
[0076] It should be noted that after obtaining the multi-scale fusion feature E, it needs to be normalized to scale the feature E to the range of [0,1] to prevent the problem of inconsistent scales of different features.
[0077] In addition, a multi-head attention mechanism is also set after each bidirectional long short-term memory network, and the combined features enter the forward LSTM and backward LSTM for forward propagation and backward propagation respectively, and then enter the multi-head attention mechanism at the same time. The multi-head attention mechanism expands the model's ability to pay attention to different positions by running multiple attention functions (for example, including dot product attention functions and additive attention functions) in parallel, and each head can independently pay attention to different parts of the input sequence. For example, in production line equipment fault detection, for temperature data, one head in the multi-head attention mechanism may focus on short-term fluctuations in equipment temperature, while another head may focus on temperature change trends within a day. In addition, for vibration data, one head in the multi-head attention mechanism may focus on high-frequency components in the vibration signal, and another head may focus on low-frequency components, so as to capture the vibration characteristics of the equipment at different frequencies. Further, for pressure data, one head in the multi-head attention mechanism may focus on instantaneous changes in equipment pressure, while another head may focus on diurnal changes in equipment pressure.
[0078] For example, suppose there is a sequence containing temperature, vibration, and pressure data, and a multi-head attention mechanism is used to process this data. Three attention heads need to be defined, each of which focuses on a different part of the sequence.
[0079] Head 1: Focuses on subtle changes in temperature data, such as short-term fluctuations in temperature.
[0080] Head 2: focuses on periodic changes in vibration data, such as the vibration pattern of a device at a certain frequency.
[0081] Head 3: Focuses on long-term trends in pressure data, such as a gradual increase in equipment pressure.
[0082] Each head computes the attention score independently and produces a weighted context vector. These context vectors can be concatenated to form a more informative vector, or averaged to reduce information redundancy. For example, if dot product attention is used, the calculation for each head is as follows:
[0083] Head1=Attention(Q1,K1,V1)
[0084] Head2=Attention(Q2,K2,V2)
[0085] Head3=Attention(Q3,K3,V3)
[0086] Concatenate the outputs of the above three heads to form the final multi-head attention output:
[0087] MultiHead(Q,K,V)=Concat(Head1,Head 2,Head3)W O
[0088] Among them, Q represents the query matrix, K represents the key matrix, V represents the value matrix, and W O Represents a learnable weight matrix that linearly transforms the outputs of multiple heads produced by the multi-head attention mechanism so that they can eventually be merged into a single output vector.
[0089] The multi-head attention mechanism enables the production line fault detection model to capture more details by focusing on different parts of the input data from multiple angles. On the other hand, since the multi-head attention mechanism can analyze data from multiple angles, the model can be better generalized to new data sets, thereby improving the robustness of the production line fault detection model.
[0090] In summary, the combined features enter the forward LSTM and backward LSTM for forward propagation and backward propagation respectively, and then enter the multi-head attention mechanism at the same time, which can fully utilize the complementarity of bidirectional LSTM and the powerful feature extraction ability of the multi-head attention mechanism, thereby significantly improving the detection performance of the production line fault detection model.
[0091] Furthermore, each multi-head attention mechanism is sequentially provided with a normalization layer and a fully connected layer, wherein the normalization layer can normalize the input feature data so that the distribution of the feature data is kept within a certain range, avoiding excessive fluctuations in the feature value during the training process, thereby stabilizing the training process of the production line fault detection model; in addition, through the normalization layer, the normalized data can accelerate the convergence speed of the gradient descent algorithm and reduce the training time, so that the production line fault detection model can converge to the optimal solution faster. The fully connected layer can further combine and transform the features output by the normalization layer to extract higher-level feature representations. Through nonlinear activation functions (such as ReLU, Sigmoid, etc.), the fully connected layer can capture complex nonlinear relationships and map features to the target space of classification or regression. In summary, in the process of equipment fault identification, the normalization layer stabilizes the training process and accelerates the convergence of the production line fault detection model; and the fully connected layer extracts global features through feature combination and transformation, thereby improving the accuracy and reliability of fault detection.
[0092] The output layer is used to output the fault category of the production line equipment through the Softmax activation function.
[0093] In another exemplary embodiment, in step S300, the production line fault detection model is trained by the following steps:
[0094] S301: Collect historical normal operation data samples and fault data samples of the equipment and form a data set, and divide the data set into a training set and a validation set in proportion after preprocessing, for example, the division ratio is 8:2; each fault data sample contains not only the operation data of the equipment (such as temperature, vibration and pressure data), but also a manually annotated label to identify the fault category to which the sample belongs;
[0095] S302: Set the training batch size to 32, the number of training rounds to 100, and the learning rate to 0.001, train the model using the training set, calculate the cross entropy loss function of the model during the training process, and use the Adam optimization algorithm to optimize the loss function until the loss function converges;
[0096] S303: Use the validation set to validate the model. During the validation process, use accuracy, recall and F1 score as evaluation indicators to evaluate the performance of the model. When all indicators reach 0.9 or above, the model validation is successful; otherwise, adjust the training parameters (for example, adjust the number of training rounds to 200, adjust the learning rate to 0.05) or expand the training samples to retrain the model until the model validation is successful.
[0097] In another embodiment, the cross entropy loss function is expressed as:
[0098]
[0099] Where N is the number of samples; C is the number of categories; y nc Represents an indicator variable. If the true category of the nth sample is the cth category, then y nc =1, otherwise 0; y' nc Represents the probability that the model predicts that the nth sample belongs to the cth class; θ j represents the jth training parameter in the model parameters; J represents the number of all parameters; λ represents the regularization coefficient.
[0100] This embodiment uses a cross-entropy loss function with a regularization term during the training process, wherein the regularization term helps to limit the size of the model weights, thereby reducing the complexity of the model and reducing the risk of overfitting, thereby ensuring to a certain extent that the model not only performs well on the training data, but also generalizes better to unseen data. In addition, the use of regularization helps to sparse the model weights, and the weights corresponding to some unimportant features may be compressed close to zero, thereby simplifying the model and improving computational efficiency. In short, by introducing a cross-entropy loss function with a regularization term, it can be ensured that the model avoids overfitting problems while learning the characteristics of equipment failures, thereby being able to more accurately identify equipment failures on the production line.
[0101] Below, this application provides an illustrative description of the above-mentioned method in combination with specific data.
[0102] Assume that multiple sensors are installed on a production line to collect equipment operation data, including temperature data, vibration data, and pressure data. The temperature data is obtained from the sensor of equipment A and recorded every 5 minutes, for a total of 24 hours of data, or 288 data points. The vibration data is also obtained from the vibration sensor of equipment A, with the same frequency as the temperature data, and 288 data points are also recorded. The pressure data is obtained from the pressure sensor of equipment A, and 288 data points are also recorded.
[0103] After preprocessing, the above data is simultaneously input into the feature extraction layer and the autoencoder through the input layer. The feature extraction layer can detect subtle local features and larger local features in the input data, wherein the subtle local features include slight temperature changes in temperature data, such as slight temperature fluctuations of a certain component of the equipment in a short period of time; and also include subtle periodic fluctuations in vibration signals, such as slight changes in vibration frequency and amplitude caused by wear or imbalance of equipment parts; and further include subtle changes in pressure data, such as load changes of equipment or slight leakage of a certain pressure point. The larger local features include, for example, periodic patterns in equipment operation (such as daily temperature fluctuation cycles of temperature data) or long-term pressure change trends of a certain pressure sensor. The autoencoder can learn the overall distribution and internal structure of temperature, vibration and pressure data through nonlinear transformation of multiple hidden layers. For example, for temperature data, the autoencoder can learn the temperature distribution range of the equipment during normal operation. When the actual temperature exceeds this range, it can be considered abnormal. When the temperature, vibration and pressure data are simultaneously input into the feature extraction layer and the autoencoder, the former can capture subtle local and short-term features, while the latter can capture global and nonlinear features. By combining the outputs of the two, a more comprehensive and rich representation of the device status can be obtained, thereby more accurately identifying signs of device failure. The features extracted by the feature extraction layer and the autoencoder are combined and fused by the feature fusion layer, and the key information is further extracted through the multi-head attention mechanism. Finally, the fault category of the device is output as "motor failure" through the output layer.
[0104] Furthermore, the present application is also compared with classic detection models including support vector machines (SVM) and convolutional neural networks (CNN). It is assumed that a public data set containing temperature, vibration and pressure data is used, and the data set contains data under normal operation of the equipment and various fault conditions. After the public data set is passed through the model constructed by this method and the above-mentioned classic model, the detection results shown in Table 1 are obtained respectively.
[0105] Table 1
[0106]
[0107] It can be seen from Table 1 that the fault detection model proposed in this application performs best in terms of accuracy, recall rate and F1 score of fault category recognition.
[0108] Furthermore, the present application tested a device on a production line based on the above three models. After laboratory testing, the device was found to have a "motor failure". The test results of the three models are as follows:
[0109] The fault category detected by the support vector machine (SVM) is "bearing fault".
[0110] The detection result of the convolutional neural network (CNN) is "normal", that is, no fault is detected.
[0111] The fault category detected by the fault detection model proposed in this application is "motor fault", which is consistent with the actual situation.
[0112] In this example, the model proposed in this application correctly identified the motor fault, while the support vector machine misdiagnosed it as a bearing fault, and the convolutional neural network failed to identify the existence of the fault. Combining Table 1 and this example, it can be shown that the fault detection model of this application is more accurate in identifying specific fault types and can effectively classify the faults of production line equipment.
[0113] In another exemplary embodiment, Figure 6 As shown, the present application also provides a production line fault detection device based on industrial Internet of Things, the device comprising: an acquisition module 100, used to collect operating data of the equipment to be detected on the production line, the operating data comprising temperature data, vibration data and pressure data; a preprocessing module 200, used to preprocess the operating data; a model building and training module 300, used to build a production line fault detection model and train the production line fault detection model; the production line fault detection model introduces a feature extraction layer and an autoencoder arranged in parallel, the feature extraction layer and the autoencoder arranged in parallel extract features from the operating data of the equipment to be detected from different angles to obtain a comprehensive representation of the equipment status of the production line; a fault category identification module 400, used to input the preprocessed operating data into the trained model to output the fault category of the equipment to be detected on the production line.
[0114] In another exemplary embodiment, the preprocessing module includes: a cleaning submodule for cleaning the operation data; a standardization submodule for standardizing the cleaned operation data; and a fusion submodule for fusing the standardized operation data.
[0115] Based on the above embodiments, Figure 7 , for an explanation of the computer-readable storage medium of the exemplary embodiment of the present application, please refer to Figure 7, the computer-readable storage medium shown is a CD 40, on which a computer program (i.e., a program product) is stored. When the computer program is executed by the processor, each step recorded in the above method implementation will be implemented, for example, collecting the operation data of the equipment to be detected on the production line; preprocessing the operation data; building a production line fault detection model and training the production line fault detection model; inputting the preprocessed operation data into the trained production line fault detection model to output the fault category of the equipment to be detected on the production line. The specific implementation method of each step will not be repeated here.
[0116] It should be noted that the computer-readable storage medium includes but is not limited to phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0117] Based on the above embodiments, the present application also provides an electronic device, as shown below: Figure 8 An electronic device for downloading a file according to an exemplary embodiment of the present application is described.
[0118] Figure 8 A block diagram of an exemplary electronic device 50 suitable for implementing the embodiments of the present application is shown, and the electronic device 50 may be a computer system or a cloud server. Figure 8 The electronic device 50 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0119] like Figure 8 As shown, the electronic device 50 includes but is not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 connecting different system components (including the system memory 502 and the processing unit 501).
[0120] The electronic device 50 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 50, including volatile and non-volatile media, removable and non-removable media.
[0121] The system memory 502 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 5021 and / or cache memory 5022. The electronic device 50 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the ROM 5023 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 is not shown in the Figure 8 As shown in FIG. 5 , a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) can be provided. In these cases, each drive can be connected to bus 503 via one or more data medium interfaces. System memory 502 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of each embodiment of the present application.
[0122] A program / utility 5025 having a set (at least one) of program modules 5024 may be stored, for example, in system memory 502, and such program modules 5024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 5024 generally perform the functions and / or methods of the embodiments described herein.
[0123] The electronic device 50 may also communicate with one or more external devices 504 (e.g., a keyboard, a pointing device, a display, etc.). Such communication may be performed via an input / output (I / O) interface 505. Furthermore, the electronic device 50 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 506. Figure 8 As shown, the network adapter 506 communicates with other modules (such as the processing unit 501, etc.) of the electronic device 50 via the bus 503. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 50 .
[0124] The processing unit 501 executes various functional applications and data processing by running the program stored in the system memory 502, for example, collecting the operating data of the equipment to be detected on the production line; preprocessing the operating data; building a production line fault detection model and training the production line fault detection model; inputting the preprocessed operating data into the trained production line fault detection model to output the fault category of the equipment to be detected on the production line. The specific implementation method of each step is not repeated here. It should be noted that although several units / modules or sub-units / sub-modules of the file concurrent downloading device are mentioned in the above detailed description, this division is only exemplary and not mandatory. In fact, according to the implementation mode of the present application, the features and functions of two or more units / modules described above can be concretized in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be concretized.
[0125] In the description of the present application, it should be noted that the terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0127] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0130] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a cloud server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0131] The above embodiments are only for illustrating the technical concept and features of the present application, and their purpose is to enable people familiar with the technology to understand the content of the present application and implement it accordingly, and they cannot be used to limit the protection scope of the present application. Any equivalent changes or modifications made according to the spirit of the present application should be included in the protection scope of the present application.
Claims
1. A production line fault detection method based on industrial Internet of Things, characterized in that: The method comprises: Collecting operating data of the equipment to be tested on the production line, wherein the operating data includes temperature data, vibration data and pressure data; Preprocessing the operation data; Constructing a production line fault detection model and training the production line fault detection model; the production line fault detection model introduces a feature extraction layer and an autoencoder arranged in parallel, and the feature extraction layer and the autoencoder arranged in parallel extract features of the operating data of the equipment to be detected from different angles to obtain a comprehensive representation of the equipment status of the production line; The preprocessed operating data is input into the trained production line fault detection model to output the fault category of the equipment to be detected on the production line.
2. The production line fault detection method according to claim 1, characterized in that: Preprocessing the operation data includes: Cleaning the operation data; Standardizing the running data after the cleaning; The standardized operating data are fused.
3. The production line fault detection method according to claim 1, characterized in that: The production line fault detection model includes: An input layer, wherein the input layer is connected to a feature extraction layer and an autoencoder, and the outputs of the feature extraction layer and the autoencoder are superimposed and connected to the output layer through a feature fusion layer.
4. The production line fault detection method according to claim 3, characterized in that: The feature extraction layer comprises: Multiple stacked convolutional layers with different convolution kernels.
5. The production line fault detection method according to claim 3, characterized in that: The autoencoder comprises: encoders and decoders, in, The encoder is used to encode the preprocessed operation data; The decoder is used to reconstruct the running data from the encoding.
6. The production line fault detection method according to claim 1, characterized in that: The production line fault detection model is trained by the following steps: Collect historical normal operation data samples and fault data samples of the equipment to form a data set, and divide the data set into a training set and a validation set in proportion after preprocessing; Set training parameters, use the training set to train the model, calculate the cross entropy loss function of the model during the training process, and use the Adam optimization algorithm to optimize the loss function until the loss function converges; The model is verified using the validation set. During the verification process, accuracy, recall and F1 score are used as evaluation indicators to evaluate the model performance. When all indicators reach the preset values, the model is verified. Otherwise, the training parameters are adjusted or the training samples are expanded to retrain the model until the model is verified.
7. A production line fault detection device based on industrial Internet of Things, characterized in that: The production line fault detection device comprises: A collection module is used to collect operating data of the equipment to be tested on the production line, wherein the operating data includes temperature data, vibration data and pressure data; A preprocessing module, used for preprocessing the operation data; A model building and training module is used to build a production line fault detection model and train the production line fault detection model; the production line fault detection model introduces a feature extraction layer and an autoencoder arranged in parallel, and the feature extraction layer and the autoencoder arranged in parallel extract features from the operating data of the equipment to be detected from different angles to obtain a comprehensive representation of the equipment status of the production line; The fault category identification module is used to input the preprocessed operation data into the trained production line fault detection model to output the fault category of the equipment to be detected on the production line.
8. The production line fault detection device according to claim 7, characterized in that: The preprocessing module comprises: A cleaning submodule, used for cleaning the operation data; A standardization submodule, used for standardizing the operation data after cleaning; The fusion submodule is used to fuse the standardized operation data.
9. A storage medium, characterized in that: The method comprises instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 6.
10. An electronic device, characterized in that: The electronic device comprises: 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 method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Large model-based risk hidden danger identification method and device, electronic equipment and storage medium
CN120298836A
Production task anomaly detection method in industrial internet and related device
CN121167544A
