A method and system for predicting process accident risks in process industry

By using the time sequence model and the dynamic adjustment of the alarm threshold of the BI-LSTM model, the problem of lacking flexibility in the traditional method of setting the threshold setting in the traditional method has been solved, and a more accurate and flexible risk prediction and alarm system have been achieved, which improves production safety and product quality.

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

Patent Information

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

AI Technical Summary

Technical Problem

In multi-condition environments, traditional alarm threshold setting methods lack flexibility and are difficult to respond to changes in the production environment instantly, resulting in an increase in nuisance alarms and an increase in false alarm rates and missed rates, affecting production safety and product quality.

Method used

Use time series models (including STL sub-models and ARIMA sub-models) to dynamically adjust and calculate the range of normal indicator thresholds, combine with the BI-LSTM model for data prediction, determine whether it is within the normal indicator threshold range, and perform corresponding update steps or issue an alarm Signal.

Benefits of technology

The flexibility of the alarm threshold is improved, the response ability to actual production changes is enhanced, nuisance alarms are reduced, the false alarm rate and false alarm rate are reduced, and production safety and product quality are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150202B_ABST
    Figure CN119150202B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for predicting the risk of process accidents in a process industry, which relates to the technical field of risk prediction. The method comprises the steps of data collection, threshold setting, modeling and training, first prediction, result judgment, first update, second update and alarm; the system comprises a data collection module, a threshold setting module, a modeling and training module, a first prediction module, a result judgment module, an update module and an alarm module. The present application sets a more flexible alarm threshold based on historical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In the complex hydrogen production process with multiple working conditions and multiple states, the reasonable setting of alarm thresholds has become a crucial challenge. Traditionally, methods widely used in the industry, such as the 3σ method (based on the statistical normal distribution assumption, the threshold is set to the mean plus or minus three times the standard deviation), can reflect the fluctuation range of the data to a certain extent, but in a multi-working environment, its fixedness makes it difficult to adapt to rapidly changing production conditions. In addition, the threshold setting method based on expert knowledge relies on the experience and judgment of domain experts. Although it can incorporate industry wisdom, it may seem powerless when faced with new processes or extreme working conditions. The FAP-MAP (false alarm rate and missed alarm rate balance method) method attempts to find the best balance between false alarms and missed alarms, but it also requires frequent calibration and updates to adapt to changes in working conditions.

[0003] However, the common limitation of these methods is that once the alarm threshold and / or normal threshold are set, they often lack sufficient flexibility to respond immediately to subtle or significant changes in actual production. This means that even an alarm system that is carefully designed in the initial stage may gradually fail as the production environment evolves, resulting in an increase in so-called "nuisance alarms" (i.e. frequent but meaningless alarms), as well as an increase in false alarms and missed alarms. This not only increases the burden on operators, but may also mask abnormal conditions that really need attention, thereby affecting production safety and product quality. Summary of the invention

[0004] In order to improve the flexibility of alarm thresholds and / or normal thresholds, the present application provides a method and system for predicting process accident risks in a process industry.

[0005] In the first aspect, the present application provides a method for predicting the risk of process accidents in a process industry, which adopts the following technical solutions:

[0006] A method for predicting the risk of process accidents in a process industry comprises the following steps:

[0007] Data collection: including the first collection and the second collection;

[0008] First collection: collect normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators, and integrate the normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators into a historical data set;

[0009] Second collection: collect data at the current moment;

[0010] Setting thresholds: including first building a model, dynamically adjusting and calculating thresholds;

[0011] First, construct a model: construct a time series model, wherein the time series model includes: an STL sub-model and an ARIMA sub-model;

[0012] Dynamic adjustment: Input normal historical data and normal historical indicators into the STL sub-model to obtain the normal historical indicator periodicity threshold; input normal historical data and normal historical indicators into the ARIMA sub-model to obtain the normal historical indicator prediction threshold and confidence interval;

[0013] Calculate the threshold: Based on the periodic threshold, prediction threshold and confidence interval, calculate the range of the normal indicator threshold. The calculation model is as follows:

[0014] ;

[0015] ;

[0016] in, is the upper limit of the normal indicator threshold; is the lower limit of the normal indicator threshold; B is the periodic threshold; k is a constant; is the standard deviation of the periodic threshold; is the weight of the periodic threshold; C is the prediction threshold; is the value of the confidence interval; is the weight of the prediction threshold;

[0017] Modeling and training: Build a BI-LSTM model and use historical data sets to train the BI-LSTM model;

[0018] First prediction: Input the current data into the trained BI-LSTM model to obtain the first prediction index;

[0019] Result judgment: judging whether the first prediction index is within the range of the normal index threshold, if so, executing the first updating step; if not, executing the second updating step;

[0020] First update: adding the first prediction indicator to the normal historical indicators and executing the step of setting the threshold;

[0021] Second update: adding the first prediction indicator to the abnormal historical indicator and executing the alarm step;

[0022] Alarm: Send out an alarm signal.

[0023] By adopting the above technical solution, the time series model of the present application includes an STL sub-model and an ARIMA sub-model, which can capture the periodicity and uncertainty characteristics of the data respectively, and provide a scientific basis for the setting of the threshold. The present application sets the periodic threshold, prediction threshold and confidence interval based on the time series model, and uses the periodic threshold, prediction threshold and confidence interval to calculate the range of the normal indicator threshold. The threshold range takes into account the equipment status or other influencing factors that change over time, making the prediction threshold closer to reality. For example, taking one year as a cycle, learning seasonal laws, or taking the equipment life as a cycle, learning the impact of equipment degradation laws on periodic thresholds, etc., so that the set normal indicator threshold covers various influencing factors. The present application also adopts a BI-LSTM model with powerful time series data processing capabilities, which is suitable for processing data with complex time series characteristics. The BI-LSTM model can learn the inherent laws and characteristics of historical data, improving the accuracy and reliability of predictions. By judging whether the first prediction indicator is within the range of the normal indicator threshold, it is possible to accurately judge whether an alarm is needed, execute the first update or the second update step according to the judgment result, add the first prediction indicator to the corresponding historical indicator, and reset the threshold or issue an alarm signal, forming a closed-loop feedback mechanism.

