Edge end fault diagnosis method, system and device based on lightweight network
By collecting and processing mechanical equipment data in real time at the edge, and building a diagnostic model with SimAM module and external attention module, the problem of low diagnostic efficiency in traditional methods is solved, and efficient and real-time mechanical equipment fault diagnosis is achieved.
Patent Information
- Application Number
- CN202411274439.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-11-15
AI Technical Summary
Traditional deep learning models are difficult to meet real-time requirements in mechanical equipment fault diagnosis, and cloud computing cannot efficiently support the connection and computing of a large number of network devices in the Internet of Things, resulting in insecure diagnosis.
Adopt edge-end fault diagnosis method based on lightweight networks, and collect vibration signals and equipment working conditions of mechanical equipment in real time through sensor clusters, upload them to edge nodes for classification and marking, and build a fault diagnosis model with SimAM module and external attention module. The universal diagnostic model is trained in the cloud and personalized training is carried out at the target edge nodes to achieve efficient fault diagnosis.
It improves the real-time and efficiency of mechanical equipment fault diagnosis, reduces network pressure, improves the generalization ability and feature extraction ability of the model, and can efficiently predict faults under specific operating conditions.
Smart Images

Figure CN118965083A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of mechanical equipment fault diagnosis, and in particular to an edge fault diagnosis method, system and device based on a lightweight network. Background Art
[0002] With the rapid development of the Internet of Things and artificial intelligence technologies, the large amount of data generated by mechanical equipment is a major challenge to the fault diagnosis technology of mechanical equipment. Analyzing, diagnosing, and predicting the data generated by mechanical equipment has become the key to ensuring the smooth and safe operation of mechanical equipment. As the core component of modern rotating mechanical equipment, ball bearings, carrying out bearing fault diagnosis research not only helps to improve the fault diagnosis level of mechanical equipment, but also ensures the healthy operation of mechanical equipment, and has high research value. With the successful application of deep learning technology in the field of bearing fault diagnosis, adaptive fault diagnosis methods have overcome the shortcomings of manually extracted features. However, traditional deep learning models often cannot achieve good diagnostic results.
[0003] On the other hand, the main goal behind the Internet of Things is to analyze and process data in the cloud, a process called cloud computing. Cloud computing can process data collected by several interconnected network devices in the cloud. However, with the development of the Internet of Things, the limitations of cloud computing have gradually become apparent. Most application scenarios in the Internet of Things have high real-time requirements, and cloud computing cannot efficiently support the connection and operation of a large number of network devices in the Internet of Things at the same time. The network devices carried by cloud computing cannot operate efficiently when computing resources are limited. In addition, the training and sample labeling of deep learning models require a lot of time, which is not suitable for scenarios with high real-time requirements such as mechanical equipment fault diagnosis. Summary of the invention
[0004] The embodiments of the present application provide an edge fault diagnosis method, system and device based on a lightweight network, thereby solving the problem that existing mechanical equipment fault diagnosis methods are difficult to adapt to scenarios with high real-time requirements, and meeting the demand for real-time troubleshooting of mechanical equipment.
[0005] In the first aspect, an embodiment of the present application provides an edge fault diagnosis method based on a lightweight network, including: collecting vibration signals and equipment operating conditions of mechanical equipment in real time through a sensor cluster, and uploading them to a nearby edge node; classifying the vibration signals based on the equipment operating conditions, and forming personalized operating condition training samples at the corresponding edge nodes; marking the personalized operating condition training samples using the acquisition timestamp, and uploading them to the cloud after compression to form a training sample set; introducing a SimAM module and an external attention module into a deep learning network to construct a fault diagnosis model; training the fault diagnosis model using the training sample set stored in the cloud to obtain a universal diagnosis model, and storing the universal diagnosis model in the cloud; determining the target edge node according to the task requirements, and obtaining the universal diagnosis model from the cloud, and training the universal diagnosis model using the personalized operating condition training samples in the target edge node to obtain a personalized diagnosis model; diagnosing the diagnosis results of the mechanical equipment under the task requirements through the personalized diagnosis model.
[0006] In combination with the first aspect, in a possible implementation manner, the vibration signal includes vibration amplitude, vibration frequency and vibration phase; and the equipment operating condition includes load, speed, temperature and pressure of the mechanical equipment.
[0007] In combination with the first aspect, in a second possible implementation, the classifying the vibration signal based on the equipment operating condition includes: clustering the vibration signal based on the equipment operating condition to obtain groupings of the vibration signals under different operating conditions to form the personalized operating condition training samples.
[0008] In combination with the first aspect, in a third possible implementation method, the introduction of the SimAM module and the external attention module in the deep learning network to construct a fault diagnosis model includes: using the deep learning network as a framework, inserting the external attention module into the feature extraction layer of the deep learning network; adding the SimAM module to the feature extraction layer in the deep learning network, and locating it after the external attention module, to obtain the fault diagnosis model.
[0009] In combination with the first aspect, in a fourth possible implementation method, determining the target edge node according to the task requirements and obtaining the universal diagnostic model from the cloud includes: determining the equipment operating condition according to the task requirements, and determining the corresponding target edge node according to the equipment operating condition; downloading the universal diagnostic model from the cloud to the target edge node based on the task requirements.
[0010] In combination with the first aspect, in the fifth possible implementation method, after obtaining the personalized diagnosis model, it also includes: defining an identification framework for the diagnosis result; obtaining the diagnosis result corresponding to each of the target edge nodes, and assigning a basic probability to it; fusing and normalizing the basic probabilities of each of the target edge nodes to obtain a fused probability; determining the confidence function and likelihood function of the fused probability, and using them to evaluate the confidence of the diagnosis result.
[0011] In combination with the fifth possible implementation method of the first aspect, in a sixth possible implementation method, after obtaining the personalized diagnostic model, it also includes a fault alarm; the alarm level is determined based on the identification framework of the diagnostic result; wherein the identification framework of the diagnostic result includes health, minor fault, serious fault and unknown fault.
[0012] In the second aspect, an embodiment of the present application provides an edge fault diagnosis system based on a lightweight network, including: a data acquisition and processing module, which is used to collect vibration signals and equipment operating conditions of mechanical equipment, and upload them to nearby edge nodes; an edge server module, including several edge nodes, which is used to perform data preprocessing and data classification on the vibration signals to obtain personalized operating condition training samples, and use the personalized operating condition training samples of the target edge nodes to train a universal diagnosis model to obtain a personalized diagnosis model, and use the personalized diagnosis model to diagnose faults of mechanical equipment to obtain diagnosis results; a cloud-based operation and maintenance system module, which is used to aggregate the personalized operating condition training samples to obtain a training sample set, and construct a fault diagnosis model, and train the fault diagnosis model based on the training sample set to obtain a universal diagnosis model; an alarm and verification module, which is used to issue a fault alarm signal based on the diagnosis result, and verify the personalized diagnosis model based on the fault diagnosis result.
[0013] In a third aspect, an embodiment of the present application provides a device for executing an edge fault diagnosis method based on a lightweight network, the device comprising: a processor; a memory for storing processor executable instructions; when the processor executes the executable instructions, it implements an edge fault diagnosis method based on a lightweight network as described in the first aspect or any possible implementation method of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium includes a medium for storing a computer program or instructions. When the computer program or instructions are executed, a lightweight network-based edge fault diagnosis method as described in the first aspect or any possible implementation method of the first aspect is implemented.
[0015] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: This application collects the vibration signals and equipment working conditions of mechanical equipment in real time based on sensors, and uploads them to the cloud through nearby edge nodes, which can improve data transmission efficiency and reduce network pressure. In the cloud, a fault diagnosis model is constructed through a deep learning network with a SimAM module and an external attention module, and the fault diagnosis model is trained using a training sample set to obtain a universal diagnosis model. This universal diagnosis model can achieve efficient, stable and strong generalization feature extraction and health status prediction. The generalization ability of the universal diagnosis model is improved by the external attention module, and important feature information can be accurately captured by adding the SimAM module. By training the universal diagnosis model with personalized working condition training samples, a personalized diagnosis model can be obtained with only a small number of personalized working condition training samples, which improves the model training efficiency and can also predict mechanical equipment failures under specific working conditions. Thereby achieving efficient and timely mechanical equipment fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 A flowchart of a method for edge fault diagnosis based on a lightweight network provided in an embodiment of the present application; Figure 2 A schematic diagram of a framework of an edge fault diagnosis system based on a lightweight network provided in an embodiment of the present application; Figure 3 A schematic diagram of a framework of a fault diagnosis model provided in an embodiment of the present application; Figure 4 It is a structural diagram of the SimAM module provided in the embodiment of the present application; Figure 5 It is a schematic diagram of the diagnostic accuracy of each model under different training batch conditions of the CWRU dataset provided in the embodiment of the present application. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0019] like Figure 1 As shown, the embodiment of the present application provides a flowchart of an edge fault diagnosis method based on a lightweight network. It includes: Step 101: The vibration signal and equipment working condition of the mechanical equipment are collected in real time through the sensor cluster, and the vibration signal and equipment working condition are uploaded to the nearby edge node.
[0020] In the embodiment of the present application, the sensor cluster includes several sensors, and these sensor types include but are not limited to vibration sensors, pressure sensors, temperature sensors and acoustic sensors.
[0021] After collecting the vibration signals and equipment conditions of the mechanical equipment, the sensor cluster uploads these sensor data to the edge nodes near the mechanical equipment through wireless transmission equipment. It should be noted that the data transmitted by the wireless transmission equipment includes not only sensor data such as the vibration signals and equipment conditions of the mechanical equipment, but also the control data source. Among them, the control data source includes the acquisition timestamp of each sensor, as well as the type and number of the sensor corresponding to the acquisition timestamp.
[0022] The vibration signal includes the vibration amplitude, vibration frequency and vibration phase of the vibration generated by the mechanical equipment during operation. The equipment operating conditions include the load, speed, temperature and pressure of the mechanical equipment during operation.
[0023] It should be noted that the present application deploys multiple edge nodes near mechanical equipment to form an edge network. These edge nodes include edge devices, edge servers, edge gateways and other components. Among them, the edge device is used to obtain data (including sensor data and control data source) from the mechanical equipment closest to it. The edge server is used to work with the cloud server to transmit data. The edge gateway is used to ensure the security and reliability of the data transmission process.
[0024] Specifically, multiple edge nodes are deployed at different locations around the mechanical equipment. These edge nodes have certain data storage and data processing capabilities (such as data cleaning and data compression), and can process data in real time and batches according to needs. After the sensor cluster collects vibration signals and equipment conditions, it sends them to nearby edge nodes, thereby completing data transmission with low power consumption and high real-time performance.
[0025] Step 102: Classify the vibration signal based on the equipment working condition, and form personalized working condition training samples at the corresponding relative edge nodes.
[0026] Specifically, the vibration signals are clustered based on the equipment working conditions, and based on the different equipment working conditions (load, speed, temperature and pressure, and their specific data), the vibration signals under different working conditions are grouped to form personalized working condition training samples.
[0027] For example, when an edge node is closest to a temperature sensor, the data it receives is the temperature of the mechanical equipment during operation. When the equipment working condition is classified at the edge node, the temperature is classified. For example, the temperature is clustered into four groups at the edge node: lower than normal temperature, normal temperature, higher than normal temperature, and extremely high temperature. Each group contains other equipment working conditions and vibration signals within the corresponding temperature range.
[0028] It should be noted that clustering is to group each vibration signal according to the similarity of several vibration signals without specific labels to determine the classification basis. Exemplarily, in the embodiment provided in the present application, the clustering method used is the K-means clustering method.
[0029] Step 103: Use the acquisition timestamp to mark the personalized working condition training samples, compress the marked personalized working condition training samples and upload them to the cloud to form a training sample set.
[0030] Specifically, each vibration signal in the personalized working condition training sample is marked with the corresponding acquisition timestamp when the vibration signal is collected, so as to ensure the consistency and reliability of the personalized working condition training sample, and facilitate data backtracking and fault analysis after fault diagnosis. The marked personalized working condition training samples are compressed according to the set data batch size, and the compressed personalized working condition training samples are uploaded to the cloud. The cloud aggregates the personalized working condition training samples uploaded by each edge node to obtain the training sample set under each equipment working condition.
[0031] Step 104: Introduce the SimAM module and the external attention module into the deep learning network to build a fault diagnosis model.
[0032] It should be noted that the SimAM module, whose full English name is Sim Attention Modules, is a lightweight, parameter-free attention module mechanism.
[0033] Specifically, Figure 3 As shown, Figure 3 A schematic diagram of the framework of the fault diagnosis model provided in the embodiment of the present application. In which, the deep learning network model is used as the framework, the external attention module is inserted into the feature extraction layer in the deep learning network model, and the SimAM module is added to the feature extraction layer in the deep learning network model and is located after the external attention module, a lightweight feature extraction layer is generated, and a fault diagnosis model is obtained.
[0034] It should be noted that the deep learning network model also includes an input layer and an output layer. The input layer is located before the lightweight feature extraction layer, and the output layer is located after the lightweight feature extraction layer.
[0035] Among them, the input layer includes an average pooling module and a convolution module. The convolution module includes a convolution layer and a BN+GELU activation function. The convolution module is used to perform convolution processing on the sample data in the training sample set in the cloud to optimize the training sample set.
[0036] It should be noted that Figure 3 In the BN+GELU activation function, BN refers to the Batch Normalization layer, which can perform batch normalization operations. The GELU activation function refers to Gaussian Error Linear Units, which introduces the characteristics of Gaussian distribution to provide stronger nonlinear modeling capabilities and smoother activation characteristics for deep learning network models.
[0037] exist Figure 3 In the figure, the lightweight feature extraction layer includes an external attention module, a SimAM module, a Norm&Add layer, and a forward propagation layer. The full name of Norm is Normalization, which means normalization. Add means addition. The Norm&Add layer is used to perform residual connection and layer normalization operations on sample data, that is, to add the input and output of a module to assist gradient propagation, and then normalize the summed result. The forward propagation layer is used to calculate layer by layer from the input direction to the output direction to obtain the loss value.
[0038] The output layer includes an average pooling module and a flattening layer.
[0039] Step 105: Train the fault diagnosis model using the training sample set stored in the cloud to obtain a universal diagnosis model, and store the universal diagnosis model in the cloud.
[0040] Specifically, the present application uses a training sample set formed by personalized working condition training samples received from each edge node in the cloud to train a fault diagnosis model to obtain a universal diagnosis model. The universal diagnosis model has a high generalization ability and can meet the fault diagnosis needs of different mechanical equipment under different equipment working conditions.
[0041] It should be noted that in the present application, steps 101 to 105 are performed in real time during the entire fault diagnosis process. The edge node collects equipment operating conditions and vibration signals in real time, and cleans, classifies, marks, and compresses the collected equipment operating conditions and vibration signals in real time or in batches according to demand, and then uploads them to the cloud for training of the universal diagnosis model. In this way, the network bandwidth occupancy ratio is reduced, the data transmission efficiency is improved, the processing burden of the edge server is reduced, and the training sample set of the universal diagnosis model can be continuously expanded. Using the latest data to train the universal diagnosis model in real time in the cloud can enable the universal diagnosis model to adapt to the data change trend, improve its accuracy and generalization ability, reduce deviations, and avoid overfitting.
[0042] Exemplarily, the temperature of mechanical equipment rises rapidly and then gradually stabilizes as its working time increases. Under the influence of temperature changes, the load, speed and pressure of mechanical equipment will be affected and changed synchronously. There is a nonlinear relationship between the working conditions of each equipment. A change in one equipment working condition will cause changes in other equipment working conditions. When these equipment working conditions are within the normal range of variation, they can gradually tend to balance. Once a certain equipment working condition exceeds the normal range of variation, the probability of mechanical equipment failure will increase. The real-time execution of steps 101 to 105 in this application can ensure that the universal diagnostic model is trained with the latest equipment working conditions and vibration signals to adapt to the changes in equipment working conditions over working time, thereby improving its accuracy.
[0043] Step 106: Determine the target edge node according to the task requirements, obtain the universal diagnosis model from the cloud, and use the personalized working condition training samples in the target edge node to train the universal diagnosis model to obtain a personalized diagnosis model.
[0044] Specifically, the universal diagnostic model is downloaded from the cloud to the target edge node based on the task requirements.
[0045] The personalized working condition training samples in the target edge node are used to perform transfer learning on the universal diagnosis model to obtain a personalized diagnosis model.
[0046] Determine the equipment operating conditions according to the task requirements, and determine the corresponding target edge nodes based on the equipment operating conditions.
[0047] In the embodiment of the present application, the universal diagnostic model is downloaded from the cloud to the target edge node, and the universal diagnostic model is trained using a small number of personalized working condition training samples on the target edge node to obtain a personalized diagnostic model. Based on the universal diagnostic model, the personalized diagnostic model only requires fewer personalized working condition training samples and time to complete the training, and can realize fault diagnosis of mechanical equipment under specific working conditions.
[0048] Step 107: diagnose the diagnosis result of the mechanical equipment under the task requirement by the personalized diagnosis model. Specifically, the vibration signal in the target edge node under the task requirement is input into the trained personalized diagnosis model to obtain the diagnosis result of the mechanical equipment.
[0049] It should be noted that after obtaining the personalized diagnosis model, the verification operation of the personalized diagnosis model is also included, specifically: Define the identification framework for diagnostic findings.
[0050] Obtain the corresponding diagnosis results of each target edge node and assign basic probabilities to them.
[0051] The basic probabilities of each target edge node are fused and normalized to obtain the fused probability.
[0052] The confidence function and likelihood function of the fusion probability are determined, and the confidence of the diagnosis result is evaluated using the confidence function and likelihood function.
[0053] It should be noted that the belief function and the likelihood function are two key function concepts in the DS evidence theory (full name: Dempster-Shaferenvidence theory, also known as DS theory, which is a complete theory for dealing with uncertainty problems). In this application, the DS evidence theory is used to verify the accuracy of the personalized diagnosis model provided in the embodiment of this application.
[0054] The credibility function is the degree of trust that hypothesis A (represented as the accurate state of the personalized diagnosis model in the embodiment of the present application, i.e., the assumption that the personalized diagnosis model meets the requirements of the fault diagnosis model required by the embodiment of the present application) is true, i.e., the lower limit estimate of the degree of trust. It is defined as the sum of the basic probability assignments BPA (full name in English: Basic Probability Assignment, which refers to the process of calculating the basic probability of each piece of evidence in the identification framework) of all the support hypothesis A in the identification framework. The mathematical expression of the credibility function is: (1) In the formula, It is called the mass function, also called the basic probability allocation function, which represents the basic probability allocation function of "B", where B represents the focal element in the basic probability allocation BPA, satisfying . It represents the credibility function of the set represented by "A", and A represents the focal element to be obtained (that is, assumption A, in this application, it is assumed that the personalized diagnosis model meets the requirements of the fault diagnosis model required by the embodiment of this application).
[0055] It should be noted that in the embodiment of the present application, due to the empty set Contains no information, so the empty set The basic probability distribution function (i.e. ) are not taken into account in the calculation of the credibility function.
[0056] The likelihood function is the degree of confidence that hypothesis A (in this application, the assumption that the personalized diagnosis model meets the requirements of the fault diagnosis model required by the embodiment of this application) is not false, that is, an upper limit estimate of the degree of confidence. It is defined as the sum of the basic probability distributions of all subsets in the recognition framework that have a non-empty intersection with hypothesis A. Its mathematical expression is: (2) In the formula, is a likelihood function, A represents the focal element to be obtained, that is, hypothesis A (assuming that the personalized diagnosis model meets the requirements of the fault diagnosis model required by the embodiment of the present application), and B represents the focal element within the basic probability distribution BPA.
[0057] and the confidence function Different, likelihood function It considers all possible evidence related to hypothesis A, not just evidence that directly supports hypothesis A. Usually greater than or equal to .
[0058] Therefore, in DS evidence theory, for hypothesis A in the identification framework, the belief function of the hypothesis is calculated according to the basic probability distribution BPA. and the likelihood function , the confidence interval , to indicate the degree of confirmation of hypothesis A.
[0059] like Figure 4 , an embodiment of the present application provides a SimAM module structure. Specifically, in the figure, Generation represents an update operation, Expansion represents an expansion operation, Fusion represents a fusion operation, X represents a matrix suitable for the SimAM module provided by the present application, H represents the height of the feature map, that is, the size or number of pixels of the feature map in the horizontal direction, C represents the number of feature map channels, and W represents the width, that is, the size or parameter of the feature map in the horizontal direction.
[0060] Existing fault diagnosis networks mainly focus on feature information in the channel domain or spatial domain, but the SimAM module can directly generate real three-dimensional weights for each neuron, not just the channel or spatial dimension. This comprehensive attention mechanism can capture important feature information more accurately. The specific process is as follows.
[0061] First, define the energy function of each neuron in the deep learning network: (3) Where t is the time step, The energy function representing the loss or error at time step t, where is the weight of the energy function at time step t, is the bias term of the energy function at time step t, is the true value, is the characteristic of the i-th sample of the energy function, is the observed value or true value at time step t, is the predicted value of the energy function at time step t, usually given by the prediction function of the energy function Given, where is the prediction function of the energy function, is the prediction error of the energy function at time step t, M is the total number of samples, is the value used to calculate the additional error, is the predicted value of the energy function for the i-th sample, usually given by It is calculated that represents the prediction error of the i-th sample.
[0062] Among them, t and is the matrix of a single channel of the input feature The relevant parameters of are usually obtained from the feature map containing C channels. , where R represents the set of real numbers, meaning the matrix Each element in is a real number. In the case of a single channel, C=1. H refers to the size or number of pixels of the feature map in the vertical direction. W refers to the size or number of pixels of the feature map in the horizontal direction.
[0063] Then, we use SGD (Stochastic Gradient Descent) iterations to represent the above values: (4) (5) In the formula, It usually represents the standard deviation of time step t, which is a statistic that measures the degree of dispersion of the data point distribution. is a positive adjustment parameter used to control the size of the denominator in the formula. It can be used to control the smoothness of the model or avoid the denominator being zero. is the average or expected value of all neurons in this channel except t.
[0064] Since formula (4) and formula (5) are obtained on a single channel, it is assumed that all pixels in a single channel follow the same distribution. Based on this assumption, the mean and variance of all neurons on the channel can be expressed, avoiding the average / expected value of neurons at each position. and variance The iterative calculation reduces the computational cost. Therefore, the calculation of the minimum energy can be expressed as: (6) Represents the minimum energy of the energy function.
[0065] Finally, feature refinement is performed through a scaling operator.
[0066] (7) In the formula, Represents the output tensor or matrix after the scaling operator operation. is an activation function, commonly used in deep learning networks, where , which compresses the input value to (0,1). Represents features or weights in deep learning networks. ⊙ indicates that the element-wise product (Hadamard product) is an element-wise multiplication operation of matrices.
[0067] In this way, the importance of different neurons can be determined according to their respective weights, thereby achieving the purpose of more accurately capturing important feature information.
[0068] This application also provides an external attention module, as follows: Unlike the self-attention module that can only focus on the feature association within a single sample, the external attention module can capture the potential correlation between different samples and obtain global feature information from the signal. The external attention module achieves efficient feature updates by using fewer parameters and less complex linear calculations. In addition, since its memory units are shared across datasets, it has a strong regularization effect, which can improve the generalization ability of the model.
[0069] An embodiment of the present application provides a multi-head self attention module (Multi-head self attention).
[0070] The mechanism of external attention is described as follows: First, calculate the input pixel and external storage unit matrix Attention between.
[0071] (8) (9) In the formula, represents a transposed matrix, is the external storage unit matrix, R is a real number set, and S represents the external storage unit matrix The number of rows, d represents the external storage unit matrix The number of columns, F represents the vector, Norm represents the normalization operation, and T represents the transpose.
[0072] For external storage unit matrix The similarity between the i-th pixel and the j-th pixel, are the attention parameters inferred from the learned dataset-level prior knowledge.
[0073] In the formula, Represents the output vector.
[0074] Based on equations (8) and (9), we can conclude that: (10) In the formula, Represents the external storage unit matrix obtained after inference processing.
[0075] It should be noted that the computational complexity of external attention is 0(dSN), where N represents the total number of elements in the set and d represents the external storage unit matrix The number of columns, S represents the external storage unit matrix Therefore, the personalized diagnosis model provided by this application is based on the similarity to represent the characteristics of the multi-head self-attention module.
[0076] It should be noted that the present application uses two different storage units in the multi-head self-attention module as key and value to increase the computing and storage capabilities of the edge network.
[0077] (11) Wherein, A represents the final calculated result. In this application, A represents a normalized matrix or vector, which is usually used to adjust the size or distribution of the vector to prevent the gradient from disappearing or exploding, or to normalize the weights in the external attention mechanism. Represents a weight matrix, which contains the parameters of the model or the characteristics of the input data. is a matrix or vector multiplied by the weight matrix F, where k represents Some related index or specific context information. For example, in the external attention mechanism proposed in the embodiment of the present application, k can represent a "key" vector used to calculate the attention score.
[0078] Therefore, when faced with a large number of fault signals in industrial reality, the external attention mechanism is more effective than the self-attention mechanism because it allows direct application to large-scale input data. In addition, the computational load of the external attention is roughly equivalent to that of a 1×1 convolution, so it does not increase the computational load of the entire network.
[0079] In order to verify the effectiveness of the lightweight fault diagnosis network model provided by the present application, the embodiments of the present application selected four models for comparative verification with the personalized diagnosis model of the present application, namely: CLFormer (full name: Convolutional Embedding and Linear Self-Attention based Former, a lightweight Transformer model based on convolutional embedding and linear self-attention mechanism), conformer nse (a sequence model with an improved self-attention mechanism based on the Transformer model), U-Net (a popular deep learning model) and ResNet18 (a classic model in the residual network (ResNet) series with a depth of 18 layers).
[0080] Among them, CLFormer and Conformer NSE are two transformer-based end-to-end fault diagnosis models. U-Net and ResNet18 are two commonly used CNN (full name: Convolutional Neural Network) models.
[0081] Figure 5 It is a schematic diagram of the diagnostic accuracy of each model under different BS (full name: Batch Size) conditions for the CWRU (full name: Case Western Reserve University) data set provided in the embodiment of the present application.
[0082] Figure 5 In the figure, the vertical axis train Accuracy represents the diagnostic accuracy (i.e., training accuracy, expressed in %); the horizontal axis Our model represents the personalized diagnostic model provided in this application, CLFormer, conformer nse, U-Net and ResNet18 represent the names of four comparative and verified models respectively; BS represents training batch, where BS=1 represents training batch 1, BS=2 represents training batch 1, BS=3 represents training batch 3, and BS=4 represents training batch 4.
[0083] like Figure 5As shown, the data set uses the CWRU bearing data set. To reduce randomness, each experiment is repeated 5 times. Each training is performed for 100 iterations, the batch size is 64 times, and the learning rate adopts an adaptive decay mode. Based on the accuracy of the validation set, the grid search method is used to determine the initial learning rate of each method.
[0084] from Figure 5 It can be concluded that the accuracy of the personalized diagnosis model (Our model) provided in this application for four training batches is over 99%. Both CLFormer and conformer use BN (full name: Batch Normalization) as the normalization strategy. As the number of training batches (BS) increases, the accuracy of their diagnosis begins to improve, but when the BS value of the training batch is 1, the performance is poor.
[0085] The model provided in this application also has good accuracy under the condition of a small training batch (BS). The diagnostic accuracy of ResNet18 and U-Net under different training batch (BS) conditions is generally lower than that of the BN-based network. Therefore, it is verified that the personalized diagnosis model designed in the present invention shows good diagnostic effects compared with the above four comparative verification models, thereby verifying the effectiveness of the personalized diagnosis model provided in this application.
[0086] like Figure 2 As shown, the embodiment of the present application provides an edge fault diagnosis system based on a lightweight network, including: The data acquisition and processing module is used to collect vibration signals and equipment operating conditions of mechanical equipment and upload them to nearby edge nodes.
[0087] It should be noted that, in the embodiment of the present application, the sensor cluster includes several sensors, and these sensor types include but are not limited to vibration sensors, pressure sensors, temperature sensors and acoustic sensors.
[0088] After collecting the vibration signals and equipment conditions of the mechanical equipment, the sensor cluster uploads these sensor data to the edge nodes near the mechanical equipment through wireless transmission equipment. It should be noted that the data transmitted by the wireless transmission equipment includes not only sensor data such as the vibration signals and equipment conditions of the mechanical equipment, but also the control data source. Among them, the control data source includes the acquisition timestamp of each sensor, as well as the type and number of the sensor corresponding to the acquisition timestamp.
[0089] The edge server module includes several edge nodes, which are used to perform data preprocessing and data classification on vibration signals to obtain personalized working condition training samples, and use the personalized working condition training samples of the target edge nodes to train a universal diagnosis model to obtain a personalized diagnosis model. The personalized diagnosis model is used to diagnose faults of mechanical equipment to obtain diagnosis results.
[0090] It should be noted that the embodiment of the present application deploys multiple edge nodes near mechanical equipment to form an edge network. These edge nodes include edge devices, edge servers, edge gateways and other components. Among them, the edge device is used to obtain data (including sensor data and control data source) of the mechanical equipment closest to it. The edge server is used to work with the cloud server to transmit data. The edge gateway is used to ensure the security and reliability of the data transmission process.
[0091] Specifically, multiple edge nodes are deployed at different locations around the mechanical equipment. These edge nodes have certain data storage and data processing capabilities (such as data cleaning and data compression), and can process data in real time and batches according to needs. After the sensor cluster collects vibration signals and equipment conditions, it sends them to nearby edge nodes, thereby completing data transmission with low power consumption and high real-time performance.
[0092] The cloud operation and maintenance system module is used to aggregate personalized working condition training samples to obtain a training sample set, and to build a fault diagnosis model. The fault diagnosis model is trained based on the training sample set to obtain a universal diagnosis model.
[0093] The specific process of building a fault diagnosis model is as follows: the cloud operation and maintenance system module is equipped with a deep learning network, and the SimAM module and the external attention module are introduced into the deep learning network to build a fault diagnosis model.
[0094] The alarm and verification module is used to issue a fault alarm signal based on the diagnosis result and verify the personalized diagnosis model based on the fault diagnosis result.
[0095] It should be noted that the alarm and verification module also has a feedback function. Specifically, the alarm and verification module can provide feedback based on the verification module and the fault alarm signal. After receiving the feedback results, the cloud operation and maintenance system module will make repair suggestions, spare parts suggestions, and maintenance suggestions, and display these suggestions to the operation and maintenance personnel through visual instruments. The operation and maintenance personnel can adjust and repair the mechanical equipment based on these suggestions.
[0096] Although the present application provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in this embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in sequence or in parallel according to the method shown in this embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment).
[0097] Some modules in the apparatus described in the present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0098] The devices or modules described in the above application embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described in various modules according to their functions. When implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware. Of course, the module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.
[0099] The methods, devices or modules described in this application can be implemented in the form of computer-readable program codes. The controller can be implemented in any appropriate manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (English: Application Specific Integrated Circuit; Abbreviation: ASIC), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program codes, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included in it for implementing various functions can also be regarded as structures within the hardware component. Or even, the means for realizing various functions may be regarded as both a software module for realizing the method and a structure within a hardware component.
[0100] An embodiment of the present application further provides a device, comprising: a processor; a memory for storing processor-executable instructions; when the processor executes the executable instructions, the method described in the embodiment of the present application is implemented.
[0101] The embodiments of the present application also provide a non-volatile computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed, the method described in the embodiments of the present application is implemented.
[0102] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist independently, or two or more modules may be integrated into one module.
[0103] The above storage media include but are not limited to random access memory (RAM), read-only memory (ROM), cache, hard disk drive (HDD) or memory card. The memory can be used to store computer program instructions.
[0104] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of the present application can be essentially or partly reflected in the prior art in the form of a software product, or it can be reflected in the implementation process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0105] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. All or part of this application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, mobile communication terminals, multi-processor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0106] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present application.
Claims
1. A method for edge fault diagnosis based on lightweight network, characterized in that: include: The sensor cluster collects the vibration signals and equipment working conditions of mechanical equipment in real time and uploads them to nearby edge nodes; Classifying the vibration signal based on the equipment working condition, and forming a personalized working condition training sample at the corresponding edge node; The personalized working condition training samples are marked by using the acquisition timestamp, and are compressed and uploaded to the cloud to form a training sample set; Introduce SimAM module and external attention module into deep learning network to build fault diagnosis model; Using the training sample set stored in the cloud to train the fault diagnosis model to obtain a universal diagnosis model, and storing the universal diagnosis model in the cloud; Determine the target edge node according to the task requirements, obtain the universal diagnosis model from the cloud, and train the universal diagnosis model using the personalized working condition training samples in the target edge node to obtain a personalized diagnosis model; The diagnosis result of the mechanical equipment under the task requirement is diagnosed by the personalized diagnosis model.
2. The method according to claim 1, characterized in that: The vibration signal includes vibration amplitude, vibration frequency and vibration phase; The equipment operating conditions include load, speed, temperature and pressure of the mechanical equipment.
3. The method according to claim 1, characterized in that The classifying the vibration signal based on the equipment operating condition includes: The vibration signals are clustered based on the equipment working conditions to obtain groups of the vibration signals under different working conditions to form the personalized working condition training samples.
4. The method according to claim 1, characterized in that: The method of introducing the SimAM module and the external attention module into the deep learning network to construct a fault diagnosis model includes: Using a deep learning network as a framework, inserting the external attention module into a feature extraction layer of the deep learning network; The SimAM module is added to the feature extraction layer in the deep learning network and is located after the external attention module to obtain the fault diagnosis model.
5. The method according to claim 1, characterized in that: Determining the target edge node according to the task requirements and obtaining the universal diagnosis model from the cloud includes: Determine the equipment operating condition according to the task requirement, and determine the corresponding target edge node according to the equipment operating condition; The universal diagnostic model is downloaded from the cloud to the target edge node based on task requirements.
6. The method according to claim 1, characterized in that After obtaining the personalized diagnosis model, the method further includes: defining an identification framework for said diagnostic results; Obtaining the diagnosis result corresponding to each of the target edge nodes, and assigning a basic probability thereto; The basic probabilities of the target edge nodes are fused and normalized to obtain a fused probability; A confidence function and a likelihood function of the fused probability are determined and used to evaluate the confidence of the diagnosis result.
7. The method according to claim 6, characterized in that After obtaining the personalized diagnosis model, it also includes fault alarm; The alarm level is determined based on the identification framework of the diagnosis result; wherein the identification framework of the diagnosis result includes healthy, minor fault, major fault and unknown fault.
8. An edge fault diagnosis system based on a lightweight network, characterized in that: include: Data acquisition and processing module, used to collect vibration signals and equipment operating conditions of mechanical equipment and upload them to nearby edge nodes; The edge server module includes a plurality of edge nodes, and is used to perform data preprocessing and data classification on the vibration signal to obtain personalized working condition training samples, and use the personalized working condition training samples of the target edge node to train a universal diagnosis model to obtain a personalized diagnosis model, and perform fault diagnosis on the mechanical equipment through the personalized diagnosis model to obtain a diagnosis result; A cloud operation and maintenance system module, used to aggregate the personalized working condition training samples to obtain a training sample set, and to construct a fault diagnosis model, and to train the fault diagnosis model based on the training sample set to obtain a universal diagnosis model; The alarm and verification module is used to issue a fault alarm signal based on the diagnosis result, and to verify the personalized diagnosis model based on the fault diagnosis result.
9. A device for executing an edge fault diagnosis method based on a lightweight network, characterized in that: include: processor; a memory for storing processor-executable instructions; When the processor executes the executable instructions, it implements an edge fault diagnosis method based on a lightweight network as described in any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium, characterized in that: It includes a computer program or instruction for storing, and when the computer program or instruction is executed, an edge fault diagnosis method based on a lightweight network as described in any one of claims 1 to 7 is implemented.
