Risk prediction, simulation and early warning method and system suitable for petrochemical key equipment

By constructing a combined model of recursive random forest and graph neural network, and combining multi-level early warning thresholds and real-time data feedback optimization, the problems of low prediction accuracy and untimely early warning in risk prediction of petrochemical equipment are solved, and accurate, three-dimensional prediction and adaptive optimization of equipment risk are realized.

CN120873440APending Publication Date: 2025-10-31HAILONG OIL GRP (SHANGHAI) INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510862578.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing risk prediction methods for petrochemical equipment suffer from low prediction accuracy, untimely warnings, and poor long-term effectiveness due to their simplistic models, basic early warning mechanisms, and inability to be dynamically updated.

Method used

By acquiring equipment operating status and environmental data through dynamic simulation software, a combined model of recursive random forest and graph neural network is constructed to predict risk parameters, set multi-level early warning thresholds, and optimize the model by combining real-time data feedback.

Benefits of technology

It achieves accurate and comprehensive prediction of potential risks to equipment, improves the timeliness and reliability of early warning, solves the problems of insufficient prediction accuracy and early warning delay in existing technologies, has adaptive evolution capabilities, and ensures long-term effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873440A_ABST
    Figure CN120873440A_ABST
Patent Text Reader

Abstract

The invention relates to the field of petrochemical engineering intelligent early warning, and discloses a risk prediction simulation early warning method and system suitable for petrochemical engineering key equipment, and the method comprises the following steps: S1, obtaining the operation state data and environmental factor data of the key equipment through dynamic simulation software; s2, performing cleaning and normalization processing on the data set, and then performing integration; s3, constructing a combined nonlinear prediction model, and performing risk parameter prediction by inputting the complete data set; s4, setting a risk early warning threshold value and an early warning mechanism; s5, updating model parameters, and dynamically optimizing the prediction model; the system comprises a data acquisition module, a data processing module, a risk prediction module, an early warning module and an updating module. According to the method, through a combined model of the recursive random forest and the graph neural network, the equipment dynamic simulation data and the multi-dimensional environmental factors are deeply fused, and accurate and three-dimensional prediction of the potential risk of the equipment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent early warning technology in the petrochemical industry, and in particular to a method and system for risk prediction, simulation and early warning of key equipment in the petrochemical industry. Background Technology

[0002] As a fundamental industry of the national economy, the safety and stability of the petrochemical production process are of paramount importance. To ensure production safety, the industry generally deploys online monitoring systems for key equipment such as heat exchangers and reactors. Current technical practices typically involve collecting core parameters during equipment operation, such as temperature, pressure, and flow rate. This data is then used as a basis to employ time series forecasting models, such as algorithms like Long Short-Term Memory (LSTM) networks, to analyze trends and assess risks related to the equipment's future operating status.

[0003] However, relying solely on the aforementioned methods for risk assessment in practical industrial applications still presents several challenges. First, equipment risks are rarely the result of a single factor; changes in the external environment are also significant contributing factors. Current technologies lack the ability to integrate and analyze equipment data with environmental data, making it difficult to effectively capture the nonlinear coupling relationships between multiple factors. Second, existing early warning mechanisms struggle to balance sensitivity and specificity. Fixed threshold settings lead to frequent false alarms for brief, normal fluctuations in operating conditions and result in delayed responses to slow, progressive risks. Furthermore, the static nature of the predictive models also presents problems. As the equipment experiences physical wear and tear and components age, the model's predictive performance gradually deteriorates due to its inability to adaptively track these time-varying characteristics. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for risk prediction, simulation and early warning of key equipment in the petrochemical industry. This invention solves the problems of low prediction accuracy, untimely early warning and poor long-term effectiveness caused by the existing risk prediction methods for petrochemical equipment, which are based on single models, simple early warning mechanisms and cannot be dynamically updated.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A risk prediction, simulation, and early warning method applicable to key equipment in the petrochemical industry includes the following steps: S1. Obtain operating status data and environmental factor data of key equipment through dynamic simulation software to form dynamic datasets and environmental datasets including temperature, pressure and flow rate; S2. The dynamic dataset and the environmental dataset are cleaned and normalized, and then merged into a complete dataset; S3. Construct a combined nonlinear prediction model, including a recursive random forest model and a graph neural network model, and predict risk parameters by inputting the complete dataset; S4. Set a risk warning threshold. When the predicted risk parameter reaches or exceeds the threshold, the warning mechanism is triggered. S5. Update model parameters through real-time data feedback and dynamically optimize the prediction model.

[0006] Preferably, in step S1, the dynamic simulation software is Aspen-Dynamics software; The acquisition of operational status data and environmental factor data of key equipment to form dynamic datasets and environmental datasets including temperature, pressure, and flow rate includes: S11. Launch the Aspen-Dynamics software on your computer, create a new project, and then perform a dynamic simulation; S12. Select the key equipment to be simulated, and input the key equipment information, including basic parameters such as equipment type, size, material and working conditions; S13. Define the feed parameters, including the feed temperature, pressure, flow rate and composition. These parameters should be set based on the actual process flow or standard operating procedures. S14. Set operating conditions and environmental parameters, including temperature and pressure fluctuations of the gas inside the tank and changes in the external environment, to ensure that the simulation scenario can reflect the real operating conditions. S15. Configure the time parameters for dynamic simulation, including the start time, end time, and time step, to ensure that the simulation can capture the dynamic changes of the equipment during operation. S16. Start dynamic simulation. Aspen-Dynamics will perform real-time calculations based on the input parameters and configuration to generate the dynamic response of the equipment under different operating conditions, including temperature, pressure and flow data. S17. During the simulation operation, monitor the data fed back by the software in real time, observe the changes in the operating status of the equipment, and ensure the rationality of the simulation process. S18. After completing the simulation, use the software's data export function to extract the generated dynamic data into a dataset, and record the dynamic dataset including temperature, pressure, and flow rate, as well as the corresponding environmental dataset.

