A process industry process abnormality early warning method and system

By using deep learning algorithms to build a BI-LSTM model in the hydrogen energy preparation process, combined with incremental learning and generative adversarial networks, real-time monitoring and early warning of process abnormalities are achieved, solving the problems of traditional monitoring methods being inefficient and difficult to capture small changes. problem, improving the timeliness and accuracy of early warning.

CN119128772BActive Publication Date: 2025-01-21CHINA SPECIAL EQUIP INSPECTION & RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411597031.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-01-21
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

During the hydrogen energy preparation process, due to factors such as aging of equipment, fluctuations in raw material quality, improper operation, etc., the risk of process abnormalities is caused. The traditional monitoring methods are inefficient and it is difficult to capture slight changes and potential trends in process parameters, which may lead to a decrease in production efficiency and Safety accident.

Method used

A deep learning algorithm is used to establish the BI-LSTM model, and through steps such as data collection, modeling, model training, and incremental learning, real-time monitoring and early warning of process abnormalities are achieved. Specific steps include data collection, establishment of BI-LSTM model, model training, incremental learning, real-time prediction and alarm.

Benefits of technology

Through the combination of incremental learning and generative adversarial networks, the BI-LSTM model can adapt to changes in various factors, achieve accurate predictions of process anomalies, improve the timeliness and accuracy of early warnings, and ensure the stability and stability of the process. Security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128772B_ABST
    Figure CN119128772B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for warning of process abnormality in a process industry, which belongs to the technical field of process abnormality warning. The method includes steps such as data acquisition, modeling, model training, incremental learning, third prediction, calculation of difference, judgment and alarm. The system includes a data acquisition module, a modeling module, a model training module, an incremental learning module, a third prediction module, a calculation of difference module, a judgment module and an alarm module. Starting from the perspective of process-related parameters, the present application adapts to the changes of various factors through an incremental learning algorithm, that is, it can learn new knowledge based on new data to achieve accurate prediction of process abnormalities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of process anomaly warning, and in particular to a process anomaly warning method and system for process industry process anomaly warning. Background Art

[0002] With the transformation of the global energy structure and the popularization of the concept of sustainable development, hydrogen energy, as a clean and efficient energy form, is gradually gaining attention and favor from all countries. As a key link in the hydrogen energy industry chain, hydrogen energy preparation involves a variety of chemical reactions and complex process conditions, such as temperature, pressure, reactant concentration, etc. Slight changes in these process parameters may have a significant impact on the efficiency of hydrogen energy preparation and product quality.

[0003] However, in the actual production process, due to various factors such as equipment aging, fluctuations in raw material quality, and improper operation, the hydrogen production process often faces the risk of process anomalies. Traditional monitoring methods often rely on manual inspections and empirical judgments, which are not only inefficient, but also difficult to capture subtle changes and potential trends in process parameters. These anomalies may not only lead to a decrease in production efficiency, but may also cause safety accidents and pose a threat to personnel and property. Therefore, how to achieve real-time monitoring and early warning of the hydrogen production process and timely detect and deal with potential process anomalies has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In order to adapt to changes in various factors and achieve accurate prediction of process abnormalities, the present application provides a process industry process abnormality early warning method and system.

[0005] The technical solutions adopted in this application are as follows:

[0006] In a first aspect, the present application provides a method for early warning of process abnormalities in a process industry, comprising the following steps:

[0007] Data collection: collect real-time process-related parameters, historical process-related parameters, real-time data and historical data;

[0008] Modeling: Based on the deep learning algorithm, establish the first BI-LSTM model, set the first loss function of the first BI-LSTM model; and build the first generative adversarial network;

[0009] Model training: including the first prediction and the first fine-tuning;

[0010] First prediction: historical process-related parameters are used as input to the first BI-LSTM model, and historical prediction data is output;

[0011] First fine-tuning: By reducing the difference between the historical prediction data and the historical data, the parameters of the first BI-LSTM model are fine-tuned until the first loss function is minimized. The fine-tuned first BI-LSTM model is recorded as the second BI-LSTM model.

[0012] Incremental learning: including acquiring weights, adding regularization terms, generating new data, second prediction, and second fine-tuning;

[0013] Obtain weights: Obtain the weights of the second BI-LSTM model, and set the second loss function based on the second BI-LSTM model;

[0014] Adding a regularization term: constructing a regularization term based on the weight, and adding the regularization term to the second loss function to obtain a new second loss function;

[0015] Generate new data: Use the first generative adversarial network to generate new historical process related parameters and new historical data;

[0016] Second prediction: The new historical process-related parameters are used as the input of the second BI-LSTM model to output new historical prediction data;

[0017] Second fine-tuning: By reducing the difference between the historical prediction data and the historical data, the parameters of the second BI-LSTM model are fine-tuned again until the second loss function is minimized. The fine-tuned second BI-LSTM model is recorded as the third BI-LSTM model.

[0018] Third prediction: The real-time process-related parameters are used as the input of the third BI-LSTM model to output real-time prediction data;

[0019] Calculate the difference: calculate the difference between real-time data and real-time predicted data;

[0020] Determine: Determine whether the difference is greater than a preset threshold, if so, execute the alarm step; if not, execute the data collection step;

[0021] Alarm: Send out an alarm signal.

[0022] By adopting the above technical solution, the incremental learning step enables the second BI-LSTM model to continuously adapt to new data and learn new knowledge from the new data. Then, the generalization ability of the second BI-LSTM model is enhanced by generating new data through the first generative adversarial network, so that the second BI-LSTM model can adapt to changes in various factors and achieve accurate prediction of process abnormalities. After completing the training of the first BI-LSTM model, the weights of the second BI-LSTM model are obtained, which represent the knowledge learned by the second BI-LSTM model from historical data. Based on the acquired knowledge (i.e., the knowledge learned by the second BI-LSTM model from historical data), the second loss function is set and used in the subsequent fine-tuning process to ensure that the second BI-LSTM model will not completely forget the previously learned knowledge while adapting to the new data. In order to prevent the second BI-LSTM model from overfitting when adapting to new data, the present application also constructs a regularization term based on the previously acquired weights and adds it to the second loss function. The role of the regularization term is to penalize the complexity of the second BI-LSTM model, thereby encouraging the second BI-LSTM model to find a simpler and more generalized solution. This application uses new historical process-related parameters and new historical data to fine-tune the second BI-LSTM model. During the fine-tuning process, the weights of the second BI-LSTM model are updated by optimizing the second loss function. Due to the existence of the regularization term, the second BI-LSTM model will try to keep the previously learned knowledge unchanged while adapting to the new data, thereby improving the robustness and generalization ability of the second BI-LSTM model.

