A pre-warning model training method, pre-warning method and device of a desulfurization solution system

By constructing a monitoring vector matrix for the desulfurization solution system and applying a spatiotemporal self-attention mechanism and self-supervised learning, the shortcomings of existing early warning models in detecting abnormal foaming are addressed, achieving efficient and accurate early warning results.

CN120806198BActive Publication Date: 2026-01-23RICHFIT INFORMATION TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511296561.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-01-23
Estimated Expiration
2045-09-11

AI Technical Summary

Technical Problem

Existing early warning models for desulfurization solution systems have poor early warning performance in detecting abnormal foaming, mainly due to the scarcity of abnormal event samples, the difficulty in modeling the spatiotemporal dependencies among multiple variables, and the difficulty in quantifying the differences in abnormal characterization.

Method used

By acquiring monitoring vectors and constructing a monitoring vector matrix, combining a spatiotemporal self-attention mechanism and a correlation matrix, and fusing multi-source time-series signals, a panoramic operational status profile is constructed. A self-supervised learning model is then used to train the early warning model, enabling efficient, accurate, and real-time early warning of abnormal bubble formation.

Benefits of technology

It achieves efficient, accurate, and real-time early warning of abnormal foaming in desulfurization solution systems, avoiding false alarms caused by fluctuations in a single factor, and improving the accuracy and timeliness of the early warning model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120806198B_ABST
    Figure CN120806198B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of early warning model training method, early warning method and equipment of desulfurization solution system.The method comprises: obtaining monitoring vector and the monitoring vector matrix obtained according to monitoring vector;Monitoring vector is generated according to the monitoring data of monitoring object in normal working condition in desulfurization solution system, and monitoring vector includes the time sequence information of the time when monitoring data is acquired and the space information of different monitoring objects in process dependence relationship;Based on space-time self-attention mechanism and association matrix, the monitoring vector in monitoring vector matrix is processed, and fusion vector with space-time dependence relationship is obtained;According to fusion vector, initial model is self-supervised training, and early warning model is obtained.The method is used to improve the early warning effect of early warning model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a desulfurization solution system early warning model training method, an early warning method and equipment. BACKGROUND

[0002] With the continuous growth of global energy demand, the safety and environmental protection requirements of oil and gas well, pipeline, station and warehouse infrastructure in the production operation process are increasingly improved. As a key link in the natural gas purification and oil and gas processing process, the desulfurization solution system undertakes the important task of removing acid gases (such as H2S, CO2, etc.), and its stable and efficient operation is directly related to production safety, equipment life and environmental protection. 、

[0003] At present, in the operation process of the desulfurization solution system, the monitoring of abnormal foaming mainly adopts two methods of manual monitoring and automatic detection based on model. Among them, the manual monitoring method is that the operator observes the change trend of the liquid level, pressure difference, flow, amine liquid color and other key parameters in real time, combines with the historical operation experience, judges whether the system has foaming signs, and triggers an alarm or takes control measures after confirming the abnormality. In the aspect of automatic detection, some systems use supervised machine learning methods for state recognition, including support vector machine, decision tree and other classification models, which output the discrimination results of system normal or abnormal by inputting multi-dimensional process parameters.

[0004] However, due to the scarcity of abnormal event samples in the operation process of the desulfurization solution system, the dependent relationship between different variables cannot be accurately reflected when using supervised machine learning methods for state recognition, so that the early warning effect of the trained early warning model is not good. SUMMARY

[0005] The desulfurization solution system early warning model training method, early warning method and equipment provided by the embodiments of the present application are used to improve the early warning effect of the early warning model.

[0006] In a first aspect, the embodiments of the present application provide a desulfurization solution system early warning model training method, comprising:

[0007] obtaining a monitoring vector and a monitoring vector matrix obtained according to the monitoring vector; the monitoring vector is generated according to the monitoring data of the monitoring object in the desulfurization solution system under normal working conditions, and the monitoring vector includes time sequence information representing the time when the monitoring data is obtained and space information representing the process dependent relationship of different monitoring objects; wherein the monitoring objects corresponding to the monitoring vectors at different positions in the monitoring vector matrix are different and / or the time sequences of the monitoring data are different;

[0008] ​According to the sampling time of the monitoring object in the desulfurization solution system and the process position of the monitoring object in the desulfurization solution system, an association matrix representing the association relationship between the monitoring vectors is generated;

[0009] Based on the spatio-temporal self-attention mechanism and the association matrix, the monitoring vectors in the monitoring vector matrix are processed to obtain fusion vectors with spatio-temporal dependency relationships;

[0010] According to the fusion vectors, the initial model is self-supervised trained to obtain the early warning model.

[0011] In a second aspect, the embodiments of the present application also provide an early warning method, which comprises:

[0012] Obtaining running data of monitoring objects in the desulfurization solution system;

[0013] Inputting the running data into the early warning model to obtain a prediction result, the early warning model being the early warning model in the first aspect above;

[0014] Generating an abnormal alarm according to the prediction result and an observation result corresponding to the prediction result.

[0015] In a third aspect, the embodiments of the present application provide an early warning model training device of a desulfurization solution system, which comprises:

[0016] A first obtaining module is configured to obtain monitoring vectors and a monitoring vector matrix obtained according to the monitoring vectors; the monitoring vectors are generated according to monitoring data of monitoring objects in the desulfurization solution system under normal working conditions, and the monitoring vectors include time sequence information representing the time when the monitoring data is obtained and spatial information representing the spatial relationship of different monitoring objects in the process dependency relationship; wherein the monitoring objects corresponding to the monitoring vectors at different positions in the monitoring vector matrix are different and / or the time sequences of the monitoring data are different;

[0017] A generating module is configured to generate an association matrix representing the association relationship between the monitoring vectors according to the sampling time of the monitoring object in the desulfurization solution system and the process position of the monitoring object in the desulfurization solution system;

[0018] A first obtaining module is configured to obtain monitoring vectors and a monitoring vector matrix obtained according to the monitoring vectors; the monitoring vectors are generated according to monitoring data of monitoring objects in the desulfurization solution system under normal working conditions, and the monitoring vectors include time sequence information representing the time when the monitoring data is obtained and spatial information representing the spatial relationship of different monitoring objects in the process dependency relationship; wherein the monitoring objects corresponding to the monitoring vectors at different positions in the monitoring vector matrix are different and / or the time sequences of the monitoring data are different;

[0019] A training module is configured to perform self-supervised training on an initial model according to the fusion vectors to obtain the early warning model.

[0020] In a fourth aspect, the embodiments of the present application provide an early warning device, which comprises:

[0021] A second obtaining module is configured to obtain running data of monitoring objects in the desulfurization solution system;

[0022] The second obtaining module is configured to input the running data into the early warning model to obtain a prediction result.

[0023] The alarm module is configured to generate an abnormality alarm according to the prediction result and an observation result corresponding to the prediction result.

[0024] The memory stores computer execution instructions.

[0025] The processor executes the computer execution instructions stored in the memory, so that the processor executes various possible implementation manners of the first aspect and / or the second aspect.

[0026] The fourth aspect provides a computer readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, the computer execution instructions are used to implement various possible implementation manners of the first aspect and / or the second aspect.

[0027] The fifth aspect provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the computer program implements various possible implementation manners of the first aspect and / or the second aspect.