[0024] Optionally, the method further comprises:

[0025] First calculation: based on the first prediction indicator, calculating the false alarm rate and / or the missed alarm rate;

[0026] Feedback adjustment: obtain the first prediction indicator corresponding to the false alarm and / or missed alarm, delete the first prediction indicator from the abnormal historical indicators and / or normal historical indicators, add the first prediction indicator back to the normal historical indicators and / or abnormal historical indicators, and execute the step of setting the threshold.

[0027] By adopting the above technical solution, the accuracy of the prediction results can be quantified by calculating the false alarm rate and the false negative rate. The false alarm rate refers to the proportion of normal events that are mistakenly judged as abnormal, while the false negative rate refers to the proportion of abnormal events that are omitted. These two values ​​can intuitively reflect the performance of the prediction model. By deleting the prediction indicators corresponding to false alarms and false negatives and adding them back to the correct historical indicator category, the quality of the historical data set can be optimized, which helps to reduce the impact of noise data on model training and improve the generalization ability of the model. After re-adjusting the historical data, executing the threshold setting step can dynamically update the threshold of the model. This helps to make the threshold setting of the model more consistent with the characteristics of the current data, thereby improving the accuracy of the prediction. The feedback adjustment step forms a closed-loop feedback mechanism, which enables the model to continuously improve according to the accuracy of the prediction results, helps to improve the robustness and adaptability of the model, and enables it to better cope with various complex situations.

[0028] Optionally, after the step of performing the first prediction and before the step of performing the result judgment, the method further includes:

[0029] Second, construct a model: construct a Stacking ensemble learning model, wherein the Stacking ensemble learning model includes n base learners and one meta learner;

[0030] Training Stacking ensemble learning model: including training base learners and training meta learners;

[0031] Training base learners: using abnormal historical data and abnormal historical indicators to train each base learner separately, and obtaining n output data, which are recorded as the first data;

[0032] Training the meta-learner: training the meta-learner with the first data and the abnormal historical indicators;

[0033] Second prediction: Input the current data into the trained Stacking ensemble learning model to obtain the second prediction indicator.

[0034] By adopting the above technical solution, the base learners are trained separately using abnormal historical data and abnormal historical indicators, which helps them better learn the characteristics of abnormal data. This targeted training can improve the Stacking ensemble learning model's ability to identify abnormal events. Using the output data of the base learner and the abnormal historical indicators as input to train the meta-learner helps the meta-learner learn the complementarity between different base learners, thereby improving the accuracy and stability of the prediction. By making a second prediction through the Stacking ensemble learning model, an additional prediction indicator (second prediction indicator) can be obtained. In the result judgment step, the first prediction indicator and the second prediction indicator are combined to jointly judge whether the data at the current moment is within the range of the normal indicator threshold, and the accuracy and reliability of the judgment result are improved through multi-indicator judgment.

[0035] Optionally, after the step of performing the second prediction and before the step of performing the result judgment, the method further includes:

[0036] Fusion prediction index: The first prediction index and the second prediction index are fused to obtain a final prediction index, and the final prediction index is used as a new first prediction index.

[0037] By adopting the above technical solutions, the fusion of prediction indicators from different sources (or different models) can combine their respective advantages and reduce the bias that may exist in a single prediction indicator. Different prediction indicators capture different characteristics or patterns in the data, and fusing them can form a more comprehensive and accurate prediction.

[0038] Optionally, after executing the step of training the Stacking ensemble learning model and before executing the second prediction step, the method further includes:

[0039] Incremental learning: Adopting online learning algorithm, using normal historical data and normal historical indicators to adjust the parameters of the base learner;

[0040] Third prediction: input the current data into the base learner after parameter adjustment to obtain n output data, which are recorded as the second data;

[0041] Retraining: Use the second data and normal historical indicators to train the meta-learner again to obtain the retrained Stacking ensemble learning model.

[0042] By adopting the above technical solutions, incremental learning allows the trained Stacking ensemble learning model to gradually update its parameters when receiving new data, instead of retraining from scratch. This enables the Stacking ensemble learning model to adapt to changes in normal historical data more quickly, and helps to achieve more efficient model updates in resource-constrained environments.

[0043] Optionally, in the second prediction step, the data at the current moment is input into the retrained Stacking ensemble learning model to obtain a new second prediction indicator.

[0044] By adopting the above technical solutions, the retrained Stacking ensemble learning model has adapted to the distribution and characteristics of normal historical data and normal historical indicators, thereby enhancing the adaptability of the Stacking ensemble learning model.

[0045] Optionally, after performing the modeling and training steps and before performing the first prediction step, the method further includes:

[0046] Set loss function: Set the loss function of the BI-LSTM model;

[0047] Set the cost matrix: define the cost matrix, the elements in the cost matrix represent the cost of misclassifying a sample of one category as another category;

[0048] Modify the loss function: modify the loss function of the BI-LSTM model based on the cost matrix;

[0049] Retraining: Retrain the BI-LSTM model using the historical dataset and the modified loss function.

[0050] By adopting the above technical solution, the present application defines a cost matrix containing classification cost information. The cost matrix allows different costs to be assigned to different types of classification errors. By considering the classification cost, the cost matrix can affect the decision boundary of the BI-LSTM model, making it more in line with the needs of practical applications. The loss function of the BI-LSTM model is modified based on the cost matrix, so that the BI-LSTM model can take into account the costs of different classification errors during the training process, which helps the BI-LSTM model to pay more attention to those classification errors with higher costs during the training process. The present application also uses historical data sets and modified loss functions to retrain the BI-LSTM model, which improves the performance of the BI-LSTM model in specific application scenarios.