[0023] Optionally, after the step of performing model building and before the step of performing model training, the method further includes:

[0024] Data processing: preprocessing operations are performed on historical process related parameters and historical data, and the preprocessed historical process related parameters are used as new historical process related parameters, and the preprocessed historical data are used as new historical data.

[0025] By adopting the above technical solution, through preprocessing operations, the quality of the data can be significantly improved, and data of different formats and dimensions can be converted into formats and dimensions suitable for processing by the first BI-LSTM model, so that the first BI-LSTM model can correctly understand and process the data.

[0026] Optionally, after executing the step of adding a regularization term and before executing the step of generating new data, the method further includes:

[0027] Expanding the network: adding a discriminator to the first generative adversarial network to obtain a second generative adversarial network, wherein the second generative adversarial network includes: a generator of the first generative adversarial network, a discriminator of the first generative adversarial network, and an added discriminator;

[0028] Set the discriminator: the discriminator in the first generative adversarial network is recorded as the first discriminator, and the added discriminator is recorded as the second discriminator;

[0029] Update network: Use the second generative adversarial network as the new first generative adversarial network.

[0030] By adopting the above technical solution, the present application adds a discriminator (second discriminator) to the first generative adversarial network. The use of two discriminators means that the data generated by the generator needs to satisfy both discriminators at the same time, which increases the difficulty of the generation task, but also forces the generator to learn more complex and real data features, thereby improving the quality of the generated data. By expanding the first generative adversarial network, it helps to generate more diverse and high-quality data, thereby enhancing the training effect and prediction accuracy of the second BI-LSTM model.

[0031] Optionally, after executing the step of updating the network and before executing the step of generating new data, the method further includes:

[0032] Training network: including first input, second input and third input;

[0033] First input: input the processed historical process related parameters into the generator to obtain the first output data;

[0034] Second input: inputting the processed historical process related parameters and the first output data into the first discriminator to obtain second output data;

[0035] Third input: The first output data and the second output data are simultaneously input into the second discriminator to obtain third output data.

[0036] By adopting the above technical solution, the first input inputs the processed historical process related parameters into the generator, and the generator attempts to generate new data (first output data) similar to the real data (processed historical process related parameters) based on these parameters. This process prompts the generator to learn and simulate the distribution of real data, thereby enhancing its generation ability. This application introduces a dual judgment mechanism, namely a first discriminator and a second discriminator. The output of the generator (first output data) and the real data (processed historical process related parameters) are input into the first discriminator. The first discriminator evaluates the similarity between the first output data and the real data and gives feedback (second output data), which helps the generator understand the quality of its generated data and adjust it accordingly. The first output data and the second output data (i.e., the evaluation result of the first discriminator) are simultaneously input into the second discriminator. The second discriminator considers not only the generated data itself, but also the evaluation of the first discriminator, thereby providing a more comprehensive perspective to evaluate the authenticity of the generated data. This dual discrimination mechanism helps to further improve the quality of the generated data. By expanding the first generative adversarial network and adding a discriminator, the entire system has been significantly improved in data generation and discrimination, which helps to generate more diverse and high-quality data, thereby enhancing the training effect and prediction accuracy of the second BI-LSTM model. The second BI-LSTM model can learn more diverse data features, so that it can make more accurate predictions when faced with new data.

[0037] Optionally, after executing the step of training the network and before executing the step of generating new data, the method further includes:

[0038] Setting function: Set the loss function of the generator, recorded as the third loss function; set the loss function of the first discriminator, recorded as the fourth loss function; set the loss function of the second discriminator, recorded as the fifth loss function;

[0039] Adjustment parameters: including first adjustment, second adjustment and third adjustment;

[0040] First adjustment: fix the parameters of the generator and the second discriminator, and update the parameters of the first discriminator until the fourth loss function is minimized;

[0041] Second adjustment: fix the parameters of the generator and the first discriminator, and update the parameters of the second discriminator until the fifth loss function is minimized;

[0042] Third adjustment: fix the parameters of the first discriminator and the second discriminator, and update the parameters of the generator until the third loss function is minimized;

[0043] Iteration: Repeat the step of adjusting the parameters until a preset stop condition is reached, wherein the preset stop condition is: the number of times the step of adjusting the parameters is executed reaches a preset execution number threshold.

[0044] By adopting the above technical solution, the present application fixes the parameters of the generator and the second discriminator, and only updates the parameters of the first discriminator to enhance the ability of the first discriminator to distinguish between real data and first output data. The present application fixes the parameters of the generator and the first discriminator, and updates the parameters of the second discriminator to enhance the discrimination ability of the second discriminator; the present application updates the parameters of the generator while fixing the parameters of the two discriminators, so that the generated data is closer to the real data, so that it is difficult for both discriminators to distinguish. By repeatedly executing the above-mentioned steps of adjusting the parameters and stopping when the preset stop condition is reached (the number of times the parameter adjustment step is executed reaches the preset execution number threshold), the performance of the generator, the first discriminator and the second discriminator can be gradually optimized. In this process, the generator gradually learns to generate more realistic data, while the two discriminators find it increasingly difficult to distinguish between the generated data and the real data.

[0045] Optionally, after executing the model training step and before executing the incremental learning step, the method further includes:

[0046] Acquiring abnormal data: Acquiring abnormal process related parameters and abnormal data;

[0047] Generate data: Use the first generative adversarial network to generate new abnormal process related parameters and new abnormal data;

[0048] Retraining: The second BI-LSTM model is trained again using new abnormal process related parameters and new abnormal data to obtain a new second BI-LSTM model.