[0007] Preferably, in step S2, the cleaning of the dynamic dataset and the environmental dataset includes: S21. Missing value handling: Check if there are missing values ​​in the dataset and decide on the interpolation method to handle them; S22. Outlier Detection: Outliers are identified and removed using the statistical method Z-score. S23. Noise Filtering: Apply a sliding window to filter noise in the data; The normalization process includes: S221. Choose a normalization method: including Min-Max normalization and Z-score standardization; S222, Min-Max Normalization: In the formula, X ′ The value represents the processed data value, X represents any data value to be processed, min(X) represents the minimum value in dataset X; max(X) represents the maximum value in dataset X; scale all features to the range [0,1]. S223, Z-score standardization: In the formula, μ is the mean and σ is the standard deviation, which transforms the data into a distribution with a mean of 0 and a standard deviation of 1. S224. Apply the selected normalization method to the dynamic dataset and the environment dataset to form normalized dynamic dataset and environment dataset.

[0008] Preferably, step S3 includes: S31. Dataset partitioning: The complete dataset is divided into a training set and a test set. The training set is used for model learning and parameter training, and the test set is used to evaluate the performance and generalization ability of the final model. S32. Construction and training of the recursive random forest model: The recursive random forest model is constructed using the pre-divided training set, and then trained using the test set; S33. Construction of Graph Neural Network Model: Based on the correlation between the process flow or data features of petrochemical equipment, construct a graph structure, then construct the GNN model architecture, and set its hyperparameters, including the number of network layers, learning rate, and activation function. S34. Training of the graph neural network model: The training set data is mapped onto the graph structure and input into the GNN model for training. The model updates the representation of its own nodes by propagating and aggregating information of neighboring nodes on the graph, thereby learning the complex global dependencies between features. S36. Fusion of combined models and generation of risk parameters: The independently trained recurrent random forest model and graph neural network model are fused by weighted summation to generate the final risk prediction parameters. S37. Model Evaluation and Final Determination: The performance of the constructed combined model is evaluated using the reserved test set. The test set data is then input into the combined model to obtain the predicted risk parameters. The evaluation index is calculated by comparing the prediction results with the actual risk labels. If the model performance does not meet expectations, the number of decision trees, learning rate, and weight coefficients are readjusted and the model is retrained until it performs optimally on the test set. In step S32, the construction of the recursive random forest model using the partitioned training set includes the following steps: S321. First, set the hyperparameters of the model, including the number of decision trees, the maximum depth of each tree, and the minimum number of samples for node splits. S322. Input the training set data into the recursive random forest model. The recursive random forest model constructs K decision trees in parallel through ensemble learning. S323. Each tree independently learns and splits the data features. Finally, by averaging the prediction results of all decision trees, the preliminary prediction value of risk by the recursive random forest model is obtained.

[0009] Preferably, in step S34, the final risk prediction parameter is calculated using the following formula: In the formula, T k (X) represents the prediction result of the k-th decision tree for the input sample k; The parameters are the final risk prediction parameters; GNN(X) represents the predicted output value of the graph neural network model for the input sample X; X represents the feature vector of the input model; RRF(X) represents the predicted output value of the recursive random forest model for the input sample X; In step S323, the prediction process is expressed by the following formula: In the formula, T k (X) represents the prediction result of the k-th decision tree for the input sample k; These are the parameters for the final risk prediction.

[0010] Preferably, in step S4, setting the risk warning threshold includes: S411. Determine the risk level and threshold benchmark. First, based on the safety production standards of the petrochemical industry, the operating procedures of key equipment, and the analysis of historical failure data, combined with the experience of experts in the field, the equipment risk is divided into three levels. S412. Quantitatively set multi-level early warning thresholds: After determining the risk level, use statistical methods and historical data to quantitatively set the thresholds. S413. Threshold calibration and solidification: The initially set multi-level thresholds are tested on the validation dataset to evaluate their accuracy, recall, and false alarm rate in distinguishing different risk states. Based on the evaluation results, fine-tuning is performed to achieve the best balance. The final determined threshold parameters are then solidified into the rule base of the early warning system as the basis for subsequent real-time judgment. The early warning triggering mechanism includes: S421. Judgment and triggering of early warning events: If the monitoring module detects that the real-time risk parameter meets the condition of exceeding the first level threshold, the system immediately judges it as a valid early warning event. At the same time, based on the specific value range of the real-time risk parameter, the system automatically determines the level of the early warning and formally triggers the corresponding level of early warning response process. S422. Generate and encapsulate structured warning information: After a warning event is triggered, the system will automatically generate a structured warning message, including: Event identifier: A unique event ID and trigger timestamp; Risk source identification: Equipment number, name, and specific measurement points where the risk occurred; Risk feature attribution: The main input features that lead to an increase in risk value and their current values; Recommendations: Based on a pre-set knowledge base, provide standardized operational recommendations corresponding to the warning level; S423. Implement multi-channel, tiered early warning notification: The system implements a tiered, multi-channel notification strategy based on the level of the early warning, and pushes the generated early warning information to relevant parties. The tiered, multi-channel notification strategy includes: Interface notification: The highest priority notification is given via audible and visual alarms on the monitoring system interface in the central control room; Communication notification: Detailed early warning information is sent to designated field engineers, team leaders, and workshop managers via SMS, email, and enterprise instant messaging tools; S424. Warning Event Recording and Archiving: Record every triggered warning event, including its complete structured information, notification records, and subsequent manual handling measures and results, in detail into the system's historical log database.

[0011] Preferably, in step S411, the risk level classification of the equipment includes: Attention Level: The equipment's operating parameters are slightly abnormal, posing a potential risk that requires attention. Warning level: The equipment operating parameters have deviated significantly, posing a high risk and requiring intervention. Hazard level: The equipment's operating parameters are severely abnormal, indicating that a failure is imminent or has already occurred, and immediate action is required. In step S412, the quantitative setting of the threshold using statistical methods and historical data includes: Attention level: The risk prediction value distribution of the analysis model on a large amount of normal operation historical data is used as the threshold. This means that when the risk value exceeds this threshold, it has deviated from the vast majority of normal operating conditions. Warning level: The risk prediction values ​​output by the model when minor faults and abnormal operating conditions have occurred in the historical data are analyzed, and the average or median of these values ​​is taken as the threshold. If there is no such data, experts can set it based on the results of simulated abnormal operating conditions. Danger level: The risk prediction values ​​output by the model before a serious fault occurred in the historical data are analyzed and set as the danger level threshold. Reaching this standard represents the critical point when the equipment is about to enter an uncontrollable state.

