Gas string pressure risk early warning method and device, computer equipment and medium

By evaluating valve parameters using multiple risk warning models and combining them with weighted voting or meta-learning models, the problem of lagging gas cross-pressure risk warning in existing technologies has been solved, achieving accurate pre-warning and safety assurance.

CN122243191APending Publication Date: 2026-06-19XINJIANG ZHUNENG CHEMICAL CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XINJIANG ZHUNENG CHEMICAL CO LTD
Filing Date
2026-03-12
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies are insufficient to provide accurate early warnings of gas cross-pressure risks. Manual inspections are inefficient and susceptible to fatigue and negligence. Central control system alarms lag behind the cross-pressure process, making it difficult to provide early warnings.

Method used

Multiple primary risk warning models (threshold-based rule-based risk warning model, AHP risk warning model, and LSTM risk warning model) are used to evaluate the upstream and downstream pressure difference, opening degree, and flow parameters of the valve. Combined with the stacking method of weighted voting or meta-learning models, the target value for gas cross-pressure risk warning is generated.

Benefits of technology

It enables accurate and comprehensive early warning of gas cross-pressure risks, avoids the limitations of a single model, improves the reliability and timeliness of risk warning, and ensures the safe and stable operation of chemical production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243191A_ABST
    Figure CN122243191A_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer equipment, and medium for early warning of gas cross-pressure risks. The method includes: acquiring the upstream and downstream pressure difference, valve opening degree, and flow parameters of a valve; using different primary risk warning models to perform risk warnings on the upstream and downstream pressure difference, valve opening degree, and flow parameters, obtaining initial values ​​for gas cross-pressure risk warnings corresponding to different primary risk warning models; processing the initial values ​​for gas cross-pressure risk warnings using weighted voting or a stacking method based on a meta-learning model to obtain a target value for gas cross-pressure risk warnings; and executing gas cross-pressure risk warning operations based on the target value. Throughout the process, based on the upstream and downstream pressure difference, valve opening degree, and flow parameters of the valve, and using different primary risk warning models for initial risk warnings, multiple initial values ​​for gas cross-pressure risk warnings are comprehensively considered using weighted voting or a stacking method based on a meta-learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of chemical safety technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for early warning of gas cross-pressure risks. Background Technology

[0002] In chemical production processes, gas cross-pressure (the accidental entry of high-pressure gas into a low-pressure system) is a typical risk threatening personnel safety and stable equipment operation. Because processes often involve multiple pressure systems, if high-pressure gas breaches the isolation barrier and enters the low-pressure area, it can lead to anything from minor overpressure damage to low-pressure equipment and loss of process parameters to catastrophic accidents such as container explosions and fires, causing significant casualties and property damage. Therefore, identifying potential cross-pressure hazards in advance and taking intervention measures through risk warning technology has become a crucial aspect of ensuring safe chemical production.

[0003] In traditional technologies, the chemical industry primarily relies on a combination of manual inspections and passive protection to address cross-pressure risks. On one hand, a central control system remotely monitors parameters such as liquid level and pressure in high-pressure vessels, combined with regular manual checks of valve status, attempting to detect potential cross-pressure risks when parameters are abnormal. On the other hand, mechanical pressure relief devices such as safety valves and rupture discs serve as a "last line of defense," passively releasing pressure in the event of overpressure. However, existing technologies have significant drawbacks: manual inspections are inefficient and susceptible to fatigue and negligence, making it difficult to detect early potential problems such as valve leakage and minor pressure fluctuations in real time; while central control systems can provide parameter alarms, they only reflect situations that have already exceeded limits, with alarms lagging behind the cross-pressure process, making it difficult to provide early warnings.

[0004] Therefore, there is an urgent need for an accurate early warning scheme for gas cross-pressure risks to achieve early warning. Summary of the Invention

[0005] Therefore, it is necessary to provide an accurate method, device, computer equipment, storage medium, and computer program product for early warning of gas cross-pressure risks, addressing the aforementioned technical problems.

[0006] Firstly, this application provides a method for early warning of gas cross-pressure risks. The method includes:

[0007] Obtain the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters;

[0008] Different primary risk warning models were used to conduct risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and the initial values ​​of gas cross pressure risk warnings corresponding to different primary risk warning models were obtained.

[0009] The initial value of the gas cross-pressure risk warning is processed by weighted voting or by a stacking method based on a meta-learning model to obtain the target value of the gas cross-pressure risk warning.

[0010] Perform gas cross-pressure risk warning operations based on the target value for gas cross-pressure risk warning.

[0011] In one embodiment, different primary risk warning models are used to provide risk warnings for upstream and downstream pressure difference, valve opening, and flow parameters. The initial values ​​for gas cross-pressure risk warnings corresponding to different primary risk warning models are as follows:

[0012] A threshold-based rule-based risk warning model is used to provide risk warnings for the pressure difference between upstream and downstream, and a first risk score is obtained.

[0013] The AHP (Analytic Hierarchy Process) risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and a second risk score is obtained.

[0014] An LSTM (Long Short-Term Memory) risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening, and flow parameters, and a third risk score is obtained.

[0015] By aggregating the first risk score, the second risk score, and the third risk score, the initial values ​​of gas cross-pressure risk warnings corresponding to different primary risk warning models are obtained.

[0016] In one embodiment, a threshold-based rule-based risk warning model is used to provide risk warnings for the upstream and downstream pressure difference, resulting in a first risk score including:

[0017] Obtain the normal differential pressure range of the valve;

[0018] Determine whether the upstream and downstream pressure difference is within the normal pressure difference range and obtain the determination result;

[0019] Based on the judgment result, a binary risk signal is output;

[0020] Obtain the confidence level of the threshold-based rule-based risk warning model;

[0021] Based on the confidence level and the binary risk signal, a first risk score is obtained.

[0022] In one embodiment, the AHP risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening, and flow parameters, resulting in a second risk score including:

[0023] The three dimensions of differential pressure, opening degree, and flow rate are obtained based on the scoring weights of the expert scoring method;

[0024] The upstream and downstream pressure difference, valve opening, and flow parameters are normalized to obtain the normalized parameters.

[0025] The second risk score is calculated based on the scoring weights and normalized parameters.

[0026] In one embodiment, an LSTM risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening, and flow parameters, resulting in a third risk score including:

[0027] Acquire time-series data of upstream and downstream pressure difference, valve opening, and flow parameters;

[0028] Extract the latest time series data within a preset period to obtain the target time series data;

[0029] The target time series data is input into the trained LSTM risk warning model to obtain the third risk score.