[0049] By adopting the above technical solution, since there are few existing abnormal data, this application introduces abnormal data and generated new abnormal data to enhance the robustness and generalization ability of the second BI-LSTM model, so as to better handle future abnormal situations. By acquiring and analyzing abnormal data, the abnormal pattern can be understood more accurately, providing a real basis for generating new abnormal data. Due to the scarcity of abnormal data, the first generative adversarial network is used to generate new abnormal process-related parameters and abnormal data, which can effectively expand the size and diversity of the data set. The first generative adversarial network can learn the distribution of real data and generate new data that seems real but is actually synthesized, which is particularly important for alleviating the problem of data scarcity. The second BI-LSTM model is retrained using new abnormal process-related parameters and abnormal data, which can significantly update and optimize the weights and parameters of the second BI-LSTM model. By introducing new abnormal data, the second BI-LSTM model can learn more abnormal features, thereby improving its prediction and recognition capabilities in abnormal situations.

[0050] Optionally, after the step of performing model building and before the step of performing model training, the method further includes:

[0051] Setting a matrix: Setting a two-dimensional matrix, each element in the two-dimensional matrix represents the probability of misclassifying the historical process-related parameters belonging to the i-th category into the j-th category;

[0052] Adjust weights: Adjust the weights in the first loss function according to the two-dimensional matrix, and use the first loss function after adjusting the weights as the new first loss function.

[0053] By adopting the above technical solution, the present application sets a two-dimensional matrix, and each element in the two-dimensional matrix represents the probability of misclassifying the historical process-related parameters belonging to the i-th category as the j-th category. Through the two-dimensional matrix, it is possible to understand which categories are prone to confusion, and the weights in the first loss function can be adjusted in a targeted manner, so that the first BI-LSTM model pays more attention to these easily confused categories during the training process. By increasing the penalty for confusing categories, the first BI-LSTM model will work harder to learn how to distinguish these categories during the training process, thereby improving the accuracy of the overall classification, and reducing the penalty for those categories that are already easy to distinguish, so that the first BI-LSTM model will not be over-trained on these categories, thereby saving training time and computing resources. Through targeted weight adjustment, the first BI-LSTM model is more robust when facing new and unknown data, and can better handle new samples that are similar to the confusing categories in the training data.

[0054] Optionally, after executing the step of setting the matrix and before executing the step of adjusting the weight, the method further includes:

[0055] Sum: Calculate the sum of the elements in each row of the two-dimensional matrix and record it as the first data;

[0056] Normalization: Divide each element by the first data in the corresponding row to obtain a new two-dimensional matrix.

[0057] By adopting the above technical solution, the sum of the elements of each row in the two-dimensional matrix is ​​calculated, and this sum provides the necessary numerical basis for subsequent normalization. Each element in the two-dimensional matrix is ​​divided by the first data of its row (that is, the sum of all elements in the row) to obtain a new two-dimensional matrix. This process actually performs row normalization on the two-dimensional matrix so that the sum of the elements in each row is 1. The normalized matrix elements can be interpreted as conditional probabilities, that is, the probability that a sample is misclassified as the jth category when it truly belongs to the i-th category, which helps to understand the meaning of the numerical values ​​in the matrix more intuitively. In some cases, if the number of samples in some categories is much larger than that in other categories, the contribution of these categories in the loss function will be too large, causing the first BI-LSTM model to overfit to these categories. Through normalization, the contribution of different categories in the loss function can be balanced, thereby alleviating the overfitting problem to a certain extent.

[0058] Optionally, the diagonal elements of the two-dimensional matrix are 0.

[0059] By adopting the above technical solution, the present application sets the diagonal elements to 0, indicating that when the sample is correctly classified, the first BI-LSTM model does not need to pay any price, so that the goal of training the first BI-LSTM model will be completely focused on reducing misclassification, rather than considering both correct classification and misclassification at the same time.

[0060] In a second aspect, the present application also provides a process industry process abnormality early warning system, comprising:

[0061] Data acquisition module, used to collect real-time process-related parameters, historical process-related parameters, real-time data and historical data;

[0062] A modeling module, used to establish a first BI-LSTM model, set a first loss function of the first BI-LSTM model; and construct a first generative adversarial network;

[0063] The model training module is connected to the data acquisition module and the modeling module, and is used to use the historical process-related parameters as the input of the first BI-LSTM model to obtain the historical prediction data; and fine-tune the parameters of the first BI-LSTM model by reducing the difference between the historical prediction data and the historical data until the first loss function is minimized, and the fine-tuned first BI-LSTM model is recorded as the second BI-LSTM model;

[0064] The incremental learning module is communicatively connected with the model training module and the third prediction module, and is used to obtain the weight of the second BI-LSTM model, set the second loss function based on the second BI-LSTM model; and construct a regularization term based on the weight, and add the regularization term to the second loss function to obtain a new second loss function; the incremental learning module is also used to generate new historical process-related parameters and new historical data using the first generative adversarial network; use the new historical process-related parameters as the input of the second BI-LSTM model, and output new historical prediction data; by reducing the difference between the historical prediction data and the historical data, fine-tune the parameters of the second BI-LSTM model again until the second loss function is minimized, and record the fine-tuned second BI-LSTM model as the third BI-LSTM model;

[0065] A third prediction module, used to use the real-time process related parameters as input of the third BI-LSTM model and output real-time prediction data;

[0066] A difference calculation module is used to calculate the difference between real-time data and real-time prediction data;

[0067] A judging module, used to judge whether the difference is greater than a preset threshold;

[0068] An alarm module is used to send out an alarm signal.

[0069] By adopting the above technical solutions, the system realizes accurate prediction of process parameters and abnormality detection by integrating modules such as data acquisition, BI-LSTM modeling, model training, incremental learning, third prediction, difference calculation, judgment and alarm. The system uses historical data to initially train the model and continuously adapts to new data through incremental learning to improve the prediction accuracy. The difference between real-time prediction data and real data is monitored so that an alarm can be issued in time when the prediction deviation exceeds the threshold, ensuring the stability and safety of the process.

[0070] In summary, the present application includes at least one of the following beneficial technical effects:

[0071] 1. The incremental learning step enables the second BI-LSTM model to continuously adapt to new data and learn new knowledge from the new data. Then, the first generative adversarial network is used to generate new data to enhance the generalization ability of the second BI-LSTM model, so that the second BI-LSTM model can adapt to changes in various factors and achieve accurate prediction of process abnormalities. After completing the training of the first BI-LSTM model, the weights of the second BI-LSTM model are obtained, which represent the knowledge learned by the second BI-LSTM model from historical data. Based on the acquired knowledge (i.e., the knowledge learned by the second BI-LSTM model from historical data), the second loss function is set and used in the subsequent fine-tuning process to ensure that the second BI-LSTM model will not completely forget the previously learned knowledge while adapting to the new data. In order to prevent the second BI-LSTM model from overfitting when adapting to new data, the present application also constructs a regularization term based on the previously acquired weights and adds it to the second loss function. The role of the regularization term is to penalize the complexity of the second BI-LSTM model, thereby encouraging the second BI-LSTM model to find a simpler and more generalized solution. This application uses new historical process-related parameters and new historical data to fine-tune the second BI-LSTM model. During the fine-tuning process, the weights of the second BI-LSTM model are updated by optimizing the second loss function. Due to the existence of the regularization term, the second BI-LSTM model will try to keep the previously learned knowledge unchanged while adapting to the new data, thereby improving the robustness and generalization ability of the second BI-LSTM model.

[0072] 2. This application adds a discriminator (second discriminator) to the first generative adversarial network. Using two discriminators means that the data generated by the generator needs to satisfy both discriminators at the same time, which increases the difficulty of the generation task, but also forces the generator to learn more complex and real data features, thereby improving the quality of the generated data. By expanding the first generative adversarial network, it helps to generate more diverse and high-quality data, thereby enhancing the training effect and prediction accuracy of the second BI-LSTM model.

[0073] 3. This application sets a two-dimensional matrix, in which each element represents the probability of misclassifying the historical process-related parameters belonging to the i-th category as the j-th category. Through this two-dimensional matrix, it is possible to understand which categories are prone to confusion, and the weights in the first loss function can be adjusted in a targeted manner, so that the first BI-LSTM model pays more attention to these easily confused categories during the training process. By increasing the penalty for confusing categories, the first BI-LSTM model will work harder to learn how to distinguish these categories during the training process, thereby improving the overall classification accuracy, and reducing the penalty for those categories that are already easy to distinguish, so that the first BI-LSTM model will not be over-trained on these categories, thereby saving training time and computing resources. Through targeted weight adjustment, the first BI-LSTM model is more robust when facing new and unknown data, and can better handle new samples that are similar to confusing categories in the training data. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 is a flow chart of the method of Example 1 of the present application;

[0075] Figure 2 It is a flow chart of the method from S3 model training to S4 incremental learning in Example 1 of the present application;

[0076] Figure 3 is a flow chart of the method of Example 2 of the present application;

[0077] Figure 4 This is a method flow chart of Example 3 of the present application. DETAILED DESCRIPTION

[0078] The following combination Figures 1 to 4 This application is described in further detail.

[0079] Example 1: Figure 1 As shown, the present application provides a method for warning abnormalities in a process industry process, the method comprising: S1 data collection, S2 modeling, S3 model training, S4 incremental learning, S5 third prediction, S6 difference calculation, S7 judgment and S8 alarm, firstly, various data are collected, then a first BI-LSTM model is established, and a first loss function of the first BI-LSTM model is set, then model training is performed to obtain a second BI-LSTM model, then incremental learning is performed based on the second BI-LSTM model to obtain a third BI-LSTM model, then the third BI-LSTM model is used to predict real-time process-related parameters, then it is judged whether the difference between the real-time prediction data and the real-time data exceeds a preset threshold, and if so, an alarm is issued. The specific steps of this embodiment are as follows:

[0080] S1 data collection, collects real-time process-related parameters, historical process-related parameters, real-time data and historical data.

[0081] Real-time process-related parameters: data collected in real time during the production process, such as temperature, pressure, flow, raw material properties, operating conditions, etc., which reflect the current production status.

[0082] Historical process-related parameters: data records over a period of time, such as temperature, pressure, flow, raw material properties, operating conditions, etc., used for model training and historical analysis.

[0083] Real-time data and historical data: refer to current production data and previously stored production data respectively.

[0084] The real-time process-related parameters will affect the real-time data. When the real-time process-related parameters are abnormal, the real-time data will also be abnormal. Similarly, when the historical process-related parameters are abnormal, the historical data will also be abnormal.

[0085] S2 modeling, based on the deep learning algorithm, establishes the first BI-LSTM model and sets the first loss function of the first BI-LSTM model.

[0086] This step also constructs a first generative adversarial network, which includes a generator and a discriminator.

[0087] S3 model training, including S31 first prediction and S32 first fine-tuning.

[0088] S31 first prediction, taking historical process related parameters as input of the first BI-LSTM model and outputting historical prediction data.

[0089] S32 is the first fine-tuning, which calculates the difference between the historical prediction data and the actual historical data collected in S1 data collection by comparing them. Based on the difference between the two, the parameters of the first BI-LSTM model are fine-tuned to minimize the first loss function. The fine-tuned first BI-LSTM model is recorded as the second BI-LSTM model.

[0090] S4 incremental learning, including S41 obtaining weights, S42 adding regularization terms, S43 generating new data, S44 second prediction and S45 second fine-tuning.

[0091] The S4 incremental learning allows the second BI-LSTM model to continue learning new knowledge when receiving new data without the need for retraining.

[0092] S41 obtains weights, obtains weights of a second BI-LSTM model, and sets a second loss function based on the second BI-LSTM model.

[0093] S42 adds a regularization term, constructs a regularization term based on the weight, and adds the regularization term to the second loss function to obtain a new second loss function.

[0094] The regularization term is used to prevent the second BI-LSTM model from overfitting. The regularization term built based on the existing weights is added to the second loss function to balance the complexity of the second BI-LSTM model and the fit of the training data.

[0095] S43 generates new data, using the first generative adversarial network to generate new historical process related parameters and new historical data.

[0096] S44 is the second prediction, which uses the new historical process related parameters in the new data generated by S43 as the input of the second BI-LSTM model and outputs new historical prediction data.