[0051] Optionally, in the first prediction step, the data at the current moment is input into the retrained BI-LSTM model to obtain a new first prediction index.

[0052] By adopting the above technical solution, since the BI-LSTM model has been optimized through the retraining step, its prediction ability for new data may be enhanced, and the retrained BI-LSTM model has adapted to the latest data distribution and characteristics. Therefore, the new first prediction indicator can better capture the latest changes in the data, showing the advantage of the BI-LSTM model in adapting to new data.

[0053] Optionally, after performing the steps of modeling and training and before performing the step of setting the loss function, the method further includes:

[0054] Assignment membership: Use the KDE algorithm to calculate the density around each sample in the historical data set and obtain the density value;

[0055] Assign weight: Use the density value as the weight of the corresponding sample to obtain a new historical data set.

[0056] By adopting the above technical solutions, the KDE algorithm can estimate the probability density function of the sample, thereby capturing the overall distribution characteristics of the sample. By calculating the density around each sample, we can understand the relative position of the sample in the data set, that is, whether they belong to dense or sparse areas. The KDE algorithm calculates the density and assigns different importance to samples in different areas, which helps to deal with the problem of unbalanced data later. Using the density value as the weight of the sample can make the samples located in the data-dense area have a greater impact on the BI-LSTM model during the training process, which helps the BI-LSTM model pay more attention to the important areas in the data and improve the generalization ability of the BI-LSTM model.

[0057] In a second aspect, the present invention provides a process industry process accident risk prediction system, which adopts the following technical solution:

[0058] A process industry process accident risk prediction system, comprising:

[0059] The data acquisition module includes a first acquisition unit and a second acquisition unit;

[0060] A first collection unit is used to collect normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators, and integrate the normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators into a historical data set;

[0061] The second collection unit is used to collect data at the current moment;

[0062] A threshold setting module is connected to the data acquisition module in communication, and includes a first model building unit, a dynamic adjustment unit, and a threshold calculation unit;

[0063] A first model building unit is used to build a time series model, wherein the time series model includes: an STL sub-model and an ARIMA sub-model;

[0064] The dynamic adjustment unit is used to input the normal historical data and normal historical indicators into the STL sub-model to obtain the normal historical indicator periodicity threshold; input the normal historical data and normal historical indicators into the ARIMA sub-model to obtain the normal historical indicator prediction threshold and confidence interval;

[0065] The threshold calculation unit is used to calculate the range of the normal indicator threshold based on the periodic threshold, the prediction threshold and the confidence interval. The calculation model is as follows:

[0066] ;

[0067] ;

[0068] in, is the upper limit of the normal indicator threshold; is the lower limit of the normal indicator threshold; B is the periodic threshold; k is a constant; is the standard deviation of the periodic threshold; is the weight of the periodic threshold; C is the prediction threshold; is the value of the confidence interval; is the weight of the prediction threshold;

[0069] The modeling and training module is connected to the data acquisition module to build a BI-LSTM model and train the BI-LSTM model using a historical data set;

[0070] A first prediction module, which is in communication with the data acquisition module and the modeling and training module, and is used to input the current data into the trained BI-LSTM model to obtain a first prediction indicator;

[0071] A result judgment module is used to judge whether the first prediction index is within the range of a normal index threshold;

[0072] An update module, comprising a first update unit and a second update unit;

[0073] A first updating unit, configured to add a first prediction indicator to a normal historical indicator;

[0074] a second updating unit, configured to add the first prediction indicator to the abnormal historical indicator;

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

[0076] By adopting the above technical solution, the system integrates multiple modules such as data acquisition module, threshold setting module, modeling and training module, first prediction module, result judgment module, update module and alarm module. The first acquisition unit integrates historical data, and the second acquisition unit collects new data in real time; the threshold setting module uses the STL sub-model and the ARIMA sub-model to dynamically adjust and calculate the normal indicator threshold range; the modeling and training module uses the historical data set to train the BI-LSTM model for prediction; the first prediction module inputs the current data into the trained BI-LSTM model to obtain the first prediction indicator; the result judgment module judges whether the first prediction indicator is normal based on the threshold range; the update module updates the historical indicator according to the judgment result; and the alarm module issues an alarm when it is abnormal. The system can establish a flexible threshold range based on historical data, and continuously adjust the threshold range to improve its flexibility and adaptability, thereby improving the accuracy of the prediction.

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

[0078] 1. The time series model of this application includes an STL sub-model and an ARIMA sub-model, which can capture the periodicity and uncertainty characteristics of the data respectively, and provide a scientific basis for the setting of thresholds. This application sets a periodic threshold, a prediction threshold and a confidence interval based on the time series model, and uses the periodic threshold, prediction threshold and confidence interval to calculate the range of the normal indicator threshold. The threshold range takes into account the equipment status or other influencing factors that change over time, making the prediction threshold closer to reality. For example, taking one year as a cycle, learning seasonal laws, or taking the equipment life as a cycle, learning the impact of equipment degradation laws on periodic thresholds, etc., so that the set normal indicator threshold covers various influencing factors. This application also uses a BI-LSTM model with powerful time series data processing capabilities, which is suitable for processing data with complex time series characteristics. The BI-LSTM model can learn the inherent laws and characteristics of historical data, improving the accuracy and reliability of predictions. By judging whether the first prediction indicator is within the range of the normal indicator threshold, it is possible to accurately judge whether an alarm is needed, execute the first update or the second update step according to the judgment result, add the first prediction indicator to the corresponding historical indicator, and reset the threshold or issue an alarm signal, forming a closed-loop feedback mechanism.

