A chemical process risk prediction method, device, equipment and medium
By combining multi-source data preprocessing with the Attention-BiLSTM model, the problem of low risk prediction accuracy in chemical processes is solved, enabling accurate risk prediction and intelligent early warning in chemical processes, thus ensuring production safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF CHEM TECH
- Filing Date
- 2023-09-19
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies have low accuracy in risk prediction during chemical processes, making it difficult to achieve intelligent risk early warning, which leads to production chain disruptions and safety hazards.
A risk prediction method for chemical processes is constructed by employing multi-source process data preprocessing, network model structural entropy calculation, and attention mechanism-bidirectional long short-term memory network model. Risk prediction is performed using the Attention-BiLSTM model through wavelet function denoising, correlation analysis, and structural entropy calculation.
It has improved the accuracy of risk prediction in chemical processes, realized intelligent risk early warning, reduced the risk of production chain interruption, and ensured safety.
Smart Images

Figure CN117238404B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and in particular to a method, apparatus, equipment and medium for predicting risks in chemical processes. Background Technology
[0002] With the continuous advancement of science and technology, the chemical industry is experiencing increasingly larger production scales and higher levels of automation, with process systems and equipment becoming increasingly larger, more complex, and more integrated. At the same time, chemical production processes exhibit characteristics such as high nonlinearity, susceptibility to interference, and interconnected coupling, resulting in massive, complex, and difficult-to-process process data. Abnormal fluctuations in any process parameter can trigger a series of malignant evolutionary events, even leading to the disruption of the entire production chain and seriously endangering people's lives and property. However, current traditional models or algorithms have relatively low accuracy in predicting chemical processes.
[0003] As can be seen from the above, how to increase the accuracy of risk prediction in chemical processes and achieve intelligent risk early warning is a problem that needs to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, equipment, and medium for predicting risks in chemical processes, which can increase the accuracy of risk prediction and achieve intelligent risk early warning. The specific solution is as follows:
[0005] Firstly, this application discloses a method for predicting risks in chemical processes, including:
[0006] Acquire multi-source process data of chemical processes, and preprocess the multi-source process data to obtain preprocessed data;
[0007] A network model is constructed based on the preprocessed data. The structural entropy of the network model is calculated to obtain the network structural entropy. The network structural entropy is then solved to obtain a sequence of relative risk values.
[0008] The risk prediction sequence of the chemical process is obtained by using a preset attention mechanism-bidirectional long short-term memory network model to predict the relative risk value sequence.
[0009] Optionally, the step of acquiring multi-source process data of a chemical process and preprocessing the multi-source process data to obtain preprocessed data includes:
[0010] Acquire the multi-source process data of the chemical process; the multi-source process data includes temperature data, pressure data, flow rate data, and liquid level data;
[0011] The temperature data, pressure data, flow rate data, and liquid level data are preprocessed using wavelet functions to reduce noise, so as to obtain the preprocessed data.
[0012] Optionally, constructing a network model based on the preprocessed data includes:
[0013] Get the preset window size and movement step size;
[0014] The network model is constructed based on the preprocessed data, the window, and the movement step size.
[0015] Optionally, constructing the network model based on the preprocessed data, the window, and the movement step size includes:
[0016] Based on the window and the movement step size, correlation analysis is performed on the preprocessed data, and matrix transformation is performed using a preset correlation coefficient threshold to obtain a Boolean matrix;
[0017] The Boolean matrix is used as the adjacency matrix, and the network model is constructed based on the adjacency matrix.
[0018] Optionally, the calculation of structural entropy on the network model includes:
[0019] The structural entropy of the network model is calculated using a preset structural entropy calculation formula; the structural entropy calculation formula is as follows:
[0020]
[0021] Where, k i denoted as the connectivity of the i-th node; N is the number of network nodes in the network model; and E is the network structure entropy.
[0022] Optionally, the step of solving for the network structure entropy to obtain the relative risk value sequence includes:
[0023] The network structure entropy is solved in combination over time using a preset sequence calculation formula to obtain the relative risk value sequence; the sequence calculation formula is:
[0024]
[0025] in, and These are the minimum and maximum values of the structural entropy E for a network with n network members; E is the network structural entropy; and R is the relative risk value sequence.
[0026] Optionally, the step of using a preset attention mechanism-bidirectional long short-term memory network model to predict the risk of the relative risk value sequence includes:
[0027] The initial attention mechanism-bidirectional long short-term memory network model is trained using the relative risk value sequence to obtain the attention mechanism-bidirectional long short-term memory network model containing the target model parameters;
[0028] Risk prediction is performed on the relative risk value sequence using the attention mechanism-bidirectional long short-term memory network model that includes the target model parameters.
[0029] Secondly, this application discloses a chemical process risk prediction device, comprising:
[0030] The preprocessing module is used to acquire multi-source process data of chemical processes and preprocess the multi-source process data to obtain preprocessed data.
[0031] The calculation module is used to construct a network model based on the preprocessed data, calculate the structural entropy of the network model to obtain the network structural entropy, and solve the network structural entropy to obtain a sequence of relative risk values.
[0032] The risk prediction module is used to perform risk prediction on the relative risk value sequence using a preset attention mechanism-bidirectional long short-term memory network model, so as to obtain the risk prediction sequence of the chemical process.
[0033] Thirdly, this application discloses an electronic device, comprising:
[0034] Memory, used to store computer programs;
[0035] A processor is used to execute the computer program to implement the aforementioned chemical process risk prediction method.
[0036] Fourthly, this application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed chemical process risk prediction method.
[0037] As can be seen, this application provides a method for predicting the risk of chemical processes, including acquiring multi-source process data of a chemical process, preprocessing the multi-source process data to obtain preprocessed data; constructing a network model based on the preprocessed data, calculating the structural entropy of the network model to obtain network structural entropy, solving the network structural entropy to obtain a relative risk value sequence; and using a preset attention mechanism-bidirectional long short-term memory network model to predict the risk of the relative risk value sequence to obtain a risk prediction sequence for the chemical process. This application utilizes the processed multi-source process data to construct a network model, then calculates and solves the structural entropy to obtain the relative risk value sequence, and uses the attention mechanism-bidirectional long short-term memory network model to predict the risk of the relative risk value sequence, thereby achieving accurate risk prediction for chemical processes. This application can increase the accuracy of chemical process risk prediction and realize intelligent risk early warning. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0039] Figure 1 This is a flowchart of a chemical process risk prediction method disclosed in this application;
[0040] Figure 2 This is a schematic diagram illustrating the principle of relative risk value sequence calculation disclosed in this application;
[0041] Figure 3 This is a flowchart of a chemical process risk prediction method disclosed in this application;
[0042] Figure 4 This application discloses a specific flowchart of a chemical process risk prediction method.
[0043] Figure 5 This application discloses a TE process flow diagram;
[0044] Figure 6 This is a mean plot of a relative risk value disclosed in this application;
[0045] Figure 7 This is a variance plot of a relative risk value disclosed in this application;
[0046] Figure 8 This is a distribution diagram of a relative risk value disclosed in this application;
[0047] Figure 9 This is an example diagram of a relative risk value sequence disclosed in this application;
[0048] Figure 10 This application discloses a distribution diagram of degree and entropy values under different operating conditions.
[0049] Figure 11 This application discloses entropy distribution diagrams of the SD structure under different operating conditions.
[0050] Figure 12 (a)-(f) are the fitting effect diagrams of the prediction curves of different models disclosed in this application;
[0051] Figure 13 (a)-(c) are example graphs comparing the evaluation indicators of different models disclosed in this application;
[0052] Figure 14 This is a schematic diagram of the structure of a chemical process risk prediction device disclosed in this application;
[0053] Figure 15 This application provides a structural diagram of an electronic device. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] With the continuous advancement of science and technology, the chemical industry is experiencing increasingly larger production scales and higher levels of automation, with process systems and equipment becoming increasingly larger, more complex, and more integrated. Simultaneously, chemical production processes exhibit characteristics such as high nonlinearity, susceptibility to interference, and interconnected coupling, resulting in massive, complex, and difficult-to-process process data. Abnormal fluctuations in any process parameter can trigger a series of catastrophic events, even leading to the disruption of the entire production chain and seriously endangering people's lives and property. However, current traditional models and algorithms have relatively low accuracy in predicting chemical processes. Therefore, improving the accuracy of chemical process risk prediction and achieving intelligent risk early warning is a problem that needs to be solved in this field.
[0056] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for predicting risks in chemical processes, which may specifically include:
[0057] Step S11: Obtain multi-source process data of the chemical process, and preprocess the multi-source process data to obtain preprocessed data.
[0058] Step S12: Construct a network model based on the preprocessed data, calculate the structural entropy of the network model to obtain the network structural entropy, and solve the network structural entropy to obtain the relative risk value sequence.
[0059] In this embodiment, a network model is constructed based on the preprocessed data, and the network structure entropy is calculated using a preset structure entropy calculation formula to obtain the network structure entropy; the structure entropy calculation formula is:
[0060]
[0061] Where, k i denoted as the connectivity of the i-th node; N is the number of network nodes in the network model; and E is the network structure entropy.
[0062] In this embodiment, the network structure entropy is solved by combining the results in the time dimension using a preset sequence calculation formula to obtain the relative risk value sequence; the sequence calculation formula is:
[0063]
[0064] in, and These are the minimum and maximum values of the structural entropy E for a network with n network members; E is the network structural entropy; R is the relative risk value sequence, with values between [0, 1], which can measure the risk changes over different time periods.
[0065] Specifically, the structural entropy of the complex network model within each time window is calculated using the structural entropy calculation formula, and then combined along the time dimension using the sequence calculation formula to obtain the relative risk value sequence. The calculation principle of the relative risk value sequence is as follows: Figure 2 As shown. The mean μ and variance σ of the relative risk values are... 2 As an evaluation criterion, the optimal window size is determined. The mean and variance of each relative risk value under different window sizes are compared. When the mean of the network structure entropy is low and the variance is relatively stable (i.e., the entropy value usually fluctuates less), the window size is considered reasonable. Based on this, the distribution of relative risk values under different operating conditions is compared. Simultaneously, the frequency of relative risk values in the [0.9, 1.0] interval is analyzed according to the risk level classification table to determine the distribution pattern of network structure entropy under fault-free and fault conditions. The risk level classification table is shown in Table 1.
[0066] Table 1
[0067]
[0068] Step S13: Use a preset attention mechanism-bidirectional long short-term memory network model to perform risk prediction on the relative risk value sequence to obtain the risk prediction sequence of the chemical process.
[0069] In this embodiment, the initial attention mechanism-bidirectional long short-term memory network model is trained using the relative risk value sequence to obtain the attention mechanism-bidirectional long short-term memory network model containing the target model parameters; the relative risk value sequence is then used to predict the risk of the chemical process using the attention mechanism-bidirectional long short-term memory network model containing the target model parameters.
[0070] Through the above steps, the multi-source process data can be transformed into a one-dimensional relative risk value sequence. This sequence is then trained using an Attention-BiLSTM (Multi-head Self-Attention Bi-directional Long Short-Term Memory) model. The optimal parameters of the model, including the number of LSTM (Long Short-Term Memory) layers, the number of LSTM nodes, and the activation function, are determined based on the loss function as the evaluation criterion. This process aims to achieve a superior model performance, resulting in the Attention-BiLSTM network model containing the target model parameters. The model evaluation metrics are then calculated using the following formulas: RMSE (Root Mean Squared Error), ARGE (Average Relative Generalization Error), and R0. 2 Based on this, the model performance can be quantitatively evaluated;
[0071]
[0072]
[0073]
[0074] Among them, y i ,pred i These are the actual output and the predicted value of the target variable for the i-th sample group, respectively. The mean of the target variable is denoted as RMSE. RMSE and ARGE reflect the error between the predicted and actual values; the smaller the better. 2 It reflects the degree of similarity between two variables; the higher the better.
[0075] In this embodiment, multi-source process data of a chemical process is acquired, and the multi-source process data is preprocessed to obtain preprocessed data. A network model is constructed based on the preprocessed data, and structural entropy is calculated on the network model to obtain network structural entropy. The network structural entropy is then solved to obtain a relative risk value sequence. A preset attention mechanism-bidirectional long short-term memory network model is used to predict the risk of the relative risk value sequence to obtain a risk prediction sequence for the chemical process. This application utilizes processed multi-source process data to construct a network model, then performs structural entropy calculation and solution to obtain a relative risk value sequence. By using an attention mechanism-bidirectional long short-term memory network model to predict the risk of the relative risk value sequence, accurate risk prediction for the chemical process is achieved. This application can increase the accuracy of chemical process risk prediction and realize intelligent risk early warning.
[0076] See Figure 3 As shown in the figure, an embodiment of the present invention discloses a method for predicting risks in chemical processes, which may specifically include:
[0077] Step S21: Obtain the multi-source process data of the chemical process; the multi-source process data includes temperature data, pressure data, flow rate data and liquid level data.
[0078] Step S22: Use wavelet functions to perform data noise reduction preprocessing on the temperature data, pressure data, flow rate data, and liquid level data to obtain the preprocessed data.
[0079] Step S23: Obtain the preset window and movement step size, construct the network model based on the preprocessed data, the window and movement step size, calculate the structural entropy of the network model to obtain the network structural entropy, and solve the network structural entropy to obtain the relative risk value sequence.
[0080] In this embodiment, a preset window and movement step size are obtained. Based on the window and movement step size, correlation analysis is performed on the preprocessed data, and a matrix transformation is performed using a preset correlation coefficient threshold to obtain a Boolean matrix. The Boolean matrix is used as an adjacency matrix, and the network model is constructed based on the adjacency matrix. The structural entropy of the network model is calculated to obtain the network structural entropy, and the network structural entropy is solved to obtain a relative risk value sequence.
[0081] Specifically, by preprocessing multi-source process data such as temperature, pressure, flow rate, and liquid level, setting a window and its movement step size, performing correlation analysis on the data within the window, setting a correlation coefficient threshold, and obtaining a Boolean matrix to represent the relationships between nodes and edges; where 1 indicates that there is an edge between nodes, and 0 indicates that there is no edge between nodes. The Boolean matrix is regarded as an adjacency matrix, and a network model is constructed accordingly.
[0082] Step S24: Use a preset attention mechanism-bidirectional long short-term memory network model to perform risk prediction on the relative risk value sequence to obtain the risk prediction sequence of the chemical process.
[0083] The specific process for achieving chemical process risk prediction in this application is as follows: Figure 4 As shown, firstly, a network model is constructed: Multi-source process data such as temperature, pressure, flow rate, and liquid level are preprocessed, a window and its movement step size are set, correlation analysis is performed on the data within the window to obtain a Boolean matrix, and then the network model is constructed. Secondly, the relative risk value sequence is solved: The network structure entropy is calculated, introduced, and Max-Min standardization is used to solve for the network structure entropy, obtaining the relative risk value sequence, which serves as the basis for whether the chemical process is in a stable state. Finally, risk analysis and prediction are carried out: An Attention-BiLSTM model is introduced to train and predict the one-dimensional relative risk value sequence. Compared with traditional models, this data dimensionality reduction method based on network structure entropy can significantly improve the accuracy of risk prediction.
[0084] Taking the TE (Tennessee Eastman Process, a chemical engineering model simulation platform) process as an example, the effectiveness of the above-mentioned risk tracking and prediction method for complex chemical processes is verified. The specific TE process flow is as follows: Figure 5 As shown, the TE process consists of a reactor, condenser, separator, stripper, reboiler, and compressor, with a total of 41 measured variables. Since a data-driven approach was used to investigate the TE process, component variables (19 in total) were not considered. The remaining 22 process variables are shown in Table 2.
[0085] Table 2
[0086]
[0087]
[0088] Using the Simulink simulation platform of MATLAB (Matrix Laboratory) software, TE process data was acquired. The sampling interval was set to 0.01 h, and the runtime to 50 h. Multi-source process data were collected under different operating conditions, resulting in 5000 simulation data points for each condition. The TE process can simulate 21 common fault conditions in actual industrial processes. Three conditions were selected for in-depth study: no fault, fault 4 (reactor cooling water temperature with a jump), and fault 11 (reactor cooling water temperature with a random fault). Furthermore, the sampled TE process data needed to be standardized to address the issue of inconsistent data dimensions. The technical solution of this application first constructs a network model: for 22 measurement variables (XMEAS(1)~XMEAS(22)) under fault-free, fault 4, and fault 11 conditions, wavelet function is used to carry out data denoising preprocessing. By dividing the data window and moving the step size by 1, correlation analysis is performed within the window. The correlation coefficient threshold is used to convert it into a Boolean matrix. The Boolean matrix is regarded as an adjacency matrix to construct the network model. Second, the relative risk value sequence is solved: based on the time dimension, the structural entropy of the above complex network model is calculated one by one according to the structural entropy calculation formula. At the same time, the entropy values are combined into a relative risk value sequence according to the sequence calculation formula. The mean of 2000 relative risk values under different window sizes is compared as follows. Figure 6 As shown, the variance is as follows Figure 7 As shown, when the window size is 150 and the step size is 1, the mean of the network structure entropy is low and the variance is relatively stable under different operating conditions (i.e., the entropy value fluctuates less under normal circumstances). Therefore, taking a window size of 150 is more reasonable. Finally, risk analysis and prediction are carried out: with a window size of 150 and a step size of 1, the distribution of 2000 relative risk values under different operating conditions is compared as follows. Figure 8 As shown. For the frequency of relative risk values in the range [0.9, 1.0], the frequencies for no-fault, fault 4, and fault 11 conditions are 3, 16, and 15 respectively. Analysis shows that within the relative risk value range [0.9, 1.0], the frequency of fault conditions is approximately 5 times that of no-fault conditions. The relative risk value sequence for fault 11 is shown below. Figure 9 As shown, taking the relative risk value sequence of fault 11 as an example, it generally remains between 0.2 and 0.8, with an average of 0.5620 for 9000 relative risk values. Furthermore, as the network window moves, the relative risk values fluctuate around the mean. In addition, compared to fault 4, this process is generally in the medium-risk and low-risk region, with fewer high-risk regions where the risk value suddenly increases to 1. The Attention-BiLSTM model was used to train and predict the one-dimensional relative risk value sequence, and the model parameters, including the number of LSTM layers, the number of LSTM nodes, and the activation function, were determined, as shown in Table 3.
[0089] Table 3
[0090]
[0091] In addition, RMSE, ARGE and R 2 To evaluate the model, we determined its optimal hyperparameters. Considering the relatively short training time, we initially set the model parameters based on experience: Batch_size = 128 and Epoch = 200.
[0092] The model training results are shown in Table 4:
[0093] Table 4
[0094]
[0095] Because the smaller the RMSE and ARGE values and R 2 A higher value indicates better model performance. Therefore, according to the results in Table 4, when RMSE and ARGE values are minimized and R... 2 When the value is at its maximum, the number of LSTM nodes is 128. Based on this, the model parameters are set as follows: LSTM node count is 128, and Epoch count is 200.
[0096] The training results of model prediction performance under different batch sizes are shown in Table 5:
[0097] Table 5
[0098]
[0099] According to the results in Table 5, under different LSTM node numbers, when the training batch size is 32, the evaluation metrics RMSE, ARGE, and R... 2 The values are optimal. Based on this, the model parameters are set as follows: the number of LSTM nodes is 128, and the batch size is 32.
[0100] The training results of the model prediction performance under different epochs are shown in Table 6:
[0101] Table 6
[0102]
[0103] According to the results in Table 6, the RMSE and ARGE values are the smallest and R... 2 When the value is at its maximum, the number of iterations (Epoch) is 500. Based on this, the model parameters are finally set as follows: the number of LSTM nodes is 128, the batch size is 32, and the Epoch is 500.
[0104] Comparing network structure entropy, the entropy distribution (degree distribution entropy) under different operating conditions is as follows: Figure 10As shown, the entropy distribution (SD structure entropy) under different operating conditions is as follows: Figure 11 As shown, a comprehensive analysis Figure 10 The degree distribution entropy and Figure 11 As shown in the SD structural entropy diagram, under the same conditions (window size 150, step size 1), the relative risk values obtained by the degree distribution entropy and the SD structural entropy also exhibit certain distribution patterns. However, the frequency distribution of the relative risk values corresponding to these two structural entropies within the high-risk region [0.9, 1.0] cannot accurately characterize the difference between fault conditions and normal conditions. Therefore, the degree distribution entropy and the SD structural entropy do not possess the characteristic of characterizing fault conditions, making the chemical process risk tracking and prediction method based on Wu structural entropy more effective and reasonable.
[0105] Comparing risk prediction models, Figure 12 The figures (a), (b), (c), (d), (e), and (f) represent the fitting results of the Attention-BiLSTM model compared with traditional models such as SVR (Support Vector Regression), XGBoost (Extreme Gradient Boosting), CNN (Convolutional Neural Networks), LSTM, and BiLSTM, respectively, for fault 11. RMSE, ARGE, and R are also used to measure the fitting effect of the prediction curves. 2 As a model evaluation metric, it is used to compare the prediction accuracy of different models. Figure 13 In the above, (a), (b), and (c) represent RMSE, ARGE, and R, respectively. 2 A comparison of evaluation metrics reveals that the prediction accuracy of SVR, XGBoost, CNN, LSTM, and BiLSTM is unsatisfactory. For example, the Attention-BiLSTM model reduces RMSE and ARGE by 2.8% and 5.6% respectively compared to the BiLSTM model; simultaneously, for R... 2 In terms of metrics, the Attention-BiLSTM model improved by 15.6% compared to the BiLSTM model. Considering multiple evaluation metrics, the Attention-BiLSTM model demonstrated the best predictive performance, thus enabling it to more accurately predict risks in complex chemical processes.
[0106] In this embodiment, multi-source process data of a chemical process is acquired, and the multi-source process data is preprocessed to obtain preprocessed data. A network model is constructed based on the preprocessed data, and structural entropy is calculated on the network model to obtain network structural entropy. The network structural entropy is then solved to obtain a relative risk value sequence. A preset attention mechanism-bidirectional long short-term memory network model is used to predict the risk of the relative risk value sequence to obtain a risk prediction sequence for the chemical process. This application utilizes processed multi-source process data to construct a network model, then performs structural entropy calculation and solution to obtain a relative risk value sequence. By using an attention mechanism-bidirectional long short-term memory network model to predict the risk of the relative risk value sequence, accurate risk prediction for the chemical process is achieved. This application can increase the accuracy of chemical process risk prediction and realize intelligent risk early warning.
[0107] See Figure 14 As shown in the figure, an embodiment of the present invention discloses a chemical process risk prediction device, which may specifically include:
[0108] The preprocessing module 11 is used to acquire multi-source process data of chemical processes and preprocess the multi-source process data to obtain preprocessed data.
[0109] The calculation module 12 is used to construct a network model based on the preprocessed data, calculate the structural entropy of the network model to obtain the network structural entropy, and solve the network structural entropy to obtain a relative risk value sequence.
[0110] The risk prediction module 13 is used to perform risk prediction on the relative risk value sequence using a preset attention mechanism-bidirectional long short-term memory network model to obtain the risk prediction sequence of the chemical process.
[0111] In this embodiment, multi-source process data of a chemical process is acquired, and the multi-source process data is preprocessed to obtain preprocessed data. A network model is constructed based on the preprocessed data, and structural entropy is calculated on the network model to obtain network structural entropy. The network structural entropy is then solved to obtain a relative risk value sequence. A preset attention mechanism-bidirectional long short-term memory network model is used to predict the risk of the relative risk value sequence to obtain a risk prediction sequence for the chemical process. This application utilizes processed multi-source process data to construct a network model, then performs structural entropy calculation and solution to obtain a relative risk value sequence. By using an attention mechanism-bidirectional long short-term memory network model to predict the risk of the relative risk value sequence, accurate risk prediction for the chemical process is achieved. This application can increase the accuracy of chemical process risk prediction and realize intelligent risk early warning.
[0112] In some specific embodiments, the preprocessing module 11 may specifically include:
[0113] The data acquisition module is used to acquire the multi-source process data of the chemical process; the multi-source process data includes temperature data, pressure data, flow rate data, and liquid level data;
[0114] The preprocessing module is used to perform data noise reduction preprocessing on the temperature data, pressure data, flow rate data, and liquid level data using wavelet functions to obtain the preprocessed data.
[0115] In some specific embodiments, the computing module 12 may specifically include:
[0116] The window and movement step size acquisition module is used to acquire the preset window and movement step size;
[0117] The model building module is used to build the network model based on the preprocessed data, the window, and the movement step size.
[0118] In some specific embodiments, the computing module 12 may specifically include:
[0119] The correlation analysis module is used to perform correlation analysis on the preprocessed data based on the window and the movement step size, and to perform matrix transformation using a preset correlation coefficient threshold to obtain a Boolean matrix.
[0120] The model building module is used to construct the network model based on the Boolean matrix as the adjacency matrix.
[0121] In some specific embodiments, the computing module 12 may specifically include:
[0122] The structure entropy calculation module is used to calculate the structure entropy of the network model using a preset structure entropy calculation formula; the structure entropy calculation formula is:
[0123]
[0124] Where, k i denoted as the connectivity of the i-th node; N is the number of network nodes in the network model; and E is the network structure entropy.
[0125] In some specific embodiments, the computing module 12 may specifically include:
[0126] The structural entropy calculation module is used to combine and solve the network structural entropy in the time dimension using a preset sequence calculation formula to obtain the relative risk value sequence; the sequence calculation formula is:
[0127]
[0128] in, and These are the minimum and maximum values of the structural entropy E for a network with n network members; E is the network structural entropy; and R is the relative risk value sequence.
[0129] In some specific embodiments, the risk prediction module 13 may specifically include:
[0130] The training module is used to train the initial attention mechanism-bidirectional long short-term memory network model using the relative risk value sequence to obtain the attention mechanism-bidirectional long short-term memory network model containing the target model parameters.
[0131] The risk prediction module is used to predict the risk of the relative risk value sequence using the attention mechanism-bidirectional long short-term memory network model containing the target model parameters.
[0132] Figure 15 This is a schematic diagram of an electronic device provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the chemical process risk prediction method performed by the electronic device disclosed in any of the foregoing embodiments.
[0133] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0134] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0135] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform calculations and processing on the data 223 in the memory 22. The operating system 221 can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the chemical process risk prediction method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the chemical process risk prediction device from external devices, as well as data collected by its own input / output interface 25.
[0136] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0137] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the chemical process risk prediction method steps disclosed in any of the foregoing embodiments.
[0138] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0139] The above provides a detailed description of the chemical process risk prediction method, apparatus, equipment, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for predicting risks in chemical processes, characterized in that, include: Acquire multi-source process data of chemical processes, and preprocess the multi-source process data to obtain preprocessed data; A network model is constructed based on the preprocessed data. The structural entropy of the network model is calculated to obtain the network structural entropy. The network structural entropy is then solved to obtain a sequence of relative risk values. The risk prediction sequence of the chemical process is obtained by using a preset attention mechanism-bidirectional long short-term memory network model to predict the relative risk value sequence. Calculating the structural entropy of the network model includes: calculating the structural entropy of the network model using a preset structural entropy calculation formula; the structural entropy calculation formula is: ; in, Let be the connectivity of the i-th node; N be the number of network nodes in the network model; and E be the entropy of the network structure. Risk prediction of the relative risk value sequence using a preset attention mechanism-bidirectional long short-term memory network model includes: training an initial attention mechanism-bidirectional long short-term memory network model using the relative risk value sequence to obtain the attention mechanism-bidirectional long short-term memory network model containing target model parameters; and using the attention mechanism-bidirectional long short-term memory network model containing target model parameters to predict the risk of the relative risk value sequence. The method for constructing a network model based on the preprocessed data includes: obtaining a preset window and a movement step size; performing correlation analysis on the preprocessed data based on the window and the movement step size, and performing matrix transformation using a preset correlation coefficient threshold to obtain a Boolean matrix; using the Boolean matrix as an adjacency matrix, and constructing the network model based on the adjacency matrix. Solving the network structure entropy to obtain a relative risk value sequence includes: introducing the network structure entropy and using Max-Min standardization to solve the network structure entropy to obtain a relative risk value sequence; Acquiring multi-source process data of a chemical process and preprocessing the multi-source process data to obtain preprocessed data includes: acquiring multi-source process data of a chemical process; the multi-source process data includes temperature data, pressure data, flow rate data, and liquid level data; and using wavelet functions to perform data noise reduction preprocessing on the temperature data, pressure data, flow rate data, and liquid level data to obtain preprocessed data.
2. The chemical process risk prediction method according to claim 1, characterized in that, The process of solving for the network structure entropy to obtain the relative risk value sequence includes: The network structure entropy is solved in combination over time using a preset sequence calculation formula to obtain the relative risk value sequence; the sequence calculation formula is: ; in, and These are the minimum and maximum values of the structural entropy E for a network with n network members; E is the network structural entropy; and R is the relative risk value sequence.
3. A chemical process risk prediction device, characterized in that, include: The preprocessing module is used to acquire multi-source process data of chemical processes and preprocess the multi-source process data to obtain preprocessed data. The calculation module is used to construct a network model based on the preprocessed data, calculate the structural entropy of the network model to obtain the network structural entropy, and solve the network structural entropy to obtain a sequence of relative risk values. The risk prediction module is used to perform risk prediction on the relative risk value sequence using a preset attention mechanism-bidirectional long short-term memory network model, so as to obtain the risk prediction sequence of the chemical process. Calculating the structural entropy of the network model includes: calculating the structural entropy of the network model using a preset structural entropy calculation formula; the structural entropy calculation formula is: ; in, Let be the connectivity of the i-th node; N be the number of network nodes in the network model; and E be the entropy of the network structure. Risk prediction of the relative risk value sequence using a preset attention mechanism-bidirectional long short-term memory network model includes: training an initial attention mechanism-bidirectional long short-term memory network model using the relative risk value sequence to obtain the attention mechanism-bidirectional long short-term memory network model containing target model parameters; and using the attention mechanism-bidirectional long short-term memory network model containing target model parameters to predict the risk of the relative risk value sequence. The method for constructing a network model based on the preprocessed data includes: obtaining a preset window and a movement step size; performing correlation analysis on the preprocessed data based on the window and the movement step size, and performing matrix transformation using a preset correlation coefficient threshold to obtain a Boolean matrix; using the Boolean matrix as an adjacency matrix, and constructing the network model based on the adjacency matrix. Solving the network structure entropy to obtain a relative risk value sequence includes: introducing the network structure entropy and using Max-Min standardization to solve the network structure entropy to obtain a relative risk value sequence; Acquiring multi-source process data of a chemical process and preprocessing the multi-source process data to obtain preprocessed data includes: acquiring multi-source process data of a chemical process; the multi-source process data includes temperature data, pressure data, flow rate data, and liquid level data; and using wavelet functions to perform data noise reduction preprocessing on the temperature data, pressure data, flow rate data, and liquid level data to obtain preprocessed data.
4. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the chemical process risk prediction method as described in any one of claims 1 to 2.
5. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the chemical process risk prediction method as described in any one of claims 1 to 2.