Petrochemical production digitalization dual-mode early warning method and device, server and storage medium

By constructing a process knowledge graph and an attention mechanism, a comprehensive feature vector is generated, which solves the problem of low early warning accuracy in petrochemical production processes and achieves more accurate and timely early warning results.

CN122135518APending Publication Date: 2026-06-02CLOUD WHALE DIGITAL TECH (TIANJIN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CLOUD WHALE DIGITAL TECH (TIANJIN) CO LTD
Filing Date
2026-01-22
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing early warning methods in petrochemical production processes have low accuracy and lack predictability, and time-series prediction models struggle to understand the actual physical meaning of data points within a specific process context.

Method used

By constructing a process knowledge graph, a graph embedding algorithm is used to encode the location and connection relationship of measurement points, obtain the inherent attribute information of measurement points, combine dynamic feature vectors and static feature sets, use an attention mechanism to calculate the relevance weights, generate a comprehensive feature vector, and input it into the early warning model.

Benefits of technology

It improves the prediction accuracy and robustness of the early warning model, enables a better understanding of the coupling relationship between data sources and process links, provides richer input features, and improves the accuracy and timeliness of early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135518A_ABST
    Figure CN122135518A_ABST
Patent Text Reader

Abstract

This invention discloses a digital and intelligent dual-mode early warning method, device, server, and storage medium for petrochemical production, belonging to the field of early warning. It constructs a knowledge graph based on the process flow diagram and uses a graph embedding algorithm to encode the network topology relationships of measurement points into low-dimensional dense vectors. Simultaneously, the inherent attributes of the measurement points are encoded into category embedding vectors, and the two are combined to form a static feature set. During online operation, the dynamically acquired feature vectors are used as queries, and the static feature set is used as keys and values. After linear transformation through a learnable weight matrix, attention weights are calculated, and the value vectors are weighted and summed to obtain a context vector. Finally, the context vector, dynamic features, and static features are fused to generate a comprehensive feature vector, which is input into the early warning model to output the final early warning result. This provides the model with richer and more accurate input features, thereby improving the prediction accuracy and robustness of the early warning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of early warning technology, and in particular to a digital and intelligent dual-mode early warning method, device, server, and storage medium for petrochemical production. Background Technology

[0002] In modern petrochemical, chemical, and other process industries, the stability and safety of production processes are paramount. Currently, mainstream industrial process monitoring relies on static high and low alarm thresholds set by distributed control systems. This method is essentially a "reactive" alarm; when an alarm is triggered, process parameters have already deviated from normal ranges, leaving operators with very limited time to react and handle the situation, thus lacking predictability.

[0003] To overcome the aforementioned problems, existing technologies employ time-series prediction models (such as ARIMA, RNN / LSTM, etc.). However, these methods only concern themselves with the massive amounts of collected data, which are separate from the process system. Furthermore, time-series prediction models struggle to understand the actual physical meaning of data points within a specific process context, thus affecting the accuracy of early warnings. Summary of the Invention

[0004] This invention provides a digital and intelligent dual-mode early warning method, device, server, and storage medium for petrochemical production, in order to solve the technical problem of low accuracy in existing early warning methods for petrochemical production processes.

[0005] In a first aspect, embodiments of the present invention provide a digital and intelligent dual-mode early warning method for petrochemical production, comprising: Construct a process knowledge graph based on the process flow diagram; The graph is learned using a graph embedding algorithm, which encodes the position and connection relationship of each measurement point in the process network into a low-dimensional dense vector; The inherent attribute information of each measurement point is obtained, and the inherent attribute information is encoded to obtain the category embedding vector; By combining the low-dimensional dense vector and the class embedding vector, a static feature set for each measurement point is obtained; The data collected at each measuring point and the corresponding time are obtained to form a dynamic feature vector. The dynamic feature vector is used as the query, and the static feature set is used as the key and value. A learnable weight matrix is ​​used to perform a linear transformation on the query, key, and value to obtain the query vector, key vector, and value vector. Calculate the dot product of the query vector and the key vector, and apply the normalized exponential function to obtain the attention weights; use the attention weights to perform a weighted summation of the value vectors to obtain the context vector; The context vector, dynamic feature vector, and static feature set are fused to generate a comprehensive feature vector; The comprehensive feature vector is input into the early warning model to obtain the early warning result.

[0006] Secondly, embodiments of the present invention also provide a petrochemical production digital intelligent dual-mode early warning device, comprising: The construction module is used to build a process knowledge graph based on the process flow diagram; The learning module is used to learn the graph using a graph embedding algorithm, encoding the position and connection relationship of each measurement point in the process network into a low-dimensional dense vector; The encoding module is used to acquire the inherent attribute information of each measurement point and encode the inherent attribute information to obtain the category embedding vector; The combination module is used to combine the low-dimensional dense vector and the class embedding vector to obtain the static feature set of each measurement point; The module is used to acquire the data collected at each measuring point and the corresponding time, and form a dynamic feature vector. The dynamic feature vector is used as the query, and the static feature set is used as the key and value. The transformation module is used to perform linear transformations on the query, key, and value using a learnable weight matrix to obtain the query vector, key vector, and value vector. The calculation module is used to calculate the dot product of the query vector and the key vector, and apply a normalized exponential function to obtain the attention weights; the attention weights are then used to perform a weighted summation of the value vectors to obtain the context vector. The fusion module is used to fuse the context vector, dynamic feature vector, and static feature set to generate a comprehensive feature vector; The early warning module is used to input the comprehensive feature vector into the early warning model to obtain the early warning result.

[0007] Thirdly, embodiments of the present invention also provide a server, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the petrochemical production digital and intelligent dual-mode early warning method provided in the above embodiments.

[0008] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the petrochemical production digital dual-mode early warning method provided in the above embodiments.

[0009] The petrochemical production digital intelligent dual-mode early warning method, device, server, and storage medium provided in this invention construct a process knowledge graph based on the process flow diagram; learn the graph using a graph embedding algorithm, encoding the position and connection relationship of each measuring point in the process network into a low-dimensional dense vector; acquire the inherent attribute information of each measuring point and encode the inherent attribute information to obtain a category embedding vector; combine the low-dimensional dense vector and the category embedding vector to obtain a static feature set for each measuring point; acquire the data collected from each measuring point and the corresponding time to form a dynamic feature vector, using the dynamic feature vector as the query and the static feature set as the key and value; perform a linear transformation on the query, key, and value using a learnable weight matrix to obtain a query vector, key vector, and value vector; calculate the dot product of the query vector and the key vector and apply a normalized exponential function to obtain the attention weight; use the attention weight to perform a weighted summation on the value vector to obtain a context vector; fuse the context vector, dynamic feature vector, and static feature set to generate a comprehensive feature vector; input the comprehensive feature vector into the early warning model to obtain the early warning result. Knowledge graph technology is used to structurally represent and vectorize prior knowledge such as the structure of the process system, equipment relationships, and physicochemical principles, enabling static knowledge to be directly utilized by machine learning models. An attention mechanism is used to dynamically calculate the relevance weights between real-time data and static knowledge vectors online. This facilitates the model's understanding of data sources, the process stages in which it is generated, and its coupling relationships with other parameters, thereby enhancing its data comprehension capabilities. Attached Figure Description

[0010] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the intelligent dual-mode early warning method for petrochemical production provided in Embodiment 1 of the present invention. Figure 2 This is a flowchart illustrating the intelligent dual-mode early warning method for petrochemical production provided in Embodiment 2 of the present invention. Figure 3 This is a schematic diagram of the structure of the petrochemical production digital intelligent dual-mode early warning device provided in Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the server structure provided in Embodiment 4 of the present invention. Detailed Implementation

[0011] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0012] Example 1 Figure 1 This is a flowchart of the intelligent digital dual-mode early warning method for petrochemical production provided in Embodiment 1 of the present invention. This embodiment is applicable to situations requiring early warning of abnormal conditions in the petrochemical production process. The method can be executed by an intelligent digital dual-mode early warning device for petrochemical production, and specifically includes the following steps: Step 110: Construct a process knowledge graph based on the process flow diagram, and use a graph embedding algorithm to learn the graph, encoding the position and connection relationship of each measurement point in the process network into a low-dimensional dense vector.