[0028] The early warning model training method, the early warning method and the device provided by the embodiments of the present application can obtain monitoring data of each monitoring object of the desulfurization solution system under normal working conditions, construct a monitoring vector containing time sequence information and process dependence relationship, and form a monitoring vector matrix. An association matrix is generated in combination with the time sequence and the process flow position of the monitoring object, to explicitly express the space-time association between variables. Then, the monitoring vector matrix is fused based on a space-time self-attention mechanism, to fully capture the dynamic dependence relationship of the monitoring object in time evolution and space association, to obtain a fusion vector containing a normal running mode of the system. The fusion vector is used for self-supervised training of an initial model, so that the early warning model learns complete space-time feature expression without abnormal labels, thereby improving the representation ability of the early warning model for the behavior of the desulfurization solution system, and effectively overcoming the problem of performance decline of the early warning model caused by the lack of abnormal samples and the insufficient modeling of variable dependence relationship. BRIEF DESCRIPTION OF DRAWINGS

[0029] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate one embodiment consistent with the present application and, together with the specification, serve to explain the principles of the application.

[0030] Figure 1 A structural schematic diagram of the desulfurization solution system provided by the present application is shown in the figure.

[0031] Figure 2aA flowchart of a pre-warning model training method of a desulfurization solution system provided in the present application is shown in the figure;

[0032] Figure 2b A schematic diagram of a monitoring vector matrix provided in an embodiment of the present application is shown in the figure;

[0033] Figure 2c A schematic diagram of multi-variable time series data alignment provided in an embodiment of the present application is shown in the figure;

[0034] Figure 2d A schematic diagram of a dependency relationship between monitoring variables provided in an embodiment of the present application is shown in the figure;

[0035] Figure 2e A schematic diagram of an initial model architecture provided in an embodiment of the present application is shown in the figure;

[0036] Figure 3a A flowchart of a pre-warning method provided in the present application is shown in the figure;

[0037] Figure 3b A schematic diagram of an abnormal foaming real-time pre-warning process provided in the present application is shown in the figure;

[0038] Figure 4a A schematic diagram of a single-factor abnormal pre-warning result provided in an embodiment of the present application is shown in the figure;

[0039] Figure 4b A schematic diagram of a multi-factor mixed abnormal pre-warning result provided in an embodiment of the present application is shown in the figure;

[0040] Figure 5 A structural schematic diagram of a pre-warning model training device of a desulfurization solution system provided in the present application is shown in the figure;

[0041] Figure 6 A structural schematic diagram of a pre-warning device provided in the present application is shown in the figure;

[0042] Figure 7 A structural schematic diagram of an electronic device provided in the present application is shown in the figure.

[0043] Through the above figures, the specific embodiments of the present application have been shown, and will be described in more detail hereinafter. These figures and textual descriptions are not intended to limit the scope of the concept of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0044] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description of the exemplary embodiments is intended to apply to any exemplary embodiment, unless specified otherwise. It is believed that the exemplary embodiments will be more fully understood from the description and drawings and it will be apparent that various changes can be made to the form, arrangement, and details of the exemplary embodiments without departing from the spirit and scope of the application as set forth in the claims.

[0045] First, the terms involved in the present application are explained:

[0046] The desulfurization solution system can refer to a key device in the oil and gas treatment process for removing acid gases (such as hydrogen sulfide and carbon dioxide ), usually using amine desulfurization process, by letting the raw gas containing acid gas and desulfurization solution (such as MEA, DEA or MDEA solution) in the absorption tower countercurrent contact, so that the acid gas is selectively absorbed by the solution, so as to realize gas purification; The solution enriched with acid gas is then heated and desorbed in the regeneration tower, releasing acid gas and restoring the desulfurization capacity, and the lean liquid is recycled after cooling.

[0047] With the increasing global energy demand, the requirements for safety and environmental protection of oil and gas well pipeline stations and warehouses in production operation are also increasing. As a key link in the oil and gas treatment process, the stable operation of the desulfurization solution system is of great significance to ensure production safety and environmental protection. However, the desulfurization solution system will face the problem of abnormal foaming in actual operation, which not only affects the desulfurization efficiency, but also may cause equipment damage, production interruption, and even safety accidents and environmental pollution. Abnormal foaming of desulfurization solution is the result of the combined action of many factors, including solution composition change, operation condition fluctuation, impurity accumulation, etc. The traditional desulfurization solution system mainly identifies and handles the abnormal foaming problem through manual monitoring and experience judgment, which has many shortcomings and is difficult to meet the needs of modern industry for high efficiency, precision and real-time warning.

[0048] Traditional abnormal foaming early warning is actually anomaly detection, which is a post-detection method and has a certain degree of lag, and cannot realize early / real-time warning. These methods include manual monitoring method and supervised machine learning / deep learning method. The manual monitoring method discovers abnormalities and alarms by long-time manual supervision and attention to instrument data trends. This mode has three major defects: first, the parameter response is lagging, usually more than 30% volume of foam accumulation is found, and there is a 3-5 hour delay from early foaming to discovery; second, the false negative and false positive rates are high, and the false positives and false negatives caused by the frequent observation of abnormal fluctuations lead to a decrease in alertness; and finally, the parameter correlation is poor, and single parameter anomalies are difficult to accurately determine system abnormalities. The machine learning methods include support vector machine (SVM), decision tree (DT), etc., and the deep learning methods include LSTM, CNN-LSTM, etc., which are all based on supervised learning. Such methods belong to post-detection methods and cannot achieve early warning. At the same time, such methods have three major challenges, which lead to their performance not meeting production requirements: (1) the lack of abnormal event samples leads to insufficient generalization ability of supervised learning; (2) dynamic modeling of time-space dependency relationships among multiple variables is difficult; and (3) the difference in abnormal representation on different monitoring parameters is difficult to unify and quantify.

[0049] The early warning model training method and early warning method of the desulfurization solution system provided by the embodiments of the present application can realize alignment of multi-source time series signals and dynamic modeling of time-space dependency relationships through fusion of absorption tower time series signals, regenerator time series signals and other multi-source signals and a space-time attention (Space-Time Attention) alignment mechanism, construct a panoramic running state image of the desulfurization solution system, and comprehensively reflect the running state of the desulfurization solution system; train a time series prediction large model through self-supervised learning, learn and simulate the full-cycle evolution of the desulfurization solution system from "normal → foaming → blocking agent intervention → recovery"; and realize efficient, accurate and real-time early warning of abnormal foaming through construction of a multi-factor mixed decision system based on a sliding window, and avoid false positives caused by single factor fluctuations.

[0050] Figure 1 The structure diagram of the desulfurization solution system provided by the present application is as follows Figure 1As shown, the desulfurization solution system includes a raw gas separator, a flash tank, an absorption tower, a regeneration tower and related auxiliary equipment. Natural gas first enters the raw gas separator to remove liquid droplets and impurities, and then enters the flash tank for further separation of light component gas (flash gas). The purified natural gas is countercurrently contacted with the desulfurization solution in the absorption tower, and the acid gas is absorbed by the solution, and the generated purified gas is discharged from the system after passing through the purified gas separator. The solution enriched with acid gas flows out from the bottom of the absorption tower, is cooled by the cooler, is preheated by the heat exchanger, and is pressurized by the booster pump and sent into the regeneration tower. In the regeneration tower, the solution is heated by the reboiler to desorb the acid gas, the acid gas is condensed by the condenser and collected in the reflux tank, and is recycled by the reflux pump. The regenerated lean solution returns to the absorption tower to continue the desulfurization process, forming a closed loop operation.

