Digital twinning-based multi-task learning petrochemical device anomaly positioning method

Through a multi-task learning method based on digital twins, a data set containing abnormal detection and positioning tags is simulated to generate, which solves the problem of insufficient abnormal positioning tag data in petrochemical devices, and realizes the efficiency and accuracy of abnormal detection and positioning of petrochemical devices.

CN119691643AActive Publication Date: 2025-03-25HUAZHONG UNIV OF SCI & TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411757285.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-25
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

Since cyber attacks rarely occur in petrochemical devices, it is difficult to obtain sufficient abnormal positioning tag data from actual devices, and it is difficult to effectively detect and locate abnormalities in petrochemical devices in the prior art.

Method used

Using a multi-task learning method based on digital twins, a data set containing anomaly detection and positioning labels is simulated and generated by building a digital twin model, a multi-task joint training data set is constructed, and anomaly detection and positioning is performed through a multi-task learning model.

Benefits of technology

The accuracy and real-timeness of abnormal positioning of petrochemical equipment are improved, overfitting problems caused by insufficient label data are avoided, and the generalization ability of the model in new abnormal situations is enhanced, so as to achieve accurate positioning of abnormalities of petrochemical equipment is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691643A_ABST
    Figure CN119691643A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of petrifaction, and discloses a multitask learning petrifaction device anomaly positioning method based on digital twinning, which comprises the following steps of: constructing a digital twinning model of a petrifaction device, simulating and generating normal and abnormal operation data of state expansion based on the digital twinning model, constructing a multi-task joint data set with labels for anomaly detection and anomaly positioning; constructing a multi-task learning anomaly positioning model, performing feature learning on a front-end shared network of the model, subsequently connecting two sub-task networks to respectively output anomaly detection and anomaly positioning results, and performing joint training on two tasks by adopting a cross entropy classification loss function; and carrying out on-line abnormal state positioning on the process data of the petrochemical device by using the abnormal positioning subtask output in the multi-task model. According to the method, the multi-task learning data set is generated in combination with digital twinning, dependence on actual label data is avoided, and the accuracy of petrochemical device anomaly positioning is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of petrochemical technology, and in particular relates to a petrochemical device abnormality positioning method based on multi-task learning of digital twins. Background Art

[0002] In recent years, with the rapid development of information and communication technology in the petrochemical industry, the flow of information in petrochemical plants has been increasing and accelerating. These technologies have not only improved the production efficiency of petrochemical plants, but also introduced more network security threats. Cyber ​​attacks can penetrate into petrochemical plants through communication network injection, attack petrochemical plants by tampering with process control instructions or injecting erroneous sensor measurement data, and gradually cross the information domain of petrochemical plants to endanger the process production process of the plant. Due to the complex and unique characteristics of petrochemical plants, their process states are closely coupled. Petrochemical plants often involve high temperature, high pressure, flammable and explosive substances and complex chemical reaction processes. Cyber ​​attacks can further lead to production losses or cause safety accidents such as production fires and explosions. Therefore, anomaly detection and analysis of petrochemical plants has become one of the research hotspots in the field of petrochemical industry safety protection. This technology ensures the identification of anomalies and sends appropriate alarm signals to the safety protection system, which is crucial to ensure the safety protection of petrochemical plants.

[0003] Since traditional anomaly detection technology focuses on determining whether there is an anomaly in the system, but lacks further analysis of the location where the anomaly occurs. Anomaly location technology can detect and locate abnormal process states or equipment, provide abnormal location alarms, and timely guide the petrochemical device safety protection system to take targeted and effective safety protection response actions. The traditional anomaly location method is to build a training classifier in combination with label data, such as Convolutional Neural Network (CNN), Graph Convolutional Network (GCN), etc. to perform anomaly location. However, since cyber attacks rarely occur in petrochemical devices, and simulating the occurrence of cyber attack incidents in actual petrochemical devices faces the risk of difficulty, high implementation cost and safety accidents, it is not practical to obtain sufficient anomaly location label data from actual petrochemical devices.

[0004] Through the above analysis, the problems and defects of the prior art are as follows:

[0005] Since cyber attacks rarely occur in petrochemical plants, and simulating the occurrence of cyber attacks in actual petrochemical plants faces the risks of difficulty, high implementation costs and causing safety accidents, it is not practical to obtain sufficient abnormal location label data from actual petrochemical plants. Summary of the invention

[0006] In view of the problems existing in the prior art, the present invention provides a petrochemical device anomaly positioning method based on multi-task learning of digital twins.

[0007] The present invention is implemented as follows: a multi-task learning petrochemical device abnormality positioning method based on digital twins includes:

[0008] Step 1: Using digital twin technology, a digital twin model is constructed based on the historical process operation data and control and process parameters of the target petrochemical unit;

[0009] Step 2, analyzing the process of the petrochemical plant;

[0010] Set up a simulated production process scenario that includes normal and abnormal working conditions, generate state-extended petrochemical unit simulation process operation data in the set simulation scenario based on the digital twin model, add anomaly detection labels and anomaly location labels to the operation data, and build a multi-task joint training dataset based on process simulation data and data labels;

[0011] Step 3: Build a multi-task learning anomaly localization model;

[0012] The front-end shared network of the model learns the feature representation of the training data. The output of the front-end shared network is synchronously connected to the two sub-task classifier networks of anomaly detection and anomaly localization. The two sub-networks predict the anomaly detection and anomaly localization results respectively. During the training process, the two sub-task networks are jointly trained.

[0013] Step 4: In the online detection phase, the digital twin model is used to expand the state of the process data of the petrochemical unit, and the expanded state data is inferred and predicted based on the multi-task anomaly location model. The prediction results of the anomaly location subtask network are combined to obtain the alarm output of the abnormal process state location.

[0014] Furthermore, the multi-task joint training dataset is constructed in the following manner:

[0015] The digital twin model can simulate and predict the process measurement status X = [x1, x2, ..., x d ], where x i is the characteristic data of the i-th sampling device, According to the inter-correlation characteristics between the sampling states in the petrochemical device, the digital twin model can be used to predict and generate e additional extended process state data associated with the existing sampling states, such as generating the process states of temperature, pressure, flow rate, etc. that have not been sampled on the petrochemical device, and finally obtain the data X containing e+d process state extensions. E =[x1,x2,...,x d ,xd+1 ,...,x d+e ];

[0016] Use digital twin models to simulate and generate process simulation data for petrochemical plants under set normal and abnormal operating conditions It includes normal simulation data and abnormal simulation data; the abnormal simulation data includes data with multiple process status abnormalities;

[0017] Add anomaly detection label A to the process data generated by digital twin model simulation AD With abnormal positioning label A AL ;

[0018] Anomaly detection tags in process simulation data tags Indicates whether the process data is abnormal, where N train is the number of training data, label data A value of 1 indicates that there is an abnormality in the set of process simulation data, and 0 indicates that it is normal;

[0019] Abnormal location label in Indicates whether the j-th sampling state of the i-th data is abnormal. The value 1 indicates abnormality and 0 indicates normality.

[0020] The simulated running data is used as the input data for the subsequent multi-task anomaly localization model training process. The anomaly detection label and anomaly localization label are used as the training targets of the model to construct a multi-task joint training dataset containing two types of labels.

[0021] Furthermore, the method for generating process simulation data and data labels includes the following steps:

[0022] Set the proportion of abnormal simulation data in process simulation data to P A ∈(0,1), then the number of abnormal simulation data in the simulation data in Indicates rounding down, then the number of normal simulation data N N =N train -N A ;