[0097] S45 second fine-tuning, by reducing the difference between the historical prediction data in the second prediction of S44 and the new historical data in the new data generated by S43, the parameters of the second BI-LSTM model are fine-tuned again until the second loss function is minimized, and the second BI-LSTM model after fine-tuning is recorded as the third BI-LSTM model.

[0098] S5 third prediction, taking the real-time process related parameters as the input of the third BI-LSTM model and outputting the real-time prediction data.

[0099] S6 calculates the difference between the real-time data and the real-time predicted data.

[0100] S7 determines whether the difference is greater than a preset threshold. If so, it is considered that the production process is abnormal and S8 is executed to alarm; if not, it is considered that the current production status is normal and S1 data collection is executed.

[0101] S8 alarms and sends out an alarm signal.

[0102] For example, a factory needs to monitor key parameters in its production process in real time, such as temperature, pressure, flow, raw material properties, operating conditions, etc., to ensure the stability and safety of the production process.

[0103] (1) Data collection

[0104] Real-time process-related parameters: The sensors installed on the production line collect data such as temperature, pressure, flow, operating conditions, etc. in real time, record them every 5 minutes, and retrieve the raw material properties in the database at the same time.

[0105] Historical process-related parameters: Data such as temperature, pressure, flow, raw material properties and operating conditions in the past month are extracted from the database for model training.

[0106] Real-time data and historical data: Real-time data comes directly from the production line, and historical data is stored in the database for subsequent analysis and model training.

[0107] (2) Modeling

[0108] Using deep learning frameworks such as TensorFlow or PyTorch, the first BI-LSTM model is built based on the BI-LSTM algorithm. This model can consider both past and future information and is suitable for processing time series data.

[0109] The first loss function of the first BI-LSTM model is set to mean square error (MSE), which is used to evaluate the difference between the model predicted value and the actual value.

[0110] The calculation model of the first loss function is as follows:

[0111] ;

[0112] in, is the first loss function, m is the number of historical process related parameters, is the true label of the i-th historical process related parameter (0 means normal, 1 means abnormal), is the predicted probability of the first BI-LSTM model for the i-th historical process-related parameter.

[0113] (3) Model training

[0114] First prediction: Take the historical process-related parameters as input and make predictions through the first BI-LSTM model to obtain historical prediction data.

[0115] First fine-tuning: Compare historical prediction data with real historical data, calculate MSE, and adjust the parameters of the first BI-LSTM model based on the back propagation method until MSE is minimized. The fine-tuned model is recorded as the second BI-LSTM model.

[0116] (4) Incremental learning

[0117] Get weights: Extract weights from the second BI-LSTM model and set the calculation model of the second loss function as follows:

[0118] ;

[0119] in, is the second loss function, g is the number of historical process related parameters, is the true label of the i-th historical process related parameter (0 means normal, 1 means abnormal), is the predicted probability of the second BI-LSTM model for the i-th historical process related parameters.

[0120] Add regularization term: To prevent overfitting, a regularization term is constructed based on the weights and added to the second loss function to obtain a new second loss function.

[0121] The calculation model of the regularization term is as follows:

[0122] ;

[0123] in, is the regularization coefficient, which is used to control the strength of regularization. Its value range is [0.001, 1]. In this embodiment, the value is 0.15. b is the number of parameters of the second BI-LSTM model. is the value of the jth parameter in the second BI-LSTM model.

[0124] Adding the regularization term to the second loss function is:

[0125] ;

[0126] in, is the new second loss function after adding the regularization term.

[0127] Generate new data: Use the first generative adversarial network to generate new historical process-related parameters and corresponding historical data to increase the generalization ability of the second BI-LSTM model.

[0128] Second prediction: Input the newly generated historical process-related parameters into the second BI-LSTM model to make predictions and obtain new historical prediction data.

[0129] Second fine-tuning: By comparing the new historical prediction data with the historical data, the parameters of the second BI-LSTM model are adjusted again until the second loss function is minimized. The fine-tuned model is recorded as the third BI-LSTM model.

[0130] (5) Third prediction

[0131] The real-time process-related parameters are input into the third BI-LSTM model, and real-time prediction data is output.

[0132] (6) Calculate the difference

[0133] Calculate the difference between the real-time data and the real-time predicted data, that is, the residual.

[0134] (7) Judgment

[0135] Set a preset threshold (such as residual error is 5%). If the difference is greater than the threshold, it is considered that the production process is abnormal. Otherwise, continue to perform S1 data collection to form a closed-loop monitoring.

[0136] (8) Call the police

[0137] If it is judged to be abnormal, an alarm signal will be issued immediately to notify relevant personnel to check and handle it.

[0138] This embodiment first collects real-time and historical process-related parameters and data, and uses the BI-LSTM model for preliminary modeling and training. And through the incremental learning mechanism, the first generative adversarial network is used to generate new data, and the second BI-LSTM model is fine-tuned to improve the prediction accuracy. It can predict process parameters in real time and monitor the difference between the predicted value and the actual value. Once the difference exceeds the preset threshold, an alarm signal is issued. The entire process forms a closed-loop prediction and monitoring system that can continuously learn and adapt to production changes.

[0139] In other embodiments, Figure 2 As shown, after executing S3 model training and before executing S4 incremental learning, it also includes:

[0140] S33 Acquire abnormal data, acquire abnormal process related parameters and abnormal data. In this step, abnormal process related parameters and corresponding abnormal data are identified and extracted from historical data. These abnormal data may be caused by equipment failure, operating errors or other external factors.

[0141] The way to obtain abnormal data can be based on various approaches such as statistical methods (such as threshold detection), machine learning algorithms (such as isolation forests), or expert knowledge.

[0142] S34 generates data, adopts new abnormal process-related parameters and new abnormal data generated by the first generative adversarial network, expands the scale of the abnormal data set, and increases the diversity of training samples of the second BI-LSTM model, thereby helping the second BI-LSTM model to better learn abnormal features.

[0143] S35 retrains, using new abnormal process related parameters and new abnormal data to train the second BI-LSTM model again to obtain a new second BI-LSTM model.