[0013] For example, key entities such as reactors, pumps, valves, and sensors, as well as their interrelationships (e.g., connections, controls, upstream and downstream), can be identified by taking process flow diagrams, equipment lists, and piping and instrumentation diagrams as inputs, thus forming a graph network that describes the topology of the entire production system.

[0014] Then, a graph embedding algorithm is used to learn the graph for each measurement point. Calculate the topological embedding vector that encodes the network position and role of the process network. The location and connectivity of each measurement point in a complex process network can be encoded into a low-dimensional, dense vector.

[0015] Step 120: Obtain the inherent attribute information of each measurement point, encode the inherent attribute information to obtain the category embedding vector, and combine the low-dimensional dense vector and the category embedding vector to obtain the static feature set of each measurement point.

[0016] Besides topological information, measurement points typically possess other inherent attributes, such as equipment type and category of the measured physical quantity. This information can be encoded into category embedding vectors. (Topological embedding vectors for process network location and role) With category embedding These together constitute the static feature set of each measuring point. Static feature set This represents background knowledge related to the process structure, where the measurement points remain unchanged.

[0017] Step 130: Obtain the data collected at each measuring point and the corresponding time, form a dynamic feature vector, use the dynamic feature vector as the query, use the static feature set as the key and value, and use the learnable weight matrix to perform a linear transformation on the query, key and value to obtain the query vector, key vector and value vector.