[0023] Use digital twin models to N Generate normal process data by simulating the quantity

[0024] Set the injection ratio P of abnormal process status I ∈(0,1], indicating that in the process of using the digital twin model to generate abnormal simulation data, there will be The process status of each petrochemical unit will be randomly selected and abnormal injection will be performed;

[0025] Abnormal injection modes include denial of service injection DOS , step injection M STEP , maximum and minimum injection M MM , randomly inject M RAND , bias injection M BIAS ; where M DOS This is achieved by simulating the failure of selected sensors and actuators in the petrochemical plant, and the process state value obtained by simulation remains fixed to that before the failure; M STEP Indicates that the corresponding process state value has been tampered with to the step value of the set value; M MM Indicates that the process state value will be randomly injected into its maximum or minimum value; M RAND The value indicating the process status will be tampered with to a random value within a certain range; M BIAS It means to take a value for the tampering process status and add an offset value based on the original value;

[0026] Among them, for the abnormal injection mode M STEP 、M RAND and M BIAS Setting the injection intensity S of the abnormal state limits the injection amplitude of the abnormality;

[0027] From the exception injection pattern set M INTJ ={M DOS ,M STEP ,M MM ,M RAND ,M BIAS}, select the abnormal injection mode in turn, according to the total amount of abnormal simulation data N A Evenly divide the simulation time blocks and inject anomalies into the digital twin model during the anomaly simulation process to obtain anomaly simulation data. Then get complete process simulation data

[0028] Using digital twins to generate data without abnormal injection but with the same operating conditions Maintain consistent normal simulation data

[0029] Set normal simulation data The corresponding data labels are set to where i∈[1,N train ]; Abnormal simulation data The corresponding label is set to a i AD =1, where i∈[N N ,N train], get the anomaly detection task label

[0030] Setting normal simulation data The abnormal location label is At this time, j∈[1,d], i∈[1,N N ];

[0031] For the abnormal location labels in the abnormal simulation data, calculate the absolute value deviation of the simulation data For process status x j , where j∈[1,d], the corresponding simulation data state deviation at time i is e ij , for states where the state value deviates too much from the normal value range, such as when When the process status is considered abnormal, the abnormal location label is set. Otherwise, set it to Where τ∈(0,1) is the percentage deviation coefficient, i∈(N N , N train ], which is used to filter out abnormal process states affected by abnormal injection; obtain the abnormal location label of the data set

[0032] Furthermore, the multi-task learning anomaly localization model is constructed in the following manner:

[0033] Running data for the above training dataset Each process state x j Do normalization in and is the maximum and minimum value of the state in the data set, where j∈[1,d+e] corresponds to the maximum value in the normalized scale of each state in the input data of the joint training data set and minimum value

[0034] Construct a multi-task learning anomaly localization model. The network structure is as follows: a shared network is constructed based on Transformer. The output features of the shared network are passed into the subsequent anomaly detection and anomaly localization subtask networks. Both subtask networks are fully connected layer networks. The output layers of the anomaly detection subtask network and the anomaly localization subtask network are fully connected layers with Sigmoid as the activation function. The anomaly detection subtask network is used to predict the probability of anomalies in the current data, and the anomaly localization subtask network predicts the probability of anomalies in each process sampling state.

[0035] Set the binary cross entropy classification loss for the two subtask classifiers of the multi-task learning anomaly localization model, including the anomaly detection loss L ADand anomaly localization loss L AL :

[0036]

[0037] During training, the training losses of the two subtask networks are weighted:

[0038] L=λL AD +(1-λ)L AL

[0039] L is the total training loss, λ∈(0,1) is the loss weight;

[0040] After joint training, a multi-task learning anomaly localization model is obtained.

[0041] Furthermore, the online application of the anomaly location method is as follows:

[0042] For the online process data X collected at time t of the petrochemical plant t First, the state is expanded through the digital twin model to obtain data

[0043] Process data Use normalized scale X max and X min Get normalized data

[0044] Will Input into the trained multi-task anomaly localization network for prediction to obtain the anomaly localization prediction result where p tj The model predicts the process state x at time t tj The probability of anomalies;

[0045] P t AL Medium tj >0.5, the corresponding state x tj Set alarm output if abnormality is detected p tj ≤0.5 Finally, the abnormal positioning alarm output of the process status is obtained

[0046] Another object of the present invention is to provide a multi-task learning petrochemical device abnormality positioning system based on digital twins, comprising:

[0047] A digital twin model building module is used to build a digital twin model based on the historical process operation data and control and process parameters of the target petrochemical unit using digital twin technology;

[0048] The analysis module is used to analyze the process production process of the petrochemical plant; set a simulated production process scenario including normal and abnormal conditions, generate state-extended petrochemical plant simulation process operation data under the set simulation scenario based on the digital twin model, add anomaly detection labels and anomaly location labels to the operation data, and build a multi-task joint training data set based on process simulation data and data labels;

[0049] The anomaly localization model construction module is used to build a multi-task learning anomaly localization model. The front-end shared network of the model performs feature representation learning on the training data. The output of the front-end shared network is synchronously connected to the two sub-task classifier networks of anomaly detection and anomaly localization. The two sub-networks predict the anomaly detection and anomaly localization results respectively. During the training process, the two sub-task networks are jointly trained.

[0050] The detection module is used in the online detection stage. It uses the digital twin model to expand the state of the process data of the petrochemical unit, makes inferences and predictions on the expanded state data based on the multi-task anomaly location model, and obtains the alarm output of abnormal process state location based on the prediction results of the anomaly location subtask network.

[0051] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the multi-task learning petrochemical device anomaly positioning method based on digital twins.

[0052] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the multi-task learning petrochemical device anomaly positioning method based on digital twins.

[0053] Another object of the present invention is to provide an information data processing terminal, which is used to implement the multi-task learning petrochemical device abnormality positioning system based on digital twins.

[0054] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:

[0055] First, before constructing an anomaly localization model based on multi-task learning, the present invention first combines digital twin simulation to generate a feature-expanded anomaly localization and anomaly detection multi-task joint learning data set. The extended data features help to add additional petrochemical state time series and spatial information to the data to improve the feature representation learning effect of the anomaly localization model; the label data generated by digital twin simulation helps to increase the label data available during the training of the anomaly localization model, avoiding the overfitting of the anomaly localization model to the existing label data, and solving the model's positioning ability for unknown and new anomalies when the label data is limited; at the same time, the present invention trains the anomaly localization task in parallel during the training of the anomaly localization model, and by setting the weighted loss function under the joint task of anomaly localization loss and anomaly detection, the Transformer model shares the knowledge learned in different task training, thereby improving the performance of the petrochemical device anomaly localization model.

[0056] Second, the technical solution of the present invention fills the technical gap in the industry at home and abroad:

[0057] The technical solution of the present invention breaks through the limitations of the prior art and improves the accuracy of anomaly positioning through a digital twin model and a multi-task joint learning framework. Unlike traditional methods that rely on limited labeled data, this solution makes full use of the rich abnormal simulation data generated by digital twin technology, and at the same time enhances the expressiveness of the model under complex spatiotemporal features by generating extended features. This not only avoids the overfitting problem caused by insufficient labeled data, but also effectively improves the generalization ability of the model in new abnormal situations. In addition, the Transformer-based multi-task sharing mechanism introduced in this solution can share knowledge between anomaly positioning and detection tasks, further improving the overall performance of the model, thereby achieving accurate positioning of anomalies in petrochemical equipment, filling the gap in technology in the industry.