[0079] 2. The base learners are trained separately using abnormal historical data and abnormal historical indicators, which helps them better learn the characteristics of abnormal data. This targeted training can improve the Stacking ensemble learning model's ability to identify abnormal events. Using the output data of the base learner and the abnormal historical indicators as input to train the meta-learner helps the meta-learner learn the complementarity between different base learners, thereby improving the accuracy and stability of the prediction. By making a second prediction through the Stacking ensemble learning model, an additional prediction indicator (second prediction indicator) can be obtained. In the result judgment step, the first prediction indicator and the second prediction indicator are combined to jointly judge whether the data at the current moment is within the range of the normal indicator threshold, and the accuracy and reliability of the judgment result are improved through multi-indicator judgment.

[0080] 3. This application defines a cost matrix containing classification cost information. This cost matrix allows different costs to be assigned to different types of classification errors. By considering the classification cost, the cost matrix can affect the decision boundary of the BI-LSTM model, making it more in line with the needs of practical applications. The loss function of the BI-LSTM model is modified based on the cost matrix, so that the BI-LSTM model can take into account the costs of different classification errors during the training process, which helps the BI-LSTM model pay more attention to those classification errors with higher costs during the training process. This application also uses historical data sets and modified loss functions to retrain the BI-LSTM model, which improves the performance of the BI-LSTM model in specific application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 It is a flowchart of the steps from S1 data collection to S7 alarm in Example 1 of the present application;

[0082] Figure 2 This is a flowchart of the steps from S7 alarm to S2 threshold setting in Example 1 of the present application;

[0083] Figure 3 This is a flow chart of the second model construction from S41 to S44 in the embodiment 2 of the present application to fuse the prediction index;

[0084] Figure 4 This is the flowchart of the second prediction step of S43 in S42 training the Stacking ensemble learning model in Example 2 of the present application;

[0085] Figure 5 This is a flow chart of Example 3 of the present application. DETAILED DESCRIPTION

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

[0087] Example 1: This example discloses a method for predicting the risk of process accidents in a process industry. Figure 1 The method includes: S1 data collection, S2 threshold setting, S3 modeling and training, S4 first prediction, S5 result judgment, S6 data update and S7 alarm. First, historical data and real-time data are collected, and then the normal indicator threshold range is dynamically set. Then, a BI-LSTM model is established. Then, the BI-LSTM model is used to predict the data at the current moment to obtain a first prediction indicator. Then, it is judged whether the first prediction indicator is within the range of the normal indicator threshold. Then, based on the judgment result, it is determined whether an alarm signal needs to be issued. This embodiment includes the following steps:

[0088] S1 data collection, including S11 first collection and S12 second collection.

[0089] S11 is the first collection, which collects normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators, and integrates the normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators into a historical data set.

[0090] Normal historical data covers various data under normal operating conditions, including equipment, environment and other data collected by sensors, as well as stored production raw materials and other data. Normal historical indicators are normal indicator values ​​of hydrogen energy preparation process.

[0091] Abnormal history data records various data under abnormal conditions, including equipment, environment and other data collected by sensors, as well as stored production raw materials and other data. Abnormal history indicators are abnormal indicator values ​​of hydrogen energy preparation processes, which are used to indicate existing problems.

[0092] S12 is the second collection, collecting data at the current moment.

[0093] S2 sets a threshold, including S21 first constructing a model, S22 dynamically adjusting, and S23 calculating a threshold.

[0094] S21 first constructs a model, constructing a time series model, wherein the time series model includes: an STL (Seasonal-Trend decomposition using LOESS) sub-model and an ARIMA (AutoRegressive IntegratedMoving Average) sub-model. The STL sub-model is used to decompose the periodic components of the data, and the ARIMA sub-model is used to predict uncertainty.

[0095] S22 dynamically adjusts, inputs normal historical data and normal historical indicators into the STL sub-model, obtains the periodic threshold of normal historical indicators, and reflects the periodic changes of normal historical data; inputs normal historical data and normal historical indicators into the ARIMA sub-model, and obtains the prediction threshold and confidence interval of normal historical indicators.

[0096] S23 calculates the threshold value, and calculates the range of the normal indicator threshold value based on the periodic threshold value, the prediction threshold value and the confidence interval. The calculation model is as follows:

[0097] ;

[0098] ;

[0099] in, is the upper limit of the normal indicator threshold; is the lower limit of the normal indicator threshold; B is the periodic threshold; k is a constant used to adjust the offset of the periodic threshold when calculating the normal indicator threshold range, and its value range is 0-0.1. is the standard deviation of the periodicity threshold, obtained by statistical analysis; is the weight of the periodic threshold; C is the prediction threshold; is the value of the confidence interval; is the weight of the prediction threshold; .

[0100] S3 modeling and training, building a BI-LSTM model, and using historical data sets to train the BI-LSTM model. Through training, the BI-LSTM model can learn the long-term dependencies between various historical data and corresponding historical indicators, thereby improving the accuracy of predictions.

[0101] S4 first prediction, input the current data into the trained BI-LSTM model to obtain the first prediction index.

[0102] S5: Result judgment, judging whether the first prediction indicator is within the range of the normal indicator threshold value. If so, executing S61: first update; if not, executing S62: second update.

[0103] S6 data update, including S61 first update and S62 second update.

[0104] S61 is the first update, adding the first prediction indicator to the normal historical indicator, and executing S2 to set the threshold.

[0105] S62 is the second update, adding the first prediction indicator to the abnormal historical indicator, and executing S7 to alarm.

[0106] S7 alarm, sending out an alarm signal.

[0107] Taking "real-time monitoring of the temperature of the reactor and detection of potential abnormalities" as an example, the process of this embodiment is as follows:

[0108] S1 Data Collection

[0109] S11 first collection

[0110] Normal historical data: The temperature data of the reactor in the past year is collected from the sensor, and these data are recorded when the reactor is in normal operation. At the same time, normal data such as the batch, composition, concentration, etc. of the production raw materials, as well as the quality and output data of the products are collected.

[0111] Normal historical indicators: According to industry standards and corporate experience, the normal historical indicator range of reactor temperature is set to 200℃~250℃.

[0112] Abnormal historical data: Review the data of reactor temperature exceeding the normal range or causing product quality problems in the past year, as well as the corresponding abnormal data of production raw materials.

[0113] Abnormal historical indicators: When recording these abnormal events, the specific values ​​of the reactor temperature and the corresponding raw material abnormal indicators.

[0114] Integrate these data into historical data sets for subsequent analysis and modeling.

[0115] S12 Second Collection

[0116] Real-time collection of the reactor temperature data and related production raw material data at the current moment.

[0117] S2 Setting Threshold

[0118] S21 first build model

[0119] A time series model including an STL sub-model and an ARIMA sub-model is constructed, and the time series model is used to analyze the periodic variation of reactor temperature and predict future temperature trends.

[0120] S22 Dynamic Adjustment

[0121] The normal historical data and normal historical indicators are input into the STL sub-model, the periodic components of the reactor temperature are analyzed, and the periodic threshold value (such as 240 °C, which reflects the periodic changes of the normal historical data) is obtained.

[0122] The normal historical data and normal historical indicators are input into the ARIMA sub-model to predict the temperature trend in the future and obtain the prediction threshold (such as 220℃) and confidence interval (such as ±10℃).

[0123] S23 Calculation Threshold

[0124] Based on the periodicity threshold, prediction threshold and confidence interval, the range of the normal indicator threshold is calculated. , k=0.05; using statistical analysis, the standard deviation of the periodic threshold is obtained is 15.698, then the normal indicator threshold range is 224.60755 to 235.39245, and the calculation process is as follows:

[0125] ;

[0126] ;

[0127] In other embodiments, the The numerical value of .

[0128] S3 Modeling and Training

[0129] A BI-LSTM model is constructed and trained using historical data sets so that the BI-LSTM model can learn the long-term dependencies between reactor temperature data and corresponding indicators.

[0130] S4 first prediction

[0131] The reactor temperature data collected at the current moment is input into the trained BI-LSTM model to obtain the first prediction index (such as the predicted temperature is 225°C).

[0132] S5 Result Judgment

[0133] It is determined whether the first prediction index (225° C.) is within the normal index threshold range (224.60755° C. to 235.39245° C.) In this embodiment, the predicted temperature is within the normal range, so the first update is performed in S61.

[0134] S6 Data Update

[0135] S61 first update

[0136] The first prediction indicator (225°C) is added to the normal historical indicators as a new normal data point.

[0137] Re-execute the S2 threshold setting step to update the periodic threshold, prediction threshold, and confidence interval to ensure the accuracy and adaptability of the threshold.

[0138] (If the first prediction indicator is not within the normal indicator threshold range, the second update in S62 is executed to add the first prediction indicator to the abnormal historical indicator, and an alarm is executed in S7.)

[0139] S7 alarm, which is not triggered in this example.

[0140] This embodiment collects normal and abnormal historical data and their corresponding indicators to construct a time series model including an STL sub-model and an ARIMA sub-model. The time series model is used to decompose the periodic components of the data and the uncertainty of the prediction, and then dynamically adjust and calculate the range of the normal indicator threshold. The BI-LSTM model is then trained using the historical data set, and the data at the current moment is input into the trained BI-LSTM model for real-time prediction, and the first prediction indicator is judged based on the prediction result to see whether it is within the range of the normal indicator threshold. If the indicator is normal, it is updated to the normal historical indicator and the threshold is reset; if it is abnormal, it is added to the abnormal historical indicator and an alarm operation is performed.

[0141] Reference Figure 2 In other embodiments, the method further comprises:

[0142] S81 first calculation: calculating the false alarm rate and / or the missed alarm rate based on the first prediction indicator.

[0143] The false alarm rate refers to the ratio of the number of erroneous alarms (i.e., predicted as abnormal but actually normal) to the total number of alarms within a certain period of time. The calculation formula is: False Alarm Rate = (Number of False Alarms / Total Number of Alarms) × 100%. The lower the false alarm rate, the higher the accuracy of the prediction and the less interference.

[0144] The false alarm rate refers to the ratio of the number of times that an alarm is not issued (i.e., predicted to be normal but actually abnormal) to the total number of abnormalities within a certain period of time. The calculation formula is: false alarm rate = (number of false alarms / total number of abnormalities) × 100%. The lower the false alarm rate, the easier it is to capture abnormal situations.

[0145] S82 feedback adjustment, obtain the first prediction indicator corresponding to the false alarm, delete the first prediction indicator from the abnormal historical indicators, add the first prediction indicator back to the normal historical indicators, and execute S2 to set the threshold.

[0146] Obtain the first prediction indicator corresponding to the underreporting, delete the first prediction indicator from the normal historical indicators, add the first prediction indicator back to the abnormal historical indicators, and execute S2 to set the threshold.

[0147] Step S81 is responsible for calculating the false alarm rate and missed alarm rate based on the comparison between the predicted indicators and the actual results to evaluate the system performance; while step S82 is responsible for obtaining and adjusting the corresponding first predicted indicators for false alarms and missed alarms, performing necessary deletion and re-addition operations between abnormal historical indicators and normal historical indicators, and then re-executing step S2 to set more accurate thresholds, thereby continuously optimizing the system prediction performance, reducing false alarms and missed alarms, and improving the accuracy and reliability of the early warning system.