[0030] In one embodiment, a weighted voting process is performed on the initial value for gas cross-pressure risk warning to obtain the target value for gas cross-pressure risk warning, including:

[0031] Obtain the model weights of the threshold-based rule-based risk warning model, the AHP risk warning model, and the LSTM risk warning model. The model weights are positively correlated with the historical accuracy of the model's risk warning.

[0032] The first risk score, the second risk score, and the third risk score are weighted and summed according to the model weights to obtain the target value for gas cross-pressure risk warning.

[0033] In one embodiment, the initial value for gas cross-pressure risk warning is processed using a stacking method based on a meta-learning model to obtain the target value for gas cross-pressure risk warning, including:

[0034] Obtain the trained meta-learning model;

[0035] The first risk score, the second risk score, and the third risk score are input into the trained meta-learning model to obtain the target value for gas cross-pressure risk warning.

[0036] The trained meta-learning model is trained as follows: an initial lightweight neural network model and training sample data are obtained, including the first risk score, second risk score, third risk score, and true risk value of the sample; the first risk score, second risk score, and third risk score of the sample are input into the initial lightweight neural network model to obtain the risk warning value; a loss function is constructed based on the true risk value and the risk warning value of the sample; the initial lightweight neural network model is iteratively trained based on the training sample data, and the model parameters are continuously adjusted through backpropagation until the loss function is minimized, thus obtaining the trained meta-learning model.

[0037] Secondly, this application also provides a gas cross-pressure risk early warning device. The device includes:

[0038] The parameter acquisition module is used to acquire the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters.

[0039] The initial warning module is used to perform risk warnings on upstream and downstream pressure difference, valve opening and flow parameters using different primary risk warning models, and to obtain the initial values ​​of gas cross pressure risk warnings corresponding to different primary risk warning models.

[0040] The target warning module is used to obtain the target value for gas cross-pressure risk warning by weighted voting or stacking based on a meta-learning model, and then execute the gas cross-pressure risk warning operation based on the target value.

[0041] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0042] Obtain the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters;

[0043] Different primary risk warning models were used to conduct risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and the initial values ​​of gas cross pressure risk warnings corresponding to different primary risk warning models were obtained.

[0044] The initial value of the gas cross-pressure risk warning is processed by weighted voting or by a stacking method based on a meta-learning model to obtain the target value of the gas cross-pressure risk warning.

[0045] Perform gas cross-pressure risk warning operations based on the target value for gas cross-pressure risk warning.

[0046] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0047] Obtain the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters;

[0048] Different primary risk warning models were used to conduct risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and the initial values ​​of gas cross pressure risk warnings corresponding to different primary risk warning models were obtained.

[0049] The initial value of the gas cross-pressure risk warning is processed by weighted voting or by a stacking method based on a meta-learning model to obtain the target value of the gas cross-pressure risk warning.

[0050] Perform gas cross-pressure risk warning operations based on the target value for gas cross-pressure risk warning.

[0051] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0052] Obtain the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters;

[0053] Different primary risk warning models were used to conduct risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and the initial values ​​of gas cross pressure risk warnings corresponding to different primary risk warning models were obtained.

[0054] The initial value of the gas cross-pressure risk warning is processed by weighted voting or by a stacking method based on a meta-learning model to obtain the target value of the gas cross-pressure risk warning.

[0055] Perform gas cross-pressure risk warning operations based on the target value for gas cross-pressure risk warning.

[0056] The aforementioned gas cross-pressure risk early warning method, device, computer equipment, storage medium, and computer program products use the pressure difference, opening degree, and flow parameters of the valve upstream and downstream as data foundation. These parameters accurately reflect the gas flow and valve operating status. Different primary risk early warning models evaluate the parameters from multiple dimensions to obtain corresponding initial values ​​for gas cross-pressure risk early warning, avoiding the limitations of a single model. Then, a weighted voting method or a stacking method based on a meta-learning model is used to process the initial values ​​for gas cross-pressure risk early warning. The weighted voting method allocates weights according to the reliability of the model and integrates the results of each primary model. The stacking method based on a meta-learning model uses an advanced learning mechanism to explore the inherent relationships. Both methods can comprehensively consider multiple initial values ​​for gas cross-pressure risk early warning, integrate the advantages of each primary risk early warning model, and make up for the shortcomings of a single model. The final target value for gas cross-pressure risk early warning can more accurately and comprehensively reflect the actual risk situation. Executing early warning operations based on this target value can achieve accurate gas cross-pressure risk early warning and provide reliable protection for safe and stable operation. Attached Figure Description

[0057] Figure 1 This is an application environment diagram of the gas cross-pressure risk early warning method in one embodiment;

[0058] Figure 2 This is a flowchart illustrating a gas cross-pressure risk warning method in one embodiment;

[0059] Figure 3 This is a flowchart illustrating a gas cross-pressure risk warning method in another embodiment;

[0060] Figure 4 This is a structural block diagram of a gas cross-pressure risk warning device in one embodiment;

[0061] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0063] The gas cross-pressure risk early warning method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed in the cloud or on other network servers. Terminal 102 sends a gas cross-pressure risk warning request to server 104. Server 104 responds to the request, obtaining the upstream and downstream pressure difference, valve opening, and flow parameters of the valve. It then uses different primary risk warning models to perform risk warnings on the upstream and downstream pressure difference, valve opening, and flow parameters, obtaining initial values ​​for gas cross-pressure risk warnings corresponding to different primary risk warning models. Finally, it performs weighted voting or a stacking method based on a meta-learning model on the initial values ​​of the gas cross-pressure risk warnings to obtain the target value for the gas cross-pressure risk warning. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0064] In one embodiment, such as Figure 2 As shown, a gas cross-pressure risk early warning method is provided, which is applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0065] S200: Obtain the upstream and downstream pressure difference of the valve, valve opening degree, and flow parameters.

[0066] Pressure data from upstream and downstream of the valve can be collected in real time using pressure sensors installed upstream and downstream, and the differential pressure value ΔP can be calculated. The pressure sensors must possess high accuracy and fast response characteristics to ensure the accuracy and reliability of the collected pressure data, thereby guaranteeing that the calculated differential pressure value accurately reflects the pressure conditions upstream and downstream of the valve. Simultaneously, valve opening data is obtained from the valve control system (central control system) or related monitoring equipment. This data reflects the current degree of valve opening and directly affects the smoothness of gas / liquid flow. Additionally, flow parameters passing through the valve are collected in real time using a flow meter.