[0058] Third, the technical solution of the present invention is based on digital twins and multi-task learning methods, which realizes the accurate detection and positioning of abnormal conditions of petrochemical equipment, solves the technical difficulties existing in traditional methods in petrochemical equipment monitoring, and brings significant technical progress, which is specifically manifested in the following aspects:

[0059] 1. The introduction of digital twin models enables accurate working condition simulation

[0060] Traditional petrochemical plant monitoring usually relies on a single data source or simple threshold monitoring, which makes it difficult to accurately judge the abnormal status of the plant in a complex and changing process environment.

[0061] The present invention integrates the historical data, control parameters and process conditions of petrochemical equipment through digital twin technology to build a realistic process operation model. The digital twin model can accurately simulate the normal and abnormal working conditions of the equipment and generate simulation data with extended state, thus providing more comprehensive data information for abnormal detection and positioning, significantly improving the simulation accuracy and judgment of the monitoring system.

[0062] 2. Multi-task learning method achieves simultaneous optimization of anomaly detection and localization

[0063] Traditional anomaly detection and localization are mostly single tasks, and the detection and localization steps are independent of each other, resulting in limited anomaly detection effects and low localization accuracy.

[0064] The present invention adopts a multi-task learning method, taking anomaly detection and location as two related tasks, and simultaneously performs feature representation learning and task optimization through a front-end shared network. During the training process, by jointly optimizing the classifier networks of anomaly detection and anomaly location, the model can accurately locate the source of anomalies while detecting anomalies, achieving a synchronous optimization effect. This multi-task learning strategy not only improves the accuracy of detection, but also improves the accuracy and real-time performance of anomaly location.

[0065] 3. Labeling of simulated data enhances the adaptability and generalization ability of the model

[0066] Traditional anomaly monitoring systems usually rely on manually labeled data, which is not rich enough in data labels and has difficulty in dealing with complex abnormal patterns and changes in operating conditions, resulting in poor model generalization capabilities.

[0067] The present invention uses a digital twin model to generate simulation data containing multiple working conditions, and constructs a multi-task joint training data set by adding anomaly detection and positioning labels to the simulation data. This labeled multi-task data set enriches the training data of the model, enabling it to maintain efficient anomaly detection and positioning capabilities under complex working conditions, greatly enhancing the adaptability and generalization ability of the model, and is suitable for the monitoring needs of different petrochemical plants.

[0068] 4. Real-time extended status analysis improves the response speed of anomaly detection

[0069] Traditional petrochemical plant abnormality monitoring methods have a lag in the response speed of abnormality detection, making it difficult to detect and feedback abnormal conditions in a timely manner, affecting the safety of the plant.

[0070] In the online detection stage of the present invention, real-time process data is input into the digital twin model for state expansion. The multi-task learning model can quickly infer and predict the expanded data, and the abnormal state is instantly located and alarmed based on the abnormal location subtask network. Compared with traditional monitoring methods, this solution can capture abnormal changes in process states in real time with faster response speed and higher accuracy, provide operators with more timely warnings, and reduce the possibility of accidents.

[0071] 5. The reliability and safety of industrial applications are significantly improved

[0072] Traditional technologies for locating abnormalities in petrochemical plants are limited by a single data source and monitoring method, have low reliability, and are unable to ensure the safe operation of complex production plants, which may lead to high economic losses and safety hazards.

[0073] The present invention realizes the intelligent and automated detection and positioning of petrochemical plant anomalies through a digital twin model that integrates multi-source data and an accurate multi-task learning model. This solution not only greatly improves the accuracy of anomaly detection and positioning, but also improves the reliability of the system, providing new technical support for petrochemical enterprises in plant monitoring and fault diagnosis, and effectively reducing production risks and maintenance costs.

[0074] In summary, the present invention achieves more efficient and accurate abnormality detection and positioning in the field of abnormality monitoring and positioning of petrochemical equipment, and has significant technical progress. This solution can be widely used in high-risk industrial fields such as petrochemicals, chemicals, and oil refining, providing strong protection for the safety and production efficiency of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 It is a flow chart of a method for locating abnormalities in a petrochemical device based on multi-task learning of digital twins provided in an embodiment of the present invention.

[0076] Figure 2 It is a structural block diagram of a petrochemical device abnormality positioning system based on digital twins provided by an embodiment of the present invention.

[0077] Figure 3 It is a flow chart of the main steps of the multi-task learning petrochemical device anomaly locating method based on digital twins provided in an embodiment of the present invention.

[0078] Figure 4 It is a schematic diagram of the steps for constructing a joint learning dataset for anomaly detection and localization tasks provided by an embodiment of the present invention.

[0079] Figure 5 It is a schematic diagram of the application process of the multi-task learning anomaly localization model provided by an embodiment of the present invention.

[0080] Figure 6It is a process and instrumentation schematic diagram of a fractionation unit embodiment object in a catalytic cracking device provided in an embodiment of the present invention.

[0081] Figure 7 It is an abnormal data curve diagram under abnormal injection of FI4, PI1, FI6, FI2 and FI5 states in the abnormal data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0083] The following are two specific embodiments of the present invention in the "Multi-task learning petrochemical device abnormality positioning method based on digital twin":

[0084] Example 1: Abnormal monitoring and location of cracking furnace in an oil refinery

[0085] Application scenario: Cracking furnaces are key equipment in refineries, usually operating under high temperature and high pressure, with heavy equipment loads and prone to failure. Due to the complex reactions in the cracking furnace, abnormalities in the process are difficult to quickly detect and accurately locate through traditional monitoring methods, so digital twin technology is introduced for abnormality monitoring and location.

[0086] Implementation steps:

[0087] 1. Construction of digital twin model: Using the historical operation data, temperature, pressure and other process parameters of the cracking furnace, a digital twin model of the cracking furnace is constructed, and the process simulation of the cracking furnace is realized through this model.

[0088] 2. Dataset generation: Set up a simulated production scenario that includes normal and abnormal conditions, generate process operation data for the cracking furnace under the digital twin model, and mark abnormal labels based on temperature fluctuations, pressure abnormalities, etc. in the furnace to generate the training data set required for multi-task learning.

[0089] 3. Multi-task learning model training: Input data with anomaly detection and positioning labels into the multi-task learning model, extract data features through the front-end shared network, and train the two sub-task networks of anomaly detection and anomaly positioning respectively to jointly improve the model's anomaly monitoring and positioning capabilities.

[0090] 4. Online detection and positioning: In actual monitoring, real-time process data is input into the digital twin model for expansion, and the model infers the expanded data. Once an abnormality is detected, such as abnormal fluctuations in temperature and pressure, the positioning network immediately outputs the specific abnormal location and alarm information in the cracking furnace to help engineers take quick measures.

[0091] The method realizes real-time monitoring of temperature and pressure anomalies in the cracking furnace and can accurately locate the source of the anomalies, thus avoiding production losses caused by long-term failure of the cracking furnace and ensuring the safe operation of the refinery.

[0092] Example 2: Fault location and early warning of synthesis tower in fertilizer plant

[0093] In fertilizer production, the synthesis tower is used to synthesize ammonia under high temperature and pressure. There are a lot of chemical reactions in the tower. If an abnormality occurs, it may lead to a decrease in production efficiency or even endanger safety. Traditional monitoring methods are difficult to identify and locate abnormalities in the tower in a timely manner, so digital twins and multi-task learning methods are used for monitoring.