[0018] The system acquires the current measurement value and converts it into a numerical embedding. Simultaneously, time information, such as the time of day and period, is encoded as a timestamp embedding. Combining these two elements yields a dynamic feature vector. An attention mechanism is then used to allow the dynamic data to query static knowledge, thereby obtaining richer contextual information.

[0019] For example, obtain the numerical embedding at the current moment. and timestamp embedding And combine them into dynamic feature vectors An attention mechanism is employed, using the dynamic feature vector... For querying, using the static feature set For keys and values, respectively, learnable weight matrices are used. , , Perform a linear transformation to obtain the query vector. Key vector Sum value vector : .

[0020] Step 140: Calculate the dot product of the query vector and the key vector, and apply the normalized exponential function to obtain the attention weights; use the attention weights to perform a weighted summation of the value vectors to obtain the context vector; fuse the context vector, dynamic feature vector and static feature set to generate a comprehensive feature vector.

[0021] Attention weights are obtained by calculating the dot product of the query vector and the key vector and applying the Softmax function. Attention weights reflect the importance of different parts of the static feature set of a measurement point in the current dynamic context. Using these attention weights, a context vector incorporating contextual information can be calculated. Contextual information is essentially the information most relevant to the current moment, dynamically extracted from static knowledge: .

[0022] For example, it may include: concatenating dynamic feature vectors and static feature sets, and performing residual connection between the concatenation result and the context vector; performing layer normalization on the result of the residual connection to obtain a comprehensive feature vector.

[0023] Optionally, the context vector can be... Compared with the original dynamic feature vector and static feature set The fusion process can be performed, for example, through residual connections and layer normalization, to generate the final comprehensive feature vector at that moment. .

[0024] The integrated feature vector integrates real-time data of the measurement point, temporal context, and background knowledge of the point within the entire process network, providing more complete and discriminative information for subsequent anomaly detection.

[0025] Step 150: Input the comprehensive feature vector into the early warning model to obtain the early warning result.

[0026] The comprehensive feature vector is input into the early warning model, and the trained early warning model is used to output the early warning prediction result.