[0067] In practical applications, when acquiring valve opening degree, an opening degree consistency verification can be performed. If the opening degree consistency verification fails, it is determined to be an abnormal opening degree. Specifically, the opening degree commanded by the central control system can be compared with the actual opening degree on site. For valves that are not fully open or fully closed, a reasonable allowable deviation range can be preset (e.g., valve opening degree deviation of 1-2 decibels). When the deviation continuously exceeds the threshold, it is determined to be an inconsistent opening degree. For fully open or fully closed valves, if a dangerous situation occurs, such as the central control system command being "closed" but the actual opening degree being non-zero, it is determined to be an "inconsistent opening degree". For fully open and fully closed valves, no deviation is allowed; there must only be two valve states: "closed" or "fully open".

[0068] S400: Different primary risk warning models are used to provide risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and the initial values ​​of gas cross-pressure risk warnings corresponding to different primary risk warning models are obtained.

[0069] Here, a multi-parameter fusion intelligent judgment logic is introduced, and multiple different primary risk warning models are used to comprehensively analyze the collected upstream and downstream pressure difference, valve opening, and flow parameters. Specifically, different primary risk warning models can include threshold-based rule-based risk warning models, AHP risk warning models, and LSTM risk warning models. Among them, the threshold-based rule-based risk warning model is used to compare the upstream and downstream pressure difference, valve opening, or flow parameters with the corresponding set threshold based on a pre-set threshold, and output a binary risk signal (0 / 1) based on the comparison result. Taking the upstream and downstream pressure difference as an example, assuming that the current valve-based process card query finds a preset pressure difference upper limit threshold of 0.5 MPa; if the obtained upstream and downstream pressure difference is 0.6 MPa, then the threshold-based rule-based risk warning model outputs a binary risk signal (1) representing the existence of risk. This type of model can directly and quickly determine the possible risks. The AHP risk warning model is a risk warning model based on the analytic hierarchy process. It generates a judgment matrix by assigning different weights to upstream and downstream pressure differentials, valve openings, and flow parameters according to expert scoring (e.g., pressure differential weight 0.5, flow rate weight 0.3, opening weight 0.2). Based on this judgment matrix and the normalized upstream and downstream pressure differentials, valve openings, and flow parameters, it outputs the final initial risk warning value. The LSTM risk warning model is a state-based warning model. It predicts the trends of pressure differentials, openings, and flow rates over a certain period (within several steps) based on data from upstream and downstream pressure differentials, valve openings, and flow parameters, thus achieving a switch from "static monitoring" to "dynamic prediction" and enabling more accurate risk warnings.

[0070] Multiple primary risk warning models analyze multiple parameters from different perspectives and algorithms, each with its own unique judgment logic and focus. By employing multiple different primary risk warning models, the risk of gas cross-pressure can be assessed from multiple dimensions, avoiding misjudgments caused by data bias or algorithmic limitations of a single model, and obtaining more comprehensive and accurate initial values ​​for gas cross-pressure risk warnings.

[0071] S600: The initial value of the gas cross-pressure risk warning is processed by weighted voting or by stacking based on the meta-learning model to obtain the target value of the gas cross-pressure risk warning.

[0072] If a weighted voting method is used, different weights are first assigned to each primary risk warning model based on its performance in extensive historical data testing. Models with superior performance, i.e., higher accuracy and stability, are given larger weights, while models with relatively poor performance are given smaller weights. Alternatively, a stacking method based on meta-learning models can be used to construct a meta-learning model capable of higher-level fusion and learning of the initial values ​​from different primary risk warning models. This meta-learning model analyzes the performance patterns of each primary model under different operating conditions and automatically learns how to dynamically adjust the utilization of each initial value according to the actual situation. Specifically, the meta-learning model can be a pre-trained lightweight neural network model.

[0073] S800: Perform gas cross-pressure risk warning operations based on the gas cross-pressure risk warning target value.

[0074] After obtaining the target value for gas cross-pressure risk warning, the gas cross-pressure risk warning operation is executed. This operation mainly includes three categories of operation methods: determining the risk level, generating risk warning alarm information, and generating risk warning response measures or instructions. The processing procedures corresponding to each type of operation method will be described in detail below.

[0075] Determine the risk level. This operational method aims to accurately map the gas cross-pressure risk warning target value S (ranging from 0 to 1) to a specific risk level, providing a clear definition of the risk degree for subsequent operations. For example, the specific judgment rules can be as follows: when S < 0.3, it is judged as Level 1 (Safe), indicating that the system is in a safe state and requires no special attention; when 0.3 ≤ S < 0.5, it is judged as Level 2 (Caution), indicating that the system has certain potential risks and requires continued attention; when 0.5 ≤ S < 0.7, it is judged as Level 3 (Warning), meaning that the risk is relatively obvious and operators need to be more vigilant; when 0.7 ≤ S < 0.9, it is judged as Level 4 (Severe), indicating that the system faces a high risk and immediate measures are required; when S ≥ 0.9, it is judged as Level 5 (Danger), indicating that the system is in an extremely dangerous state and must be dealt with quickly and decisively. Through this risk level classification, the risk degree becomes visible and quantifiable, allowing operators to quickly understand the risk situation and providing a strong basis for subsequent decision-making.

[0076] This process generates risk warning and alarm information. It includes two key aspects: alarm and recording, and safety linkage and feedback. Alarm and Recording: Different levels of alarms are triggered based on the determined risk level. For risks of level 3 and above, alarm information is pushed to the operator interface, reminding operators to pay attention to the risk dynamics. For risks of level 4 and above, in addition to pushing to the operator interface, the risk event is automatically recorded and engineers are notified for timely intervention and analysis. Simultaneously, the risk event and corresponding handling measures are stored in the database to provide data support for subsequent model optimization. On the central control interface, different risk levels are clearly displayed using different colors (green, yellow, orange, red), and the main risk contribution parameters are indicated, enabling operators to intuitively and quickly obtain key information and respond promptly. Safety Linkage and Feedback: The risk level output by the model is closely linked to the safety system. For early warning level risks, only a prompt message is sent to the central control room, where central control personnel conduct on-site inspections of equipment or valves according to the instructions to confirm the actual risk situation. For high-level alarms, an audible and visual alarm is automatically triggered, and handling guidance pops up on the operation interface, planning the optimal handling route. This approach prevents personnel from making mistakes under stress, ensures rapid response and handling, avoids the escalation of accidents, and guarantees the safe and stable operation of the system.