[0094] 1. Construction of digital twin model: Based on the historical operation data of the synthesis tower, the temperature, pressure, flow rate and other parameters inside the tower, a digital twin model of the synthesis tower is established, which can simulate the normal and abnormal operating conditions inside the tower.

[0095] 2. Dataset generation: By simulating different production scenarios, data containing normal and abnormal operating conditions are generated, such as rapid temperature rise, abnormal pressure fluctuations, etc., and the abnormal conditions are labeled to generate training data sets.

[0096] 3. Multi-task model training: The multi-task data set is input into the front-end shared network of the model, and the accuracy of anomaly detection and positioning is improved through joint training of feature extraction, anomaly detection and positioning sub-networks.

[0097] 4. Online monitoring and early warning: After the real-time process data is input into the digital twin model, the model identifies and locates the abnormal process status of the synthesis tower by analyzing the extended data. When an abnormality is detected, the model immediately outputs an early warning to indicate the abnormal point in the tower so that the operator can deal with it in time.

[0098] The method realizes real-time detection of abnormal status of the synthesis tower, can quickly locate abnormal areas in the tower, improves the emergency response speed of faults, and ensures the safety and stability of the production process of the fertilizer plant.

[0099] like Figure 1 As shown, a method for locating abnormalities of a petrochemical device based on multi-task learning of digital twins provided by an embodiment of the present invention includes the following steps:

[0100] S101, using digital twin technology, build a digital twin model based on the historical process operation data and control and process parameters of the target petrochemical unit;

[0101] S102, analyze the process of petrochemical equipment;

[0102] Set up a simulated production process scenario that includes normal and abnormal working conditions, generate state-extended petrochemical unit simulation process operation data in the set simulation scenario based on the digital twin model, add anomaly detection labels and anomaly location labels to the operation data, and build a multi-task joint training dataset based on process simulation data and data labels;

[0103] S103, building a multi-task learning anomaly localization model;

[0104] The front-end shared network of the model learns the feature representation of the training data. The output of the front-end shared network is synchronously connected to the two sub-task classifier networks of anomaly detection and anomaly localization. The two sub-networks predict the anomaly detection and anomaly localization results respectively. During the training process, the two sub-task networks are jointly trained.

[0105] S104, the online detection stage, uses the digital twin model to expand the state of the process data of the petrochemical unit, and performs inference and prediction on the expanded state data based on the multi-task abnormality location model. The alarm output of abnormal process state location is obtained by combining the prediction results of the abnormality location subtask network.

[0106] Based on digital twin and multi-task learning technology, this paper provides an effective method for locating abnormalities in petrochemical equipment. Through simulation of process and multi-task learning of data, the accuracy and real-time performance of abnormality detection and positioning are improved. The specific working principle is as follows:

[0107] 1. Digital twin model construction and data expansion

[0108] First, the digital twin technology is used to build a digital model of the target petrochemical unit. Based on the historical process operation data, control parameters and process parameters of the unit, a virtual "twin" is generated. This model can reflect and simulate the process operation status of the petrochemical unit in real time. Through the digital twin model, the normal and abnormal operating conditions of the petrochemical unit can be simulated in detail. Next, a simulated production scenario containing normal and abnormal conditions is set to generate process operation data with abnormal labels. By adding anomaly detection and positioning labels to the simulated data, basic data is provided for the multi-task learning process of the model.

[0109] 2. Construction of multi-task learning model

[0110] In multi-task learning, anomaly detection and anomaly localization are two main tasks. The front-end shared network of the model is responsible for feature representation learning of the input data, extracting the key features of the process operation and passing them backward. The output of the shared network is connected to two subtask networks: anomaly detection and anomaly localization classifiers. The anomaly detection subnetwork is responsible for identifying abnormal states in process data, while the anomaly localization subnetwork focuses on determining the specific process location where the anomaly occurs. Through the front-end shared feature network, the model can more effectively utilize data features during the learning process, while improving the accuracy of anomaly detection and localization.

[0111] 3. Multi-task joint training process

[0112] During the training phase, the model is trained using a built multi-task joint dataset. The front-end shared network outputs synchronously to the two subtask networks, which are jointly trained to optimize parameters during the model training process. The anomaly detection subnetwork and the anomaly localization subnetwork receive anomaly detection and localization labels respectively, and based on the common optimization goal, the prediction capabilities of the two subtasks are continuously improved through alternating training and weight sharing. Joint training enables the model to detect anomalies and localize them at the same time, achieving a dual optimization effect.

[0113] 4. Online detection and abnormal location output

[0114] In the online detection stage of actual application, the real-time process data of the petrochemical unit is input into the digital twin model to generate extended status data, keeping the data synchronized with the operating status of the process unit in real time. The multi-task anomaly location model performs real-time reasoning on the extended status data, and quickly identifies and locates abnormal process states through the prediction results of the anomaly detection and location sub-networks. Once an anomaly is detected, the location sub-task network outputs an early warning signal to indicate the abnormal process location, thereby achieving real-time monitoring and accurate abnormal alarm output.

[0115] The multi-task joint training dataset provided by the embodiment of the present invention is constructed in the following manner:

[0116] The digital twin model can simulate and predict the process measurement status X = [x1, x2, ..., x d ], where x i is the characteristic data of the i-th sampling device, According to the inter-correlation characteristics between the sampling states in the petrochemical device, the digital twin model can be used to predict and generate e additional extended process state data associated with the existing sampling states, such as generating the process states of temperature, pressure, flow rate, etc. that have not been sampled on the petrochemical device, and finally obtain the data X containing e+d process state extensions. E =[x1,x2,...,x d ,xd+1 ,...,x d+e ];

[0117] Use digital twin models to simulate and generate process simulation data for petrochemical plants under set normal and abnormal operating conditions It includes normal simulation data and abnormal simulation data; the abnormal simulation data includes data with multiple process status abnormalities;

[0118] Add anomaly detection label A to the process data generated by digital twin model simulation AD With abnormal positioning label A AL ;

[0119] Anomaly detection tags in process simulation data tags Indicates whether the process data is abnormal, where N train is the number of training data, label data A value of 1 indicates that there is an abnormality in the set of process simulation data, and 0 indicates that it is normal;

[0120] Abnormal location label in Indicates whether the j-th sampling state of the i-th data is abnormal. The value 1 indicates abnormality and 0 indicates normality.

[0121] The simulated running data is used as the input data for the subsequent multi-task anomaly localization model training process. The anomaly detection label and anomaly localization label are used as the training targets of the model to construct a multi-task joint training dataset containing two types of labels.

[0122] The method for generating process simulation data and data labels provided by the embodiment of the present invention comprises the following steps:

[0123] Set the proportion of abnormal simulation data in process simulation data to P A ∈(0,1), then the number of abnormal simulation data in the simulation data in Indicates rounding down, then the number of normal simulation data N N =N train -N A ;

[0124] Use digital twin models to N Generate normal process data by simulating the quantity

[0125] Set the injection ratio P of abnormal process status I ∈(0,1], indicating that in the process of using the digital twin model to generate abnormal simulation data, there will be The process status of each petrochemical unit will be randomly selected and abnormal injection will be performed;