[0051] The early warning model training method and the early warning method of the desulfurization solution system provided by the embodiments of the present application can be executed by a server, which can be a mobile phone, a computer, a tablet computer or the like. The embodiments of the present application do not limit the execution subject, as long as it can execute the steps of obtaining the monitoring vector and the monitoring vector matrix obtained from the monitoring vector; the monitoring vector is generated according to the monitoring data of the monitoring object in the desulfurization solution system under normal working conditions, and the monitoring vector includes time sequence information representing the time when the monitoring data is obtained and spatial information representing different monitoring objects in the process dependence relationship; wherein the monitoring objects corresponding to the monitoring vectors at different positions in the monitoring vector matrix are different and / or the time sequences of the monitoring data are different; generating a correlation matrix representing the correlation between the monitoring vectors according to the sampling time of the monitoring object in the desulfurization solution system and the process position of the monitoring object in the desulfurization solution system; processing the monitoring vectors in the monitoring vector matrix based on the spatio-temporal self-attention mechanism and the correlation matrix to obtain the fusion vectors with spatio-temporal dependence relationship; and the method of performing self-supervised training on the initial model according to the fusion vectors to obtain the early warning model, and / or executing the method of obtaining the running data of the monitoring object in the desulfurization solution system; inputting the running data into the early warning model to obtain the prediction result; and the method of generating an abnormal alarm according to the prediction result and the observation result corresponding to the prediction result.

[0052] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail in the specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0053] Figure 2a The flowchart of the early warning model training method of the desulfurization solution system provided by the present application is shown as Figure 2a The method comprises:

[0054] S201, acquire a monitoring vector and a monitoring vector matrix obtained according to the monitoring vector; the monitoring vector is generated according to monitoring data of a monitoring object in the desulfurization solution system under a normal working condition, the monitoring vector includes time sequence information representing the time when the monitoring data is acquired and spatial information representing different monitoring objects in a process dependence relationship; and the monitoring objects corresponding to the monitoring vectors at different positions in the monitoring vector matrix are different and / or the time sequences of the monitoring data are different.

[0055] The monitoring object can refer to a data item monitored by different devices in the desulfurization solution system, and the data item can be an item affecting abnormal foaming of the desulfurization solution in the desulfurization solution system. In some embodiments, the desulfurization solution system includes an absorption tower, a flash tank, a regeneration tower and the like, and the monitoring object can be an item affecting abnormal foaming of the desulfurization solution in different devices, for example, the monitoring object can include but is not limited to absorption tower overhead temperature, absorption tower liquid level, absorption tower pressure, absorption tower lean liquid inlet temperature, absorption tower rich liquid outlet temperature, absorption tower pressure difference, regeneration tower overhead temperature, regeneration tower pressure, regeneration tower pressure difference, regeneration tower liquid level, regeneration tower bottom lean liquid temperature, steam flow and the like.

[0056] In the embodiments of the present application, the monitoring object can be arbitrarily set as required.

[0057] The monitoring data of the monitoring object under the normal working condition can refer to the monitoring data corresponding to each monitoring object in the desulfurization solution system in the normal production process. The monitoring data of the monitoring object under the normal working condition can be a group of time sequence data, that is, the data monitored in a period of time.

[0058] In the embodiments of the present application, the monitoring data can be acquired in real time by a sensor network deployed in the desulfurization solution system. For example, for key monitoring objects such as absorption tower liquid level, regeneration tower pressure, amine liquid circulation flow, lean amine liquid temperature and acid gas outlet concentration, temperature, pressure, flow, conductivity, liquid level and the like type sensors can be installed at the corresponding process positions, and the data can be continuously acquired at a preset sampling frequency (such as once per minute).

[0059] In the embodiments of the present application, one monitoring object can have multiple monitoring data, that is, the same monitoring object has multiple data with different sampling times. For example, when the monitoring object is the absorption tower overhead temperature, the corresponding monitoring data can have multiple, and each monitoring data can correspond to data in different time periods.

[0060] A monitoring vector refers to data that has been vectorized to facilitate the processing of monitoring data. Vectorization involves standardizing, extracting features, and stitching together time-series data from different monitoring objects, combining their collection timestamps and their physical location or process dependencies in the desulfurization process, to form a high-dimensional vector.

[0061] The time-series information included in the monitoring vector can refer to the time point or time series characteristics corresponding to the collected monitoring data, used to characterize the dynamic behavior of system variables evolving over time. This information can be the original timestamp, or it can be a numerical vector that can be processed by the model through time encoding methods (such as location encoding, periodic encoding) to express characteristics such as the chronological order, periodicity, or time interval.

[0062] The spatial information included in the monitoring vector can refer to the logical or physical relationships between different monitored objects in the desulfurization solution system process flow, i.e., topological information based on process dependencies. For example, there is a material transfer relationship between the lean amine inlet of the absorber and the rich amine outlet of the regeneration tower, and the corresponding monitoring variables have upstream and downstream dependencies in the system. This spatial information can be obtained through process topology analysis or expert knowledge modeling based on the physical connections, material flow direction, and process dependencies of each monitored object in the desulfurization solution system process flow, and is incorporated into the monitoring vector in the form of embedded vectors, location codes, or association weights.

[0063] A monitoring vector matrix can refer to a matrix composed of monitoring vectors. In the embodiments of this application, the rows in the monitoring vector matrix can represent the monitoring vectors monitored at different sampling times under the same monitoring object, and the columns in the monitoring vector matrix can represent the monitoring vectors monitored at the same sampling time under different monitoring objects.

[0064] for example, Figure 2b This is a schematic diagram of the monitoring vector matrix provided in the embodiments of this application, as shown below. Figure 2b As shown, the monitoring objects can be the absorber level, regeneration tower level, and steam flow rate. The monitoring vectors corresponding to the absorber level monitoring data at different sampling times are Token_0, Token_1, and Token_2; the monitoring vectors corresponding to the regeneration tower level monitoring data at different sampling times are Token_3, Token_4, and Token_5; and the monitoring vectors corresponding to the steam flow rate monitoring data at different sampling times are Token_6, Token_7, and Token_8. Therefore, the monitoring vector matrix can be obtained as follows: Figure 2b The 2DToken matrix is ​​shown in the figure.

[0065] In this embodiment of the application, obtaining the monitoring vector and the monitoring vector matrix obtained based on the monitoring vector includes:

[0066] Acquire initial monitoring data of the monitored objects in the desulfurization solution system under normal operating conditions;

[0067] The initial monitoring data is divided according to the preset time division rules to obtain the monitoring data;

[0068] The monitoring data is vectorized to obtain the initial monitoring vector;

[0069] The monitoring vector is obtained by adding temporal information representing the acquisition of monitoring data and spatial information representing the process dependency relationship of different monitoring objects to the initial monitoring vector.

[0070] A monitoring vector matrix is ​​generated based on the spatial and temporal information in the monitoring vectors.