[0077] This system generates risk warning and response measures or instructions. The operational method mainly includes two parts: multi-level warning reporting and automatic interlocking actions (core protection). Multi-level warning reporting: Once a risk is detected, an audible and visual alarm is immediately triggered in the central control room, and the risk valve, deviation details, and risk type are highlighted on the operator interface, reminding operators to intervene manually. This measure can promptly attract the attention of operators, enabling them to quickly understand the location and specific situation of the risk, providing a clear direction for subsequent handling and ensuring that the risk is controlled in a timely and effective manner. Automatic interlocking actions (core protection): The system automatically issues closing commands to the relevant valves in the high-pressure-low-pressure series and simultaneously sends adjustment commands to the pressure regulation system. By quickly establishing reliable physical isolation or pressure balance, it proactively prevents the occurrence or escalation of cross-pressure accidents. Automatic interlocking actions are a core measure to ensure system safety, enabling rapid action when a risk occurs, reducing accident losses, ensuring the safety of equipment and personnel, and effectively maintaining the stable operation of the system.

[0078] The aforementioned gas cross-pressure risk early warning method uses upstream and downstream pressure difference, valve opening degree, and flow rate parameters as data foundations. These parameters accurately reflect gas flow and valve operating status. Different primary risk early warning models evaluate the parameters from multiple dimensions to obtain corresponding initial values ​​for gas cross-pressure risk early warning, avoiding the limitations of a single model. Then, a weighted voting method or a stacking method based on a meta-learning model is used to process the initial values. Weighted voting allocates weights based on model reliability, integrating the results of each primary model. The stacking method based on a meta-learning model utilizes advanced learning mechanisms to uncover inherent relationships. Both methods comprehensively consider multiple initial values ​​for gas cross-pressure risk early warning, combining the advantages of each primary risk early warning model and compensating for the shortcomings of a single model. The final target value for gas cross-pressure risk early warning more accurately and comprehensively reflects the actual risk situation. Executing early warning operations based on this target value can achieve accurate gas cross-pressure risk early warning, providing reliable assurance for safe and stable operation.

[0079] In one embodiment, such as Figure 3 As shown, different primary risk warning models are used to provide risk warnings for upstream and downstream pressure difference, valve opening, and flow parameters. The initial values ​​for gas cross-pressure risk warnings corresponding to different primary risk warning models are as follows:

[0080] S420: A threshold-based rule-based risk warning model is used to provide risk warnings for the pressure difference between upstream and downstream, and a first risk score is obtained.

[0081] The threshold-based rule-based risk warning model performs risk warning work according to pre-established explicit threshold rules. In this embodiment, the focus is on the upstream and downstream pressure difference parameter, setting threshold conditions such as "if the pressure difference > safety threshold". For example, combined with the normal pressure difference range [ΔP] corresponding to the valve in the process card. min ΔP max When the upstream and downstream pressure difference calculated in real time exceeds the normal pressure difference range [ΔP] min ΔP max When a pressure difference meets the set risk conditions, the model makes a judgment based on preset rules. Specifically, the threshold-based rule-based risk warning model processes pressure difference data directly and quickly, making it suitable for handling known and clearly defined risk scenarios. Once the pressure difference meets the set risk conditions, the model outputs a first risk score, ranging from 0 to 1, with higher scores indicating higher risk levels. Simultaneously, the threshold-based rule-based risk warning model also has a preset confidence level to indicate the reliability of the risk score result. In this way, a preliminary assessment of the pressure difference-related risk situation can be quickly made, providing basic data for subsequent comprehensive judgment.

[0082] S440: The AHP risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and a second risk score is obtained.

[0083] The AHP risk warning model is a risk assessment method that comprehensively considers the weights of multiple factors. In this step, the model simultaneously analyzes three key parameters: upstream and downstream pressure difference, valve opening, and flow rate. Furthermore, the AHP risk warning model determines the weight of each parameter based on its impact on gas cross-pressure risk through expert scoring and historical data analysis. For example, under certain operating conditions, pressure difference may have a greater impact on risk, so its weight will be relatively higher; while the weights of valve opening and flow rate are reasonably allocated according to the actual situation. Then, the real-time collected parameter values ​​are standardized to ensure they are within a comparable range. Next, based on the weights of each parameter and the standardized parameter values, a weighted calculation method is used to derive a comprehensive risk assessment result, i.e., a second risk score, which also ranges from 0 to 1. The model also includes a confidence level to reflect the reliability of the score result. The AHP risk warning model comprehensively considers the interrelationships and influence levels between multiple parameters, assessing gas cross-pressure risk holistically and overcoming the limitations of single-parameter assessments.

[0084] S460: The LSTM risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening and flow parameters, and a third risk score is obtained.

[0085] The LSTM risk warning model is a time-series model that can not only analyze the current state of upstream and downstream pressure differentials, valve openings, and flow parameters, but also predict the changing trends of these parameters over the next few steps. This is a key technical feature that distinguishes it from the previous two models, achieving a leap from "static monitoring" to "dynamic prediction." During the training phase, the LSTM model uses a large amount of historical data, including time-series data of upstream and downstream pressure differentials, valve openings, and flow parameters under different operating conditions, to learn the temporal relationships and changing patterns of these parameters. In practical applications, the real-time collected parameter data is input into the trained LSTM model. The model analyzes the current state based on the learned patterns and predicts the changing trends of the parameters over a future period. If the prediction results indicate that the parameters may exceed the normal range or undergo abnormal changes, the model outputs a third risk score, ranging from 0 to 1, with a higher score indicating a greater likelihood of future gas cross-pressure risks. Simultaneously, the model also has a confidence level to indicate the reliability of the prediction results. In this way, the LSTM risk warning model can issue early warnings before parameters exceed limits, providing more time for timely measures to prevent risks.

[0086] S480: Collect the first risk score, the second risk score, and the third risk score to obtain the initial value of gas cross-pressure risk warning corresponding to different primary risk warning models.

[0087] After completing the above three steps and obtaining the first risk score of the threshold-based rule-based risk warning model, the second risk score of the AHP risk warning model, and the third risk score of the LSTM risk warning model, these scores are aggregated and used as the initial values ​​for gas cross-pressure risk warning.

[0088] In one embodiment, a threshold-based rule-based risk warning model is used to provide risk warnings for the upstream and downstream pressure difference, resulting in a first risk score including:

[0089] Step 1: Obtain the normal differential pressure range of the valve.

[0090] In actual industrial production processes, valves typically operate within a specific differential pressure range. This range is determined based on the valve's design parameters, process requirements, and long-term practical experience. Specifically, the normal differential pressure range can be retrieved from a pre-set database based on process card information. This range serves as a benchmark for judging whether the upstream and downstream differential pressure is normal. For example, for a specific type of valve, based on its design specifications and process requirements, its normal differential pressure range is determined to be [0.2 MPa, 0.4 MPa]. Accurately obtaining this range is fundamental for subsequent risk warnings, ensuring that the assessment of the valve's differential pressure status aligns with actual production needs.