[0012] Preferably, in step S5, updating the model parameters through real-time data feedback includes: S511. Continuously collect the latest data streams generated by key equipment during actual operation and preprocess them; S512. Subsequently, in conjunction with manual review and confirmation, these new data are labeled to form incremental data samples with real risk labels; S513. Collect the new data samples to form an incremental learning dataset for model optimization, and use a sliding window strategy to manage the dataset, that is, only retain the recent data. The dynamic optimization of the prediction model includes: S521. When the system detects a decline in model performance or the arrival of a preset update cycle, it loads the parameters P of the existing model. old Following the principle of gradient descent, the dataset is retrained using an incremental learning dataset; S522. Using a genetic algorithm, automatically search for a set of model hyperparameters that minimize the loss. S523. The optimized new model needs to be finally verified on an independent test set. Only when the overall performance of the new model is confirmed to be better than that of the old model will the system deploy it to the production environment to complete the closed loop of the entire dynamic optimization and update.

[0013] Preferably, in step S521, the core update formula following the gradient descent principle is: In the formula, P new These are the updated model parameters; P old These are the current model parameters; η is the learning rate, which controls the step size for parameter updates. The loss function L is the loss function with respect to the current parameter P. old The gradient indicates the direction of parameter adjustment; In step S522, the process of automatically searching for a set of model hyperparameters that minimizes loss can be expressed as: In the formula, H * H represents the optimal combination of hyperparameters found; H represents a set of hyperparameters to be optimized. Describe an operation aimed at finding the objective function Loss. validation (H) The parameter H that yields the minimum value; Loss validation (H) represents the prediction loss or error on the independent validation set when the model uses the hyperparameter combination H.

[0014] A risk prediction, simulation, and early warning system for key equipment in the petrochemical industry, comprising: The data acquisition module is used to acquire real-time operating status data and environmental factor data of key petrochemical equipment through dynamic simulation software; The data processing module, connected to the data acquisition module, is used to clean, normalize, and fuse the received operating status data and environmental factor data to generate a complete dataset for the model to use. The risk prediction module, connected to the data processing module, is used to receive the complete dataset and predict the risk parameters of the device in real time through a built-in combined nonlinear prediction model. The early warning module, connected to the risk prediction module, is used to receive predicted risk parameters and compare them with preset risk early warning thresholds. When the risk parameters reach or exceed the thresholds, multi-level early warning information is triggered and issued. The update module, which is connected to both the data acquisition module and the risk prediction module, is used to receive real-time data feedback and combine it with manual confirmation information of the early warning results to adaptively fine-tune and dynamically optimize the model parameters and hyperparameters in the risk prediction module.

[0015] In summary, the present invention has at least one of the following beneficial technical effects: 1. This invention utilizes a combined model of recursive random forest and graph neural network to deeply integrate dynamic equipment simulation data with multi-dimensional environmental factors, achieving accurate and comprehensive prediction of potential equipment risks. This solves the problem of existing technologies relying on single equipment operation data and time-series models, which makes it difficult to capture the complex risk evolution process under the coupling of multiple factors, thus resulting in insufficient prediction accuracy.

[0016] 2. This invention constructs a graph neural network model to uncover deep topological relationships between data points at various measurement points of the equipment, and combines this with a multi-level quantified early warning threshold system. The timeliness and reliability of the early warning are guaranteed. Compared to the simple alarm mechanisms based on fixed thresholds in existing technologies, this invention overcomes the limitations of delayed early warnings and the inability to effectively distinguish between the initial stage of a fault and normal fluctuations.

[0017] 3. This invention employs a closed-loop mechanism of dynamic optimization and feedback to fine-tune the parameters and optimize hyperparameters of the prediction model using real-time data. This enables the entire risk prediction system to possess adaptive evolution capabilities. Existing prediction models are mostly static, with performance fixed after a single deployment. This invention effectively solves the problem of performance degradation caused by equipment aging and changes in operating conditions, ensuring the long-term effectiveness of the method. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a system module architecture diagram of the method of the present invention. Detailed Implementation

[0019] The following is in conjunction with the appendix Figure 1 -Appendix Figure 2 The present invention will be further described in detail below.

[0020] This invention provides a method and system for risk prediction, simulation, and early warning of key equipment in the petrochemical industry.

[0021] like Figure 1 As shown, a risk prediction, simulation, and early warning method suitable for key equipment in the petrochemical industry may include the following steps: S1. Obtain operating status data and environmental factor data of key equipment through dynamic simulation software to form dynamic datasets and environmental datasets including temperature, pressure and flow rate; Specifically, the core purpose of this step is to obtain raw data that can comprehensively and dynamically reflect the operating status of key equipment and its environment, providing a solid data foundation for the subsequent construction of risk prediction models.

[0022] For example, this step can be performed using specialized dynamic simulation software, such as Aspen-Dynamics, which is capable of performing high-fidelity dynamic simulations of complex chemical processes.

[0023] When performing data acquisition, first launch the Aspen-Dynamics software on the computer and create a new project to provide a working environment for the subsequent dynamic simulation process.

[0024] Then, select the key equipment that needs to be risk-predicted, such as heat exchangers, reactors, or separation towers, and input the basic parameter information of the key equipment.

[0025] The basic parameter information specifically includes the equipment type, physical dimensions, construction materials, and standard operating conditions. This information together constitutes the static physical model of the equipment in the simulation environment.

[0026] Next, to make the simulation closely resemble real-world conditions, the feed parameters need to be defined. These parameters should be precisely set based on the actual process flow diagram or standard operating procedure (SOP).