[0071] The initial monitoring data can be time-series data of the monitored objects in the desulfurization solution system under normal operating conditions. After acquiring this time-series data, it can be cleaned, and data with obvious errors can be removed. The time-series data is then standardized to eliminate the influence of different dimensions and amplitudes of heterogeneous time-series data, transforming the time-series data into a standard normal distribution.

[0072] The preset time division rules divide the initial monitoring data into patches of equal length, which can be divided into time series data according to the chronological order. The patches can be partially overlapping or non-overlapping, which can be determined by the step size.

[0073] After determining the monitoring data, the patch data can be mapped to a fixed-dimensional vector through a residual network or a multilayer perceptron (MLP) to achieve unified alignment of the feature space, with an output dimension of out_dim.

[0074] In this embodiment, the residual network may include an input layer, one or more hidden layers, a residual connection layer, and an output layer. Wherein:

[0075] Input layer: Input a patch of length P, output a feature vector of dimension hidden_dim;

[0076] Hidden layer: The input is a feature vector of dimension hidden_dim, and the output is a feature vector Vector_1 of dimension out_dim;

[0077] Residual connection layer: takes a patch of length P as input and outputs a feature vector Vector_2 of dimension out_dim;

[0078] Output layer: add the output of the hidden layer and the input of the residual connection layer, and perform normalization operation, output a vector with out_dim dimension (i.e. the initial monitoring vector). This vector can be used as the basic unit for time series model processing, called Token.

[0079] After determining the initial monitoring vector, time encoding (corresponding to time ID information) and space encoding (corresponding to space ID information) can be added to the initial monitoring vector respectively to generate Tokens (monitoring vectors) with position information that can be directly processed by the Transformer. Among them, the time ID can represent the time index of different patches under the same variable, used to describe the time sequence and dynamic correlation between patches; the space ID can represent the index of different variables, used to reflect the process dependency and spatial interaction between variables.

[0080] In some embodiments, adding time encoding and space encoding to the vector is equivalent to adding a component representing position information to each dimension of the vector. The position encoding can be absolute position encoding or relative position encoding. For example, when the position encoding is absolute position encoding:

[0081]

[0082] In the above formula, pos is the index corresponding to the time ID or space ID (such as 0, 1, 2, etc.) used to identify different time steps or different spatial positions; out_dim is the dimension of the vector, and 2i and 2i+1 are the indices of each component in the vector. Thus, by alternately using sine (sin) and cosine (cos) functions in adjacent dimensions to generate position encoding, the model can effectively distinguish Tokens at different positions and capture the relative relationship in time or space. Thus, not only the position order information is preserved, but also the ability of the Transformer to process sequence structure is provided.

[0083] Figure 2c The schematic diagram of the multivariate time series data alignment provided by the embodiments of the present application is as follows: Figure 2c As shown in the figure, after combining the encoded Tokens into a serialized feature vector, the vector can be input into the Space-Time Attention of the Transformer to realize joint modeling in the time and space dimensions through the self-attention mechanism, and complete the dynamic alignment and fusion of the time-space dependency relationship between the multivariate.

[0084] S202, generating a correlation matrix representing the correlation relationship between the monitoring vectors according to the sampling time of the monitoring object in the desulfurization solution system and the process position of the monitoring object in the desulfurization solution system.

[0085] The physical or logical link position of the device or measuring point where the monitoring object is located in the overall process reflects its functional role in material transmission, energy exchange or process sequence. For example, the temperature sensor located at the top of the absorption tower belongs to the process link of acid gas absorption, and the pressure sensor at the bottom of the regeneration tower belongs to the process link of amine liquid regeneration. The process position not only reflects the relative order of each monitoring object in the system topology, but also determines the upstream and downstream dependency relationship between variables.

[0086] The correlation relationship can represent the dynamic mutual influence relationship between different monitoring objects due to the connection of the process in the desulfurization solution system, material or energy transmission, control logic coupling and other factors. Among them, the correlation relationship can include: in the time dimension, the response influence of the change of a monitoring variable on other variables at subsequent time (time sequence dependence); in the spatial dimension, the connection strength and action direction between variables determined based on the device topology structure (such as the amine liquid circulation path between the absorption tower and the regeneration tower) or the upstream and downstream relationship of the process.

[0087] In the embodiments of the present application, the process topology structure can be converted into a priori spatial connection relationship according to the process position of the monitoring object in the desulfurization solution system, the time correlation of the monitoring data is combined to construct the time sequence dependence, and the spatio-temporal interaction between multiple variables is weighted and fused by using graph modeling or attention mechanism, so as to obtain the correlation relationship of the mutual influence of different monitoring objects.

[0088] Among them, in the embodiments of the present application, according to the sampling time of the monitoring object in the desulfurization solution system and the process position of the monitoring object in the desulfurization solution system, a correlation matrix representing the correlation relationship between the monitoring vectors is generated, including:

[0089] According to the sampling time of the monitoring object in the desulfurization solution system, a first matrix representing the time sequence relationship between the sampling times is generated;

[0090] According to the process position of the monitoring object in the desulfurization solution system, a second matrix representing the process dependence relationship is generated;

[0091] According to the first matrix and the second matrix, a correlation matrix representing the correlation relationship between the monitoring vectors is generated.

[0092] The first matrix can refer to a temporal relationship matrix constructed according to the sampling time order of each monitored object, which can be used to characterize the sequential dependency relationship between different time points. In the embodiments of this application, this matrix can be designed as a causal mask matrix (such as a unit lower triangular matrix) to ensure that only the current moment is allowed to focus on the input of the past or the current moment during the modeling process, and to prohibit "peeking" at future information, thereby ensuring the causality and real-world interpretability of the model in terms of temporal relationships. For example, after dividing the time series data into multiple patches, the first matrix is ​​used to constrain the calculation of the previous patch in the same variable sequence, reflecting the unidirectional dependency in the time dimension.

[0093] The second matrix can refer to a process dependency matrix constructed based on the location of the monitored object in the desulfurization solution system, i.e., a spatial adjacency matrix between variables. This matrix can reflect whether there is a physical or functional relationship between different monitored variables. For example, there is a coupling relationship between the absorber level and the regeneration tower pressure difference due to amine circulation. If two variables in the matrix are process-connected or influence each other, the corresponding position is set to 1; otherwise, it is 0. In some embodiments, it can also be an all-1 matrix, indicating that all variables may interact.

[0094] for example, Figure 2d This is a schematic diagram illustrating the dependencies between monitoring variables provided in the embodiments of this application, such as... Figure 2d As shown, the absorber level corresponds to Token_0, Token_1, and Token_2; the regeneration tower pressure difference corresponds to Token_3, Token_4, and Token_5; and the steam flow rate corresponds to Token_6, Token_7, and Token_8. The associations of each Token include the association between itself and the Token preceding it at the same time point in the same sequence, such as Token_7 being associated with Token_6; they also include the associations between variables, such as Token_0, Token_1, Token_3, and Token_4 being associated with Token_7.

[0095] In some embodiments, the time sequence relationship determined based on the sampling time of the monitored object in the desulfurization solution system can be... ,in, satisfy:

[0096]

[0097] This means patch and patches Is there a connection?

[0098] The dependency relationship determined based on the monitoring object's position in the desulfurization solution system can be... ,in, satisfies:

[0099]