[0091] Step 2: Determine whether the pressure difference between the upstream and downstream is within the normal pressure difference range and obtain the judgment result.

[0092] After real-time acquisition of upstream and downstream pressure data from the DCS (Distributed Control System), the upstream and downstream pressure difference (ΔP = upstream pressure - downstream pressure) is calculated. This calculated real-time pressure difference is compared with the normal pressure difference range obtained in step 1. If the real-time pressure difference is within the normal range, the valve pressure difference is considered normal; if it exceeds the normal range, the valve pressure difference is considered abnormal. For example, if the calculated real-time upstream and downstream pressure difference is 0.35 MPa, within the range of [0.2 MPa, 0.4 MPa], the result is considered normal; if the real-time pressure difference is 0.5 MPa, exceeding this range, the result is considered abnormal. This step quickly determines whether the valve pressure difference is within the normal range, providing a basis for subsequent risk signal output.

[0093] Step 3: Based on the judgment result, output a binary risk signal.

[0094] Based on the judgment result obtained in step 2, a binary risk signal is output. When the judgment result indicates that the valve differential pressure is normal, the output binary risk signal is 0, indicating that there is no obvious risk to the current valve differential pressure; when the judgment result indicates that the valve differential pressure is abnormal, the output binary risk signal is 1, indicating that there may be a risk to the current valve differential pressure. This binary risk signal output method is simple and clear, and can quickly convey the risk status of the valve differential pressure, facilitating subsequent risk assessment and handling. For example, in an automated control system, the binary risk signal can serve as the basis for triggering alarms or taking corresponding control measures.

[0095] Step 4: Obtain the confidence level of the threshold-based rule-based risk warning model.

[0096] The threshold-based rule-based risk warning model sets thresholds according to the process card, for example, setting ΔP > 0.5 MPa as high risk. The confidence level is determined based on the degree to which the real-time differential pressure deviates from the set threshold. Specifically, the confidence level is determined by calculating the difference between the real-time differential pressure and the set threshold, combined with a certain algorithm. For example, if the real-time differential pressure is 0.55 MPa, deviating from the high-risk threshold by 0.05 MPa, the confidence level calculated according to the preset algorithm is 80%. The confidence level reflects how close the current differential pressure state is to the set risk threshold; the higher the confidence level, the closer the current differential pressure state is to the set risk threshold, and the greater the probability of risk occurrence. This step can more accurately quantify the risk level of valve differential pressure, providing more detailed information for the subsequent first risk assessment.

[0097] Step 5: Obtain the first risk score based on the confidence level and the binary risk signal.

[0098] The binary risk signal output in step 3 and the confidence level obtained in step 4 are combined to calculate the first risk score. The specific calculation method can be set according to actual needs; for example, a weighted average method can be used. If the binary risk signal is 1, the confidence level is given a higher weight; if the binary risk signal is 0, the confidence level is given a lower weight or is not included in the calculation. For example, when the binary risk signal is 1, the first risk score can be set to 1 × 0.9 (confidence level). In this way, the binary risk signal and confidence level are organically combined to obtain a first risk score that comprehensively reflects the degree of valve differential pressure risk. The first risk score can more comprehensively and accurately assess the risk status of valve differential pressure.

[0099] In one embodiment, the AHP risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening, and flow parameters, resulting in a second risk score including:

[0100] Step 1: Obtain the scoring weights of the three dimensions of differential pressure, opening degree, and flow rate based on the expert scoring method.

[0101] In this embodiment, an expert scoring method is used to determine the relative importance of the three dimensions—pressure difference, gas opening degree, and flow rate—in the risk assessment, thereby obtaining their scoring weights. Specifically, a judgment matrix is ​​constructed, and experts score each parameter pairwise based on its impact on the gas cross-pressure risk. For example, experts believe that pressure difference has the greatest impact on risk, assigning it a weight of 0.5; flow rate has the second greatest impact, assigning it a weight of 0.3; and gas opening degree has a relatively small impact on risk, assigning it a weight of 0.2. These weights reflect the relative importance of each parameter in the overall risk assessment and are an important basis for the subsequent calculation of the second risk score. Obtaining weights through an expert scoring method can fully utilize the expertise and experience of experts, making the risk assessment more consistent with reality.

[0102] Specifically, constructing the judgment matrix includes the following steps: 1) First, clearly define the judgment objective, namely, assess the impact of upstream and downstream pressure difference, valve opening, and flow rate parameters on the risk of gas cross-pressure, thereby determining the relative importance of each parameter in risk warning. The parameters involved in the comparison are clearly defined as upstream and downstream pressure difference, valve opening, and flow rate, which will serve as the row and column elements of the judgment matrix; 2) Develop a reasonable scaling rule, typically using a 1-9 scaling method; 3) Obtain expert scores for pairwise comparisons of the three parameters—upstream and downstream pressure difference, valve opening, and flow rate—based on their professional knowledge and practical experience; 4) Construct an initial judgment matrix based on the expert scores for pairwise comparisons, thus obtaining the corresponding scoring weights for the three dimensions: pressure difference, valve opening, and flow rate.

[0103] Step 2: Normalize the upstream and downstream pressure difference, valve opening, and flow parameters to obtain normalized parameters.

[0104] Because the units and numerical ranges of parameters such as upstream and downstream pressure difference, valve opening, and flow rate can vary significantly, directly using these raw data for calculations can lead to inconsistencies in the dimensions of different parameters, affecting the accuracy and rationality of risk scoring. Therefore, it is necessary to normalize these parameters. Normalization involves scaling the values ​​of each parameter to a specific range according to certain rules, typically scaling the data to the [0,1] interval. For example, for the upstream and downstream pressure difference, if its current value is 0.45, the normalized value calculated using the normalization formula is 0.9; for the flow rate parameter, the normalized value is 0.8; and for the valve opening parameter, the normalized value is 0.7. Normalization eliminates the dimensional differences between different parameters, allowing them to be compared and calculated on the same scale, thereby improving the accuracy and reliability of risk scoring.

[0105] Step 3: Calculate the second risk score based on the scoring weights and normalized parameters.