[0027] Feed parameters include the temperature, pressure, flow rate, and chemical composition of the material entering the equipment, ensuring that the material input in the simulation process is consistent with the real world.

[0028] In order to simulate various situations that the equipment may encounter during operation, it is also necessary to set corresponding operating conditions and environmental parameters to ensure that the simulation scenario can reflect the real operating state.

[0029] These conditions can specifically include temperature and pressure fluctuations of the internal medium (such as gas or liquid) of the equipment, as well as changes in the external environment such as ambient temperature and humidity.

[0030] To capture the dynamic changes of the equipment during operation, it is necessary to configure the runtime parameters for dynamic simulation.

[0031] This configuration includes setting the simulation start time, end time, and time step. A reasonable time step is crucial to ensuring that the simulation can accurately capture transient changes in the device's state.

[0032] After completing all the above configurations, start the dynamic simulation. The Aspen-Dynamics software will perform real-time calculations based on the input equipment parameters, material parameters, and operating conditions.

[0033] The software's calculation process generates dynamic response data of the equipment under different operating conditions. This data records the changes in key process parameters in the form of a time series.

[0034] During the simulation, the feedback data can be monitored in real time through the software interface to observe changes in the equipment's operating status. This is intended to ensure the rationality and effectiveness of the entire simulation process.

[0035] Once the simulation is complete, use the software's built-in data export function to extract all the dynamic data generated during the simulation from the software for formatted storage.

[0036] Ultimately, the extracted data was organized into two core datasets: a dynamic dataset and an environmental dataset. These two datasets together constitute the input for subsequent steps.

[0037] Dynamic datasets record the changes in core operating parameters of a device over time, and their mathematical form can be expressed as: D = {(T} i ,P i ,F i |i = 1, 2, ..., N}; In the formula, D represents the dynamic dataset; i is the index of the time series; N is the total number of data points; T i ,P i ,F i These represent the internal temperature, pressure, and flow rate of the device at time point i, respectively.

[0038] The environmental dataset records external environmental parameters synchronized with the device's operation, and its mathematical form can be expressed as: E = {(T e,j H j V j )|j=1,2,…,M}; In the formula, E represents the environmental dataset; j is the index of the time series; M is the total number of data points; and M represents the external environmental temperature, humidity, and vibration at the j-th time point, respectively.

[0039] Through the above steps, high-fidelity, high-temporal-resolution equipment operation data and environmental data can be obtained, providing a complete and reliable data source for subsequent data preprocessing, model building, and risk prediction.

[0040] S2. Clean and normalize the dynamic dataset and the environmental dataset, and then merge them into a complete dataset; Specifically, step S2 aims to improve the quality of the raw data, eliminate noise and dimensional differences, and provide standardized input for building a high-precision prediction model.

[0041] The data preprocessing step specifically includes three consecutive sub-steps: data cleaning, data normalization, and data fusion, which are applied sequentially to the aforementioned dynamic dataset and environmental dataset EE.

[0042] First, data cleaning operations are performed on dynamic datasets and environmental datasets to correct errors and inconsistencies in the data, thereby improving the accuracy of the data.

[0043] Data cleaning operations, for example, may include handling missing values. This involves checking the dataset for missing data points and using interpolation to fill in the missing values, thus ensuring the integrity of the data sequence.

[0044] Furthermore, to identify and remove extreme outliers in the data sequence, outlier detection can be performed. This detection can be based on statistical methods, such as the Z-score method.

[0045] The Z-score method is used to calculate the score of each data point. When the absolute value of the Z-score of a data point exceeds the preset threshold, the point is judged as an outlier and is removed or corrected.

[0046] Furthermore, noise filtering techniques can be applied to smooth the data and reduce the interference of random noise. For example, a sliding window averaging method can be used to process the data sequence to obtain data with a more obvious trend.

[0047] After data cleaning, normalization is performed on the cleaned dataset. The purpose of this step is to eliminate numerical differences between different physical quantities caused by different units, so that all features are on the same order of magnitude.

[0048] In embodiments of the present invention, various normalization methods can be selected. One method is Z-score standardization, which transforms the data into a standard normal distribution with a mean of 0 and a standard deviation of 1.

[0049] The Z-score standardization calculation process is expressed by the following formula: In the formula, μ is the mean and σ is the standard deviation, which transforms the data into a distribution with a mean of 0 and a standard deviation of 1.

[0050] Another alternative normalization method is Min-Max normalization, which linearly scales the data to a specified interval, typically [0,1].

[0051] The calculation process of Min-Max normalization is expressed by the following formula: In the formula, X ′ The value represents the processed data value, X represents any data value to be processed, min(X) represents the minimum value in dataset X; max(X) represents the maximum value in dataset X; scale all features to the range [0,1].

[0052] The selected normalization method is applied to the cleaned dynamic dataset and the environment dataset respectively to generate normalized dynamic dataset and normalized environment dataset.

[0053] Finally, perform a data fusion operation. Merge the normalized dynamic dataset obtained in the preceding steps with the normalized environmental dataset.

[0054] This fusion operation combines two independent datasets into a unified, multi-dimensional, complete dataset that contains all the key features of the device's internal state and external environment.

[0055] The complete dataset will serve as the direct input for subsequent combined nonlinear prediction models, and its data quality directly affects the training effect and prediction accuracy of the models.

[0056] Through the above data cleaning, normalization, and fusion steps, raw, heterogeneous data sources can be transformed into structured, high-quality feature data, providing the necessary data foundation for accurate risk prediction.

[0057] S3. Construct a combined nonlinear prediction model, including a recursive random forest model and a graph neural network model, and predict risk parameters by inputting a complete dataset; Specifically, step S3 aims to use the high-quality data processed in the preceding steps to train an intelligent model that can accurately predict equipment risk parameters.

[0058] The model building process begins with the partitioning of the dataset. The complete dataset generated in the previous step is divided into a training set and a test set according to a preset ratio.