[0126] Abnormal injection modes include denial of service injection DOS , step injection M STEP , maximum and minimum injection M MM , randomly inject M RAND , bias injection M BIAS ; where M DOS This is achieved by simulating the failure of selected sensors and actuators in the petrochemical plant, and the process state value obtained by simulation remains fixed to that before the failure; M STEP Indicates that the corresponding process state value has been tampered with to the step value of the set value; M MM Indicates that the process state value will be randomly injected into its maximum or minimum value; M RAND The value indicating the process status will be tampered with to a random value within a certain range; M BIAS It means to take a value for the tampering process status and add an offset value based on the original value;

[0127] Among them, for the abnormal injection mode M STEP 、M RAND and M BIAS Setting the injection intensity S of the abnormal state limits the injection amplitude of the abnormality;

[0128] From the exception injection pattern set M INTJ ={M DOS ,M STEP ,M MM ,M RAND ,M BIAS}, select the abnormal injection mode in turn, according to the total amount of abnormal simulation data N A Evenly divide the simulation time blocks and inject anomalies into the digital twin model during the anomaly simulation process to obtain anomaly simulation data. Then get complete process simulation data

[0129] Using digital twins to generate data without abnormal injection but with the same operating conditions Maintain consistent normal simulation data

[0130] Set normal simulation data The corresponding data labels are set to where i∈[1,N train ]; Abnormal simulation data The corresponding label is set to where i∈[N N ,N train ], get the anomaly detection task label

[0131] Setting normal simulation data The abnormal location label is At this time, j∈[1,d], i∈[1,N N ];

[0132] For the abnormal location labels in the abnormal simulation data, calculate the absolute value deviation of the simulation data For process status x j , where j∈[1,d], the corresponding simulation data state deviation at time i is e ij , for states where the state value deviates too much from the normal value range, such as when When the process status is considered abnormal, the abnormal location label is set. Otherwise, set it to Where τ∈(0,1) is the percentage deviation coefficient, i∈(N N , N train ], which is used to filter out abnormal process states affected by abnormal injection; obtain the abnormal location label of the data set

[0133] The multi-task learning anomaly localization model provided in the embodiment of the present invention is constructed in the following manner:

[0134] Running data for the above training dataset Each process state x j Do normalization in and is the maximum and minimum value of the state in the data set, where j∈[1,d+e], corresponding to the maximum value of the normalized scale of each state in the input data of the joint training data set and minimum value

[0135] Construct a multi-task learning anomaly localization model. The network structure is as follows: a shared network is constructed based on Transformer. The output features of the shared network are passed into the subsequent anomaly detection and anomaly localization subtask networks. Both subtask networks are fully connected layer networks. The output layers of the anomaly detection subtask network and the anomaly localization subtask network are fully connected layers with Sigmoid as the activation function. The anomaly detection subtask network is used to predict the probability of anomalies in the current data, and the anomaly localization subtask network predicts the probability of anomalies in each process sampling state.

[0136] Set the binary cross entropy classification loss for the two subtask classifiers of the multi-task learning anomaly localization model, including the anomaly detection loss L AD and anomaly localization loss LAL :

[0137]

[0138] During training, the training losses of the two subtask networks are weighted:

[0139] L=λL AD +(1-λ)L AL

[0140] L is the total training loss, λ∈(0,1) is the loss weight;

[0141] After joint training, a multi-task learning anomaly localization model is obtained.

[0142] The online application mode of the abnormality location method provided by the embodiment of the present invention is:

[0143] For the online process data X collected at time t of the petrochemical plant t First, the state is expanded through the digital twin model to obtain data

[0144] Process data Use normalized scale X max and X min Get normalized data

[0145] Will Input into the trained multi-task anomaly localization network for prediction to obtain the anomaly localization prediction result where p tj The model predicts the process state x at time t tj The probability of anomalies;

[0146] P t AL Medium tj >0.5, the corresponding state x tj Set alarm output if abnormality is detected p tj ≤0.5 Finally, the abnormal positioning alarm output of the process status is obtained

[0147] like Figure 2 As shown, an embodiment of the present invention provides a multi-task learning petrochemical device abnormality positioning system based on digital twins, including:

[0148] A digital twin model building module is used to build a digital twin model based on the historical process operation data and control and process parameters of the target petrochemical unit using digital twin technology;

[0149] The analysis module is used to analyze the process production process of the petrochemical plant; set a simulated production process scenario including normal and abnormal conditions, generate state-extended petrochemical plant simulation process operation data under the set simulation scenario based on the digital twin model, add anomaly detection labels and anomaly location labels to the operation data, and build a multi-task joint training data set based on process simulation data and data labels;

[0150] The anomaly localization model construction module is used to build a multi-task learning anomaly localization model. The front-end shared network of the model performs feature representation learning on the training data. The output of the front-end shared network is synchronously connected to the two sub-task classifier networks of anomaly detection and anomaly localization. The two sub-networks predict the anomaly detection and anomaly localization results respectively. During the training process, the two sub-task networks are jointly trained.

[0151] The detection module is used in the online detection stage. It uses the digital twin model to expand the state of the process data of the petrochemical unit, makes inferences and predictions on the expanded state data based on the multi-task anomaly location model, and obtains the alarm output of abnormal process state location based on the prediction results of the anomaly location subtask network.

[0152] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the multi-task learning petrochemical device anomaly positioning method based on digital twins.

[0153] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the multi-task learning petrochemical device anomaly positioning method based on digital twins.

[0154] Another object of the present invention is to provide an information data processing terminal, which is used to implement the multi-task learning petrochemical device abnormality positioning system based on digital twins.

[0155] The present invention is specifically implemented:

[0156] Embodiment 1

[0157] Figure 3 The figure is a flow chart of a method for locating abnormalities of a petrochemical device based on digital twins using multi-task learning in the present invention. Figure 3 As shown, including:

[0158] Using digital twin technology, a digital twin model is constructed based on the historical process operation data and control and process parameters of the target petrochemical unit;

[0159] Analyze the process production process of petrochemical equipment, set up simulated production process scenarios including normal and abnormal working conditions, generate state-extended petrochemical equipment simulation process operation data under the set simulation scenarios based on the digital twin model, add anomaly detection labels and anomaly location labels to the operation data, and build a multi-task joint training data set based on the operation data and data labels;

[0160] Construct a multi-task learning anomaly localization model. The front-end shared network of the model learns the feature representation of the training data. The output of the front-end shared network is synchronously connected to the two sub-task classifier networks of anomaly detection and anomaly localization. The two sub-networks predict the anomaly detection and anomaly localization results respectively. During the training process, the two sub-task networks are jointly trained.

[0161] During the online detection stage, the digital twin model is used to expand the state of the process data of the petrochemical unit, and the extended data is inferred and predicted based on the multi-task anomaly localization model. The prediction results of the anomaly localization subtask network are combined to obtain the alarm output of abnormal state localization.

[0162] As a preferred implementation, the digital twin model of the petrochemical plant is constructed as follows:

[0163] The historical process operation data of the petrochemical device mainly includes controller setting values, actuator states, and sensor process state sampling data that can reflect the operating status of the petrochemical device. These data can be collected from the DCS in the target petrochemical device or other systems connected to sensors and actuators, or can be obtained from the historical database corresponding to the petrochemical device. The control and process parameters cover the control behavior parameters and process parameters of the petrochemical device. The control behavior parameters can be control logic and mode parameters of control systems such as DCS in the petrochemical device, such as the production control logic parameters of the device, the algorithms and parameters used by the controller, etc. The process parameters can be parameters related to process equipment and mechanism, such as the structure and size of process equipment in the petrochemical device, the physical and chemical properties of the produced materials, and the working environment characteristic parameters of the process production process. The acquired historical process data can be combined with the control and process parameters of the petrochemical device to establish a digital twin model with virtual-real mapping of the petrochemical device.