[0106] After obtaining the scoring weights and normalized parameters for the three dimensions of differential pressure, valve opening, and flow rate, a weighted summation method is used to calculate the second risk score. The specific calculation process is as follows: multiply the scoring weight of each parameter by its corresponding normalized parameter value, and then sum the products. For example, if the differential pressure weight is 0.5, the normalized differential pressure value is 0.9; the flow rate weight is 0.3, the normalized flow rate value is 0.8; and the valve opening weight is 0.2, the normalized opening value is 0.7. Therefore, the formula for calculating the second risk score is: Score = 0.5 × 0.9 + 0.3 × 0.8 + 0.2 × 0.7 = 0.45 + 0.24 + 0.14 = 0.83. The second risk score calculated in this way is a value between 0 and 1, comprehensively reflecting the influence of upstream and downstream differential pressure, valve opening, and flow rate parameters on the risk of gas cross-pressure. A higher score indicates a greater risk; a lower score indicates a lower risk.

[0107] In one embodiment, an LSTM risk warning model is used to provide risk warnings for upstream and downstream pressure difference, valve opening, and flow parameters, resulting in a third risk score including:

[0108] Step 1: Obtain time-series data of upstream and downstream pressure difference, valve opening, and flow parameters.

[0109] In this embodiment, time-series data refers to a set of data on upstream and downstream pressure differentials, valve openings, and flow parameters recorded in chronological order. This data is acquired in real time by sensors installed at appropriate locations. The sensors continuously record the values ​​of each parameter at regular time intervals (e.g., once per second), thus forming time-series data containing both time information and parameter values. Acquiring time-series data is fundamental to the entire risk warning process because the LSTM model, as a time-series model, is characterized by its ability to process and analyze time-dependent data. Only by acquiring complete and accurate time-series data can the model fully learn the patterns of parameter changes over time, thereby providing a reliable basis for subsequent risk prediction.

[0110] Step 2: Extract the latest time series data within the preset period to obtain the target time series data.

[0111] Considering that the LSTM model does not need to use all historical time-series data when processing data, but focuses on the impact of recent data on the current and future states, the latest time-series data within a preset period is selected as the target time-series data, according to the LSTM model input requirements mentioned in the technical disclosure. In this embodiment, the preset period can be the most recent 60 seconds, that is, a sliding window method is used to select time-series data of upstream and downstream pressure difference, valve opening, and flow parameters collected within the most recent 60 seconds each time.

[0112] Step 3: Input the target time series data into the trained LSTM risk warning model to obtain the third risk score.

[0113] The trained LSTM risk warning model is pre-trained using a large amount of historical time-series data. During training, the model learns the patterns of upstream and downstream pressure differentials, valve openings, and flow parameters over time, as well as the intrinsic relationship between these changes and risk. For example, the model can identify the correlation between abnormal upward trends in pressure differentials and flow rates and high risk. After inputting the target time-series data obtained in step 2 into the trained LSTM risk warning model, the model processes and analyzes the input data based on its internally learned patterns and rules. Specifically, the LSTM model uses its unique gating mechanism (input gate, forget gate, and output gate) to control the flow and retention of information, thereby better capturing long-term dependencies in the time-series data. After processing and calculation by the model, a risk probability value between 0 and 1 is finally output, i.e., the third risk score.

[0114] In one embodiment, a weighted voting process is performed on the initial value for gas cross-pressure risk warning to obtain the target value for gas cross-pressure risk warning, including:

[0115] Step 1: Obtain the model weights of the threshold-based rule-based risk warning model, the AHP risk warning model, and the LSTM risk warning model. The model weights are positively correlated with the historical accuracy of the model's risk warning.

[0116] In risk warning systems, threshold-based rule-based risk warning models, AHP risk warning models, and LSTM risk warning models each have different characteristics and advantages. Threshold-based rule-based risk warning models judge risk by setting fixed thresholds, which is simple and direct but relatively inflexible; AHP risk warning models use the analytic hierarchy process to comprehensively consider the weights of multiple parameters, reflecting the relative importance of each parameter; LSTM risk warning models, as time series models, can analyze the changing trends of parameters over time, achieving dynamic prediction.

[0117] To fully leverage the strengths of each model, weights are assigned based on their accuracy in historical risk warnings. A higher historical accuracy indicates a more accurate and reliable performance in past risk warnings, thus warranting a greater weight. For example, if the rule-based model has an 80% accuracy rate in historical warnings, the AHP model 90%, and the LSTM model 85%, a common weighted voting method could assign a weight of 0.3 to the rule-based model, 0.4 to the AHP model, and 0.3 to the LSTM model. This allocation method allows the better-performing model to play a greater role in the final risk assessment.

[0118] Step 2: Based on the model weights, the first risk score, the second risk score, and the third risk score are weighted and summed to obtain the target value for gas cross-pressure risk warning.

[0119] The first risk score is the result of the threshold-based rule-based risk warning model, which reflects the current level of risk as determined by the set threshold. The second risk score is the result of the AHP risk warning model, which reflects the risk situation after comprehensive consideration of the weights of each parameter. The third risk score is the result of the LSTM risk warning model, which represents the risk probability predicted based on the time-series change trend of the parameters.

[0120] When performing weighted summation, it is necessary to consider not only the risk score output by each model, but also the confidence level of each model's output. For example, the threshold-based rule-based risk warning model outputs 0.2 (which can be understood as a risk score with a confidence level of 0.8), the AHP risk warning model outputs 0.6 (confidence level of 0.9), and the LSTM risk warning model outputs 0.7 (confidence level of 0.85). According to the weighted summation formula: Comprehensive score = (0.2 × 0.8 × 0.3 + 0.6 × 0.9 × 0.4 + 0.7 × 0.85 × 0.3) / (0.8 × 0.3 + 0.9 × 0.4 + 0.85 × 0.3) ≈ 0.58.

[0121] In one embodiment, the initial value for gas cross-pressure risk warning is processed using a stacking method based on a meta-learning model to obtain the target value for gas cross-pressure risk warning, including:

[0122] Step 1: Obtain the trained meta-learning model. The trained meta-learning model is obtained as follows: An initial lightweight neural network model and training sample data are obtained. The training sample data includes the first risk score, second risk score, third risk score, and the true risk value of the sample. The first, second, and third risk scores are input into the initial lightweight neural network model to obtain risk warning values. A loss function is constructed based on the true risk value and the risk warning value. The initial lightweight neural network model is iteratively trained based on the training sample data, and the model parameters are continuously adjusted through backpropagation until the loss function is minimized, thus obtaining the trained meta-learning model.

[0123] A lightweight neural network (such as a 2-layer fully connected network) is used as the meta-learning model. Its input is the output features of the primary model, and its output is the final risk value. The first, second, and third risk scores of samples from the meta-learning training set are input into the initial lightweight neural network model. The neural network uses its computational power to perform nonlinear transformations and combinations on these input features to obtain the risk warning value. A loss function is constructed based on the actual risk value corresponding to the sample and the risk warning value output by the model. For example, mean squared error is used as the loss function to measure the difference between the model's predicted value and the actual value. The initial lightweight neural network model is iteratively trained based on the meta-learning training set. In each iteration, the model parameters are continuously adjusted using the backpropagation algorithm to gradually minimize the loss function. When the loss function converges to a certain extent or reaches the preset number of iterations, training stops, and the trained meta-learning model is obtained. The technical feature of this model is its ability to learn how to combine the outputs of the primary model to minimize the prediction error, thereby improving the accuracy of gas cross-pressure risk warnings.