[0059] The training set is used exclusively for model learning and training of internal parameters, while the test set is kept separately to evaluate the performance and generalization ability of the final model.

[0060] After the dataset is partitioned, the model construction and training phase begins. This method exemplifies the construction of a combined model that includes a recursive random forest model and a graph neural network model.

[0061] First, a Recursive Random Forest (RRF) model is constructed and trained. This model, through the idea of ​​ensemble learning, can effectively handle high-dimensional features and has good resistance to overfitting.

[0062] Specifically, the key hyperparameters of the RRF model are first set, including the number of decision trees the model will build, the maximum depth each tree is allowed to grow to, and the minimum number of samples required for a node to split.

[0063] Subsequently, the divided training set data is input into the RRF model with pre-defined hyperparameters. The model is trained by constructing multiple decision trees in parallel.

[0064] During training, each decision tree independently learns and splits features from the input data. Finally, the predictions from all decision trees are aggregated to obtain a preliminary risk prediction value. The prediction process is expressed by the following formula: In the formula, Tk (X) represents the prediction result of the k-th decision tree for the input sample k; RRF(X) represents the final risk prediction parameters; and X represents the input feature vector.

[0065] Simultaneously or subsequently, a graph neural network (GNN) model is constructed and trained. This model excels at uncovering hidden, non-Euclidean relationships between features.

[0066] Before constructing a GNN model, it is necessary to first construct a graph structure based on the correlation analysis between the actual process flow or data characteristics of petrochemical equipment, where nodes represent equipment measurement points or features, and edges represent the relationships between them.

[0067] Next, the specific architecture of the GNN model is constructed, and its hyperparameters are set, including, for example, the number of network layers, the learning rate during training, and the type of activation function used by the neurons.

[0068] The training set data is mapped onto the previously constructed graph structure and fed into the GNN model for training. The model updates its own node representation by propagating and aggregating information from neighboring nodes on the graph structure. This information propagation process can be represented by the following equation: In the formula, H (t+1) The feature representation of a node at layer t+1; It is an adjacency matrix A with self-loops added; yes degree matrix; H (t) W is the feature representation of a node at layer t; (t) σ is the trainable weight matrix of the t-th layer; σ is the activation function, such as the ReLU function.

[0069] After the recurrent random forest model and the graph neural network model are trained independently, the outputs of the two models are fused to generate the final, comprehensive risk prediction parameters.

[0070] In an embodiment of the present invention, the prediction results of the two models are fused using a weighted summation method, specifically accomplished by the following formula: In the formula, T k (X) represents the prediction result of the k-th decision tree for the input sample k; RRF(X) represents the final risk prediction parameter; α is the preset weight coefficient, which ranges from 0 to 1 and is used to balance the importance of the two models.

[0071] Finally, the constructed combined model is evaluated and finalized. The performance of the combined model is objectively evaluated using reserved test set data that the model has never seen before.

[0072] The test set data is input into the combined model to obtain the predicted risk parameters. By comparing the predicted results with the actual risk labels, evaluation indicators such as accuracy and mean squared error are calculated.

[0073] If the model performance does not meet the preset engineering requirements, the hyperparameters of the model are adjusted, such as the number of decision trees in the RRF, the learning rate of the GNN, and the weight coefficient α of the fusion step. The training and evaluation process is repeated until the model performs optimally on the test set, at which point the model is finally determined.

[0074] Through the above steps, a fully trained and rigorously validated combined prediction model can be constructed and obtained, which provides accurate and reliable risk parameter prediction capabilities for subsequent risk warning and dynamic optimization.

[0075] S4. Set a risk warning threshold. When the predicted risk parameter reaches or exceeds the threshold, the warning mechanism is triggered. Specifically, step S4 aims to transform the quantitative risk parameters output by the preceding model into clear, graded, and actionable warning signals, thereby enabling timely response to potential risks.

[0076] The risk assessment and early warning process includes two core components: setting risk warning thresholds and implementing early warning triggering mechanisms.

[0077] First, risk warning thresholds are set. This step does not involve setting a single threshold, but rather constructing a multi-level threshold system to achieve differentiated management of risks of varying severity.

[0078] Before setting thresholds, the risks of equipment should first be classified. This classification can be based on existing safety production regulations in the petrochemical industry, historical failure data analysis of specific equipment, and the experience and knowledge of domain experts.

[0079] For example, equipment risk can be divided into three levels: "Attention level", which indicates that the equipment operating parameters are slightly abnormal and there is a potential risk, requiring operators to pay more attention; "Warning level", which indicates that the equipment operating parameters are significantly deviated and the risk is high, requiring corresponding intervention measures; and "Danger level", which indicates that the equipment operating parameters are seriously abnormal and a failure is about to occur or has already occurred, requiring immediate emergency handling.

[0080] After determining the risk levels, statistical methods and historical data are used to quantify and set the thresholds for each level.

[0081] For the "attention level" threshold, the risk prediction value distribution of the analysis model on a large amount of historical normal operation data can be used, and a higher quantile, such as the 95th percentile, can be taken as the threshold for this level. This setting means that when the real-time risk value exceeds this threshold, the equipment status has deviated from the vast majority of normal operating conditions.

[0082] For the "warning level" threshold, the risk prediction values ​​output by the model can be analyzed from historical data when minor faults or known abnormal operating conditions occurred. The average or median of these values ​​can be used as the threshold for this level. If such data is lacking, domain experts can assist in setting the threshold based on the results of simulated abnormal operating conditions.

[0083] The "hazard level" threshold is determined by analyzing historical data on the eve of a serious failure, and setting the predicted risk value output by the model as the hazard level threshold. Reaching this threshold indicates a critical point where the equipment is about to enter an uncontrollable state.

[0084] The initially set multi-level thresholds need to be calibrated before finalization. The initially set thresholds should be tested on an independent validation dataset to evaluate their accuracy, recall, and false positive rate in distinguishing different risk states.

[0085] The thresholds are fine-tuned based on the evaluation results to find the optimal balance point for early warning performance. After calibration, the finalized threshold parameters at each level are fixed in the rule base of the early warning system as the basis for subsequent real-time judgments.