[0148] Example 2: Reference Figure 3 The difference between this embodiment and embodiment 1 is that after executing S4 first prediction and before executing S5 result determination, it also includes:

[0149] S41 secondly constructs a model, constructing a Stacking ensemble learning model, wherein the Stacking ensemble learning model includes n base learners and a meta learner. Base learners are different types of machine learning models, such as decision trees, support vector machines, etc., which learn the training data independently. The meta learner is responsible for taking the output of the base learner as input, further learning and giving the final prediction result.

[0150] S42 trains the Stacking ensemble learning model, including S421 training the base learner and S422 training the meta learner.

[0151] S421 trains the base learners, and uses the abnormal historical data and abnormal historical indicators to train each base learner separately. Each base learner will generate its own prediction results based on the input data and abnormal historical indicators, and these prediction results are recorded as the first data.

[0152] S422 trains a meta-learner, and trains the meta-learner with the first data and the abnormal historical indicator. The meta-learner takes the prediction result of the base learner as input, and learns how to make a final prediction in combination with the abnormal historical indicator.

[0153] S43 second prediction, input the current data into the trained Stacking ensemble learning model to obtain the second prediction index.

[0154] S44 fuses the prediction indicator, fuses the first prediction indicator and the second prediction indicator to obtain a final prediction indicator, and uses the final prediction indicator as a new first prediction indicator.

[0155] Fusing the first prediction indicator and the second prediction indicator includes: solving an average value of the first prediction indicator and the second prediction indicator, or solving a weighted average value of the first prediction indicator and the second prediction indicator.

[0156] Reference Figure 4 In other embodiments, after executing S42 to train the Stacking ensemble learning model and before executing S43 for the second prediction, the method further includes:

[0157] S423 incremental learning, using online learning algorithm, using normal historical data and normal historical indicators to adjust the parameters of the base learner. This step uses online learning algorithm, as well as normal historical data and normal historical indicators, so that the base learner can better adapt to the data distribution of normal historical data.

[0158] S424 is the third prediction, which is to input the data at the current moment into the base learner after parameter adjustment to obtain n output data, which are recorded as the second data.

[0159] S425 retrains, using the second data and normal historical indicators to train the meta-learner again to obtain a retrained Stacking ensemble learning model.

[0160] In the second prediction at S43, the data at the current moment is input into the retrained Stacking ensemble learning model to obtain a new second prediction indicator.

[0161] This embodiment constructs a Stacking ensemble learning model. First, the Stacking ensemble learning model is preliminarily trained using abnormal historical data and abnormal historical indicators alone. During the preliminary training process, the Stacking ensemble learning model only learns the relationship between the abnormal historical data and the abnormal historical indicators to obtain the ability to predict abnormal situations. Thereafter, an online learning algorithm is used to retrain the preliminarily trained Stacking ensemble learning model using normal historical data and normal historical indicators. During the retraining process, the preliminarily trained Stacking ensemble learning model learns the distribution of normal historical data and normal historical indicators to obtain the ability to predict normal situations.

[0162] Example 3: Reference Figure 5 The difference between this embodiment and embodiment 1 is that after executing S3 modeling and training and before executing S4 first prediction, it also includes:

[0163] S31 allocates membership, uses the KDE algorithm, calculates the density around each sample in the historical data set (the sample refers to normal historical data or normal historical indicators or abnormal historical data or abnormal historical indicators) to obtain a density value.

[0164] The KDE algorithm is a non-parametric estimation method that can estimate the probability density function based on samples. By calculating the density value of each sample, the distribution of samples in the historical data set can be obtained, that is, which samples are more dense and which samples are relatively sparse.

[0165] S32 assigns weights, uses the density values ​​as weights of corresponding samples, and obtains a new historical data set.

[0166] The introduction of weights can make the BI-LSTM model pay more attention to samples that are densely distributed (i.e., have larger weights) in the historical data set during training, while reducing dependence on sparse samples, which helps to improve the BI-LSTM model's ability to learn the main data distribution, thereby improving the accuracy of predictions.

[0167] S33 sets the loss function and sets the loss function of the BI-LSTM model.

[0168] S34 sets a cost matrix, defining the cost matrix, wherein the elements in the cost matrix represent the cost of misclassifying a sample of one category as another category.

[0169] S35 modifies the loss function and modifies the loss function of the BI-LSTM model based on the cost matrix.

[0170] S36 retraining, using historical data sets and modified loss functions to retrain the BI-LSTM model. The retrained BI-LSTM model not only learns the main distribution features in the historical data, but also considers the cost of misclassification of different categories, thus having stronger prediction ability and accuracy.

[0171] In the first prediction of S4, the data at the current moment is input into the retrained BI-LSTM model to obtain a new first prediction index.

[0172] The following further explains this embodiment with reference to specific cases:

[0173] S31 Allocation Membership

[0174] First, a large amount of data is collected, including: collecting normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators, and marking the normal historical data or normal historical indicators or abnormal historical data or abnormal historical indicators as samples.

[0175] The KDE algorithm is used to calculate the density around each sample. Through calculation, the density value of each sample is obtained. These density values ​​reflect the density of the sample in the historical data set.

[0176] S32 weighting

[0177] Next, the calculated density value is used as the weight of the corresponding sample to construct a new historical data set. Samples with dense distribution in the historical data set will have larger weights, while sparse samples will have smaller weights.

[0178] S33 Setting loss function

[0179] In order to guide the learning of the BI-LSTM model, the mean square error is used as the initial loss function of the BI-LSTM model. This loss function can reflect the difference between the model prediction results and the actual real data, thereby guiding the BI-LSTM model to continuously optimize its parameters.

[0180] The initial loss function calculation formula of the BI-LSTM model is as follows:

[0181] ;

[0182] in, is the first predictor; is the real indicator (normal historical indicator or abnormal historical indicator), N is the number of samples, is the weight of the ith sample.