[0027] This embodiment constructs a process knowledge graph based on the process flow diagram; it uses a graph embedding algorithm to learn the graph, encoding the position and connection relationship of each measuring point in the process network into a low-dimensional dense vector; it obtains the inherent attribute information of each measuring point and encodes the inherent attribute information to obtain a category embedding vector; it combines the low-dimensional dense vector and the category embedding vector to obtain a static feature set for each measuring point; it obtains the data collected by each measuring point and the corresponding time to form a dynamic feature vector, using the dynamic feature vector as the query and the static feature set as the key and value; it uses a learnable weight matrix to perform a linear transformation on the query, key, and value to obtain a query vector, a key vector, and a value vector; it calculates the dot product of the query vector and the key vector and applies a normalized exponential function to obtain the attention weight; it uses the attention weight to perform a weighted summation of the value vector to obtain a context vector; it fuses the context vector, the dynamic feature vector, and the static feature set to generate a comprehensive feature vector; and it inputs the comprehensive feature vector into the early warning model to obtain the early warning result. By employing knowledge graph technology, prior knowledge such as the structure of the process system, equipment relationships, and physicochemical principles is structurally represented and vectorized, enabling static knowledge to be directly utilized by machine learning models. An attention mechanism is used to dynamically calculate the correlation weights between real-time data and static knowledge vectors online. This facilitates the model's understanding of data sources, the process stages in which it is generated, and its coupling relationships with other parameters, thereby enhancing its data understanding capabilities. It provides the model with richer and more accurate input features, ultimately improving the prediction accuracy and robustness of the early warning model.

[0028] Example 2 Figure 2This is a flowchart illustrating the intelligent dual-mode early warning method for petrochemical production provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment inputs a comprehensive feature vector into an early warning model to obtain early warning results. Specifically, the optimization is as follows: the comprehensive feature vector is input into a trained high-efficiency long-term prediction model, which focuses on capturing long-term, trend-based operating condition evolution to obtain long-term safety prediction results; the comprehensive feature vector is input into a trained instantaneous gradient prediction model, which focuses on sensing drastic changes within a short time window to obtain short-term safety prediction results; and the long-term safety prediction results and short-term safety prediction results are fused to obtain a graded early warning signal.

[0029] See Figure 2 The aforementioned intelligent dual-mode early warning method for petrochemical production includes: Step 210: Construct a process knowledge graph based on the process flow diagram, and use a graph embedding algorithm to learn the graph, encoding the position and connection relationship of each measurement point in the process network into a low-dimensional dense vector.

[0030] Step 220: Obtain the inherent attribute information of each measurement point, encode the inherent attribute information to obtain the category embedding vector, and combine the low-dimensional dense vector and the category embedding vector to obtain the static feature set of each measurement point.

[0031] Step 230: Obtain the data collected at each measuring point and the corresponding time, form a dynamic feature vector, use the dynamic feature vector as the query, use the static feature set as the key and value, and use the learnable weight matrix to perform a linear transformation on the query, key and value to obtain the query vector, key vector and value vector.

[0032] Step 240: Calculate the dot product of the query vector and the key vector, and apply the normalized exponential function to obtain the attention weights; use the attention weights to perform a weighted summation of the value vectors to obtain the context vector; fuse the context vector, dynamic feature vector and static feature set to generate a comprehensive feature vector.

[0033] Step 250: Input the comprehensive feature vector into the trained high-efficiency long-term prediction model. The high-efficiency long-term prediction model is used to focus on capturing long-term, trend-based operating condition evolution to obtain long-term safety prediction results.

[0034] Most existing forecasting methods focus on the future "value" itself, while lacking effective monitoring of the "trend" and "rate" (i.e., gradient) of numerical changes, easily overlooking hidden risks such as slow but continuous parameter drift. Therefore, in this embodiment, two warning modes can be used in combination for early warning.

[0035] For example, the two early warning modes correspond to an efficient long-term time-series prediction model and an instantaneous gradient prediction model, respectively. The efficient long-term time-series prediction model takes the long sequence of the comprehensive feature vector as input and, through its powerful ability to capture long-range dependencies, makes macro-trend predictions for numerical sequences over a longer period. It focuses on capturing long-cycle, trend-based evolution of operating conditions.

[0036] For example, the efficient long-term prediction model includes: an encoder for extracting deep-level temporal dependency features from a historical long sequence in the input comprehensive feature vector; and a decoder for generating a complete prediction sequence using a single forward propagation. The encoder can extract deep-level temporal dependencies and coupling features from the historical long sequence input composed of the comprehensive feature vector. Its structure employs a multi-layer stacked structure containing an efficient ProbSparse self-attention mechanism. To further process extremely long sequence inputs, self-attention distillation is used between layers to halve the sequence length through convolution and pooling. Its forward propagation process can be represented as follows: ,in, For the encoder The input feature map of the layer, The output is the result after processing by the attention block. This is a one-dimensional convolution operation. For activation function, This is a maximum pooling layer operation.

