Fault prediction method and device, terminal equipment and readable storage medium
By extracting and preprocessing the equipment operation data and inputting it into the fault prediction model, the problem of insufficient accuracy of equipment failure mode prediction in the prior art is solved, and higher fault prediction accuracy and optimized maintenance decisions are achieved.
Patent Information
- Application Number
- CN202510114776.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art is inadequate in predicting complex equipment failure modes, which may not be able to accurately predict equipment failures, which in turn affects the stability of the production process.
By collecting the operating data of the equipment, feature extraction and preprocessing are performed, and input into the pre-trained fault prediction model to generate fault prediction results and corresponding maintenance decisions. This method uses data analysis and machine learning models to learn to extract complex patterns from large amounts of data, thereby improving the accuracy of failure prediction.
Improve the prediction accuracy of equipment failure mode, reduce false alarms and missed reports, discover potential problems in advance, and generate optimized maintenance decisions, thereby improving the reliability of the equipment and the stability of the production process.
Smart Images

Figure CN120029233A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of equipment fault maintenance, and in particular, relates to a fault prediction method, apparatus, terminal equipment and readable storage medium. Background Art
[0002] Programmable Logic Controller (PLC) plays a vital role in modern industrial automation and control systems. PLC is used to perform logic control functions such as sequence control, conditional control and timing control, which ensure the smooth progress of the production process. Regular maintenance can detect and solve potential problems and prevent production interruptions caused by equipment failure.
[0003] In related technologies, many companies and organizations use remote maintenance and predictive maintenance technologies. These technologies use modern communication technologies and data analysis capabilities to achieve remote monitoring, fault prediction, and real-time maintenance of PLCs. However, the predictive maintenance methods of related companies and organizations rely on rules and statistical analysis, which may not accurately predict complex equipment failure modes. Summary of the invention
[0004] The embodiments of the present application provide a fault prediction method, apparatus, terminal device, and readable storage medium, which can improve the prediction accuracy of device failure modes.
[0005] In a first aspect, an embodiment of the present application provides a fault prediction method, comprising:
[0006] Collecting first operation data of the operating device;
[0007] Performing feature extraction on the first operation data to obtain first feature data;
[0008] The first characteristic data is input into a fault prediction model to obtain a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result.
[0009] In an embodiment of the present application, operation data is collected from the operating equipment. These data may include sensor data (such as temperature, pressure, vibration, etc.). Useful features are extracted from the collected operation data. Feature extraction may include statistical features (such as mean, variance, maximum value, minimum value, etc.). The extracted feature data is input into a pre-trained fault prediction model. The model will output the fault prediction result of the equipment, and generate corresponding maintenance decisions based on the prediction result. By collecting and analyzing the operation data of the equipment and using the trained prediction model, the equipment failure can be predicted more accurately. Since the prediction model is obtained by learning complex patterns from a large amount of data, it provides more accurate prediction results, reduces false positives and false negatives, discovers potential problems in advance, and generates optimized maintenance decisions. Therefore, the above method can improve the prediction accuracy of equipment failure modes.
[0010] In a possible implementation manner of the first aspect, extracting features from the first operating data to obtain first feature data includes:
[0011] Preprocessing the first operation data to obtain second operation data; wherein the preprocessing includes data cleaning and normalization processing of the first operation data;
[0012] The means, variances, and change rates corresponding to the plurality of operating parameters of the operating device are obtained according to the second operating data to obtain the first characteristic data.
[0013] In the embodiment of the present application, the first feature data generated by preprocessing and feature extraction can improve the quality of the model input data, thereby improving the prediction performance of the model.
[0014] In a possible implementation manner of the first aspect, the process of acquiring the fault prediction model includes:
[0015] Collecting a plurality of first historical operation data corresponding to the operation device;
[0016] Performing data enhancement processing on the plurality of the first historical operation data to obtain a plurality of second historical operation data after the enhancement processing;
[0017] The fault prediction model to be trained is trained according to the plurality of the second historical operation data to obtain the fault prediction model.
[0018] In the embodiment of the present application, the performance and reliability of the fault prediction model can be significantly improved by collecting historical operating data of the operating equipment, performing data enhancement processing and model training.
[0019] In a possible implementation manner of the first aspect, training the fault prediction model to be trained according to the plurality of second historical operation data to obtain the trained fault prediction model includes:
[0020] Performing feature extraction on each of the second historical operation data to obtain a plurality of second historical feature data;
[0021] Input each of the second historical feature data into the fault prediction model to be trained, and obtain a first loss value between a second fault prediction result corresponding to each of the second historical feature data and a preset result, and a second loss value between a second fault maintenance decision corresponding to each of the second fault prediction results and a preset decision;
[0022] Determining a total loss of the fault prediction model to be trained according to the first loss and the second loss value;
[0023] When the total loss of the fault prediction model to be trained has not reached the convergence condition, the parameters of the fault prediction model to be trained are continued to be iteratively trained according to the plurality of the second historical feature data until the total loss of the fault prediction model to be trained reaches the convergence condition, and the training process ends to obtain the trained fault prediction model.
[0024] In the embodiment of the present application, by performing feature extraction, model input, loss calculation and iterative training on each second historical operation data, the performance and reliability of the fault prediction model can be significantly improved.
[0025] In a possible implementation manner of the first aspect, the method further includes:
[0026] The fault prediction model to be trained is connected to an expert system to obtain the second fault maintenance decision corresponding to the second fault prediction result.
[0027] In the embodiment of the present application, the expert system can provide maintenance decisions based on rich experience and professional knowledge. These decisions are usually more accurate and reliable, and help improve the quality of maintenance decisions generated by the model.
[0028] In a possible implementation manner of the first aspect, the method further includes:
[0029] After obtaining a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result, automatically adjusting the operating parameters of the operating equipment according to the first fault maintenance decision;
[0030] After the operating parameters of the operating equipment are adjusted, an early warning signal is generated to prompt the user to detect the operating equipment.
[0031] In the embodiment of the present application, the system can respond to fault prediction results in real time, adjust operating parameters in a timely manner, prevent potential faults, and generate early warning signals to notify users in advance, reminding them to conduct inspections and enhance users' trust in the system.
[0032] In a possible implementation manner of the first aspect, the method further includes:
[0033] Obtaining an actual fault result corresponding to the running device fed back by the user after detecting the running device after receiving the early warning signal;
[0034] The performance of the fault prediction model is determined according to the first fault prediction result and the actual fault result.
[0035] In the embodiments of the present application, by comparing the prediction results with the actual fault results, the performance of the fault prediction model can be objectively evaluated, including indicators such as accuracy, recall rate, and F1 score. According to the performance evaluation results, the shortcomings of the model can be identified, and targeted optimization and adjustment can be performed to improve the prediction ability of the model.
[0036] In a second aspect, an embodiment of the present application provides a fault prediction device, including:
[0037] A data collection module, used for collecting first operation data of the operation device;
[0038] A feature extraction module, used for performing feature extraction on the first operation data to obtain first feature data;
[0039] The fault prediction module is used to input the first characteristic data into a fault prediction model to obtain a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result.
[0040] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a fault prediction method as described in any one of the first aspects above is implemented.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the fault prediction method as described in any one of the above-mentioned first aspects is implemented.
[0042] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the fault prediction method described in any one of the above-mentioned first aspects.
[0043] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 is a flow chart of a fault prediction method provided in an embodiment of the present application;
[0046] Figure 2 It is a schematic diagram of the feature extraction process provided by the embodiment of the present application;
[0047] Figure 3 This is a schematic diagram of the process of training the fault prediction model provided in the embodiment of the present application. Figure 1 ;
[0048] Figure 4 This is a schematic diagram of the process of training the fault prediction model provided in the embodiment of the present application. Figure 2 ;
[0049] Figure 5 It is a schematic diagram of the fault warning process provided by the embodiment of the present application;
[0050] Figure 6 It is a general structural block diagram of the fault prediction method provided in the embodiment of the present application;
[0051] Figure 7 It is a structural schematic diagram of a fault prediction and maintenance device provided in an embodiment of the present application;
[0052] Figure 8 It is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0054] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0055] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0056] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0057] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0058] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0059] Programmable Logic Controller (PLC) plays a vital role in modern industrial automation and control systems. PLC is used to perform logic control functions such as sequence control, conditional control and timing control, which ensure the smooth progress of the production process. Regular maintenance can detect and solve potential problems and prevent production interruptions caused by equipment failure.
[0060] In related technologies, many enterprises and organizations use remote maintenance and predictive maintenance technologies. These technologies use modern communication technologies and data analysis capabilities to achieve remote monitoring, fault prediction and real-time maintenance of PLCs. However, the predictive maintenance methods of related enterprises and organizations rely on rules and statistical analysis or manual analysis, which may result in the inability to accurately predict complex equipment failure modes.
[0061] In order to solve the problems existing in the related art, the embodiments of the present application provide a fault prediction method, apparatus, terminal device and storage medium. The present application provides a fault prediction model, which can learn complex patterns from a large amount of data, thereby accurately providing equipment fault prediction results and reducing false positives and false negatives.
[0062] See also Figure 1 , is a flowchart of a fault prediction method provided in an embodiment of the present application. As an example but not a limitation, the method may include the following steps:
[0063] S101, collecting first operating data of an operating device.
[0064] In the embodiment of the present application, collecting the operating data (first operating data) of the PLC (Programmable Logic Controller) device is an important part of industrial automation and maintenance. First, determine the type of data that needs to be collected from the PLC device and various sensors. Common data types include: equipment operating status such as start / stop status, operating time, etc.; sensor readings such as temperature, pressure, vibration, current, etc.; fault logs such as fault codes, alarm information, etc.; and maintenance records such as the last maintenance time, maintenance content, etc. Then select a suitable communication protocol such as the Modbus serial communication protocol, etc. PLC devices and sensors usually support multiple communication protocols, and select a suitable protocol for data collection.
[0065] S102: extract features from the first operation data to obtain first feature data.
[0066] In the embodiment of the present application, feature extraction of the collected first operation data is an important step in data processing, which can help extract useful information, reduce data dimensions, and improve the efficiency of subsequent analysis.
[0067] In one embodiment, see Figure 2 , is a schematic diagram of the feature extraction process provided by the embodiment of the present application, such as Figure 2 As shown, step S102 includes:
[0068] S201, preprocessing the first operation data to obtain second operation data; wherein the preprocessing includes data cleaning and normalization processing of the first operation data.
[0069] In the embodiment of the present application, cleaning and normalizing the collected raw data (first operation data) is an important step in data preprocessing, which can eliminate the influence of noise and outliers and improve the accuracy and reliability of subsequent analysis. Among them, normalizing the data includes standardizing and normalizing the data. The data obtained after preprocessing the collected raw data (first operation data) is the second operation data.
[0070] Specifically, data cleaning refers to processing the collected raw data to eliminate noise and outliers and ensure data quality, including checking whether there are missing values in the data, and choosing to delete rows or columns with missing values according to actual conditions, or filling missing values with statistical methods or machine learning methods; checking whether there are duplicate records in the data and deleting these duplicate records; identifying and processing outliers in the data through statistical methods (such as Z-score, IQR, etc.). Outliers may be caused by measurement errors or data recording errors, which will seriously affect the accuracy of subsequent analysis.
[0071] Data normalization is the process of converting data into a form with zero mean and unit variance. The purpose of normalization is to make different features have the same scale, thereby preventing certain features from having too much weight in model training. Common normalization methods include min-max annotation, Z-score table conversion, etc. Data normalization is the process of converting data into a specific range, usually between 0 and 1. The purpose of normalization is to make data have the same scale, thereby improving the training efficiency and accuracy of the model. Common normalization methods include min-max normalization and logarithmic normalization.
[0072] S202: Obtain, according to the second operating data, means, variances, and change rates corresponding to a plurality of operating parameters of the operating device, to obtain the first characteristic data.
[0073] In the embodiment of the present application, the second operating data is a data set that has been preprocessed (including outlier processing and normalization processing), and these data have been cleaned and standardized. The second operating data is subjected to feature value extraction, such as feature engineering methods, such as principal component analysis, linear discriminant analysis, etc., to extract features from the second operating data, and the principal components extracted into the PLC device include current, voltage, vibration frequency, temperature, and operating data, etc., as well as obtaining the mean and variance corresponding to each of the current and voltage, calculating the mean and variance of the vibration frequency, calculating the rate of change of the temperature, and calculating the operating time, etc. The above-obtained feature values are combined together to form the first feature data.
[0074] In the above method, the first feature data generated by preprocessing and feature extraction can improve the quality of model input data, thereby improving the prediction performance of the model.
[0075] S103: Input the first characteristic data into a fault prediction model to obtain a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result.
[0076] In an embodiment of the present application, the fault prediction model is a pre-trained model used to predict the fault condition of the device based on the input feature data. The first feature data calculated previously is input into the fault prediction model. The first feature data includes statistical characteristics of multiple operating parameters, such as the mean and variance of current and voltage, the mean and variance of vibration frequency, the temperature change rate, the humidity change rate, the operating time statistics, etc. These feature data can fully reflect the operating status of the device. After inputting the first feature data, the fault prediction model will output a prediction result, namely the first fault prediction result. This result is usually a probability value or a classification label, indicating the possibility of the device failing in the future. For example, the model may output a probability value of 0.8, indicating that the device has an 80% chance of failing in the future.
[0077] According to the first fault prediction result, a corresponding maintenance decision is generated. The maintenance decision may include the following types: if the prediction result indicates that the probability of the equipment failing in the future is low (for example, the probability is lower than a certain threshold), normal operation can continue without immediate maintenance; if the prediction result indicates that the equipment has a medium probability of failing (for example, the probability is within a certain intermediate range), regular inspections can be arranged to ensure the normal operation of the equipment; if the prediction result indicates that the equipment has a high probability of failing (for example, the probability is higher than a certain threshold), immediate maintenance is required to prevent greater losses caused by equipment failure.
[0078] In the above method, by collecting and analyzing the operating data of the equipment and using the trained prediction model, the equipment failure can be predicted more accurately. Since the prediction model is obtained by learning complex patterns from a large amount of data, it provides more accurate prediction results, reduces false positives and false negatives, detects potential problems in advance, and generates optimized maintenance decisions. Therefore, the above method can improve the prediction accuracy of equipment failure modes.
[0079] In one embodiment, see Figure 3 , is a schematic diagram of the process of training the fault prediction model provided in the embodiment of the present application Figure 1 ,like Figure 3 As shown, obtaining the fault prediction model in step S103 includes:
[0080] S301, collecting a plurality of first historical operation data corresponding to the operation device.
[0081] In the implementation of this application, collecting multiple first historical operation data of the running equipment is an important step in fault prediction and maintenance decision-making. These historical data provide the operating status information of the equipment in different time periods, which can be used to train the fault prediction model, thereby improving the accuracy and reliability of the model.
[0082] Specifically, in order to ensure the diversity and representativeness of the data, it is necessary to select multiple time periods for data collection. These time periods may include data when the equipment is operating normally, data when the equipment fails, and data from the normal operation of the equipment to the occurrence of the failure (first historical data). Sensors can be installed at key parts of the equipment to collect data such as current, voltage, vibration, temperature, humidity, etc. in real time. The operation log recorded by the control system or management system of the equipment includes operating time, fault records, etc.
[0083] It should be noted that after collecting the historical data of the PLC device in different time periods, it is also necessary to perform data cleaning and normalization on the multiple historical data, which is the same as the data processing process of the above step S201 and will not be repeated here.
[0084] S302: Perform data enhancement processing on the plurality of first historical operation data to obtain a plurality of second historical operation data after enhancement processing.
[0085] In the implementation of this application, data enhancement is a technology to improve model performance, especially when the amount of data is limited. Through data enhancement, more training data can be generated, thereby improving the generalization ability and robustness of the model. For the historical operation data of the running equipment, data enhancement can be achieved through a variety of methods, such as enhancing the historical data through various transformation methods such as data translation, data scaling, and data interpolation to generate multiple training samples.
[0086] For example, it is assumed that the current data of the first historical data after processing is I=[I 1 ,I 2 ,I 3 ……, I n ], then after being processed by the translation enhancement algorithm in the enhancement algorithm, the enhanced data obtained is I=[I 2 ,I 3 ……, I n , I 1 ]. Among them, the enhanced historical data and the original historical data are called second historical operation data.
[0087] S303: training the fault prediction model to be trained according to the plurality of the second historical operation data to obtain the fault prediction model.
[0088] In the implementation of the present application, the fault prediction model to be trained can be a long short-term memory network (Long Short-Term Memory, LSTM) model, which is a special recurrent neural network (Recurrent Neural Network, RNN) designed to solve the gradient vanishing and gradient exploding problems of traditional RNN when processing long sequence data. LSTM controls the flow of information by introducing a gating mechanism, so that it can effectively capture long-term dependencies.
[0089] The LSTM model is trained using the processed multiple second historical running data, and the input layer-three-layer LSTM hidden layer-output layer is used as the structure of the prediction model. In order to alleviate the overfitting problem, a Dropout layer is added after the hidden layer, and the attention mechanism is introduced to improve the model's attention to key features, and regression is achieved with a fully connected layer as the output layer.
[0090] In the above method, the performance and reliability of the fault prediction model can be significantly improved by collecting historical operating data of the operating equipment, performing data enhancement processing and model training.
[0091] In one embodiment, see Figure 4 , is a schematic diagram of the model training process provided in the embodiment of the present application Figure 2 ,like Figure 4 As shown, step S303 includes:
[0092] S401: Perform feature extraction on each of the second historical operation data to obtain a plurality of second historical feature data.
[0093] In the implementation of this application, feature extraction is performed on each of the second historical operation data to obtain multiple second historical feature data, which is an important step in data preprocessing and feature engineering. The purpose of feature extraction is to extract features useful for model training and prediction from the preprocessed historical data. The method for obtaining the second historical feature data is the same as the method for obtaining the first feature data in the above step S202, and will not be repeated here.
[0094] S402, input each of the second historical feature data into the fault prediction model to be trained, and obtain a first loss value between a second fault prediction result corresponding to each of the second historical feature data and a preset result, and a second loss value between a second fault maintenance decision corresponding to each of the second fault prediction results and a preset decision.
[0095] In the implementation of the present application, the plurality of second historical feature data are divided into a plurality of training sets and a plurality of validation sets. The model is trained using the training set data, and is validated on the validation set to adjust the hyperparameters.
[0096] The second historical feature data in each training set is input into the above-mentioned LSTM model, i.e., the fault prediction model to be trained. The LSTM model generates a second fault prediction result corresponding to each second historical feature data based on the input feature data. These prediction results can be the probability of a fault occurring, the type of fault, etc. The generated second fault prediction result is compared with the preset result (i.e., the true label or target value), and the difference between them is calculated to obtain the first loss value. The first loss value reflects the deviation between the model prediction result and the true result. Common loss functions include mean square error (MSE), cross entropy loss, etc.
[0097] In addition, the LSTM model not only predicts faults, but also generates second fault maintenance decisions corresponding to each second fault prediction result. These decisions can be recommended maintenance measures, maintenance time, etc. The generated second fault maintenance decision is compared with the preset decision (i.e., the actual maintenance measure or target decision), and the difference between them is calculated to obtain the second loss value. The second loss value reflects the deviation between the maintenance decision generated by the model and the actual maintenance decision.
[0098] In one embodiment, step S402 includes:
[0099] The fault prediction model to be trained is connected to an expert system to obtain the second fault maintenance decision corresponding to the second fault prediction result.
[0100] In the implementation of this application, the LSTM model is combined with the expert system to obtain more accurate fault maintenance decisions. The expert system can interpret, recommend, predict and diagnose various complex problems in a manner similar to that of human experts. Based on the second fault prediction results received from the LSTM model, the expert system will scan the knowledge base to find rules that match the current fault. Once a matching rule is found, the corresponding second fault maintenance decision will be generated.
[0101] As time goes by, domain knowledge will change. In order to ensure the long-term accuracy of the expert system, the knowledge base needs to be updated regularly to reflect the latest practical experience.
[0102] The process of building an expert system knowledge base:
[0103] 1. Knowledge acquisition: Communicate with domain experts or search for the latest information to obtain the judgment and treatment methods for common faults.
[0104] 2. Knowledge representation: convert the acquired knowledge into rules. Example: if the equipment is overheated, reduce the equipment power and increase the power of the workshop cooling system.
[0105] 3. Knowledge verification: Test the accuracy and consistency of the rules through simulation.
[0106] 4. Knowledge update: Regularly visit domain experts or review the latest information to update relevant rules in the knowledge base.
[0107] 5. Knowledge base management: Establish a mechanism to ensure the continuous updating and maintenance of the knowledge base.
[0108] In the above methods, expert systems can provide maintenance decisions based on rich experience and expertise. These decisions are usually more accurate and reliable, which helps to improve the quality of maintenance decisions generated by the model.
[0109] S403: Determine the total loss of the fault prediction model to be trained according to the first loss and the second loss value.
[0110] In the implementation of this application, the first loss value reflects the difference between the fault prediction result generated by the model and the preset (real) result. This loss value is used to evaluate the performance of the model in fault prediction, and the second loss value reflects the difference between the fault maintenance decision generated by the model and the preset (real) maintenance decision. This loss value is used to evaluate the performance of the model in maintenance decision-making. The total loss is the combination of the first loss value and the second loss value to form a comprehensive loss value. This comprehensive loss value is used to evaluate the overall performance of the model and to optimize the parameters of the model.
[0111] S404, when the total loss of the fault prediction model to be trained has not reached the convergence condition, continue to iteratively train the parameters of the fault prediction model to be trained according to multiple of the second historical feature data until the total loss of the fault prediction model to be trained reaches the convergence condition, then the training process ends and the trained fault prediction model is obtained.
[0112] In the implementation of this application, the total loss of the LSTM model (fault prediction model to be trained) has not yet reached the predetermined convergence condition. This means that the performance of the model is not good enough and needs further optimization. Use multiple second historical feature data to iteratively train the parameters of the fault prediction model to be trained. The "second historical feature data" here refers to the feature data used to train the model, which generally includes historical fault records, maintenance records, etc., to help the model learn how to predict faults and make maintenance decisions.
[0113] After each iteration of training, the total loss of the model is calculated. The total loss is a comprehensive loss value that combines the first loss value and the second loss value. It is used to evaluate the overall performance of the model. If the total loss of the model reaches the predetermined convergence condition, the training process stops. The convergence condition usually means that the total loss value is lower than a preset threshold, or the change of the total loss value is stable within a certain range. When the total loss of the model reaches the convergence condition, the LSTM model with converged output parameters is used as the final fault prediction model. This means that the model has been optimized to a satisfactory level and can be used for actual fault prediction and maintenance decisions. The trained fault prediction model is deployed to the system and works in conjunction with the data acquisition unit, processing unit, etc. The model can be deployed using containerization technology (such as Docker) to improve the convenience and portability of deployment. Finally, the fault prediction model obtained above is verified using the data in the validation set.
[0114] In the above method, the performance and reliability of the fault prediction model can be significantly improved by performing feature extraction, model input, loss calculation and iterative training on each second historical operation data.
[0115] In one embodiment, see Figure 5 , is a schematic diagram of a fault warning process provided by an embodiment of the present application, such as Figure 5 As shown, the method also includes:
[0116] S501: After obtaining a first fault prediction result of the operating device and a first fault maintenance decision corresponding to the first fault prediction result, automatically adjusting the operating parameters of the operating device according to the first fault maintenance decision.
[0117] In the implementation of this application, the first operating data of the operating equipment is predicted in real time using the above-mentioned fault prediction model to obtain a first fault prediction result. This prediction result is usually a probability value or a classification result, which indicates the probability that the equipment may fail at a certain point in the future or whether it will fail. Based on the first fault prediction result, a corresponding first fault maintenance decision is generated. This maintenance decision may include specific maintenance measures, such as replacing a component, adjusting a parameter, conducting regular inspections, etc. Based on the generated first fault maintenance decision, the operating parameters of the operating equipment are automatically adjusted. These adjustments are intended to prevent the occurrence of faults or reduce the impact of faults.
[0118] S502, generating a warning signal after adjusting the operating parameters of the operating device to prompt the user to detect the operating device.
[0119] In the implementation of this application, the operating parameters of the operating equipment are adjusted according to the generated maintenance decision. These adjustments are intended to reduce the risk of failure or optimize the performance of the equipment. After the parameter adjustment is completed, an early warning signal is generated, and the early warning signal can be generated by using a threshold detection or anomaly detection method.
[0120] The early warning signal is a notification or alarm that reminds the user to pay attention to the current status of the equipment. Through the early warning signal, the user is prompted to check the running equipment. The user can conduct further inspections to confirm whether the status of the equipment is normal and ensure that the adjusted parameters are indeed effective.
[0121] In the above method, the system can respond to fault prediction results in real time, adjust operating parameters in time, prevent potential faults, and generate early warning signals to notify users in advance, reminding them to conduct inspections and enhance users' trust in the system.
[0122] In one embodiment, step S502 includes:
[0123] Obtaining an actual fault result corresponding to the running device fed back by the user after detecting the running device after receiving the early warning signal;
[0124] The performance of the fault prediction model is determined according to the first fault prediction result and the actual fault result.
[0125] In the implementation of this application, when the user receives the early warning signal, the running equipment is inspected and the actual fault results detected are fed back to the system. The actual fault results fed back by the user are compared with the first fault prediction results of the fault prediction model to evaluate the performance of the model.
[0126] Specifically, the actual fault results fed back by the user are compared with the first fault prediction results of the fault prediction model to evaluate the performance of the model. Specific evaluation indicators may include accuracy, which is the proportion of faults predicted by the model that match the actual faults; recall, which is the proportion of devices that actually failed that the model correctly predicted; precision, which is the proportion of devices that the model predicted to be faulty that actually failed; F1 score, which is the harmonic mean of accuracy and recall, which is used to comprehensively evaluate the performance of the model.
[0127] In the above method, by comparing the prediction results with the actual fault results, the performance of the fault prediction model can be objectively evaluated, including indicators such as accuracy, recall rate, and F1 score. According to the performance evaluation results, the shortcomings of the model can be identified, and targeted optimization and adjustment can be carried out to improve the prediction ability of the model.
[0128] In one embodiment, after the performance test of the fault prediction model, the entire prediction system needs to be performance tested, including: unit testing: unit testing each component to ensure that each part functions correctly, and using a unit testing framework (such as JUnit, pytest) to write test cases; integration testing: integrating each component for testing to ensure that the system as a whole works normally, and an integrated testing framework (such as Selenium, Robot Framework) can be used for testing; performance testing: testing the system's performance indicators, such as response time, throughput, etc., and performance testing tools (such as JMeter, LoadRunner) can be used for testing; stress testing: simulating system performance under high load conditions to ensure that the system is stable and reliable, and stress testing tools (such as Chaos Monkey, Gatling) can be used for testing, etc.
[0129] See also Figure 6 , is a general structural block diagram of the fault prediction method provided in the embodiment of the present application, such as Figure 6 As shown, the specific steps include:
[0130] ① Data collection and preprocessing 61:
[0131] Collect multiple historical data (first historical data) of the PLC device, and pre-process the multiple historical data, including data cleaning, normalization and data enhancement processing, to obtain multiple processed second historical operation data, see the above steps S301-S302 for details.
[0132] ② Feature extraction and selection 62:
[0133] Feature processing is performed on the pre-processed multiple historical data to extract and construct key information (second historical feature data), see the above step S303.
[0134] ③Model training and verification 63:
[0135] The historical feature data (second historical feature data) obtained above is input into the LSTM model to be trained for training. The multiple historical data can be divided into a training set and a validation set. The model is trained using the training set data, and is validated on the validation set, and the hyperparameters are adjusted to obtain a fault prediction model. For the specific process, see the above steps S401-S404.
[0136] ④System deployment and integration 64:
[0137] Build a platform based on microservice architecture, split the entire system into multiple independent service modules (such as data collection, preprocessing, model reasoning, and result display), each of which can be independently developed, deployed, and expanded. Each service module interacts with each other through mTLS, API gateway, OAuth 2.0, and OpenIDConnect, ensuring secure communication between service modules.
[0138] ⑤Real-time monitoring and prediction65:
[0139] When the PLC device starts running, the first operating data of the operating data set of the PLC device is collected in real time, and the first characteristic data of the first operating data is extracted. The first characteristic data is input into the fault prediction model to obtain the first fault prediction result corresponding to the PLC device and the maintenance strategy (first maintenance strategy) corresponding to the result.
[0140] ⑥Maintenance decision and support 66:
[0141] The system automatically adjusts the parameters of the PLC equipment according to the maintenance strategy obtained from the fault prediction model and reminds the staff to perform maintenance.
[0142] ⑤System maintenance and update
[0143] Regularly evaluate and update the system to adapt to new data and requirements. In addition to the common accuracy, recall, and F1 score, introduce business-related indicators (such as fault detection time and maintenance cost savings) to more comprehensively measure the value of the system.
[0144] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0145] Corresponding to the fault prediction method described in the above embodiment, Figure 7 This is a structural block diagram of the fault prediction and maintenance device 7 provided in an embodiment of the present application. For the sake of convenience of explanation, only the parts related to the embodiment of the present application are shown.
[0146] Reference Figure 7 , the device comprises:
[0147] The data collection module 71 is used to collect first operation data of the operating device.
[0148] The feature extraction module 72 is used to extract features from the first operating data to obtain first feature data.
[0149] The model training module 73 is used to:
[0150] Collecting a plurality of first historical operation data corresponding to the operation device;
[0151] Performing data enhancement processing on the plurality of the first historical operation data to obtain a plurality of second historical operation data after the enhancement processing;
[0152] The fault prediction model to be trained is trained according to the plurality of the second historical operation data to obtain the fault prediction model.
[0153] The fault prediction module 74 is used to input the first characteristic data into a fault prediction model to obtain a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result.
[0154] Optionally, the feature extraction module 72 includes:
[0155] Preprocessing the first operation data to obtain second operation data; wherein the preprocessing includes data cleaning and normalization processing of the first operation data;
[0156] The means, variances, and change rates corresponding to the plurality of operating parameters of the operating device are obtained according to the second operating data to obtain the first characteristic data.
[0157] Optionally, the model training module 73 is also used for:
[0158] Performing feature extraction on each of the second historical operation data to obtain a plurality of second historical feature data;
[0159] Input each of the second historical feature data into the fault prediction model to be trained, and obtain a first loss value between a second fault prediction result corresponding to each of the second historical feature data and a preset result, and a second loss value between a second fault maintenance decision corresponding to each of the second fault prediction results and a preset decision;
[0160] Determining a total loss of the fault prediction model to be trained according to the first loss and the second loss value;
[0161] When the total loss of the fault prediction model to be trained has not reached the convergence condition, the parameters of the fault prediction model to be trained are continued to be iteratively trained according to the plurality of the second historical feature data until the total loss of the fault prediction model to be trained reaches the convergence condition, and the training process ends to obtain the trained fault prediction model.
[0162] Optionally, the model training module 73 is also used for:
[0163] The fault prediction model to be trained is connected to an expert system to obtain the second fault maintenance decision corresponding to the second fault prediction result.
[0164] The fault prediction and maintenance device 7 also includes:
[0165] The fault warning module 75 is used to:
[0166] After obtaining a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result, automatically adjusting the operating parameters of the operating equipment according to the first fault maintenance decision;
[0167] After the operating parameters of the operating equipment are adjusted, an early warning signal is generated to prompt the user to detect the operating equipment.
[0168] The fault prediction and maintenance device 7 also includes:
[0169] The model performance detection module 76 is used to:
[0170] Obtaining an actual fault result corresponding to the running device fed back by a user after detecting the running device after receiving the early warning signal;
[0171] The performance of the fault prediction model is determined according to the first fault prediction result and the actual fault result.
[0172] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0173] in addition, Figure 7 The fault prediction and maintenance device shown may be a software unit, a hardware unit, or a combination of software and hardware units built into an existing terminal device, or may be integrated into the terminal device as an independent accessory, or may exist as an independent terminal device.
[0174] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0175] Figure 8 Schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 8 As shown, the terminal device 8 of this embodiment includes: at least one processor 80 ( Figure 8 Only one is shown in the figure) a processor, a memory 81, and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, wherein the processor 80 implements the steps in any of the above-mentioned fault prediction method embodiments when executing the computer program 82.
[0176] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 8 It is only an example of the terminal device 8 and does not constitute a limitation on the terminal device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0177] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0178] In some embodiments, the memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or memory of the terminal device 8. In other embodiments, the memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 8. Further, the memory 81 may also include both an internal storage unit of the terminal device 8 and an external storage device. The memory 81 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as the program code of the computer program, etc. The memory 81 may also be used to temporarily store data that has been output or is to be output.
[0179] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0180] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0182] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0183] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0184] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0185] 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.
[0186] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A fault prediction method, characterized in that: The method comprises: Collecting first operation data of the operating device; Performing feature extraction on the first operation data to obtain first feature data; The first characteristic data is input into a fault prediction model to obtain a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result.
2. The fault prediction method according to claim 1, characterized in that: The extracting features of the first operation data to obtain first feature data includes: Preprocessing the first operation data to obtain second operation data; wherein the preprocessing includes data cleaning and normalization processing of the first operation data; The means, variances, and change rates corresponding to the plurality of operating parameters of the operating device are obtained according to the second operating data to obtain the first characteristic data.
3. The fault prediction method according to claim 1, characterized in that: The process of obtaining the fault prediction model includes: Collecting a plurality of first historical operation data corresponding to the operation device; Performing data enhancement processing on the plurality of the first historical operation data to obtain a plurality of second historical operation data after the enhancement processing; The fault prediction model to be trained is trained according to the plurality of the second historical operation data to obtain the trained fault prediction model.
4. The fault prediction method according to claim 3, characterized in that: The step of training the fault prediction model to be trained according to the plurality of the second historical operation data to obtain the trained fault prediction model includes: Performing feature extraction on each of the second historical operation data to obtain a plurality of second historical feature data; Input each of the second historical feature data into the fault prediction model to be trained, and obtain a first loss value between a second fault prediction result corresponding to each of the second historical feature data and a preset result, and a second loss value between a second fault maintenance decision corresponding to each of the second fault prediction results and a preset decision; Determine a total loss of a fault prediction model according to the first loss and the second loss value; When the total loss of the fault prediction model to be trained has not reached the convergence condition, the parameters of the fault prediction model are iteratively trained according to the plurality of the second historical feature data until the total loss of the fault prediction model reaches the convergence condition, and the training process ends to obtain the trained fault prediction model.
5. The fault prediction method according to claim 4, characterized in that: The method further comprises: The fault prediction model to be trained is connected to an expert system to obtain the second fault maintenance decision corresponding to the second fault prediction result.
6. The fault prediction method according to claim 1, characterized in that: The method further comprises: After obtaining a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result, automatically adjusting the operating parameters of the operating equipment according to the first fault maintenance decision; After the operating parameters of the operating equipment are adjusted, an early warning signal is generated to prompt the user to detect the operating equipment.
7. The fault prediction method according to claim 6, characterized in that: The method further comprises: Obtaining an actual fault result corresponding to the running device fed back by the user after detecting the running device after receiving the early warning signal; The performance of the fault prediction model is determined according to the first fault prediction result and the actual fault result.
8. A fault prediction and maintenance device, characterized in that: include: A data collection module, used for collecting first operation data of the operation device; A feature extraction module, used for performing feature extraction on the first operation data to obtain first feature data; The fault prediction module is used to input the first characteristic data into a fault prediction model to obtain a first fault prediction result of the operating equipment and a first fault maintenance decision corresponding to the first fault prediction result.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Fault prediction method, electronic equipment and storage medium
CN120687985A
Ground blowout preventer fault diagnosis reasoning method and device
CN121052379A