[0164] As a preferred implementation, the schematic diagram of the steps for constructing the joint learning dataset for anomaly detection and localization tasks is as follows: Figure 4 As shown, combined with Figure 6 The fractionation unit in the catalytic cracking unit of the petrochemical plant is shown as an example object for explanation. The data set is constructed as follows:

[0165] The digital twin model can simulate and predict the process measurement status X = [x1, x2, ..., x d ], including the status of sensors (temperature, pressure, liquid level and flow) and actuators (valves) used in the control loops of the distillation tower, oil-gas separator and pipeline in the diversion unit of the catalytic cracking unit, as well as the status of other sensors used to monitor the distillation tower and pipeline.

[0166] According to the interrelated characteristics of the process states in the diversion unit, the digital twin model is used to generate e = 8 extended state data associated with the existing sampling states, which are supplemented by the existing sampling states, including the temperature (TI6, TI7, TI8), pressure (PI4), and liquid level (LI4) of different plates on the fractionation tower that have not been sampled, the flow rate of oil and gas output from the top of the fractionation tower (FI7), and the temperature (TI5) and pressure (PI3) of the oil and gas separator, to obtain data X containing e + d = 26 process states. E =[x1,x2,...,x 26 ] to expand the spatial state information in the process data and provide a richer process data foundation for the subsequent multi-task learning anomaly localization model;

[0167] The digital twin model is used to simulate and generate process simulation data of the distillation unit under set normal and abnormal operating conditions. It includes normal simulation data and abnormal simulation data, and the abnormal simulation data includes data with multiple process status abnormalities;

[0168] Add anomaly detection label A to the process data generated by digital twin model simulation AD With abnormal positioning label A AL ;

[0169] Anomaly detection tags in process simulation data tags Indicates whether the process data is abnormal, where N train =10000 is the number of training data, label data A value of 1 indicates that there is an abnormality in the set of process simulation data, and 0 indicates that it is normal;

[0170] Abnormal location label in Indicates whether the j-th sampling state of the i-th data is abnormal. The value 1 indicates abnormality and 0 indicates normality.

[0171] The simulated running data is used as the input data for the subsequent multi-task anomaly localization model training. The anomaly detection label and anomaly localization label are used as the training targets of the model to construct a multi-task joint training dataset containing two types of labels.

[0172] The method for generating the simulation operation data and data labels is constructed in the following manner:

[0173] Set the proportion of abnormal simulation data in process simulation data to P A =0.2, the number of abnormal simulation data in the simulation data in Indicates rounding down, then the number of normal simulation data N N =N train -N A =8000;

[0174] Use digital twin models to N The normal process simulation data is obtained by numerical simulation

[0175] Set the injection ratio P of abnormal process status I =0.2, indicating that in the process of using the digital twin model to generate abnormal simulation data, there will be Each process state will be randomly selected and anomaly injected;

[0176] Abnormal injection modes include denial of service injection DOS , step injection M STEP , maximum and minimum injection M MM , randomly inject M RAND , bias injection M BIAS ; where M DOS This is achieved by simulating the failure of selected sensors and actuators in the petrochemical plant, and the process state value obtained by simulation remains fixed to that before the failure; M STEP Indicates that the corresponding process state value has been tampered with to the step value of the set value; M MM Indicates that the process state value will be randomly injected into its maximum or minimum value; M RAND The value indicating the process status will be tampered with to a random value within a certain range; M BIAS It means to take a value for the tampering process status and add an offset value based on the original value;

[0177] Among them, for the abnormal injection mode M STEP 、M RAND and M BIAS Set the injection intensity S=0.3 in the abnormal state to limit the injection amplitude of the abnormality;

[0178] From the exception injection pattern set M INTJ ={M DOS ,M STEP ,M MM ,MRAND ,M BIAS}, select the abnormal injection mode in turn, according to the total amount of abnormal simulation data N A Each mode is divided into 400 simulation data segments, and anomalies are injected into the abnormal simulation process of the digital twin model to obtain abnormal simulation data. Then get complete process simulation data

[0179] Using digital twins to generate data without abnormal injection but with the same operating conditions Maintain consistent normal simulation data

[0180] Set normal simulation data The corresponding data labels are set to where i∈[1,8000]; abnormal simulation data The corresponding label is set to Where i∈[8001,10000], get the anomaly detection task label

[0181] Setting normal simulation data The abnormal location label is At this time, j∈[1,18], i∈[1,8000];

[0182] For the abnormal location labels in the abnormal simulation data, the simulation deviation is calculated For process status x j , where j∈[1,18], for states where the state value deviates too much from the normal value range, such as when When the process status is considered abnormal, the abnormal location label is set. Otherwise, set Where τ = 0.05 is the percentage deviation coefficient, i∈[8001,10000], which is used to screen out abnormal process states affected by abnormal injection; get the abnormal location label of the data set

[0183] The schematic diagram of the multi-task learning anomaly localization model construction process is as follows: Figure 5 The following method is used to construct:

[0184] Running data for the above joint training dataset Each process state x j Do normalization in and is the maximum and minimum value of the state in the data set, where j∈[1,26], corresponding to the state normalization scale of the input data set and

[0185] In order to better extract data features from the data, compared to traditional deep neural networks or convolutional neural networks, the Transformer used in the shared task network can effectively capture the long-range dependencies between different positions in the input sequence through a self-attention mechanism. This method enables the Transformer to perform well in tasks such as processing long sequence data and natural language processing. It can not only process data in parallel and improve computational efficiency, but also extract contextual information more accurately, thereby providing a more powerful feature representation capability for subsequent subtask learning networks and improving the performance of multi-task joint learning.

[0186] Construct a multi-task learning anomaly localization model. The network structure is to build a shared network based on Transformer. The shared network setting includes 2 Transformer network layers, each layer contains 4 multi-head attentions, and each layer of Transformer network feedforward neural network contains 64 neurons. The final output features are passed to the subsequent anomaly detection and anomaly localization subtask networks. The middle layer of the two subtask networks contains 2 layers of fully connected layer networks. Each fully connected network includes 64 neurons. The output layers of the anomaly detection and anomaly localization network subtask networks are both fully connected layers that use Sigmoid as the activation function. The output layer dimension of the anomaly detection is 1, and the output layer dimension of the anomaly localization subtask network is 18; the anomaly detection subtask network is used to predict the probability of anomalies in the current data, and the anomaly localization subtask network predicts the probability of anomalies in each process sampling state;

[0187] Set the binary cross entropy classification loss L for the two subtask classifiers of the multi-task learning anomaly localization model AD and L AL :

[0188]

[0189] During training, the training losses of the two subtask networks are weighted:

[0190] L=λL AD +(1-λ)L AL

[0191] L is the total training loss, which is set to loss weight λ = 0.3, and the training loss is tilted towards the anomaly localization task;

[0192] After joint training, a multi-task learning anomaly localization model is obtained.

[0193] The method of using the multi-task learning anomaly localization model based on digital twins to perform online process anomaly localization is as follows:

[0194] For the online process data X collected at time t of the petrochemical plant t First, the state is expanded through the digital twin model to obtain data

[0195] Process data Use normalized scale X max and X min Get normalized data