[0037] The ProbSparse self-attention mechanism reduces the complexity of attention computation from O(n log n) to O(n log n) in the following way. ) decreased to O( This enables it to efficiently process long-sequence industrial data. The "important" queries that contribute more significantly are identified by querying the sparsity metric formula. The i-th query is measured using the following formula. Sparsity relative to all bonds K: ; in, Indicates the first query vectors Relative to the set of all key vectors The sparsity metric is a measure of the sparseness of a query. The larger the sparsity metric, the more diverse the attention distribution of the query and the more important its contribution. For query matrix The first in row vectors Key matrix The first in Row vectors. is the length of the key sequence. This indicates the dimension of the input vector, preventing the value from being too large.

[0038] ProbSparse Self-Attention is based on the above metrics and only selects the Top-u region for attention calculation, as shown in the following formula: ,in, It is a sparse matrix, and its size is the same as the original query matrix. same, Indicates the top ranking under the sparsity metric. Important queries. Let be the activation function, and d be the feature dimension of (Q / K / V).

[0039] The computational complexity of traditional self-attention is proportional to the square of the sequence length, making it difficult to handle long industrial data sequences. The ProbSparse mechanism uses a sparsity metric to select the top-u most important queries that contribute the most to the attention distribution, while ignoring a large number of redundant queries, thus significantly reducing complexity. To further handle extremely long inputs, a distillation operation is inserted between multiple layers of the encoder. This operation compresses the feature maps of the previous layer in the time dimension through one-dimensional convolution and max pooling, thereby highlighting the dominant attention, reducing network parameters and computational cost, and enhancing the model's robustness to long sequences.

[0040] The decoder employs a generative decoding mechanism, which directly generates a complete prediction result for a long future sequence through a single forward propagation and represents this result as... It is generated point-by-point iteratively, rather than point-by-point; its input The known historical sequence portion, composed of the comprehensive feature vectors, is concatenated as a placeholder for the StartToken and the portion to be predicted.

[0041] The decoder uses its internal mapping function The input is processed to obtain the final predicted sequence output. : in These are the trainable parameters of the decoder module.

[0042] During a forward propagation, the decoder directly maps the complete future prediction sequence through its internal multi-layer attention mechanism. This approach avoids the error accumulation problem caused by the "iterative prediction" of traditional time series models, greatly improving the inference speed and overall accuracy of long sequence prediction.

[0043] Step 260: Input the comprehensive feature vector into the trained instantaneous gradient prediction model. The instantaneous gradient prediction model is used to focus on sensing drastic changes within a short time window to obtain short-term safety prediction results.

[0044] In this embodiment, the instantaneous gradient prediction model includes: an input layer for receiving a comprehensive feature vector within a preset time window; a feature processing layer for flattening the input comprehensive feature vector, converting it into a one-dimensional vector; a lightweight multilayer perceptron, wherein the number of neurons in the input layer of the lightweight multilayer perceptron is the same as the length of the flattened feature vector, and outputs the predicted gradient value; and an output layer for outputting a scalar value predicting the feature change rate based on the predicted gradient value. The instantaneous gradient prediction model can detect drastic changes within a short time window, obtaining short-term safe prediction results.

[0045] Step 270: The long-term security prediction results and the short-term security prediction results are fused to obtain a graded early warning signal.

[0046] In this embodiment, the outputs of the two heterogeneous prediction models can be integrated, rather than simply weighting them at the feature level. Danger gradient thresholds, dangerous operating condition thresholds, attention gradient thresholds, and attention condition thresholds can be preset according to the warning requirements.

[0047] For example, integration can be achieved in the following ways: ,in, The scalar value predicted by the characteristic rate of change. For the complete predicted sequence, , , , These are the preset danger gradient threshold, danger condition threshold, concern gradient threshold, and concern condition threshold.

[0048] The core of the above decision-making process is that the risk of transient mutations takes precedence over the risk of trends. The fusion results can be arbitrated into four levels of early warning signals through preset multi-level thresholds, allowing for flexible adaptation to various process scenarios and risk tolerance levels.

[0049] This embodiment inputs a comprehensive feature vector into an early warning model to obtain early warning results. Specifically, the optimization involves: inputting the comprehensive feature vector into a trained, high-efficiency long-term time-series prediction model, which focuses on capturing long-term, trend-based operational condition evolution to obtain long-term safety prediction results; inputting the comprehensive feature vector into a trained instantaneous gradient prediction model, which focuses on sensing drastic changes within a short time window to obtain short-term safety prediction results; and fusing the long-term and short-term safety prediction results to obtain a tiered early warning signal. The most urgent instantaneous mutations can be identified first, which aligns with the primary principle of rapid response in safety control. After ruling out urgent mutations, the potential risks revealed by the high-efficiency long-term time-series prediction model are then assessed, achieving preventative measures.

[0050] Example 3 Figure 3 This is a schematic diagram of the structure of the petrochemical production digital intelligent dual-mode early warning device provided in Embodiment 3 of the present invention. See also... Figure 3 The petrochemical production digital dual-mode early warning device includes: Module 310 is used to construct a process knowledge graph based on the process flow diagram; The learning module 320 is used to learn the graph using a graph embedding algorithm, encoding the position and connection relationship of each measurement point in the process network into a low-dimensional dense vector; The encoding module 330 is used to acquire the inherent attribute information of each measurement point and encode the inherent attribute information to obtain a category embedding vector; The combination module 340 is used to combine the low-dimensional dense vector and the class embedding vector to obtain the static feature set of each measurement point; The module 350 is used to acquire the data collected at each measuring point and the corresponding time, and to form a dynamic feature vector. The dynamic feature vector is used as a query, and the static feature set is used as the key and value. Transformation module 360 ​​is used to perform linear transformations on the query, key, and value using a learnable weight matrix to obtain query vector, key vector, and value vector; The calculation module 370 is used to calculate the dot product of the query vector and the key vector, and apply a normalized exponential function to obtain the attention weights; the attention weights are then used to perform a weighted summation of the value vectors to obtain the context vector. The fusion module 380 is used to fuse the context vector, dynamic feature vector and static feature set to generate a comprehensive feature vector; The early warning module 390 is used to input the comprehensive feature vector into the early warning model to obtain the early warning result.

[0051] The petrochemical production digital intelligent dual-mode early warning device provided in this embodiment constructs a process knowledge graph based on the process flow diagram; it uses a graph embedding algorithm to learn the graph, encoding the position and connection relationship of each measuring point in the process network into a low-dimensional dense vector; it acquires the inherent attribute information of each measuring point and encodes the inherent attribute information to obtain a category embedding vector; it combines the low-dimensional dense vector and the category embedding vector to obtain a static feature set for each measuring point; it acquires the data collected by each measuring point and the corresponding time to form a dynamic feature vector, using the dynamic feature vector as the query and the static feature set as the key and value; it uses a learnable weight matrix to perform a linear transformation on the query, key, and value to obtain a query vector, a key vector, and a value vector; it calculates the dot product of the query vector and the key vector and applies a normalized exponential function to obtain the attention weight; it uses the attention weight to perform a weighted summation of the value vector to obtain a context vector; it fuses the context vector, the dynamic feature vector, and the static feature set to generate a comprehensive feature vector; and it inputs the comprehensive feature vector into the early warning model to obtain the early warning result. By employing knowledge graph technology, prior knowledge such as the structure of the process system, equipment relationships, and physicochemical principles is structurally represented and vectorized, enabling static knowledge to be directly utilized by machine learning models. An attention mechanism is used to dynamically calculate the correlation weights between real-time data and static knowledge vectors online. This facilitates the model's understanding of data sources, the process stages in which it is generated, and its coupling relationships with other parameters, thereby enhancing its data understanding capabilities. It provides the model with richer and more accurate input features, ultimately improving the prediction accuracy and robustness of the early warning model.

[0052] Based on the above embodiments, the fusion module includes: The concatenation unit is used to concatenate the dynamic feature vector and the static feature set, and then perform a residual connection between the concatenation result and the context vector. The layer normalization unit is used to normalize the results of the residual connection to obtain the comprehensive feature vector.

[0053] Based on the above embodiments, the early warning module includes: The first input unit is used to input the comprehensive feature vector into the trained high-efficiency long-term prediction model. The high-efficiency long-term prediction model is used to focus on capturing long-term, trend-based operating condition evolution and obtain long-term safety prediction results. The second input unit is used to input the comprehensive feature vector into the trained instantaneous gradient prediction model. The instantaneous gradient prediction model is used to focus on perceiving drastic changes within a short time window to obtain short-term safe prediction results. The fusion unit is used to fuse long-term security prediction results and short-term security prediction results to obtain graded early warning signals.

[0054] Based on the above embodiments, the efficient long-term prediction model includes: An encoder for extracting deep time-dependent features from long historical sequences in an input composite feature vector; A decoder, which generates a complete prediction sequence using a single forward propagation.

[0055] Based on the above embodiments, the instantaneous gradient prediction model includes: The input layer is used to receive the comprehensive feature vector within a preset time window; The feature processing layer is used to flatten the input composite feature vector, converting it into a one-dimensional vector. A lightweight multilayer perceptron, wherein the number of neurons in the input layer of the lightweight multilayer perceptron is the same as the length of the flattened feature vector, and the output is the predicted gradient value. The output layer is used to output the scalar value of the predicted rate of change of features based on the predicted gradient value.

[0056] Based on the above embodiments, the fusion unit includes: Combined with sub-units, it is used to generate graded early warning signals by utilizing preset danger gradient thresholds, danger condition thresholds, attention gradient thresholds, and attention condition thresholds, combined with the complete prediction sequence output by the efficient long-term prediction model and the scalar value predicted by the characteristic rate of change output by the instantaneous gradient prediction model.

[0057] Based on the above embodiments, the combined subunit is implemented in the following manner: ,in, The scalar value predicted by the characteristic rate of change. For the complete predicted sequence, , , , These are the preset danger gradient threshold, danger condition threshold, concern gradient threshold, and concern condition threshold.

[0058] The petrochemical production digital intelligent dual-mode early warning device provided in the embodiments of the present invention can execute the petrochemical production digital intelligent dual-mode early warning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0059] Example 4 Figure 4 This is a schematic diagram of the structure of a server provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary server 12 suitable for implementing embodiments of the present invention is shown. Figure 4The server 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0060] like Figure 4 As shown, server 12 is presented in the form of a general-purpose computing server. The components of server 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0061] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0062] Server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by server 12, including volatile and non-volatile media, removable and non-removable media.