[0124] Step 2: Input the first risk score, the second risk score, and the third risk score into the trained meta-learning model to obtain the target value for gas cross-pressure risk warning.

[0125] In practical gas cross-pressure risk assessment, the first, second, and third risk scores obtained through the primary model are used as inputs to a trained meta-learning model. The meta-learning model, based on the complex relationship between the output features of the primary model learned during training and the final risk value, comprehensively processes and calculates these input risk scores, ultimately outputting a gas cross-pressure risk warning target value. This step fully utilizes the learning and fusion capabilities of the meta-learning model, optimizing and combining the risk scores obtained from different primary models to obtain risk warning results that better reflect the actual situation.

[0126] Furthermore, the trained meta-learning model can output specific risk levels. It can determine the corresponding risk level based on the obtained target risk warning value, ultimately directly outputting the specific risk level. Specifically, the trained meta-learning model can quantify and visualize risk levels, mapping the comprehensive risk probability calculated by the model (e.g., a value between 0 and 1) to intuitive risk levels such as "LOW," "MID," "HIGH," and "EMERGENCY." On the central control interface, the corresponding risk level can be clearly displayed using different colors (green, yellow, orange, red), along with the main risk contribution parameters.

[0127] In practical applications, the model can calculate the target risk warning value S (0~1); and map the risk level according to the S value: S<0.3→Level 1 (Safe); 0.3≤S<0.5→Level 2 (Caution); 0.5≤S<0.7→Level 3 (Warning); 0.7≤S<0.9→Level 4 (Severe); S≥0.9→Level 5 (Dangerous).

[0128] To illustrate the technical solution of the gas cross-pressure risk early warning method of this application in detail, the following will use the feed valve V-101 (which requires 8 turns to fully open) of a reactor in a chemical plant during the feeding process as a specific application example.

[0129] Data acquisition phase: Real-time data shows that the valve opening rapidly increased from 30% to 70% (manual adjustment by the operator), while the differential pressure increased from 0.15MPa to 0.45MPa and the flow rate increased from 10m³ / h to 25m³ / h.

[0130] The entire process of the gas cross-pressure risk early warning method includes the following steps:

[0131] 1) Data preprocessing: Calculate the differential pressure change rate (0.3MPa / 10s) and the flow rate change rate (1.5m³ / h / s).

[0132] 2) Primary Model:

[0133] Threshold-based rule-based risk warning model (hereinafter referred to as rule model): When the pressure difference exceeds the threshold of 0.45MPa by 0.45MPa, output risk signal 1 (high risk) with a confidence level of 0.9.

[0134] AHP risk warning model: pressure difference weight 0.5 (current value 0.45, normalized 0.9), flow rate weight 0.3 (normalized 0.8), opening weight 0.2 (normalized 0.7), score = 0.5 * 0.9 + 0.3 * 0.8 + 0.2 * 0.7 = 0.83.

[0135] LSTM Risk Warning Model: Input the above pressure difference, opening degree and flow rate data of the last 60 seconds into the LSTM risk warning model to identify the abnormal upward trend of pressure difference and flow rate. After running, the LSTM risk warning model finally outputs a risk probability of 0.88.

[0136] 3) Meta-learning model: Input [0.9, 0.83, 0.88] into the trained meta-learning model for risk fusion analysis, and output S=0.85.

[0137] 4) Risk level: S=0.85→Level 4 (Severe), and the rule model triggers high risk, which is confirmed as Level 4.

[0138] 5) System Action: A red alarm “Valve V-101 has a serious risk of cross-pressure” pops up on the operator interface, suggesting “immediately check the valve opening and upstream and downstream pressure”, and the event is automatically recorded.

[0139] In practical applications, through the above-described end-to-end process, operators intervened promptly, preventing cross-pressure accidents caused by excessive valve opening. Subsequent analysis confirmed that the alarm was accurate and provided a warning 15 seconds earlier than traditional single-threshold alarms.

[0140] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0141] Based on the same inventive concept, this application also provides a gas cross-pressure risk warning device for implementing the gas cross-pressure risk warning method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the gas cross-pressure risk warning device provided below can be found in the limitations of the gas cross-pressure risk warning method described above, and will not be repeated here.

[0142] In one embodiment, such as Figure 4 As shown, this application also provides a gas cross-pressure risk early warning device. The device includes:

[0143] The parameter acquisition module 200 is used to acquire the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters.

[0144] The initial warning module 400 is used to perform risk warnings on upstream and downstream pressure difference, valve opening and flow parameters using different primary risk warning models, and to obtain the initial values ​​of gas cross pressure risk warnings corresponding to different primary risk warning models.

[0145] The target warning module 600 is used to perform weighted voting or stacking based on meta-learning model processing on the initial value of gas cross-pressure risk warning to obtain the target value of gas cross-pressure risk warning; and to perform gas cross-pressure risk warning operation according to the target value of gas cross-pressure risk warning.

[0146] In one embodiment, the initial warning module 400 is further configured to use a threshold-based rule-based risk warning model to provide risk warnings for the upstream and downstream pressure difference, and obtain a first risk score; use an AHP risk warning model to provide risk warnings for the upstream and downstream pressure difference, valve opening, and flow parameters, and obtain a second risk score; use an LSTM risk warning model to provide risk warnings for the upstream and downstream pressure difference, valve opening, and flow parameters, and obtain a third risk score; and aggregate the first risk score, the second risk score, and the third risk score to obtain the initial values ​​for gas cross-pressure risk warnings corresponding to different primary risk warning models.

[0147] In one embodiment, the initial warning module 400 is further configured to acquire the normal differential pressure range of the valve; determine whether the upstream and downstream differential pressure is within the normal differential pressure range and obtain a judgment result; output a binary risk signal based on the judgment result; acquire the confidence level of the threshold-based rule-based risk warning model; and obtain a first risk score based on the confidence level and the binary risk signal.

[0148] In one embodiment, the initial warning module 400 is also used to obtain the scoring weights of the three dimensions of differential pressure, valve opening and flow rate based on the expert scoring method; normalize the upstream and downstream differential pressure, valve opening and flow rate parameters to obtain normalized parameters; and calculate the second risk score based on the scoring weights and the normalized parameters.