[0144] Since there are relatively few abnormal process-related parameters and abnormal data, this embodiment generates new abnormal process-related parameters and abnormal data based on the existing abnormal process-related parameters and abnormal data, and uses the new abnormal process-related parameters and abnormal data to train the second BI-LSTM model, so that it has the ability to identify and handle abnormal situations, thereby improving its prediction ability when facing unknown or rare abnormalities.

[0145] Example 2: Figure 3 As shown, the difference between this embodiment and embodiment 1 is that after executing S2 modeling and before executing S3 model training, it also includes:

[0146] S21 data processing, preprocessing the historical process related parameters and historical data, using the preprocessed historical process related parameters as new historical process related parameters, and using the preprocessed historical data as new historical data.

[0147] The preprocessing includes: data cleaning (missing value processing, outlier processing, duplicate value processing, etc.), data conversion (data standardization), dimensionality reduction, sampling, etc.

[0148] Then, the steps of S3 model training, S41 obtaining weights, and S42 adding regularization items are executed. After executing S42 adding regularization items, and before executing S43 generating new data, the following steps are also included:

[0149] S421 expands the network, adds a discriminator to the first generative adversarial network, and obtains a second generative adversarial network, wherein the second generative adversarial network includes: a generator of the first generative adversarial network, a discriminator of the first generative adversarial network, and an added discriminator.

[0150] S422 sets the discriminator, records the discriminator in the first generative adversarial network as the first discriminator, and records the added discriminator as the second discriminator.

[0151] S423 updates the network and uses the second generative adversarial network as a new first generative adversarial network.

[0152] S424 training network, including S4241 first input, S4242 second input and S4243 third input.

[0153] S4241 first input, input the processed historical process related parameters into the generator, and the generator attempts to generate the first output data as close to the real data as possible.

[0154] S4242 second input, input the processed historical process related parameters and the first output data into the first discriminator, the first discriminator attempts to distinguish whether these data are real or generated by the generator, and outputs the second output data.

[0155] S4243 third input, the first output data and the second output data are simultaneously input into the second discriminator, the second discriminator is used to determine whether the first output data and the second output data are in a one-to-one correspondence, and output the third output data. If the first output data and the second output data are in a one-to-one correspondence, the third output data is 1, otherwise it is 0.

[0156] For example, in a reactor for preparing hydrogen energy, the reaction temperature, a key process parameter, is continuously monitored. The generator receives and processes historical process-related parameters (including reaction temperature, pressure, feed flow rate, etc.), and then generates the first output data, which is the current value of the reaction temperature.

[0157] The first output data generated by the generator is the value of the current reaction temperature.

[0158] The first discriminator evaluates the processed historical process related parameters and the first output data to generate the second output data. That is, the first discriminator determines whether the input data at this time is the processed historical process related parameters or the first output data. If it is the processed historical process related parameters, then the second output data has a value of 1. If it is the first output data, then the second output data has a value of 0.

[0159] The second discriminator receives the first output data and the second output data as input, and evaluates whether the one-to-one correspondence between the two data is reasonable or consistent, the process is as follows:

[0160] Verify whether the second output data correctly reflects the actual situation of the first output data. If the first discriminator input is the processed historical process related parameters and the second output data is 1, the second discriminator will confirm that the corresponding relationship is consistent. If the first discriminator input is the first output data and the second output data is 1, the second discriminator will confirm that the corresponding relationship is not consistent.

[0161] At this point, the expansion of the first generative adversarial network structure has been completed, the structure of the second generative adversarial network has been set, and the training of the second generative adversarial network has been completed.

[0162] In other embodiments, after executing S424 to train the network and before executing S43 to generate new data, the method further includes:

[0163] S425 sets the function, sets the loss function of the generator, recorded as the third loss function; sets the loss function of the first discriminator, recorded as the fourth loss function; sets the loss function of the second discriminator, recorded as the fifth loss function. These loss functions are used to guide the training process of the second generative adversarial network, ensuring that the generator can generate more and more realistic data, and the discriminator can identify the authenticity of the data more and more accurately.

[0164] In this embodiment, the calculation model of the third loss function is as follows:

[0165] ;

[0166] in, is the loss function of the generator, is the historical process related parameter after the i-th processing, is the i-th first output data output by the generator, is the number of historical process related parameters after processing.

[0167] The calculation model of the fourth loss function is as follows:

[0168] ;

[0169] in, is the loss function of the first discriminator, is the predicted probability of the i-th input data of the first discriminator (the processed historical process-related parameters are taken as 1, and the first output data output by the generator is taken as (0,1). The more similar the first output data is to the processed historical process-related parameters, The closer the value is to 1), yes The true label of (the label is the historical process related parameter after processing, the value is 1, and the label is the first output data, the value is 0), The number of input data for the first discriminator.

[0170] The calculation model of the fifth loss function is as follows:

[0171] ;

[0172] in, is the loss function of the second discriminator, is the predicted probability of the second discriminator for the i-th input data (including the first output data and the second output data) (the two are 1 respectively, otherwise 0), yes The true label of (the two correspond to 1, otherwise 0), The number of input data for the second discriminator, is a preset threshold value, which is 0.01 in this embodiment.

[0173] S426 adjusts parameters, including S4261 first adjustment, S4262 second adjustment and S4263 third adjustment.

[0174] S4261 first adjustment, fix the parameters of the generator and the second discriminator, and update the parameters of the first discriminator until the fourth loss function is minimized.

[0175] S4262 second adjustment, fix the parameters of the generator and the first discriminator, update the parameters of the second discriminator, until the fifth loss function is minimized.

[0176] S4263 The third adjustment is to fix the parameters of the first discriminator and the second discriminator, and update the parameters of the generator until the third loss function is minimized.

[0177] S427 iteration, repeatedly executing S426 to adjust the parameters until a preset stop condition is reached, wherein the preset stop condition is: the number of times the step of adjusting the parameters is executed reaches a preset execution number threshold.

[0178] This embodiment iteratively adjusts the parameters of the generator and the two discriminators to minimize their respective loss functions, so that the generator can generate more realistic data and improve the discriminator's ability to recognize real and generated data until the preset training stop condition is met.