[0063] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. Server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0064] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0065] Server 12 can also communicate with one or more external servers 14 (e.g., keyboard, pointing server, display 24, etc.), one or more servers that enable users to interact with server 12, and / or any server (e.g., network card, modem, etc.) that enables server 12 to communicate with one or more other computing servers. This communication can be performed via input / output (I / O) interface 22. Furthermore, server 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of server 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with server 12, including but not limited to: microcode, server drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0066] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the petrochemical production digital intelligent dual-mode early warning method provided in this embodiment of the invention. Example 5 Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the petrochemical production digital dual-mode early warning method as described in any of the above embodiments.

[0067] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0068] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0069] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0070] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0071] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A digital and intelligent dual-mode early warning method for petrochemical production, characterized in that, include: Construct a process knowledge graph based on the process flow diagram; The graph is learned using a graph embedding algorithm, which encodes the position and connection relationship of each measurement point in the process network into a low-dimensional dense vector; The inherent attribute information of each measurement point is obtained, and the inherent attribute information is encoded to obtain the category embedding vector; By combining the low-dimensional dense vector and the class embedding vector, a static feature set for each measurement point is obtained; The data collected at each measuring point and the corresponding time are obtained to form a dynamic feature vector. The dynamic feature vector is used as the query, and the static feature set is used as the key and value. A learnable weight matrix is ​​used to perform a linear transformation on the query, key, and value to obtain the query vector, key vector, and value vector. Calculate the dot product of the query vector and the key vector, and apply the normalized exponential function to obtain the attention weights; use the attention weights to perform a weighted summation of the value vectors to obtain the context vector; The context vector, dynamic feature vector, and static feature set are fused to generate a comprehensive feature vector; The comprehensive feature vector is input into the early warning model to obtain the early warning result.