[0100] Thus, after determining the first matrix and the second matrix, the first matrix and the second matrix can be combined by a matrix fusion method such as a Kronecker product or a Hadamard product to generate the association matrix.

[0101] The Kronecker product is suitable for expanding the outer product of the time structure and the space structure, and is particularly suitable for modeling scenarios of multivariate Token sequences, and can systematically construct the joint mask of the connection relationship between variables and the attention range on time; the Hadamard product is suitable for the case where the two dimensions are consistent, and the common association path is reserved by directly multiplying the bits.

[0102] In addition, a weighted fusion or a dynamic fusion based on an attention mechanism can also be used, that is, the two matrices are first mapped into attention weights, and then combined and calculated.

[0103] In the embodiment of the present application, when the Kronecker product is used to obtain the association matrix, the association matrix representing the association relationship between the monitoring vectors is generated according to the first matrix and the second matrix, comprising:

[0104] The Kronecker product of the first matrix and the second matrix is calculated to obtain the association matrix representing the association relationship between the monitoring vectors.

[0105] If the first matrix satisfies:

[0106]

[0107] The second matrix satisfies:

[0108]

[0109] The Kronecker product of the first matrix and the second matrix is calculated to obtain the association matrix, which can be:

[0110]

[0111] The generated association matrix M has the typical Kronecker product outer product characteristic: it systematically fuses the spatial connection relationship between variables and the time-dependent pattern. That is, whether there is a process association between each element in the second matrix and , the relationship will be completely "copied" and "expanded" in the time dimension by the first matrix T. That is, when , , Between each corresponding time sequence segment, complete spatio-temporal connection will be established according to the causal structure defined by T (such as only allowing attention to the current and past time); At the same time, regardless of how T is defined, no connection is established between all corresponding time steps, and the corresponding sub-block is zero in M.

[0112] That is, the association matrix M can satisfy:

[0113]

[0114] Wherein, Tk_0~Tk_8 respectively one-to-one correspond to the monitoring vectors of the monitoring data of the liquid level of the absorption tower, the liquid level of the regeneration tower and the steam flow at different sampling times, that is, Token_0~Token_8.

[0115] S203, based on the spatio-temporal self-attention mechanism and the association matrix, the monitoring vectors in the monitoring vector matrix are processed to obtain fusion vectors with spatio-temporal dependence.

[0116] Wherein, the spatio-temporal self-attention mechanism can refer to an attention calculation method combining time and space dimension information, which is used to model the dynamic dependence relationship between different monitoring vectors in multivariate time series data. Based on the standard self-attention, the mechanism introduces the prior knowledge of time sequence and variable position, so that the model can not only capture the evolution law of the same variable at different times, but also identify the mutual influence of different variables at the same or adjacent time.

[0117] The fusion vector with spatio-temporal dependence can refer to a high-dimensional feature vector obtained after processing by the spatio-temporal self-attention mechanism, which not only retains the observation information of the original monitoring vector, but also fuses the time sequence evolution characteristics from the historical time of the same monitoring object and the cross-space influence of other related monitoring vectors. The output fusion vector aggregates the information of other monitoring vectors associated with it through the attention mechanism, realizing the joint expression of time dynamics and spatial correlation at the feature level, so as to more comprehensively represent the state context of the system at a certain time and a certain position.

[0118] Wherein, in the embodiment of the application, based on the spatio-temporal self-attention mechanism and the association matrix, the monitoring vectors in the monitoring vector matrix are processed to obtain fusion vectors with spatio-temporal dependence, including:

[0119] According to the monitoring vector matrix, obtain the query matrix, the key matrix and the value matrix;

[0120] According to the query matrix, the key matrix and the association matrix, obtain the attention weight matrix; wherein, the elements in the association matrix without association relationship are elements after mask processing;

[0121] The attention weight matrix is normalized to obtain a normalized attention score;

[0122] According to the normalized attention score and the value matrix, a fusion vector with a space-time dependency relationship is obtained.

[0123] Among them, the query matrix, the key matrix and the value matrix can respectively refer to "Query", "Key" and "Value" used to calculate attention. Among them, the query matrix represents "what the current each monitoring vector wants to pay attention to", the key matrix represents "how other vectors can be matched", and the value matrix can contain actual feature information to be aggregated.

[0124] The attention weight matrix can refer to the original attention score matrix obtained by calculating the similarity between the query matrix and the key matrix, which is used to measure the potential association strength between any two monitoring vectors.

[0125] In the embodiment of the present application, the association matrix can be an association matrix using a mask mechanism, that is, the elements in the association matrix that do not have an association relationship are masked. For example, element 1 representing an association relationship is set to 0; element 0 representing no association relationship is set to negative infinity. That is, the association matrix using the mask mechanism is satisfies:

[0126]

[0127] Therefore, when calculating the attention weight, these positions are masked, that is, the corresponding positions in the original attention score are set to negative infinity, so that the attention weight after softmax normalization tends to 0, thereby effectively shielding illegal dependency relationships.

[0128] Among them, in the embodiment of the present application, the fusion vector satisfies:

[0129]

[0130] Among them, represents the query matrix, represents the key matrix, represents the value matrix, represents the attention score matrix, represents the scaling factor, represents the association matrix.

[0131] Among them, the query matrix satisfies:

[0132]

[0133] The key matrix satisfies:

[0134]

[0135] The value matrix satisfies:

[0136]

[0137] wherein, monitoring vectors in the monitoring vector matrix; is a learnable parameter. The dynamics are reflected in is dynamically transformed according to the input sequence.

[0138] S204, according to the fusion vector, self-supervised training is performed on the initial model to obtain a pre-warning model.

[0139] wherein, the multivariate spatiotemporal dependence relationship contained in the fusion vector is used to construct a self-supervised learning task (such as mask reconstruction or future sequence prediction) without an abnormal label, so that the initial model learns the dynamic operation mode of the system on a large amount of normal working condition data; by minimizing the reconstruction error between the prediction result and the actual observation, the pre-warning model is continuously optimized to accurately capture the spatiotemporal characteristics of normal behavior.

[0140] After the training is completed, the pre-warning model can be used as a pre-warning model to detect the deviation degree of the input data online, and when the prediction error significantly deviates from the normal range, it is determined as an abnormal precursor and triggers early warning.

[0141] In the embodiments of the present application, the initial model can adopt a Transformer Decoder-Only architecture, that is, the initial model can be a time series prediction model based on the Transformer architecture. Among them, Figure 2e the architecture diagram of the initial model provided by the embodiments of the present application is as shown in Figure 2e the fusion vector is input into the Transformer for spatiotemporal attention alignment, and the Transformer architecture adopts a Decoder-Only architecture, which includes 1 to multiple Decoder Layers, a linear mapping layer (Linear) and a Softmax layer.

[0142] Among them, the Decoder Layer can include a spatiotemporal attention layer, a normalization layer, a feedforward neural network layer and a normalization layer.

[0143] Among them, in the embodiments of the present application, according to the fusion vector, self-supervised training is performed on the initial model to obtain a pre-warning model, including:

[0144] the fusion vector is input into the initial model to obtain a prediction value;

[0145] The initial model is adjusted and optimized according to the deviation between the predicted value and the actual observation value, and the early warning model is obtained.