[0196] Will Input into the trained multi-task anomaly localization network for prediction to obtain the anomaly localization prediction result where p tj For the model to predict the process state x tj The probability of anomalies;

[0197] P t AL Medium tj >0.5, the corresponding state x tj Set alarm output if abnormality is detected p tj ≤0.5 Finally, the abnormal positioning alarm output of the process status is obtained

[0198] The multi-task learning petrochemical device anomaly location method based on digital twins proposed in this embodiment overcomes the dependence of the anomaly location method on the petrochemical device anomaly location label data, and generates a multi-task joint learning label data set including anomaly detection and anomaly location by using the digital twin model simulation, and at the same time, increases the correlation information in the data through the extended features generated by the digital twin simulation to improve the performance of anomaly location. Since the petrochemical device is accompanied by an abnormal state at the same time, the anomaly detection task and the anomaly location task are jointly learned through multi-task learning, and the parameters and knowledge of the two tasks are shared through the shared network layer, which enhances the recognition ability of process abnormality data and strengthens the training effect of the anomaly location task, thereby helping to improve the accuracy of anomaly location.

[0199] In general, the present invention provides a multi-task learning petrochemical device abnormality positioning method based on digital twins. First, a digital twin model of the petrochemical device is constructed, and normal and abnormal operation data with feature expansion are simulated and generated based on the digital twin model to construct a multi-task joint data set with labeled abnormality detection and abnormality positioning; a multi-task learning abnormality positioning model is constructed, and the front-end shared network of the model is used for feature learning. Subsequently, two sub-task networks are connected to output abnormality detection and abnormality positioning results respectively, and the two tasks are jointly trained using a cross-entropy classification loss function; finally, the abnormal state of the petrochemical device process data is positioned online using the abnormality positioning sub-task output in the multi-task model.

[0200] 1. Specific application fields or related products of the present invention.

[0201] The present invention belongs to the field of information security protection technology of petrochemical industrial systems and is applied to intrusion detection systems or attack detection instruments and equipment of petrochemical devices. The invention is used to monitor the operating status of petrochemical devices, locate the occurrence of abnormal status, and provide alarm information for operators and safety protection mechanisms.

[0202] 2. Relevant evidence of the technical effects obtained by the embodiments of the present invention.

[0203] The data set used in this example comes from the simulation data of the open source petroleum catalytic cracking agent fractionation unit simulation model. The original training data includes 8,000 groups, including 6,000 groups of simulation data under completely normal operation and 2,000 groups of simulation data with abnormal conditions. The test data includes 2,000 groups, of which 1,000 groups are normal data and 1,000 groups are data with abnormal conditions.

[0204] In order to generate an additional 2,000 sets of abnormal simulation data based on the digital twin model, the digital twin model is derived from the modification of the petrochemical simulation model parameters, including the parameters of the proportional-integral controller, the physical properties of the components, the tower plate pressure calculation parameters, etc., to simulate the deviation of digital twin modeling to construct a model that differs from the original simulation model.

[0205] Then, digital twin modeling and simulation are combined to generate labeled abnormal data, and the abnormal simulation pattern set M INTJ ={M DOS ,M STEP ,M MM ,M RAND ,M BIAS} in turn according to the selected exception injection mode, inject into Figure 6 The simulation experiment object shown generates labeled abnormal data, such as Figure 7The abnormal data curves of FI4, PI1, FI6, FI2 and FI5 states under abnormal injection are displayed, which show obvious abnormal data patterns corresponding to the original normal data, thus obtaining 2000 sets of simulated data and corresponding data labels.

[0206] In order to evaluate the performance of the anomaly localization model designed in the present invention, decision tree (DT), deep neural network (DNN), convolutional neural network (CNN) and Transformer (TRAN) were selected as experimental comparison models. In order to analyze the effects of digital twin anomaly simulation and multi-task learning, the anomaly localization performance of the Transformer (E-TRAN) with input data feature expansion, the model AS-TRAN with additional training of 2000 anomaly simulation data under feature expansion, the multi-task learning model MT-TRAN, and the model ASMT-TRAN which combines anomaly simulation data expansion and multi-task learning were evaluated.

[0207] In order to measure the performance of each anomaly localization model in locating abnormal states, the commonly used indicators for binary classification problems are used, including accuracy, false alarm rate (FAR), precision, recall, and F1 score.

[0208] The anomaly localization performance of each experimental comparison model is shown in Table 1.

[0209] Table 1 Anomaly location indicators of each test model

[0210] Model Accuracy FAR Precision Recall F1score DNN 0.9167 0.5000 0.5000 0.3333 0.4000 CNN 0.9167 0.0606 0.5000 0.6667 0.5714 LSTM 0.9332 0.0534 0.5723 0.7860 0.6624 GCN 0.9616 0.0000 1.0000 0.5387 0.7002 TRAN 0.9593 0.0427 0.6762 0.9810 0.8006 ETRAN 0.9734 0.0095 0.8821 0.7853 0.8309 AS-TRAN 0.9751 0.0115 0.8672 0.8273 0.8468 MT-TRAN 0.9825 0.0165 0.8429 0.9713 0.9026 ASMT-TRAN 0.9913 0.0095 0.9058 1.0000 0.9506

[0211] Through the abnormal positioning experimental indicators in the table, from the overall positioning effect, the method designed by the present invention has higher positioning accuracy than other methods, and the additional abnormal simulation data and multi-task

[0212] Acc:0.9593,FAR:0.0427,PRE:0.6762,REC:0.9810,F1:0.8006.

[0213] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.

[0214] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A multi-task learning petrochemical device anomaly location method based on digital twins, characterized in that: The following steps are involved: Step 1: Using digital twin technology, a digital twin model is constructed based on the historical process operation data and control and process parameters of the target petrochemical unit; Step 2, analyzing the process of the petrochemical plant; Set up a simulated production process scenario that includes normal and abnormal working conditions, generate state-extended petrochemical unit simulation process operation data in the set simulation scenario based on the digital twin model, add anomaly detection labels and anomaly location labels to the operation data, and build a multi-task joint training dataset based on process simulation data and data labels; Step 3: Build a multi-task learning anomaly localization model; The front-end shared network of the model learns the feature representation of the training data. The output of the front-end shared network is synchronously connected to the two sub-task classifier networks of anomaly detection and anomaly localization. The two sub-networks predict the anomaly detection and anomaly localization results respectively. During the training process, the two sub-task networks are jointly trained. Step 4: In the online detection phase, the digital twin model is used to expand the state of the process data of the petrochemical unit, and the expanded state data is inferred and predicted based on the multi-task anomaly location model. The prediction results of the anomaly location subtask network are combined to obtain the alarm output of the abnormal process state location.

2. According to the multi-task learning method for abnormal location of petrochemical equipment based on digital twins in claim 1, it is characterized in that: The multi-task joint training dataset is constructed in the following way: The digital twin model can simulate and predict the process measurement status X = [x1, x2, ..., x d ], where x i is the characteristic data of the i-th sampling device, According to the inter-correlation characteristics between the sampling states in the petrochemical device, the digital twin model can be used to predict and generate e additional extended process state data associated with the existing sampling states, such as generating the process states of temperature, pressure, flow rate, etc. that have not been sampled on the petrochemical device, and finally obtain the data X containing e+d process state extensions. E =[x1,x2,...,x d ,x d+1 ,...,x d+e ]; Use digital twin models to simulate and generate process simulation data for petrochemical plants under set normal and abnormal operating conditions It includes normal simulation data and abnormal simulation data; the abnormal simulation data includes data with multiple process status abnormalities; Add anomaly detection label A to the process data generated by digital twin model simulation AD With abnormal positioning label A AL ; Anomaly detection tags in process simulation data tags Indicates whether the process data is abnormal, where N train is the number of training data, label data A value of 1 indicates that there is an abnormality in the set of process simulation data, and 0 indicates that it is normal; Abnormal location label in Indicates whether the j-th sampling state of the i-th data is abnormal. The value 1 indicates abnormality and 0 indicates normality. The simulated running data is used as the input data for the subsequent multi-task anomaly localization model training process. The anomaly detection label and anomaly localization label are used as the training targets of the model to construct a multi-task joint training dataset containing two types of labels.