[0179] Example 3: Figure 4 As shown, the difference between this embodiment and embodiment 1 is that after executing S2 modeling and before executing S3 model training, it also includes:

[0180] S91 sets a matrix, setting a two-dimensional matrix, each element in the two-dimensional matrix represents the probability of misclassifying the historical process-related parameters belonging to the i-th category as the j-th category, and the diagonal elements of the two-dimensional matrix are 0, and the size of the two-dimensional matrix is ​​the number of categories multiplied by the number of categories.

[0181] For example, assuming that there are two states in the hydrogen production process: normal and abnormal, the two-dimensional matrix is ​​as follows:

[0182] ;

[0183] represents the probability of misclassifying an abnormal situation as a normal situation; represents the probability of misclassifying a normal situation as an abnormal situation, where .

[0184] S92 is to calculate the sum of the elements of each row in the two-dimensional matrix and record it as first data. The first data represents the total probability of misclassifying the historical process-related parameters belonging to the i-th category into all other categories.

[0185] S93 normalizes, dividing each element by the first data of the corresponding row to obtain a new two-dimensional matrix. This step ensures that the sum of the elements in each row is 1, thereby converting the original two-dimensional matrix into a conditional probability matrix, in which each row represents the probability distribution of misclassifying a sample into other categories.

[0186] S94 adjusts the weights, adjusts the weights in the first loss function according to the two-dimensional matrix, and uses the first loss function after the weight adjustment as a new first loss function.

[0187] The calculation model of the original first loss function is set as follows:

[0188] ;

[0189] in, is the first loss function, m is the number of historical process related parameters, is the true label of the i-th historical process related parameter (0 means normal, 1 means abnormal), is the predicted probability of the first BI-LSTM model for the i-th historical process-related parameter.

[0190] The calculation model of the new first loss function after adjusting the weights is as follows:

[0191] ;

[0192] The weights determined for the category to which the i-th historical process-related parameter belongs and the elements of the two-dimensional matrix are related. For abnormal historical process-related parameters, equal , for normal historical process related parameters, equal .

[0193] This application sets a two-dimensional matrix whose elements represent the probability of misclassification of samples between categories, the diagonal elements are 0, and the size is determined by the number of categories. For the normal and abnormal states of the hydrogen energy preparation process, the matrix describes the probability of misclassification, and calculates the total probability of misclassifying a certain category of samples by summing the elements of each row. Then, through the normalization step, the matrix is ​​converted into a conditional probability matrix to ensure that the sum of each row is 1, reflecting the probability distribution of misclassification. The weights in the first loss function are further adjusted according to this matrix to take into account the cost of misclassification of different categories. The new loss function optimizes the accuracy of prediction of abnormal and normal states by introducing weights determined by the matrix elements.

[0194] Embodiment 4: The present application also provides a process industry process abnormality early warning system, comprising:

[0195] The data acquisition module is used to collect real-time process-related parameters, historical process-related parameters, real-time data and historical data.

[0196] The data acquisition module realizes real-time data collection and transmission through sensors, PLC (programmable logic controller), DCS (distributed control system) and other devices.

[0197] The modeling module is responsible for establishing a prediction model that can reflect the operating rules of the hydrogen energy preparation process based on the collected historical data. The modeling module is used to establish a first BI-LSTM model and set a first loss function of the first BI-LSTM model. The modeling module is also used to construct a first generative adversarial network.

[0198] The model training module is used to use the historical process-related parameters as the input of the first BI-LSTM model to obtain historical prediction data; and to fine-tune the parameters of the first BI-LSTM model by narrowing the difference between the historical prediction data and the historical data until the first loss function is minimized (implemented by the back propagation algorithm, i.e., updating the model weights according to the error gradient), and the fine-tuned first BI-LSTM model is recorded as the second BI-LSTM model.

[0199] An incremental learning module is used to obtain the weights of a second BI-LSTM model, set a second loss function based on the second BI-LSTM model, construct a regularization term based on the weights, and add the regularization term to the second loss function; the incremental learning module is also used to generate new historical process-related parameters and new historical data using a generative adversarial network; use the new historical process-related parameters as input to the second BI-LSTM model, and output new historical prediction data; and fine-tune the parameters of the second BI-LSTM model again by narrowing the difference between the historical prediction data and the historical data until the second loss function is minimized, and the fine-tuned second BI-LSTM model is recorded as a third BI-LSTM model.

[0200] The third prediction module is used to use the real-time process related parameters as the input of the third BI-LSTM model and output the real-time prediction data.

[0201] The difference calculation module is used to calculate the difference between real-time data and real-time predicted data.

[0202] The judgment module is used to judge whether the difference is greater than a preset threshold.

[0203] An alarm module is used to send out an alarm signal.

[0204] The system collects real-time and historical process parameters in real time through the data acquisition module, establishes a BI-LSTM prediction model using the modeling module, and continuously optimizes the model to adapt to new data through the model training module and the incremental learning module. The third prediction module uses the optimized model to predict the real-time process parameters, the calculation difference module evaluates the deviation between the prediction and the actual, the judgment module judges the anomaly according to the preset threshold, and the alarm module issues an alarm when an anomaly is found.