[0146] The initial model can be pre-trained by using self-supervised learning, and the loss function (deviation) can be defined as the mean absolute error (MAE) or the mean square error (MSE) of the predicted value and the measured value, so that manual labeling is not required, and the predicted value and the measured value under normal working conditions are highly consistent.

[0147] The mean absolute error can refer to a regression evaluation index for measuring the deviation between the predicted value and the actual measured value, and the calculation method can be the average of the absolute values of the sample prediction errors.

[0148] The mean square error can refer to a widely used prediction error measurement method, which is defined as the average of the squares of the differences between the predicted value and the actual measured value.

[0149] The early warning model training method of the desulfurization solution system provided by the embodiments of the present application can eliminate the differences in dimensions and amplitudes of different sensor data by standardizing the multi-source time series data collected in the desulfurization solution system, and improve the data consistency; the preprocessed time series sequence is divided into time segments (patches) of equal length as a basic processing unit, which effectively suppresses the influence of occasional noise and short-time interference on model judgment; a specially designed residual network is used to extract local features and perform nonlinear mapping on each patch, realizing the conversion of time series data to a high-dimensional feature space; further, time encoding and spatial encoding are introduced to fuse the time dynamics and process correlations between variables, and a vector sequence containing space-time semantics is constructed; the sequence is input into a model based on the Transformer Decoder-Only architecture, and the cross-time and cross-variable dependency relationship modeling and feature alignment are realized through the space-time self-attention mechanism; in a self-supervised learning manner, the next time point of each key parameter (such as temperature, liquid level, pressure, pressure difference, etc.) is predicted as the target, and the mean absolute error (MAE) or the mean square error (MSE) is used as the loss function for model training, so that the system normal operation mode can be learned without abnormal labels.

[0150] Figure 3a The flowchart of the early warning method provided by the present application is shown in FIG. Figure 3a The method comprises the following steps:

[0151] S301, obtaining the running data of the monitored object in the desulfurization solution system;

[0152] S302, inputting the running data into the early warning model to obtain a prediction result, wherein the early warning model is the early warning model of the embodiments of the present application;

[0153] S303, generating an abnormality alarm according to the prediction result and the observation result corresponding to the prediction result.

[0154] The running data of each monitoring object in the desulfurization solution system is obtained, and the running data is standardized. For example, the running data can include the temperature, pressure, liquid level, and pressure difference of the absorption tower and the regeneration tower, and other key process parameters. The running data is input into the early warning model constructed in the embodiments of the present application. The model is based on a spatiotemporal self-attention mechanism and a self-supervised learning framework, can capture dynamic dependency relationships among multiple variables and predict expected values of each parameter at the next moment; the prediction result output by the model is compared with the actual observation result at the corresponding moment, and the deviation degree is calculated; and an abnormality alarm is generated according to the deviation degree.

[0155] The abnormality alarm can include alarm type, alarm level, abnormality occurrence time, involved monitoring object and specific parameter, deviation degree (such as error amplitude of the predicted value and the measured value), possible associated abnormality cause prompt (such as suspected foaming, solution contamination, or operation fluctuation), and alarm confidence, and the like.

[0156] The alarm information can be real-time notified to the operator through a visual interface, an audible and light prompt, or a message push, supports rapid positioning of the problem source and taking intervention measures, and can also be automatically recorded to a system log for subsequent fault analysis, model optimization, and operation and maintenance decision-making.

[0157] In the embodiments of the present application, the abnormality alarm is generated according to the prediction result and the observation result corresponding to the prediction result, including:

[0158] An error result is obtained according to the prediction result and the observation result corresponding to the prediction result.

[0159] A target error in the error result that meets a current time requirement, and a mean value of the target error are determined according to a preset sliding window mechanism.

[0160] An abnormality alarm is generated according to the mean value of the target error and a sliding window mean value, wherein the sliding window mean value is determined according to a time window corresponding to the current time requirement.

[0161] The sliding window records the prediction error under normal working conditions in the current period (a period of time before the current time, the length of time is determined by the length of the sliding window), and the prediction error in the alarm period is not recorded into the sliding window (excluding the alarm period and the following filling period), which changes dynamically with time and working conditions. When the system is running, the time window to which the current time belongs is determined, and the mean value of the prediction error corresponding to the window is calculated, which is compared with the target error mean value calculated at the current time. If the deviation significantly exceeds the mean value of the sliding window, an abnormality alarm is triggered.

[0162] Figure 3b An abnormal foaming real-time early warning process provided by the present application is shown in the figure. As shown in the figure, the process includes: Figure 3b

[0163] Obtaining operation data of each monitoring object in the desulfurization solution system.

[0164] Inputting the operation data of each monitoring object in the desulfurization solution system into a warning model to obtain a prediction result.

[0165] According to the prediction result and the observation result corresponding to the prediction result, the deviation between the two is calculated to obtain the error result of each monitoring parameter (such as using MAE or MSE as the error measurement).

[0166] In order to dynamically reflect the normal fluctuation level of the system in the recent period, a preset sliding window mechanism is introduced: the mechanism maintains a window of a fixed time length (for example, the last 30 time points), and only retains the error data in the current time and a period of time before the current time. With the continuous entry of new errors, the oldest error is automatically removed from the window. Therefore, the errors retained in the window are the target errors that meet the current time requirements, thereby realizing dynamic screening of the target errors.

[0167] After determining the window mean, the adaptive abnormal alarm is realized by comparing the current error with the multiple relationship of the dynamic window mean (such as whether it exceeds B times, B≥1.5).

[0168] The early warning method provided by the embodiment of the present application realizes high-precision time series prediction of key parameters in the desulfurization solution system through a model. In the online running stage, the deviation between the predicted value and the actual measured value is calculated in real time, and the error mean of a plurality of key factors (such as the liquid level of the absorption tower, the pressure difference, the temperature of the regeneration tower, the pressure, etc.) is dynamically determined based on the sliding window; by constructing a multi-factor hybrid decision mechanism, the system running state is comprehensively judged, and the alarm is triggered in time when the error significantly deviates from the normal range. Therefore, not only can early signs such as abnormal foaming be effectively captured, but also strong robustness and adaptive ability are possessed, thereby improving the detection accuracy and response timeliness of the abnormal events of the desulfurization solution system, and realizing the change from “post-alarm” to “pre-warning”.

[0169] In the embodiment of the present application, 30-day time series data (excluding data in the foaming-filling period) collected by a certain oil and gas well pipeline station warehouse is taken as an example. The time series data has about 100,000 time series records, and a self-supervised learning is performed to train a time series prediction large model (i.e., a warning model).

[0170] ​The time series data includes the overhead temperature of the absorption tower, the liquid level of the absorption tower, the pressure of the absorption tower, the temperature of the lean liquid entering the absorption tower, the temperature of the rich liquid leaving the absorption tower, the pressure difference of the absorption tower, and the like; and the time series data collected by the regeneration tower includes 13 isomerous measurement data such as the overhead temperature of the regeneration tower, the pressure of the regeneration tower, the pressure difference of the regeneration tower, the liquid level of the regeneration tower, the temperature of the lean liquid at the bottom of the regeneration tower, and the steam flow.

[0171] The sampling frequency can be 3 times per minute, and the data of the last 6 months can be selected as the test sample, and the model parameters are as follows:

[0172] The parameters of the prediction task are as follows:

[0173] seq_len=96;

[0174] patch_len=96;

[0175] pred_len=96;