2. The method according to claim 1, characterized in that, The process of fusing context vectors, dynamic feature vectors, and static feature sets to generate a comprehensive feature vector includes: The dynamic feature vector and the static feature set are concatenated, and the concatenation result is residually connected with the context vector. The results of the residual connection are normalized by layer to obtain the comprehensive feature vector.

3. The method according to claim 1, characterized in that, The process of inputting the comprehensive feature vector into the early warning model to obtain the early warning result includes: The comprehensive feature vector is input into the trained high-efficiency long-term time-series prediction model. The high-efficiency long-term time-series prediction model is used to focus on capturing long-term, trend-based operating condition evolution and obtain long-term safety prediction results. The comprehensive feature vector is input into the trained instantaneous gradient prediction model, which is used to focus on perceiving drastic changes within a short time window to obtain short-term safety prediction results. By fusing long-term and short-term security prediction results, a tiered early warning signal is obtained.

4. The method according to claim 3, characterized in that, The efficient long-term prediction model includes: An encoder for extracting deep time-dependent features from long historical sequences in an input composite feature vector; A decoder, which generates a complete prediction sequence using a single forward propagation.

5. The method according to claim 3, characterized in that, The instantaneous gradient prediction model includes: The input layer is used to receive the comprehensive feature vector within a preset time window; The feature processing layer is used to flatten the input composite feature vector, converting it into a one-dimensional vector. A lightweight multilayer perceptron, wherein the number of neurons in the input layer of the lightweight multilayer perceptron is the same as the length of the flattened feature vector, and the output is the predicted gradient value. The output layer is used to output the scalar value of the predicted rate of change of features based on the predicted gradient value.