[0183] S34 sets the cost matrix

[0184] Considering that different types of accidents have different severity and impact ranges, a cost matrix is ​​defined. The elements in the cost matrix are Represents the cost of misclassifying samples of category i as category j. For example, misclassifying a serious accident as a minor accident, or misclassifying an accident that may cause environmental pollution as an accident with no impact, will bring a large cost.

[0185] S35 Modify loss function

[0186] Based on the set cost matrix, the loss function of the BI-LSTM model is modified. The modified loss function not only considers the difference between the model prediction results and the actual data, but also considers the cost of misclassification of samples of different categories. In this way, the BI-LSTM model will pay more attention to those misclassifications with higher costs during the training process.

[0187] ;

[0188] M is the number of categories.

[0189] S36 Retraining

[0190] The BI-LSTM model was retrained using a new historical dataset and a modified loss function. The retrained BI-LSTM model not only learned the main distribution characteristics in various data, but also considered the cost of misclassification of different categories, thus having stronger predictive ability and accuracy.

[0191] S4 first prediction

[0192] In the S4 first prediction, the process data at the current moment is input into the retrained BI-LSTM model to obtain new first prediction indicators. These first prediction indicators include the probability of an accident, possible accident types, and impact range. By comparing the prediction results with the actual accident situation, the prediction performance of the BI-LSTM model can be evaluated.

[0193] This embodiment introduces a series of steps including assigning membership (using the KDE algorithm to calculate the sample density in the historical data set), assigning weights (building a new data set based on the density value), setting the loss function, setting the cost matrix, modifying the loss function to consider the misclassification costs of different categories, and retraining. These steps together enhance the BI-LSTM model's ability to learn the distribution of historical data and make it pay more attention to costly misclassification situations, thereby providing more accurate and reliable prediction indicators in the S4 first prediction.

[0194] Embodiment 4: This embodiment discloses a process industry process accident risk prediction system, the system comprising:

[0195] The data acquisition module includes a first acquisition unit and a second acquisition unit.

[0196] The first collection unit is used to collect normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators, and integrate the normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators into a historical data set for subsequent model training and prediction.

[0197] The second collection unit is used to collect data at the current moment and provide input data for the first prediction module.

[0198] The threshold setting module is connected to the data acquisition module in communication, and includes a first model building unit, a dynamic adjustment unit and a threshold calculation unit.

[0199] The first model building unit is used to build a time series model, and the time series model includes: an STL sub-model and an ARIMA sub-model.

[0200] The dynamic adjustment unit is used to input normal historical data and normal historical indicators into the STL sub-model to obtain the normal historical indicator periodicity threshold; input normal historical data and normal historical indicators into the ARIMA sub-model to obtain the normal historical indicator prediction threshold and confidence interval.

[0201] The threshold calculation unit is used to calculate the range of the normal indicator threshold based on the periodic threshold, the prediction threshold and the confidence interval. The calculation model is as follows:

[0202] ;

[0203] ;

[0204] in, is the upper limit of the normal indicator threshold; is the lower limit of the normal indicator threshold; B is the periodic threshold; k is a constant; is the standard deviation of the periodic threshold; is the weight of the periodic threshold; C is the prediction threshold; is the value of the confidence interval; is the weight of the prediction threshold.

[0205] The modeling and training module is connected to the data acquisition module for building a BI-LSTM model and training the BI-LSTM model using a historical data set.

[0206] The first prediction module is connected to the data acquisition module and the modeling and training module. This module uses the historical data set as training data. Through multiple iterations and optimizations, the BI-LSTM model can learn the inherent laws and characteristics of the data. The trained BI-LSTM model will be used for subsequent prediction tasks.

[0207] The result judgment module is used to judge whether the first prediction indicator is within the range of the normal indicator threshold. If the prediction indicator is within the normal range, the monitoring continues; if the prediction indicator exceeds the normal range, the alarm module is triggered.

[0208] The update module includes a first update unit and a second update unit.

[0209] The first updating unit is used to add the first prediction indicator to the normal historical indicator to update the range of the normal indicator threshold.

[0210] The second updating unit is used to add the first prediction indicator to the abnormal historical indicator.

[0211] The alarm module is used to send out an alarm signal, which can be a sound, light or other form of prompt to attract the attention of the operator and take appropriate measures.

[0212] This embodiment collects historical and current data through the first acquisition unit and the second acquisition unit respectively, and uses the STL sub-model and the ARIMA sub-model to dynamically adjust and calculate the normal indicator threshold range. Then, the historical data set is used to train the BI-LSTM model, and the current data is input into the trained BI-LSTM model for prediction, and a judgment is made based on whether the prediction result is within the threshold range. If the prediction is normal, the normal historical indicators are updated and the threshold is reset; if it is abnormal, the abnormal historical indicators are updated and the alarm module is triggered to realize real-time monitoring and early warning functions.