[0176] The size of the patch is 96 data points (about 30 minutes of sampling data), and the step is 96.

[0177] The parameters of the residual network (mapping patch data to a 256-dimensional feature space) are as follows:

[0178] hidden_dim=128 The feature dimension of the hidden layer is 128.

[0179] out_dim=256 The output is a 256-dimensional feature space.

[0180] The parameters of the Transformer (Decoder-Only architecture) are as follows:

[0181] d_model=256 The feature dimension of the input transformer is 256.

[0182] e_layers=2 There are two Decoder Layers.

[0183] n_heads=4 The number of multi-heads is 4.

[0184] d_ff=512 The feature dimension of the Feed-Forward connection layer.

[0185] When a single factor (such as steam flow) is used as the basis for decision-making, Figure 4a The schematic diagram of the single-factor abnormal early warning result provided by the embodiment of the application is as follows: Figure 4aAs shown, the system recorded filling time is completely consistent with the manual log. From the time logic, the filling operation occurs before the foaming start time. In the range of [60-70] on the X-axis in the figure, the prediction error of the steam flow can be observed to fluctuate significantly, corresponding to the actual foaming period. However, the error curve has multiple peaks (local maxima), making it difficult to accurately determine the true foaming start time. At the same time, two obvious error rises (early warning signals) have occurred before foaming, causing multiple warnings and increasing the workload of on-site personnel for judgment and review.

[0186] In contrast, Figure 4b The schematic diagram of the multi-factor mixed abnormal early warning result provided by the embodiment of the present application is shown in FIG. 6. As shown, the early warning method used in the embodiment of the present application combines the average error of 13 measurement items. As can be seen from the figure, the filling time and the foaming time correspond to two peaks (local maxima) in the figure, the early warning time is also clear, and there is no problem of multiple warnings. As can be seen from the figure, the early warning time is more than 8 hours earlier than the foaming time, which reserves enough time for on-site workers to take preventive measures to avoid production losses caused by foaming. Figure 4b

[0187] Therefore, the embodiment of the present application realizes early and accurate early warning of abnormal foaming by constructing a dynamic behavior model of the desulfurization solution system "normal → foaming → blocking agent intervention → recovery" full cycle, significantly improving the timeliness and accuracy of early warning. Based on the process circulation process of "absorption tower → flash tank → regeneration tower → absorption tower", combining multi-variable time series data, using the extended 2D Transformer self-attention mechanism, realizing the spatio-temporal attention alignment and feature fusion across variables and time, deeply mining the complex spatio-temporal dependence relationship between process parameters and the implicit pattern of accident precursors, effectively capturing the long-term dynamic evolution characteristics of the system. On this basis, a multi-factor mixed decision mechanism is introduced, the average processing of the prediction error of multiple key parameters is used to reduce the interference caused by the fluctuation of a single variable, and the false alarm is significantly reduced. At the same time, the adaptive threshold mechanism based on the sliding window is used to replace the traditional fixed threshold, so that the system can dynamically respond to the changes of different loads and operating conditions, greatly improving the applicability, robustness and on-site deployment stability of the model, and realizing the intelligent early warning ability of high accuracy, low false alarm and strong adaptation.

[0188] Figure 5 The structure schematic diagram of the early warning model training device of the desulfurization solution system provided by the present application is shown in FIG. 7. As shown, the early warning model training device 50 of the desulfurization solution system provided by the embodiment of the present application comprises: Figure 5

[0189] ​​The first obtaining module 501 is configured to obtain a monitoring vector and a monitoring vector matrix obtained according to the monitoring vector; the monitoring vector is generated according to monitoring data of a monitoring object in a desulfurization solution system under a normal working condition, and the monitoring vector includes time sequence information representing a time when the monitoring data is obtained and spatial information representing a spatial relationship of different monitoring objects in a process dependency relationship; and the monitoring objects corresponding to the monitoring vectors at different positions in the monitoring vector matrix are different and / or the time sequences of the monitoring data are different;

[0190] The generating module 502 is configured to generate a correlation matrix representing a correlation relationship between the monitoring vectors according to sampling times of the monitoring objects in the desulfurization solution system and process positions of the monitoring objects in the desulfurization solution system.

[0191] The first obtaining module 503 is configured to process the monitoring vectors in the monitoring vector matrix based on a spatio-temporal self-attention mechanism and the correlation matrix, to obtain a fusion vector with a spatio-temporal dependency relationship.

[0192] The training module 504 is configured to perform self-supervised training on an initial model according to the fusion vector, to obtain a warning model.

[0193] In a possible implementation, the first obtaining module 501 can be specifically configured to:

[0194] obtain initial monitoring data of the monitoring object in the desulfurization solution system under the normal working condition;

[0195] divide the initial monitoring data according to a preset time division rule, to obtain the monitoring data;

[0196] perform vectorization processing on the monitoring data, to obtain an initial monitoring vector;

[0197] add time sequence information representing a time when the monitoring data is obtained and spatial information representing a spatial relationship of different monitoring objects in a process dependency relationship to the initial monitoring vector, to obtain the monitoring vector;

[0198] generate the monitoring vector matrix according to the spatial information and the time information in the monitoring vector.

[0199] In a possible implementation, the generating module 502 can be specifically configured to:

[0200] generate a first matrix representing a time sequence relationship between the sampling times of the monitoring objects in the desulfurization solution system;

[0201] generate a second matrix representing a process dependency relationship according to the process positions of the monitoring objects in the desulfurization solution system;

[0202] generate the correlation matrix representing the correlation relationship between the monitoring vectors according to the first matrix and the second matrix.

[0203] In a possible implementation, the generating module 502 can be further specific to:

[0204] calculating the Kronecker product of the first matrix and the second matrix to obtain a correlation matrix representing the correlation between the monitoring vectors.

[0205] In a possible implementation, the first obtaining module 503 can be further specific to:

[0206] obtaining a query matrix, a key matrix and a value matrix according to the monitoring vector matrix;

[0207] obtaining an attention weight matrix according to the query matrix, the key matrix and the correlation matrix; wherein the elements without the correlation in the correlation matrix are elements processed by masking;

[0208] performing normalization processing on the attention weight matrix to obtain a normalized attention score;

[0209] obtaining a fusion vector with a spatio-temporal dependency relationship according to the normalized attention score and the value matrix.

[0210] In a possible implementation, the fusion vector in the first obtaining module 503 satisfies:

[0211]

[0212] wherein, the query matrix represents the query matrix, the key matrix represents the key matrix, the value matrix represents the value matrix, the attention score matrix represents the attention score matrix, the scaling factor represents the scaling factor, and the correlation matrix represents the correlation matrix.

[0213] In a possible implementation, the training module 504 can be further specific to:

[0214] inputting the fusion vector into an initial model to obtain a predicted value;

[0215] optimizing and adjusting the initial model according to the deviation between the predicted value and the actual observation value to obtain a warning model.

[0216] The warning model training device of the desulfurization solution system provided in this embodiment can execute the method provided in the method embodiment, and has similar implementation principles and technical effects. Details are not described herein.

[0217] Figure 6 The structure diagram of the warning device provided in this application is shown in Figure 6 As shown in the figure, the warning device 60 provided in this embodiment includes:

[0218] The second obtaining module 601 is configured to obtain running data of a monitoring object in a desulfurization solution system.

