Natural gas purification foaming early warning model training method, device and equipment
Patent Information
- Application Number
- CN202211461213.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-09
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2041-09-09
AI Technical Summary
[0002]天然气净化厂发泡指的是在对天然气进行净化的流程中,吸收塔和再生塔里产生的发泡现象,塔内一旦出现发泡,会增加塔内阻力影响天然气的上下流动,造成净化气中的硫未能及时脱除,降低脱硫效率,甚至湿净化器含硫量超标;另外如果发泡严重,需要喷入阻泡剂,调整贫液流量,调整原料气处理流量,造成一系列参数波动,大大增加操作员的工作量
[0030] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description.
Smart Images

Figure CN115809727B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of industrial big data technology, and in particular to the fields of artificial intelligence and deep learning. Background Technology
[0002] Foaming in natural gas purification plants refers to the foaming phenomenon that occurs in the absorption tower and regeneration tower during the natural gas purification process. Once foaming occurs in the tower, it will increase the resistance inside the tower, affecting the upward and downward flow of natural gas, causing sulfur in the purified gas to not be removed in time, reducing desulfurization efficiency, and even causing the sulfur content in the wet purifier to exceed the standard. In addition, if the foaming is severe, it is necessary to spray antifoaming agent, adjust the lean liquid flow rate, and adjust the feed gas processing flow rate, causing a series of parameter fluctuations and greatly increasing the workload of the operator. Summary of the Invention
[0003] This disclosure provides a method, apparatus, equipment, and storage medium for improving early warning efficiency in natural gas purification plant processes involving foaming.
[0004] According to one aspect of this disclosure, a method for training a natural gas purification foaming early warning model is provided, comprising:
[0005] Obtain the first data affecting natural gas foaming;
[0006] The first data is sampled to obtain the second data;
[0007] Statistical variables are calculated based on the first and second data;
[0008] The statistical variables are used to train the model, resulting in a trained natural gas purification foaming early warning model.
[0009] According to another aspect of this disclosure, a method for early warning of foaming during natural gas purification is provided, comprising:
[0010] Obtain third-party data affecting natural gas foaming;
[0011] The third data is input into the natural gas purification foaming early warning model;
[0012] The natural gas purification foaming early warning model is obtained by training according to the early warning model training method in the above technical solution;
[0013] Based on the output of the natural gas purification foaming early warning model, determine whether to issue a natural gas foaming early warning message.
[0014] According to a third aspect of this disclosure, a training device for a natural gas purification foaming early warning model is provided, comprising:
[0015] First acquisition unit: used to acquire the first data affecting foaming;
[0016] Sampling unit: used to sample the first data to obtain the second data;
[0017] Statistical unit: used to calculate statistical variables based on the first and second data;
[0018] Training unit: The statistical variables are used to train the model to obtain the trained natural gas purification foaming early warning model.
[0019] According to a fourth aspect of this disclosure, a natural gas purification foaming early warning device is also provided, comprising:
[0020] Second acquisition unit: used to acquire third data affecting natural gas foaming;
[0021] Processing unit: used to input the third data into the natural gas purification foaming early warning model;
[0022] The natural gas purification foaming early warning model is obtained by training according to the early warning model training method in the above technical solution.
[0023] Early warning unit: Used to determine whether to issue a natural gas foaming early warning information based on the output of the natural gas purification foaming early warning model.
[0024] According to a fifth aspect of this disclosure, an electronic device is also provided, comprising:
[0025] At least one processor; and
[0026] A memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any of the above technical solutions.
[0028] According to a sixth aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause the computer to perform any one of the methods described above.
[0029] According to a seventh aspect of this disclosure, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the method according to any one of the above-described technical solutions.
[0030] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0031] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0032] Figure 1 This is a schematic diagram of the training method for the natural gas purification foaming early warning model according to this disclosure;
[0033] Figure 2 This is a schematic diagram of the natural gas purification foaming early warning method disclosed herein;
[0034] Figure 3 This is a schematic diagram of a natural gas purification foaming early warning model training device based on the present disclosure;
[0035] Figure 4 This is a schematic diagram of a natural gas purification foaming early warning device based on this disclosure;
[0036] Figure 5 This is a block diagram of an electronic device used to implement the natural gas purification foaming early warning method according to the embodiments of this disclosure;
[0037] Explanation of reference numerals in the attached figures:
[0038] 3. Natural Gas Purification Foaming Early Warning Model Training Device
[0039] 301 First acquisition unit; 302 Sampling unit;
[0040] 303 Statistical Unit; 304 Training Unit;
[0041] 4 Natural Gas Purification Foaming Early Warning Device
[0042] 401 Second Acquisition Unit 402 Processing Unit
[0043] 403 Early Warning Unit
[0044] 500 Electronic Devices 501 Computing Unit
[0045] 502 Read-Only Memory (ROM) 503 Random Access Memory (RAM)
[0046] 504 bus, 505 I / O interface
[0047] 506 Input Unit 507 Output Unit
[0048] 508 Memory Unit 509 Communication Unit Detailed Implementation
[0049] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0050] Natural gas from a natural gas wellhead is a multi-component mixture, primarily composed of carbon dioxide (C4), with C4 being the most abundant, and smaller amounts of C4, C5, and D2. It also generally contains hydrogen sulfide, organic sulfur, carbon dioxide, nitrogen, and water vapor, trace amounts of inert gases such as nitrogen and oxygen, as well as solid particulate impurities and heavy gases of C4 and above. Bubbles are formed by the collision and energy exchange between gas and liquid molecules in a solution, causing adjacent gas molecules to aggregate and overcome the surface tension of the liquid. Because the gas density is lower than the liquid, the gas quickly rises to the liquid surface and coalesces under the influence of the liquid film, forming foam. The technical solution disclosed in this paper aims to solve the problem of wasted human resources caused by requiring experienced technicians to constantly monitor the foaming process, and to provide early warning of inaccurate foaming conditions.
[0051] The natural gas purification process is as follows: First, natural gas enters from the bottom of the absorption tower, and desulfurizing agent is sprayed from the top of the absorption tower to complete the natural gas desulfurization. The membrane desulfurized liquid that has adsorbed hydrogen sulfide enters the purification system to remove impurities from the brittle liquid. The purified desulfurized liquid enters the regeneration tower for high-temperature desulfurization, and then enters the inlet and outlet tower for recycling.
[0052] like Figure 1 As shown, a training method for a natural gas purification foaming early warning model includes:
[0053] S101: Acquire the first data affecting foaming; under actual working conditions, various sensors and detectors can be installed to acquire various data affecting foaming.
[0054] S102: Sample the first data to obtain the second data; the sensors and detectors acquire a lot of data, but not all data points are used for analysis and processing. Data closely related to foaming needs to be collected. Among these, the most important data are the data at the time point when the antifoaming agent is added, and the data near the time point when the antifoaming agent is added. Additionally, data at the time points during the purification process when no antifoaming agent is added must be acquired for comparison. The data at the time points when the antifoaming agent is added are called positive samples, and the data at the time points when no antifoaming agent is added are called negative samples. These positive and negative samples constitute the second data.
[0055] S103: Statistical variables are calculated based on the first and second data; for the sample information obtained from the first and second data, features corresponding to positive and negative samples are constructed. That is, for each positive or negative sample, the first data from a certain period prior to that positive or negative sample is selected, and the statistical variables of the first data within that certain period are calculated. Typically, this certain period is relatively small, only within 5 to 10 minutes. Beyond this time range, the data is inaccurate and has no practical significance.
[0056] S104: Use the statistical variables to train the model and obtain the trained natural gas purification foaming early warning model.
[0057] The first data includes: the liquid level value of the absorption tower used for purifying natural gas, the absorption tower liquid level adjustment-set value, the absorption tower liquid level adjustment-output value, the H2S concentration value of the wet purified gas, the product gas outlet pressure adjustment value, the tray differential pressure value, the lean liquid inlet flow rate adjustment value before entering the absorption tower, and the flash vapor absorption tower outlet flow rate value. All of the above first data are collected in real time by sensors or detectors installed inside and outside the absorption tower.
[0058] The step of sampling the first data to obtain the second data includes: determining a second time point for sampling the second data based on a first time point when the antifoaming agent is added. The antifoaming agent is used to prevent further foaming in cases where foaming is possible or has already occurred.
[0059] The calculation of statistical variables based on the first and second data includes: selecting the first data at a time interval of a first time length from the second data, and calculating the statistical variables of the first data within the first time length. The statistical variables include: maximum value, minimum value, average value, median, variance, standard deviation, etc. The first time length is approximately 5 minutes. A first time length that is too long or too short is detrimental to data processing and result acquisition.
[0060] The second data includes: positive samples obtained from sampling the first data at a time point a second time interval after the addition of the antifoaming agent; and negative samples obtained from sampling the first data at the time point before foaming. This second time interval is approximately 5 minutes. A second time interval that is too long or too short is detrimental to data processing and result acquisition.
[0061] The process of training the model using the statistical variables includes: training the model using a neural network or machine learning model.
[0062] The neural network model includes a DNN model; the machine learning model includes XGB and LGB models. Training is performed using XGB, LGB, and DNN models. XGB stands for XGBoost, LGB for LightGBM, and DNN for Deep Neural Networks. One or more models can be used for training. XGB, LGB, and DNN are all existing technologies and will not be elaborated upon here. The operator adds antifoaming agent when foaming is considered to occur; this point in time is considered a positive sample. However, the operator may make an error. Analyzing the trend of the second data points when the operator adds antifoaming agent, if the trend is relatively stable, it can be considered an improper operation, and this point in time will not be considered a positive sample, and the data at this point will not participate in model training to avoid affecting the results. If the trend of the second data points shows significant fluctuations, it can be considered a proper operation, and the data at this point in time will be considered a positive sample and can participate in model training.
[0063] like Figure 2 As shown, according to a second aspect of this disclosure, a method for early warning of foaming during natural gas purification is also provided, comprising:
[0064] S201: Obtain third data affecting natural gas foaming;
[0065] S202: Input the third data into the natural gas purification foaming early warning model; the natural gas purification foaming early warning model is trained according to the early warning model training method in the above technical solution;
[0066] S203: Based on the output of the natural gas purification foaming early warning model, determine whether to issue a natural gas foaming early warning message.
[0067] like Figure 3 As shown, according to a third aspect of this disclosure, a training device for a natural gas purification foaming early warning model is also provided, comprising:
[0068] First acquisition unit 301: Used to acquire first data affecting foaming;
[0069] Sampling unit 302: used to sample the first data to obtain the second data;
[0070] Statistical unit 303: used to calculate statistical variables based on the first data and the second data;
[0071] Training Unit 304: Use the statistical variables to train the model and obtain the trained natural gas purification foaming early warning model.
[0072] The first data includes:
[0073] The following parameters are used for purifying natural gas: liquid level value of the absorption tower, liquid level adjustment-set value of the absorption tower, liquid level adjustment-output value of the absorption tower, H2S concentration value of the wet purified gas, product gas outlet pressure adjustment value, tray differential pressure value, lean liquid inlet flow rate adjustment value of the absorption tower, and flash vapor absorption tower outlet flow rate value.
[0074] The step of sampling the first data to obtain the second data includes: determining the second time point for sampling and obtaining the second data based on the first time point at which the antifoaming agent was added.
[0075] The step of calculating statistical variables based on the first data and the second data includes: selecting the first data that is a first time length away from the second data, and calculating the statistical variables of the first data within the first time length.
[0076] The second data includes: positive samples obtained by sampling the first data at a time point two time intervals after the addition of the antifoaming agent; and negative samples obtained by sampling the first data at the time point before foaming.
[0077] The process of training the model using the statistical variables includes training using a neural network model or a machine learning model.
[0078] The neural network model includes: DNN model; the machine learning model includes: XGB and LGB models.
[0079] like Figure 4 As shown, according to a fourth aspect of this disclosure, a natural gas purification foaming early warning device is also provided, comprising:
[0080] Second acquisition unit 401: used to acquire third data affecting natural gas foaming;
[0081] Processing unit 402: used to input the third data into the natural gas purification foaming early warning model; the natural gas purification foaming early warning model is trained according to the early warning model training method according to claims 1 to 5;
[0082] Early warning unit 403: Used to determine whether to issue a natural gas foaming early warning message based on the output of the natural gas purification foaming early warning model.
[0083] The third data includes: the liquid level value of the absorption tower used for purifying natural gas, the liquid level adjustment-set value of the absorption tower, the liquid level adjustment-output value of the absorption tower, the H2S concentration value of the wet purified gas, the product gas outlet pressure adjustment value, the tray differential pressure value, the flow rate adjustment value of the lean liquid before entering the absorption tower, and the flash vapor absorption tower outlet flow rate value.
[0084] According to a fifth aspect of this disclosure, an electronic device is also provided, comprising:
[0085] At least one processor; and
[0086] A memory communicatively connected to the at least one processor; wherein,
[0087] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any of the above technical solutions.
[0088] According to a sixth aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause the computer to perform the method according to any one of the above-described technical solutions.
[0089] According to a seventh aspect of this disclosure, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the method according to any one of the above-described technical solutions.
[0090] This invention proposes an early warning method for foaming in natural gas purification. By extracting key features in real time and using a model to efficiently and accurately predict foaming phenomena, it notifies operators in advance to make operational adjustments, reducing production fluctuations caused by foaming, alleviating the labor intensity of workers, and further saving energy and reducing the amount of antifoaming agent used through early foaming treatment. It can both detect foaming phenomena in advance, reduce operational steps, and achieve the goals of energy conservation and emission reduction. Products or projects applying this invention: various natural gas purification plants.
[0091] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0092] like Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0093] like Figure 5As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0094] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0095] The computing unit 501 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as a method for early warning of foaming in a natural gas purification plant process. For example, in some embodiments, a method for training a natural gas purification foaming early warning model can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the method for training a natural gas purification foaming early warning model described above can be performed. Alternatively, in other embodiments, computing unit 501 may be configured by any other suitable means (e.g., by means of firmware) to perform a natural gas purification foaming early warning model training method.
[0096] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0097] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0098] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0099] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0100] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0101] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0102] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0103] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A training method for a natural gas purification foaming early warning model, comprising: Obtain the first data affecting natural gas foaming; The process of sampling the first data to obtain the second data includes: determining the second time point for sampling the second data based on the first time point when the antifoaming agent is added, wherein the second data includes: negative samples obtained by sampling the first data at the non-foaming time point, and positive samples obtained by sampling the first data at a time point after the second time length of time when the antifoaming agent is added; The statistical variable is calculated based on the first data and the second data, including: selecting the first data a certain time before the second data, and calculating the statistical variable of the first data a certain time before the second data at that certain time, wherein the certain time range includes: 5~10 minutes; The statistical variables are used to train the model, and the trained natural gas purification foaming early warning model is obtained. The step of calculating statistical variables based on the first data and the second data includes: selecting the first data that is a first time length away from the second data, and calculating the statistical variables of the first data within the first time length, wherein the first time length includes 5 minutes, and the statistical variables include: maximum value, minimum value, average value, median, variance and / or standard deviation; The method further includes: Analyze the trend of the second data when the antifoaming agent is added. If the trend of the second data is determined to be stable, the positive sample is determined to be an invalid sample and will not participate in model training. If the trend of the second data is determined to be fluctuating, the positive sample is determined to be a valid sample and will participate in model training.
2. The method according to claim 1, wherein, The first data includes: The following parameters are used for purifying natural gas: liquid level value of the absorption tower, liquid level adjustment-set value of the absorption tower, liquid level adjustment-output value of the absorption tower, H2S concentration value of the wet purified gas, product gas outlet pressure adjustment value, tray differential pressure value, lean liquid inlet flow rate adjustment value of the absorption tower, and flash vapor absorption tower outlet flow rate value.
3. A method for early warning of foaming during natural gas purification, comprising: Obtain third-party data affecting natural gas foaming; The third data is input into the natural gas purification foaming early warning model; The natural gas purification foaming early warning model is obtained by training according to the early warning model training method of claims 1 to 2; Based on the output of the natural gas purification foaming early warning model, determine whether to issue a natural gas foaming early warning message.
4. The method according to claim 3, wherein, The third data includes: The following parameters are used for purifying natural gas: liquid level value of the absorption tower, liquid level adjustment-set value of the absorption tower, liquid level adjustment-output value of the absorption tower, H2S concentration value of the wet purified gas, product gas outlet pressure adjustment value, tray differential pressure value, lean liquid inlet flow rate adjustment value of the absorption tower, and flash vapor absorption tower outlet flow rate value.
5. A training device for a natural gas purification foaming early warning model, comprising: First acquisition unit: used to acquire the first data affecting foaming; Sampling unit: used to sample the first data to obtain the second data; The step of sampling the first data to obtain the second data includes: determining the second time point for sampling the second data based on the first time point of adding the antifoaming agent, wherein the second data includes: negative samples obtained by sampling the first data at the non-foaming time point, and positive samples obtained by sampling the first data at a time point after the second time length of time of adding the antifoaming agent; Statistical unit: used to calculate statistical variables based on the first data and the second data, wherein the calculation of statistical variables based on the first data and the second data includes: selecting the first data a certain time before the second data, and calculating the statistical variables of the first data a certain time before the second data at that certain time, wherein the certain time range includes: 5~10 minutes; Training unit: The statistical variables are used to train the model to obtain the trained natural gas purification foaming early warning model; The step of calculating statistical variables based on the first data and the second data includes: selecting the first data that is a first time length away from the second data, and calculating the statistical variables of the first data within the first time length, wherein the first time length includes 5 minutes, and the statistical variables include: maximum value, minimum value, average value, median, variance and / or standard deviation; The device further includes: Analysis unit: used to analyze the trend of the second data when the antifoaming agent is added; in response to determining that the trend of the second data is stable, the positive sample is determined to be an invalid sample and will not participate in model training; in response to determining that the trend of the second data fluctuates, the positive sample is determined to be a valid sample and will participate in model training.
6. The apparatus according to claim 5, wherein, The first data includes: The following parameters are used for purifying natural gas: liquid level value of the absorption tower, liquid level adjustment-set value of the absorption tower, liquid level adjustment-output value of the absorption tower, H2S concentration value of the wet purified gas, product gas outlet pressure adjustment value, tray differential pressure value, lean liquid inlet flow rate adjustment value of the absorption tower, and flash vapor absorption tower outlet flow rate value.
7. A natural gas purification foaming early warning device, comprising: Second acquisition unit: used to acquire third data affecting natural gas foaming; Processing unit: used to input the third data into the natural gas purification foaming early warning model; the natural gas purification foaming early warning model is trained according to the early warning model training method of claims 1 to 2; Early warning unit: Used to determine whether to issue a natural gas foaming early warning information based on the output of the natural gas purification foaming early warning model.
8. The apparatus according to claim 7, wherein, The third data includes: The following parameters are used for purifying natural gas: liquid level value of the absorption tower, liquid level adjustment-set value of the absorption tower, liquid level adjustment-output value of the absorption tower, H2S concentration value of the wet purified gas, product gas outlet pressure adjustment value, tray differential pressure value, lean liquid inlet flow rate adjustment value of the absorption tower, and flash vapor absorption tower outlet flow rate value.
9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-4.