6. The method according to claim 5, characterized in that, The process of fusing long-term and short-term security prediction results to obtain tiered early warning signals includes: By utilizing preset danger gradient thresholds, danger condition thresholds, attention gradient thresholds, and attention condition thresholds, and combining the complete prediction sequence output by the efficient long-term prediction model with the scalar value predicted by the characteristic rate of change output by the instantaneous gradient prediction model, a graded early warning signal is generated.

7. The method according to claim 6, characterized in that, The method of generating graded early warning signals by utilizing preset danger gradient thresholds, danger condition thresholds, attention gradient thresholds, and attention condition thresholds, combined with the complete prediction sequence output by the efficient long-term prediction model and the scalar value predicted by the characteristic rate of change output by the instantaneous gradient prediction model, is as follows: ,in, The scalar value predicted by the characteristic rate of change. For the complete predicted sequence, , , , These are the preset danger gradient threshold, danger condition threshold, concern gradient threshold, and concern condition threshold.

8. A digital dual-mode early warning device for petrochemical production, characterized in that, include: The construction module is used to build a process knowledge graph based on the process flow diagram; The learning module is used to learn the graph using a graph embedding algorithm, encoding the position and connection relationship of each measurement point in the process network into a low-dimensional dense vector; The encoding module is used to acquire the inherent attribute information of each measurement point and encode the inherent attribute information to obtain the category embedding vector; The combination module is used to combine the low-dimensional dense vector and the class embedding vector to obtain the static feature set of each measurement point; The module is used to acquire the data collected at each measuring point and the corresponding time, and form a dynamic feature vector. The dynamic feature vector is used as the query, and the static feature set is used as the key and value. The transformation module is used to perform linear transformations on the query, key, and value using a learnable weight matrix to obtain the query vector, key vector, and value vector. The calculation module is used to calculate the dot product of the query vector and the key vector, and apply the normalized exponential function to obtain the attention weights; The context vector is obtained by weighted summation of the value vector using attention weights. The fusion module is used to fuse the context vector, dynamic feature vector, and static feature set to generate a comprehensive feature vector; The early warning module is used to input the comprehensive feature vector into the early warning model to obtain the early warning result.

9. A server, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the petrochemical production digital intelligent dual-mode early warning method as described in any one of claims 1-7.

10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the petrochemical production digital dual-mode early warning method as described in any one of claims 1-7.