[0219] The second obtaining module 602 is configured to input the running data into a pre-warning model to obtain a prediction result.

[0220] The warning module 603 is configured to generate an abnormal warning according to the prediction result and an observation result corresponding to the prediction result.

[0221] In a possible implementation, the warning module 603 can be specifically configured to:

[0222] obtain an error result according to the prediction result and the observation result corresponding to the prediction result;

[0223] determine a target error meeting a current time requirement and a mean value of the target error in the error result according to a preset sliding window mechanism;

[0224] generate the abnormal warning according to the mean value of the target error and a sliding window mean value, wherein the sliding window mean value is determined according to a time window corresponding to the current time requirement.

[0225] The pre-warning device provided in this embodiment can execute the method provided in the method embodiment, and has similar implementation principles and technical effects, which will not be described here again.

[0226] Figure 7 A structural schematic diagram of an electronic device provided in this application is shown in FIG. 7. Figure 7 As shown in FIG. 7, the electronic device 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected through a bus 704.

[0227] In the specific implementation process, the at least one processor 701 executes the computer execution instructions stored in the memory 702, so that the at least one processor 701 executes the method described above.

[0228] The specific implementation process of the processor 701 can refer to the method embodiment described above, and has similar implementation principles and technical effects, which will not be described here again.

[0229] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.

[0230] The memory can include a random access memory (RAM), and can also include a non-volatile memory (NVM), such as at least one disk memory.

[0231] The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0232] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the above method.

[0233] The present application also provides a computer readable storage medium, which stores computer execution instructions, and when a processor executes the computer execution instructions, the above method is implemented.

[0234] The above readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0235] An example readable storage medium is coupled to the processor such that the processor can read information from the readable storage medium and can write information to the readable storage medium. Of course, the readable storage medium can also be a part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.

[0236] The division of units is only a logical functional division, and in actual implementation, there can be another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0237] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0238] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0239] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0240] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a computer readable storage medium. The program executes to perform the steps of the above-mentioned method embodiments; and the foregoing storage medium includes various media capable of storing program codes, such as ROM, RAM, magnetic disk, or optical disk.

[0241] Finally, it should be noted that other embodiments of the present application will readily occur to those skilled in the art upon consideration of the specification and practice of the present application disclosed herein. The present application is intended to include all such variations, uses, or adaptations of the application in which the general principles of the application are used to best advantage and encompassed within its scope. The present application is not limited to the precise structures described and shown in the accompanying drawings and figures, and can be practiced with variation of modifications and alterations without departing from the scope of the present application. The scope of the present application is limited only by the claims appended hereto.

Claims

1. A method for training a warning model of a desulfurization solution system, characterized in that, The method comprises the following steps: obtaining a monitoring vector and a monitoring vector matrix obtained according to the monitoring vector; the monitoring vector is generated according to monitoring data of a monitoring object in a desulfurization solution system under normal working conditions, and the monitoring vector comprises time sequence information representing the time when the monitoring data is obtained and space information representing the spatial relationship of different monitoring objects in the process dependency relationship; wherein the monitoring objects corresponding to the monitoring vectors at different positions in the monitoring vector matrix are different and / or the time sequences of the monitoring data are different; generating a correlation matrix representing the correlation relationship between the monitoring vectors according to the sampling time of the monitoring object in the desulfurization solution system and the process position of the monitoring object in the desulfurization solution system; processing the monitoring vectors in the monitoring vector matrix based on a spatio-temporal self-attention mechanism and the correlation matrix to obtain a fusion vector with a spatio-temporal dependency relationship; performing self-supervised training on an initial model according to the fusion vector to obtain a warning model; the processing of the monitoring vectors in the monitoring vector matrix based on the spatio-temporal self-attention mechanism and the correlation matrix to obtain the fusion vector with the spatio-temporal dependency relationship comprises: obtaining a query matrix, a key matrix and a value matrix according to the monitoring vector matrix; obtaining an attention weight matrix according to the query matrix, the key matrix and the correlation matrix; wherein the elements in the correlation matrix that do not have a correlation relationship are elements processed by a mask; normalizing the attention weight matrix to obtain a normalized attention score; obtaining a fusion vector with a spatio-temporal dependency relationship according to the normalized attention score and the value matrix.

2. The method of claim 1, wherein, The method comprises the following steps: obtaining initial monitoring data of a monitoring object in a desulfurization solution system under normal working conditions; dividing the initial monitoring data according to a preset time division rule to obtain monitoring data; vectorizing the monitoring data to obtain an initial monitoring vector; adding time sequence information representing the time when the monitoring data is obtained and space information representing the spatial relationship of different monitoring objects in the process dependency relationship to the initial monitoring vector to obtain the monitoring vector; generating the monitoring vector matrix according to the space information and the time information in the monitoring vector.

3. The method of claim 1, wherein, The method comprises the following steps: generating a first matrix representing the time sequence relationship between the sampling times of the monitoring object in the desulfurization solution system according to the sampling time of the monitoring object in the desulfurization solution system; generating a second matrix representing the process dependency relationship according to the process position of the monitoring object in the desulfurization solution system; generating a correlation matrix representing the correlation relationship between the monitoring vectors according to the first matrix and the second matrix.

4. The method of claim 3, wherein, The method comprises the following steps: generating a first matrix representing the time sequence relationship between the sampling times of the monitoring object in the desulfurization solution system according to the sampling time of the monitoring object in the desulfurization solution system; generating a second matrix representing the process dependency relationship according to the process position of the monitoring object in the desulfurization solution system; generating a correlation matrix representing the correlation relationship between the monitoring vectors according to the first matrix and the second matrix. A Kronecker product of the first matrix and the second matrix is calculated to obtain a correlation matrix representing a correlation between the monitoring vectors.

5. The method of claim 1, wherein, The fusion vector satisfies: wherein the a query matrix representing the a key matrix representing the a value matrix representing the an attention score matrix representing the a scaling factor representing the a correlation matrix representing the 6. The method of claim 1, wherein, The self-supervised training of the initial model according to the fusion vector to obtain a pre-warning model comprises: The fusion vector is input into the initial model to obtain a predicted value. The initial model is optimized and adjusted according to a deviation between the predicted value and an actual observation value to obtain a pre-warning model.

7. A method of early warning, characterized in that The method comprises: Obtaining running data of a monitoring object in a desulfurization solution system; The running data is input into the pre-warning model to obtain a prediction result, the pre-warning model being any one of the pre-warning models in claims 1 to 6; An abnormality alarm is generated according to the prediction result and an observation result corresponding to the prediction result.

8. The method of claim 7, wherein, The abnormality alarm generated according to the prediction result and the observation result corresponding to the prediction result comprises: An error result is obtained according to the prediction result and the observation result corresponding to the prediction result; A target error meeting a current time requirement in the error result and a mean value of the target error are determined according to a preset sliding window mechanism; An abnormality alarm is generated according to the mean value of the target error and a sliding window mean value, wherein the sliding window mean value is determined according to a time window corresponding to the current time requirement.

9. An electronic device, comprising: Comprise: A memory, a processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the method in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Three-dimensional convolution attention neural network modeling method for nitric oxide in cement denitration process

    CN117217266A

  • Power distribution network system fault monitoring method and system based on multi-source information

    CN120405328A