[0086] Once the threshold is set, the warning trigger mechanism will be executed when the system is running in real time.

[0087] This mechanism continuously compares the risk parameter R^R predicted by the model in real time with the multi-level early warning thresholds fixed in the rule base. If the monitoring module detects that the real-time risk parameter R^R meets the condition of exceeding any level threshold, the system immediately determines it as a valid early warning event.

[0088] The system also automatically determines the level of this warning based on the specific numerical range of the real-time risk parameters and formally triggers the corresponding warning response process.

[0089] Once an alert event is triggered, the system will immediately and automatically generate a structured alert message. This message not only includes the alert level and specific risk index, but must also encapsulate a series of key contextual information.

[0090] Key information includes: a unique event ID for traceability and a trigger timestamp accurate to the second; the specific device number, name, and measurement point location where the risk occurred; the main input features that led to the increased risk value and their current values, to achieve risk attribution; and standardized operational suggestions corresponding to the warning level, provided by a preset knowledge base.

[0091] Subsequently, based on the level of the warning, the system implements a tiered, multi-channel notification strategy to efficiently push the aforementioned structured warning information to relevant parties.

[0092] Examples of notification strategies include: for the highest risk level, a mandatory alert with the highest priority is issued via audible and visual alarms on the monitoring system interface in the central control room; simultaneously, detailed warning information is sent to designated field engineers, team leaders, and workshop managers via SMS, email, or enterprise instant messaging tools.

[0093] Finally, the system records every triggered warning event, including its complete structured information, notification records, subsequent manual handling measures, and final results, in its historical log database. This not only provides a basis for accident tracing but also accumulates valuable data for subsequent model iteration and optimization.

[0094] S5. Update model parameters through real-time data feedback and dynamically optimize the prediction model; Specifically, step S5 enables the entire early warning method to have self-learning and self-adaptive capabilities, thereby maintaining its predictive accuracy over the long term.

[0095] The dynamic optimization process can be divided into two main stages: real-time data feedback updates and dynamic optimization of the prediction model.

[0096] First, real-time data feedback updates are performed. The system continuously collects the latest data streams generated by key equipment in the real operating environment and performs preprocessing operations similar to those in step S2 on these newly collected data.

[0097] Subsequently, these new data are labeled using a combination of manual review and confirmation, or through semi-supervised learning, to form incremental data samples with labels indicating the actual risk level.

[0098] These newly labeled data samples are aggregated to form an incremental learning dataset specifically for model optimization and iteration.

[0099] Furthermore, a sliding window strategy can be used to manage this incremental learning dataset, that is, only retaining data from the most recent period, to ensure that model updates can focus more on reflecting the current state of the device.

[0100] Next, dynamic optimization of the prediction model is performed. This optimization process is not continuous, but is initiated when specific triggering conditions are met.

[0101] For example, the triggering condition could be when the system detects that the prediction performance metric (such as accuracy) of the current online model has dropped below a certain preset threshold, or when a preset update cycle (such as weekly or monthly) is reached.

[0102] When optimization is triggered, the model's parameters are first fine-tuned. The system loads the existing parameters of the currently online ensemble model as a starting point and retrains it using the aforementioned incremental learning dataset.

[0103] The training process follows the principle of gradient descent, and its core parameter update process can be expressed by the following formula: In the formula, P new These are the updated model parameters; P old These are the current model parameters; η is the learning rate, used to control the step size of parameter updates. The loss function LL is the loss function with respect to the current parameter P. old The gradient of the parameter indicates the direction of parameter adjustment that will cause the loss function to decrease the fastest.

[0104] In addition to fine-tuning the model parameters, this method also includes optimizing the model hyperparameters to find a better performance configuration.

[0105] For example, global optimization algorithms such as genetic algorithms can be used to automatically search for a set of hyperparameter combinations that minimize the model validation loss within a predefined hyperparameter space. The objective of this search process can be formally expressed as: In the formula, H * H represents the optimal combination of hyperparameters found; H represents a set of hyperparameters to be optimized (e.g., learning rate η, number of model layers, etc.). It is a mathematical operation aimed at finding the parameter H that minimizes the objective function; Loss validation (H) represents the prediction loss or error calculated on an independent validation set when the model uses the hyperparameter combination HH.

[0106] The optimized new model, obtained after parameter fine-tuning and hyperparameter optimization, will not be deployed immediately. The new model needs to undergo final performance verification on a separate test set.

[0107] The system will only perform a deployment operation to replace the old model with the new model when the overall performance metrics of the new model are confirmed to be superior to those of the currently online old model.

[0108] Through the above steps, a complete closed loop of dynamic optimization and updating is completed. This mechanism enables the early warning method of this invention to continuously learn from new data, achieving continuous self-evolution of the model, thereby ensuring long-term effectiveness and reliability.

[0109] The risk prediction, simulation and early warning system for key equipment in the petrochemical industry described below can be referred to in conjunction with the risk prediction, simulation and early warning method for key equipment in the petrochemical industry described above.

[0110] Please see the appendix Figure 2 The present invention also provides a risk prediction, simulation and early warning system suitable for key equipment in the petrochemical industry, comprising: The data acquisition module is used to acquire real-time operating status data and environmental factor data of key petrochemical equipment through dynamic simulation software; The data processing module, connected to the data acquisition module, is used to clean, normalize, and fuse the received operational status data and environmental factor data to generate a complete dataset for the model to use. The risk prediction module, connected to the data processing module, is used to receive the complete dataset and make real-time predictions of the equipment's risk parameters through a built-in combined nonlinear prediction model. The early warning module, connected to the risk prediction module, is used to receive predicted risk parameters and compare them with preset risk early warning thresholds. When the risk parameters reach or exceed the threshold, it triggers and issues multi-level early warning information. The update module, connected to both the data acquisition module and the risk prediction module, is used to receive real-time data feedback and combine it with manual confirmation information of the early warning results to adaptively fine-tune and dynamically optimize the model parameters and hyperparameters in the risk prediction module. The system in this embodiment can be used to execute the above method embodiment, and its principle and technical effect are similar, so they will not be described again here.