3. According to claim 2, a multi-task learning petrochemical device abnormality positioning method based on digital twins is characterized in that: The method for generating process simulation data and data labels comprises the following steps: Set the proportion of abnormal simulation data in process simulation data to P A ∈(0,1), then the number of abnormal simulation data in the simulation data in Indicates rounding down, then the number of normal simulation data N N =N train -N A ; Use digital twin models to N Generate normal process data by simulating the quantity Set the injection ratio P of abnormal process status I ∈(0,1], indicating that in the process of using the digital twin model to generate abnormal simulation data, there will be The process status of each petrochemical unit will be randomly selected and abnormal injection will be performed; Abnormal injection modes include denial of service injection DOS , step injection M STEP , maximum and minimum injection M MM , randomly inject M RAND , bias injection M BIAS ; where M DOS This is achieved by simulating the failure of selected sensors and actuators in the petrochemical plant, and the process state value obtained by simulation remains fixed to that before the failure; M STEP Indicates that the corresponding process state value has been tampered with to the step value of the set value; M MM Indicates that the process state value will be randomly injected into its maximum or minimum value; M RAND The value indicating the process status will be tampered with to a random value within a certain range; BIAS It means to take a value for the tampering process status and add an offset value based on the original value; Among them, for the abnormal injection mode M STEP 、M RAND and M BIAS Setting the injection intensity S of the abnormal state limits the injection amplitude of the abnormality; From the exception injection pattern set M INTJ ={M DOS ,M STEP ,M MM ,M RAND ,M BIAS }, select the abnormal injection mode in turn, according to the total amount of abnormal simulation data N A Evenly divide the simulation time blocks and inject anomalies into the digital twin model during the anomaly simulation to obtain anomaly simulation data. Then get complete process simulation data Using digital twins to generate data without abnormal injection but with the same operating conditions Maintain consistent normal simulation data Set normal simulation data The corresponding data labels are set to where i∈[1,N train ]; Abnormal simulation data The corresponding label is set to where i∈[N N ,N train ], get the anomaly detection task label Setting normal simulation data The abnormal location label is At this time, j∈[1,d], i∈[1,N N ]; For the abnormal location labels in the abnormal simulation data, calculate the absolute value deviation of the simulation data For process status x j , where j∈[1,d], the corresponding simulation data state deviation at time i is e ij , for states where the state value deviates too much from the normal value range, such as when When the process status is considered abnormal, the abnormal location label is set. Otherwise, set it to Where τ∈(0,1) is the percentage deviation coefficient, i∈(N N , N train ], used to filter out abnormal process states affected by abnormal injection; obtain the abnormal location label of the data set 4. According to the multi-task learning method for abnormal location of petrochemical equipment based on digital twins in claim 1, it is characterized in that: The multi-task learning anomaly localization model is constructed in the following way: Running data for the above training dataset Each process state x j Do normalization in and is the maximum and minimum value of the state in the data set, where j∈[1,d+e], corresponding to the maximum value of the normalized scale of each state in the input data of the joint training data set and minimum value Construct a multi-task learning anomaly localization model. The network structure is as follows: a shared network is constructed based on Transformer. The output features of the shared network are passed into the subsequent anomaly detection and anomaly localization subtask networks. Both subtask networks are fully connected layer networks. The output layers of the anomaly detection subtask network and the anomaly localization subtask network are fully connected layers with Sigmoid as the activation function. The anomaly detection subtask network is used to predict the probability of anomalies in the current data, and the anomaly localization subtask network predicts the probability of anomalies in each process sampling state. Set the binary cross entropy classification loss for the two subtask classifiers of the multi-task learning anomaly localization model, including the anomaly detection loss L AD and anomaly localization loss L AL : During training, the training losses of the two subtask networks are weighted: L=λL AD +(1-λ)L AL L is the total training loss, λ∈(0,1) is the loss weight; After joint training, a multi-task learning anomaly localization model is obtained.

5. According to the multi-task learning method for abnormal location of petrochemical equipment based on digital twins in claim 1, it is characterized in that: The online application mode of the anomaly location method is as follows: For the online process data X collected at time t of the petrochemical plant t First, the state is expanded through the digital twin model to obtain data Process data Use normalized scale X max and X min Get normalized data Will Input into the trained multi-task anomaly localization network for prediction to obtain the anomaly localization prediction result where p tj The model predicts the process state x at time t tj The probability of anomalies; Medium tj >0.5, the corresponding state x tj Set alarm output if abnormality is detected p tj ≤0.5 Finally, the abnormal positioning alarm output of the process status is obtained 6. A digital twin-based multi-task learning petrochemical device anomaly positioning system implementing the digital twin-based multi-task learning petrochemical device anomaly positioning method according to any one of claims 1 to 5, characterized in that: The multi-task learning petrochemical device abnormality positioning system based on digital twins includes: A digital twin model building module is used to build a digital twin model based on the historical process operation data and control and process parameters of the target petrochemical unit using digital twin technology; The analysis module is used to analyze the process production process of the petrochemical plant; set a simulated production process scenario including normal and abnormal conditions, generate state-extended petrochemical plant simulation process operation data under the set simulation scenario based on the digital twin model, add anomaly detection labels and anomaly location labels to the operation data, and build a multi-task joint training data set based on process simulation data and data labels; The anomaly localization model construction module is used to build a multi-task learning anomaly localization model. The front-end shared network of the model performs feature representation learning on the training data. The output of the front-end shared network is synchronously connected to the two sub-task classifier networks of anomaly detection and anomaly localization. The two sub-networks predict the anomaly detection and anomaly localization results respectively. During the training process, the two sub-task networks are jointly trained. The detection module is used in the online detection stage. It uses the digital twin model to expand the state of the process data of the petrochemical unit, makes inferences and predictions on the expanded state data based on the multi-task anomaly location model, and obtains the alarm output of abnormal process state location based on the prediction results of the anomaly location subtask network.

7. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the multi-task learning petrochemical device anomaly positioning method based on digital twins as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the multi-task learning petrochemical device anomaly positioning method based on digital twins as described in any one of claims 1 to 5.

9. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the multi-task learning petrochemical device abnormality positioning system based on digital twin as described in claim 6.

Citation Information

Patent Citations

  • Intelligent factory fault diagnosis and decision-making system based on digital twinning

    CN116125958A

  • Digital twin hydraulic engineering operation and maintenance monitoring system and method

    CN116757097A

  • Method for constructing anomaly detection model of industrial control system in process industry based on digital twinning

    CN118068765A

  • Method and system for predicting crack propagation life of offshore drilling rig derrick based on digital twinning

    CN118626795A

  • Digital twinning assisted virtual network function resource prediction and migration method

    CN119012236A