[0213] 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 predicting the risk of process accidents in a process industry, characterized in that: include: Data collection: including the first collection and the second collection; First collection: collect normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators, and integrate the normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators into a historical data set; Second collection: collect data at the current moment; Setting thresholds: including first building a model, dynamically adjusting and calculating thresholds; First, construct a model: construct a time series model, wherein the time series model includes: an STL sub-model and an ARIMA sub-model; Dynamic adjustment: Input normal historical data and normal historical indicators into the STL sub-model to obtain the normal historical indicator periodicity threshold; input normal historical data and normal historical indicators into the ARIMA sub-model to obtain the normal historical indicator prediction threshold and confidence interval; Calculate the threshold: Based on the periodic threshold, prediction threshold and confidence interval, calculate the range of the normal indicator threshold. The calculation model is as follows: ; ; in, is the upper limit of the normal indicator threshold; is the lower limit of the normal indicator threshold; B is the periodic threshold; k is a constant; is the standard deviation of the periodic threshold; is the weight of the periodic threshold; C is the prediction threshold; is the value of the confidence interval; is the weight of the prediction threshold; Modeling and training: Build a BI-LSTM model and use historical data sets to train the BI-LSTM model; First prediction: Input the current data into the trained BI-LSTM model to obtain the first prediction index; Second, construct a model: construct a Stacking ensemble learning model, wherein the Stacking ensemble learning model includes n base learners and one meta learner; Training Stacking ensemble learning model: including training base learners and training meta learners; Training base learners: using abnormal historical data and abnormal historical indicators to train each base learner separately, and obtaining n output data, which are recorded as the first data; Training the meta-learner: training the meta-learner with the first data and the abnormal historical indicators; Second prediction: Input the current data into the trained Stacking ensemble learning model to obtain the second prediction index; Fusion prediction index: Fusion the first prediction index and the second prediction index to obtain a final prediction index, and the final prediction index is used as a new first prediction index; Result judgment: judging whether the first prediction index is within the range of the normal index threshold, if so, executing the first updating step; if not, executing the second updating step; First update: adding the first prediction indicator to the normal historical indicators and executing the step of setting the threshold; Second update: adding the first prediction indicator to the abnormal historical indicator and executing the alarm step; Alarm: Send out an alarm signal.

2. The process industry process accident risk prediction method according to claim 1 is characterized in that: The method further comprises: First calculation: based on the first prediction indicator, calculating the false alarm rate and / or the missed alarm rate; Feedback adjustment: obtain the first prediction indicator corresponding to the false alarm and / or missed alarm, delete the first prediction indicator from the abnormal historical indicators and / or normal historical indicators, add the first prediction indicator back to the normal historical indicators and / or abnormal historical indicators, and execute the step of setting the threshold.

3. The process industry process accident risk prediction method according to claim 1 is characterized in that: After executing the step of training the Stacking ensemble learning model and before executing the second prediction step, the method further includes: Incremental learning: Adopting online learning algorithm, using normal historical data and normal historical indicators to adjust the parameters of the base learner; Third prediction: input the current data into the base learner after parameter adjustment to obtain n output data, which are recorded as the second data; Retraining: Use the second data and normal historical indicators to train the meta-learner again to obtain the retrained Stacking ensemble learning model.

4. The process industry process accident risk prediction method according to claim 3 is characterized in that: In the second prediction step, the data at the current moment is input into the retrained Stacking ensemble learning model to obtain a new second prediction indicator.

5. The process industry process accident risk prediction method according to claim 1 or 2, characterized in that: After executing the modeling and training steps and before executing the first prediction step, the method further includes: Set loss function: Set the loss function of the BI-LSTM model; Set the cost matrix: define the cost matrix, the elements in the cost matrix represent the cost of misclassifying a sample of one category as another category; Modify the loss function: modify the loss function of the BI-LSTM model based on the cost matrix; Retraining: Retrain the BI-LSTM model using the historical dataset and the modified loss function.

6. The process industry process accident risk prediction method according to claim 5 is characterized in that: In the first prediction step, the data at the current moment is input into the retrained BI-LSTM model to obtain a new first prediction index.

7. The process industry process accident risk prediction method according to claim 6 is characterized in that: After executing the modeling and training steps and before executing the step of setting the loss function, it also includes: Assignment membership: Use the KDE algorithm to calculate the density around each sample in the historical data set and obtain the density value; Assign weight: Use the density value as the weight of the corresponding sample to obtain a new historical data set.

8. A process industry process accident risk prediction system, the system is applicable to the method according to any one of claims 1 to 7, characterized in that: include: The data acquisition module includes a first acquisition unit and a second acquisition unit; A first collection unit is used to collect normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators, and integrate the normal historical data, normal historical indicators, abnormal historical data and abnormal historical indicators into a historical data set; The second collection unit is used to collect data at the current moment; A threshold setting module is connected to the data acquisition module in communication, and includes a first model building unit, a dynamic adjustment unit, and a threshold calculation unit; A first model building unit is used to build a time series model, wherein the time series model includes: an STL sub-model and an ARIMA sub-model; The dynamic adjustment unit is used to input the normal historical data and normal historical indicators into the STL sub-model to obtain the normal historical indicator periodicity threshold; input the normal historical data and normal historical indicators into the ARIMA sub-model to obtain the normal historical indicator prediction threshold and confidence interval; The threshold calculation unit is used to calculate the range of the normal indicator threshold based on the periodic threshold, the prediction threshold and the confidence interval. The calculation model is as follows: ; ; in, is the upper limit of the normal indicator threshold; is the lower limit of the normal indicator threshold; B is the periodic threshold; k is a constant; is the standard deviation of the periodic threshold; is the weight of the periodic threshold; C is the prediction threshold; is the value of the confidence interval; is the weight of the prediction threshold; The modeling and training module is connected to the data acquisition module to build a BI-LSTM model and train the BI-LSTM model using a historical data set; A first prediction module, which is in communication with the data acquisition module and the modeling and training module, and is used to input the current data into the trained BI-LSTM model to obtain a first prediction indicator; A result judgment module is used to judge whether the first prediction index is within the range of a normal index threshold; An update module, comprising a first update unit and a second update unit; A first updating unit, configured to add a first prediction indicator to a normal historical indicator; a second updating unit, configured to add the first prediction indicator to the abnormal historical indicator; An alarm module is used to send out an alarm signal.

Citation Information

Patent Citations

  • Hybrid cloud scene-oriented time series data anomaly prediction method based on ensemble learning technology

    CN112131212A

  • Power grid host dynamic threshold setting method based on FARIMA-LSTM prediction

    CN113435725A