[0149] In one embodiment, the initial warning module 400 is further used to acquire time-series data of upstream and downstream pressure difference, valve opening degree and flow parameters; extract the latest time-series data within a preset period to obtain target time-series data; and input the target time-series data into the trained LSTM risk warning model to obtain a third risk score.

[0150] In one embodiment, the target warning module 600 is further used to obtain the model weights of the threshold-based rule-based risk warning model, the AHP risk warning model, and the LSTM risk warning model. The model weights are positively correlated with the historical accuracy of the model risk warnings. The first risk score, the second risk score, and the third risk score are weighted and summed according to the model weights to obtain the gas cross-pressure risk warning target value.

[0151] In one embodiment, the target warning module 600 is further configured to acquire a trained meta-learning model; input the first risk score, the second risk score, and the third risk score into the trained meta-learning model to obtain the gas cross-pressure risk warning target value; the trained meta-learning model is trained in the following manner: acquiring an initial lightweight neural network model and training sample data, the training sample data including the sample first risk score, the sample second risk score, the sample third risk score, and the sample true risk value; inputting the sample first risk score, the sample second risk score, and the sample third risk score into the initial lightweight neural network model to obtain the risk warning value; constructing a loss function based on the sample true risk value and the risk warning value; iteratively training the initial lightweight neural network model based on the training sample data, continuously adjusting the model parameters through backpropagation until the loss function is minimized, to obtain the trained meta-learning model.

[0152] Each module in the aforementioned gas cross-pressure risk early warning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0153] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores preset data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a gas cross-pressure risk early warning method.

[0154] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0155] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described gas cross-pressure risk warning method.

[0156] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described gas cross-pressure risk warning method.

[0157] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described gas cross-pressure risk warning method.

[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0159] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0160] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A gas string pressure risk early warning method, characterized in that, The method includes: Obtain the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters; Different primary risk warning models are used to conduct risk warnings for the upstream and downstream pressure difference, the valve opening, and the flow parameters, and the initial values ​​of gas cross-pressure risk warnings corresponding to different primary risk warning models are obtained. The initial value of the gas cross-pressure risk warning is processed by weighted voting or by a stacking method based on a meta-learning model to obtain the target value of the gas cross-pressure risk warning. Perform gas cross-pressure risk warning operations based on the aforementioned gas cross-pressure risk warning target value.

2. The method of claim 1, wherein, The method of using different primary risk warning models to perform risk warnings on the upstream and downstream pressure difference, the valve opening, and the flow parameters, and obtaining the initial values ​​for gas cross-pressure risk warnings corresponding to different primary risk warning models, includes: A threshold-based rule-based risk warning model is used to conduct risk warning on the upstream and downstream pressure difference, and a first risk score is obtained; The AHP risk warning model is used to provide risk warnings for the upstream and downstream pressure difference, the valve opening, and the flow parameters, and a second risk score is obtained. An LSTM risk warning model is used to provide risk warnings for the upstream and downstream pressure difference, the valve opening, and the flow parameters, and a third risk score is obtained. By aggregating the first risk score, the second risk score, and the third risk score, initial values ​​for gas cross-pressure risk warnings corresponding to different primary risk warning models are obtained.

3. The method of claim 2, wherein, The threshold-based rule-based risk warning model is used to conduct risk warnings on the upstream and downstream pressure difference, and the first risk score is obtained, including: Obtain the normal differential pressure range of the valve; Determine whether the upstream and downstream pressure difference is within the normal pressure difference range, and obtain the determination result; Based on the judgment result, a binary risk signal is output; Obtain the confidence level of the threshold-based rule-based risk warning model; A first risk score is obtained based on the confidence level and the binary risk signal.

4. The method of claim 2, wherein, The AHP risk warning model is used to perform risk warnings on the upstream and downstream pressure difference, the valve opening, and the flow parameters, and the second risk score is obtained, including: The three dimensions of differential pressure, opening degree, and flow rate are obtained based on the scoring weights of the expert scoring method; The upstream and downstream pressure difference, the valve opening, and the flow parameters are normalized to obtain normalized parameters. The second risk score is calculated based on the scoring weights and the normalized parameters.

5. The method according to claim 2, characterized in that, The LSTM risk warning model is used to perform risk warnings on the upstream and downstream pressure difference, the valve opening, and the flow parameters, resulting in a third risk score, which includes: Acquire time-series data of the upstream and downstream pressure difference, the valve opening, and the flow parameters; Extract the latest time series data within a preset period to obtain the target time series data; The target time series data is input into the trained LSTM risk warning model to obtain the third risk score.

6. The method according to claim 2, characterized in that, The initial value for gas cross-pressure risk warning is weighted and voted on to obtain the target value for gas cross-pressure risk warning, which includes: Obtain the model weights of the threshold-based rule-based risk warning model, the AHP risk warning model, and the LSTM risk warning model. The model weights are positively correlated with the historical accuracy of the model's risk warning. The first risk score, the second risk score, and the third risk score are weighted and summed according to the model weights to obtain the gas cross-pressure risk warning target value.

7. The method according to claim 2, characterized in that, The initial value for gas cross-pressure risk warning is processed using a stacking method based on a meta-learning model to obtain the target value for gas cross-pressure risk warning, including: Obtain the trained meta-learning model; The first risk score, the second risk score, and the third risk score are respectively input into the trained meta-learning model to obtain the gas cross-pressure risk warning target value; The trained meta-learning model is trained as follows: an initial lightweight neural network model and training sample data are obtained, the training sample data including a first risk score, a second risk score, a third risk score, and a true risk value; the first risk score, the second risk score, and the third risk score are input into the initial lightweight neural network model to obtain a risk warning value; a loss function is constructed based on the true risk value and the risk warning value; the initial lightweight neural network model is iteratively trained based on the training sample data, and the model parameters are continuously adjusted through backpropagation until the loss function is minimized, thus obtaining the trained meta-learning model.

8. A gas cross-pressure risk early warning device, characterized in that, The device includes: The parameter acquisition module is used to acquire the upstream and downstream pressure difference of the valve, the valve opening degree, and the flow parameters. The initial warning module is used to perform risk warnings on the upstream and downstream pressure difference, the valve opening and the flow parameters using different primary risk warning models, and to obtain the initial values ​​of gas cross-pressure risk warnings corresponding to different primary risk warning models. The target warning module is used to perform weighted voting or stacking based on a meta-learning model on the initial value of the gas cross-pressure risk warning to obtain the target value of the gas cross-pressure risk warning; and to perform gas cross-pressure risk warning operation according to the target value of the gas cross-pressure risk warning.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.