[0205] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for early warning of process abnormality in a process industry, characterized in that: include: Data collection: collect real-time process-related parameters, historical process-related parameters, real-time data and historical data; Modeling: Based on the deep learning algorithm, establish the first BI-LSTM model, set the first loss function of the first BI-LSTM model; and build the first generative adversarial network; Data processing: preprocessing the historical process related parameters and historical data, taking the preprocessed historical process related parameters as new historical process related parameters, and taking the preprocessed historical data as new historical data; Model training: including the first prediction and the first fine-tuning; First prediction: historical process-related parameters are used as input to the first BI-LSTM model, and historical prediction data is output; First fine-tuning: By reducing the difference between the historical prediction data and the historical data, the parameters of the first BI-LSTM model are fine-tuned until the first loss function is minimized. The fine-tuned first BI-LSTM model is recorded as the second BI-LSTM model. Incremental learning: including obtaining weights, adding regularization terms, expanding the network, setting the discriminator, updating the network, generating new data, second prediction and second fine-tuning; Obtain weights: Obtain the weights of the second BI-LSTM model, and set the second loss function based on the second BI-LSTM model; Adding a regularization term: constructing a regularization term based on the weight, and adding the regularization term to the second loss function to obtain a new second loss function; Expanding the network: adding a discriminator to the first generative adversarial network to obtain a second generative adversarial network, wherein the second generative adversarial network includes: a generator of the first generative adversarial network, a discriminator of the first generative adversarial network, and an added discriminator; Set the discriminator: the discriminator in the first generative adversarial network is recorded as the first discriminator, and the added discriminator is recorded as the second discriminator; Update network: use the second generative adversarial network as the new first generative adversarial network; Generate new data: Use the first generative adversarial network to generate new historical process related parameters and new historical data; Second prediction: The new historical process-related parameters are used as the input of the second BI-LSTM model to output new historical prediction data; Second fine-tuning: By reducing the difference between the historical prediction data and the historical data, the parameters of the second BI-LSTM model are fine-tuned again until the second loss function is minimized. The fine-tuned second BI-LSTM model is recorded as the third BI-LSTM model. Third prediction: The real-time process-related parameters are used as the input of the third BI-LSTM model to output real-time prediction data; Calculate the difference: calculate the difference between real-time data and real-time predicted data; Determine: Determine whether the difference is greater than a preset threshold, if so, execute the alarm step; if not, execute the data collection step; Alarm: Send out an alarm signal.

2. The process abnormality early warning method for process industry according to claim 1 is characterized in that: After executing the step of updating the network and before executing the step of generating new data, it also includes: Training network: including first input, second input and third input; First input: input the processed historical process related parameters into the generator to obtain the first output data; Second input: inputting the processed historical process related parameters and the first output data into the first discriminator to obtain second output data; Third input: The first output data and the second output data are simultaneously input into the second discriminator to obtain third output data.

3. The process abnormality early warning method for process industry according to claim 2 is characterized in that: After executing the step of training the network and before executing the step of generating new data, it also includes: Setting function: Set the loss function of the generator, recorded as the third loss function; set the loss function of the first discriminator, recorded as the fourth loss function; set the loss function of the second discriminator, recorded as the fifth loss function; Adjustment parameters: including first adjustment, second adjustment and third adjustment; First adjustment: fix the parameters of the generator and the second discriminator, and update the parameters of the first discriminator until the fourth loss function is minimized; Second adjustment: fix the parameters of the generator and the first discriminator, and update the parameters of the second discriminator until the fifth loss function is minimized; Third adjustment: fix the parameters of the first discriminator and the second discriminator, and update the parameters of the generator until the third loss function is minimized; Iteration: Repeat the step of adjusting the parameters until a preset stop condition is reached, wherein the preset stop condition is: the number of times the step of adjusting the parameters is executed reaches a preset execution number threshold.

4. The process abnormality early warning method for process industry according to any one of claims 1 to 3, characterized in that: After the model training step and before the incremental learning step, the following steps are also included: Acquiring abnormal data: Acquiring abnormal process related parameters and abnormal data; Generate data: Use the first generative adversarial network to generate new abnormal process related parameters and new abnormal data; Retraining: The second BI-LSTM model is trained again using new abnormal process related parameters and new abnormal data to obtain a new second BI-LSTM model.

5. The process abnormality early warning method for process industry according to any one of claims 1 to 3, characterized in that: After the modeling step is performed and before the model training step is performed, it also includes: Setting a matrix: Setting a two-dimensional matrix, each element in the two-dimensional matrix represents the probability of misclassifying the historical process-related parameters belonging to the i-th category into the j-th category; Adjust weights: Adjust the weights in the first loss function according to the two-dimensional matrix, and use the first loss function after adjusting the weights as the new first loss function.

6. The process industry process abnormality early warning method according to claim 5 is characterized in that: After executing the step of setting the matrix and before executing the step of adjusting the weight, the method further includes: Sum: Calculate the sum of the elements in each row of the two-dimensional matrix and record it as the first data; Normalization: Divide each element by the first data in the corresponding row to obtain a new two-dimensional matrix.

7. The process industry process abnormality early warning method according to claim 6 is characterized in that: The diagonal elements of the two-dimensional matrix are 0.

8. A process industry process abnormality early warning system, characterized in that: The system is used to implement the method according to any one of claims 1 to 7, and the system further includes: Data acquisition module, used to collect real-time process-related parameters, historical process-related parameters, real-time data and historical data; A modeling module, used to establish a first BI-LSTM model, set a first loss function of the first BI-LSTM model; and construct a first generative adversarial network; The model training module is connected to the data acquisition module and the modeling module, and is used to use the historical process-related parameters as the input of the first BI-LSTM model to obtain the historical prediction data; and fine-tune the parameters of the first BI-LSTM model by reducing the difference between the historical prediction data and the historical data until the first loss function is minimized, and the fine-tuned first BI-LSTM model is recorded as the second BI-LSTM model; The incremental learning module is communicatively connected with the model training module and the third prediction module, and is used to obtain the weight of the second BI-LSTM model, set the second loss function based on the second BI-LSTM model; and construct a regularization term based on the weight, and add the regularization term to the second loss function to obtain a new second loss function; the incremental learning module is also used to generate new historical process-related parameters and new historical data using the first generative adversarial network; use the new historical process-related parameters as the input of the second BI-LSTM model, and output new historical prediction data; by reducing the difference between the historical prediction data and the historical data, fine-tune the parameters of the second BI-LSTM model again until the second loss function is minimized, and record the fine-tuned second BI-LSTM model as the third BI-LSTM model; A third prediction module, used to use the real-time process related parameters as input of the third BI-LSTM model and output real-time prediction data; A difference calculation module is used to calculate the difference between real-time data and real-time prediction data; A judging module, used to judge whether the difference is greater than a preset threshold; An alarm module is used to send out an alarm signal.

Citation Information

Patent Citations

  • Early warning and positioning method and system for key process parameters of dimethyl phosphite

    CN113539382A

  • Fermentation process soft measurement modeling method based on dynamic multilayer domain self-adaption

    CN116484723A