[0111] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry, characterized in that, Includes the following steps: S1. Obtain operating status data and environmental factor data of key equipment through dynamic simulation software to form dynamic datasets and environmental datasets including temperature, pressure and flow rate; S2. The dynamic dataset and the environmental dataset are cleaned and normalized, and then merged into a complete dataset; S3. Construct a combined nonlinear prediction model, including a recursive random forest model and a graph neural network model, and predict risk parameters by inputting the complete dataset; S4. Set a risk warning threshold. When the predicted risk parameter reaches or exceeds the threshold, the warning mechanism is triggered. S5. Update model parameters through real-time data feedback and dynamically optimize the prediction model.

2. The method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry according to claim 1, characterized in that, In step S1, the dynamic simulation software used is Aspen-Dynamics software; The acquisition of operational status data and environmental factor data of key equipment to form dynamic datasets and environmental datasets including temperature, pressure, and flow rate includes: S11. Launch the Aspen-Dynamics software on your computer, create a new project, and then perform a dynamic simulation; S12. Select the key equipment to be simulated, and input the key equipment information, including basic parameters such as equipment type, size, material and working conditions; S13. Define the feed parameters, including the feed temperature, pressure, flow rate and composition. These parameters should be set based on the actual process flow and standard operating procedures. S14. Set operating conditions and environmental parameters, including temperature and pressure fluctuations of the gas inside the tank and changes in the external environment, to ensure that the simulation scenario can reflect the real operating conditions. S15. Configure the time parameters for dynamic simulation, including the start time, end time, and time step, to ensure that the simulation can capture the dynamic changes of the equipment during operation. S16. Start dynamic simulation. Aspen-Dynamics will perform real-time calculations based on the input parameters and configuration to generate the dynamic response of the equipment under different operating conditions, including temperature, pressure and flow data. S17. During the simulation operation, monitor the data fed back by the software in real time, observe the changes in the operating status of the equipment, and ensure the rationality of the simulation process. S18. After completing the simulation, use the software's data export function to extract the generated dynamic data into a dataset, and record the dynamic dataset including temperature, pressure, and flow rate, as well as the corresponding environmental dataset.

3. The method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry according to claim 1, characterized in that, In step S2, the cleaning of the dynamic dataset and the environmental dataset includes: S21. Missing value handling: Check if there are missing values ​​in the dataset and decide on the interpolation method to handle them; S22. Outlier Detection: Outliers are identified and removed using the statistical method Z-score. S23. Noise Filtering: Apply a sliding window to filter noise in the data; The normalization process includes: S221. Choose a normalization method: including Min-Max normalization and Z-score standardization; S222, Min-Max Normalization: In the formula, X ′ The value represents the processed data value, X represents any data value to be processed, min(X) represents the minimum value in dataset X; max(X) represents the maximum value in dataset X; scale all features to the range [0,1]. S223, Z-score standardization: In the formula, μ is the mean and σ is the standard deviation, which transforms the data into a distribution with a mean of 0 and a standard deviation of 1. S224. Apply the selected normalization method to the dynamic dataset and the environment dataset to form normalized dynamic dataset and environment dataset.

4. The method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry according to claim 1, characterized in that, Step S3 includes: S31. Dataset partitioning: The complete dataset is divided into a training set and a test set. The training set is used for model learning and parameter training, and the test set is used to evaluate the performance and generalization ability of the final model. S32. Construction and training of the recursive random forest model: The recursive random forest model is constructed using the pre-divided training set, and then trained using the test set; S33. Construction of Graph Neural Network Model: Based on the correlation between the process flow and data features of petrochemical equipment, a graph structure is constructed, and then the GNN model architecture is constructed, and its hyperparameters are set, including the number of network layers, learning rate and activation function. S34. Training of the graph neural network model: The training set data is mapped onto the graph structure and input into the GNN model for training. The model updates the representation of its own nodes by propagating and aggregating information of neighboring nodes on the graph, thereby learning the complex global dependencies between features. S36. Fusion of combined models and generation of risk parameters: The independently trained recurrent random forest model and graph neural network model are fused by weighted summation to generate the final risk prediction parameters. S37. Model Evaluation and Final Determination: The performance of the constructed combined model is evaluated using the reserved test set. The test set data is then input into the combined model to obtain the predicted risk parameters. The evaluation index is calculated by comparing the prediction results with the actual risk labels. If the model performance does not meet expectations, the number of decision trees, learning rate, and weight coefficients are readjusted and the model is retrained until it performs optimally on the test set. In step S32, the construction of the recursive random forest model using the partitioned training set includes the following steps: S321. First, set the hyperparameters of the model, including the number of decision trees, the maximum depth of each tree, and the minimum number of samples for node splits. S322. Input the training set data into the recursive random forest model. The recursive random forest model constructs K decision trees in parallel through ensemble learning. S323. Each tree independently learns and splits the data features. Finally, by averaging the prediction results of all decision trees, the preliminary prediction value of risk by the recursive random forest model is obtained.

5. The method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry according to claim 4, characterized in that, In step S34, the final risk prediction parameters are calculated using the following formula: In the formula, T k (X) represents the prediction result of the k-th decision tree for the input sample k; RRF(X) represents the final risk prediction parameters; In step S323, the prediction process is expressed by the following formula: In the formula, T k (X) represents the prediction result of the k-th decision tree for the input sample k; RRF(X) represents the final risk prediction parameters.

6. The method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry according to claim 1, characterized in that, In step S4, setting the risk warning threshold includes: S411. Determine the risk level and threshold benchmark. First, based on the safety production standards of the petrochemical industry, the operating procedures of key equipment, and the analysis of historical failure data, combined with the experience of experts in the field, the equipment risk is divided into three levels. S412. Quantitatively set multi-level early warning thresholds: After determining the risk level, use statistical methods and historical data to quantitatively set the thresholds. S413. Threshold calibration and solidification: The initially set multi-level thresholds are tested on the validation dataset to evaluate their accuracy, recall, and false alarm rate in distinguishing different risk states. Based on the evaluation results, fine-tuning is performed to achieve the best balance. The final determined threshold parameters are then solidified into the rule base of the early warning system as the basis for subsequent real-time judgment. The early warning triggering mechanism includes: S421. Judgment and triggering of early warning events: If the monitoring module detects that the real-time risk parameter meets the condition of exceeding the first level threshold, the system immediately judges it as a valid early warning event. At the same time, based on the specific value range of the real-time risk parameter, the system automatically determines the level of the early warning and formally triggers the corresponding level of early warning response process. S422. Generate and encapsulate structured warning information: After a warning event is triggered, the system will automatically generate a structured warning message, including: Event identifier: A unique event ID and trigger timestamp; Risk source identification: Equipment number, name, and specific measurement points where the risk occurred; Risk feature attribution: The main input features that lead to an increase in risk value and their current values; Recommendations: Based on a pre-set knowledge base, provide standardized operational recommendations corresponding to the warning level; S423. Implement multi-channel, tiered early warning notification: The system implements a tiered, multi-channel notification strategy based on the level of the early warning, and pushes the generated early warning information to relevant parties. The tiered, multi-channel notification strategy includes: Interface notification: The highest priority notification is given via audible and visual alarms on the monitoring system interface in the central control room; Communication notification: Detailed early warning information is sent to designated field engineers, team leaders, and workshop managers via SMS, email, and enterprise instant messaging tools; S424. Warning Event Recording and Archiving: Record every triggered warning event, including its complete structured information, notification records, and subsequent manual handling measures and results, in detail into the system's historical log database.

7. The method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry according to claim 6, characterized in that, In step S411, the risk level classification of the equipment includes: Attention Level: The equipment's operating parameters are slightly abnormal, posing a potential risk that requires attention. Warning level: The equipment operating parameters have deviated significantly, posing a high risk and requiring intervention. Hazard level: Equipment operating parameters are severely abnormal, indicating an imminent or already occurring malfunction, requiring immediate action; In step S412, the quantitative setting of the threshold using statistical methods and historical data includes: Attention level: The risk prediction value distribution of the analysis model on a large amount of normal operation historical data is used as the threshold. This means that when the risk value exceeds this threshold, it has deviated from the vast majority of normal operating conditions. Warning level: The risk prediction values ​​output by the model when minor faults and abnormal operating conditions have occurred in the historical data are analyzed, and the average and median of these values ​​are taken as the threshold. If such data is not available, experts can set it based on the results of simulated abnormal operating conditions. Danger level: The risk prediction values ​​output by the model before a serious fault occurred in the historical data are analyzed and set as the danger level threshold. Reaching this standard represents the critical point when the equipment is about to enter an uncontrollable state.

8. The method for risk prediction, simulation, and early warning of key equipment in the petrochemical industry according to claim 1, characterized in that, In step S5, updating the model parameters through real-time data feedback includes: S511. Continuously collect the latest data streams generated by key equipment during actual operation and preprocess them; S512. Subsequently, in conjunction with manual review and confirmation, these new data are labeled to form incremental data samples with real risk labels; S513. Collect the new data samples to form an incremental learning dataset for model optimization, and use a sliding window strategy to manage the dataset, that is, only retain the recent data. The dynamic optimization of the prediction model includes: S521. When the system detects a decline in model performance and the arrival of a preset update cycle, it loads the parameters P of the existing model. old Following the principle of gradient descent, the dataset is retrained using an incremental learning dataset; S522. Using a genetic algorithm, automatically search for a set of model hyperparameters that minimize the loss. S523. The optimized new model needs to be finally verified on an independent test set. Only when the overall performance of the new model is confirmed to be better than that of the old model will the system deploy it to the production environment to complete the closed loop of the entire dynamic optimization and update.

9. A risk prediction, simulation, and early warning method for key equipment in the petrochemical industry according to claim 8, characterized in that, In step S521, the core update formula following the gradient descent principle is: In the formula, P new These are the updated model parameters; P old These are the current model parameters; η is the learning rate, which controls the step size for updating the parameters; The loss function L is the loss function with respect to the current parameter P. old The gradient indicates the direction of parameter adjustment; In step S522, the process of automatically searching for a set of model hyperparameters that minimizes loss can be expressed as: In the formula, H * H represents the optimal combination of hyperparameters found; H represents a set of hyperparameters to be optimized. Describe an operation aimed at finding the objective function Loss. validation (H) The parameter H that yields the minimum value; Loss validation (H) represents the prediction loss and error on the independent validation set when the model uses the hyperparameter combination H.

10. A risk prediction, simulation, and early warning system for key equipment in the petrochemical industry, comprising a risk prediction, simulation, and early warning method for key equipment in the petrochemical industry according to any one of claims 1-9, characterized in that, include: The data acquisition module is used to acquire real-time operating status data and environmental factor data of key petrochemical equipment through dynamic simulation software; The data processing module, connected to the data acquisition module, is used to clean, normalize, and fuse the received operating status data and environmental factor data to generate a complete dataset for the model to use. The risk prediction module, connected to the data processing module, is used to receive the complete dataset and predict the risk parameters of the device in real time through a built-in combined nonlinear prediction model. The early warning module, connected to the risk prediction module, is used to receive predicted risk parameters and compare them with preset risk early warning thresholds. When the risk parameters reach or exceed the thresholds, multi-level early warning information is triggered and issued. The update module, which is connected to both the data acquisition module and the risk prediction module, is used to receive real-time data feedback and combine it with manual confirmation information of the early warning results to adaptively fine-tune and dynamically optimize the model parameters and hyperparameters in the risk prediction module.

Citation Information

Cited By

  • Multi-source data fire-fighting facility risk grade assessment and early warning decision-making method

    CN121481003A

  • Chemical process safety risk early warning system based on edge calculation

    CN121599478A