Pipeline fault prediction method and device, and electronic device

By fusing multi-dimensional monitoring data from pipeline systems using a two-layer Transformer model, the problems of response lag and data processing in traditional manual inspections are solved, enabling early warning and precise location of pipeline faults, and improving the accuracy and real-time performance of fault prediction.

CN122241412APending Publication Date: 2026-06-19CHINA MOBILE GROUP DESIGN INST +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE GROUP DESIGN INST
Filing Date
2026-01-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Traditional pipeline fault detection relies on manual inspections, which suffers from response delays, insufficient coverage, and difficulty in detecting potential problems in real time. This is especially true in cold and heat source systems, where there are numerous pipeline sensors and a large amount of data, making it difficult for traditional methods to process and analyze efficiently. As a result, potential faults are easily overlooked, increasing the risk of system downtime.

Method used

A pipeline fault prediction method based on self-attention mechanism is adopted. By acquiring multi-dimensional monitoring data of the pipeline system, a two-layer Transformer model is used to fuse local features in a single time step and capture global features along the time axis. Combined with a time-series prediction module, fault probability prediction and location are performed.

Benefits of technology

It enables early warning and precise location of pipeline faults, improves the accuracy and real-time performance of fault prediction, and provides reliable operation and maintenance support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241412A_ABST
    Figure CN122241412A_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, and electronic device for predicting pipeline faults, relating to the field of data processing technology. The main technical features include: acquiring multi-dimensional monitoring data of a pipeline system; fusing the multi-dimensional monitoring data within a single time step based on a first encoder in a target model to obtain local features; and capturing global features corresponding to the local features along the time axis based on a second encoder in the target model under preset constraints; predicting pipeline faults in the pipeline system based on the global features to obtain a fault probability confidence level, thereby improving the accuracy of pipeline fault prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus, and electronic device for predicting pipeline faults. Background Technology

[0002] As data centers continue to expand, critical systems such as power supply, cooling, and water supply increasingly rely on complex pipeline networks. Their stable operation directly impacts the security and business continuity of server clusters. Traditional pipeline fault detection methods largely depend on manual inspections and experience-based judgment, resulting in issues such as delayed response, insufficient coverage, and difficulty in real-time detection of potential problems, failing to meet the operational and maintenance requirements of high-reliability data centers. Particularly in cold and heat source systems, the numerous pipeline sensors and massive amounts of data are difficult to process and analyze efficiently using traditional methods, leading to potential faults being easily overlooked and increasing the risk of downtime.

[0003] To address the potential hazards of manual inspections, pipeline fault prediction methods based on self-attention mechanisms have emerged. By leveraging deep learning and temporal modeling techniques, these methods model and learn from multi-point monitoring data, identify abnormal evolution trends, and achieve early warning and precise location. Although these methods can solve the potential hazards caused by manual inspections and introduce a model prediction mechanism, the problem of inaccurate prediction results still exists. Summary of the Invention

[0004] This disclosure provides a method, apparatus, and electronic device for predicting pipeline faults. Its main objective is to solve at least one of the above-mentioned technical problems.

[0005] According to a first aspect of this disclosure, a method for predicting pipeline faults is provided, comprising: Acquire multi-dimensional monitoring data of the pipeline system; Based on the first encoder in the target model, the multi-dimensional monitoring data is fused within a single time step to obtain local features, and based on the second encoder in the target model, global features corresponding to the local features are captured along the time axis under preset constraints. Based on the global features, pipeline faults in the pipeline system are predicted to obtain the fault probability confidence level.

[0006] In some embodiments, the multi-dimensional detection data includes the temperature information, the pressure information, the flow rate information, the pipeline location index, and the absolute time information; after acquiring the multi-dimensional monitoring data of the pipeline system, the method further includes: The temperature, pressure, and flow information collected at a single point in the pipeline system at the same time are subjected to self-attention encoding to obtain a spliced ​​feature vector; wherein, the multi-dimensional monitoring data includes the temperature information, the pressure information, the flow information, the pipeline location index, and the absolute time information; The pipeline location index and the absolute time information are encoded respectively to obtain the location feature vector and the time feature vector.

[0007] In some embodiments, the target model includes a Transformer model; The first encoder in the target model fuses the multi-dimensional monitoring data within a single time step to obtain local features, and based on the second encoder in the target model, captures the global features corresponding to the local features along the time axis under preset constraints, including: The Transformer model is divided into two layers to extract features from the spliced ​​feature vector, the position feature vector, and the time feature vector. The first encoder in the first layer determines the data change pattern at a single point in the pipeline system to obtain the local features. By fusing the local features of all points in the pipeline system under the preset constraints using the second encoder in the second layer structure, the global pipeline data motion pattern is determined. The time-series prediction module captures the global features of temporal evolution in the global pipeline data, wherein the Transformer model includes the time-series prediction module.

[0008] In some embodiments, the step of predicting pipeline faults in the pipeline system based on the global features to obtain a fault probability confidence level includes: The global features are mapped to obtain the failure probability confidence level of the pipeline system in the next time window; The failure probability confidence level is compared with a preset one-sided threshold. When the failure probability confidence level exceeds the preset one-sided threshold, it is determined that there is a failure in the pipeline system.

[0009] In some embodiments, the method further includes: An alarm for the pipeline fault is triggered and the fault location is pushed to the digital twin system so that the fault information can be displayed in the digital twin system, and the fault information includes at least the fault location.

[0010] In some embodiments, before fusing the multi-dimensional monitoring data within a single time step based on the first encoder in the target model to obtain local features, and before capturing the global features corresponding to the local features along the time axis based on the second encoder in the target model under preset constraints, the method further includes: Acquire multi-physical quantity sensor data and filter the data from the pipeline system that is operating normally as positive samples to construct a training set; A two-layer Transformer structure is used to perform spatiotemporal coupling modeling on the training set, and the two-layer Transformer structure is trained to obtain the target model. The first encoder fuses the temperature, pressure and flow features of the current time step through a self-attention mechanism to obtain local features for training, and the second encoder models long-range dependencies of a preset duration along the time axis under preset constraints to obtain global features for training.

[0011] In some embodiments, the step of using a two-layer Transformer structure to perform spatiotemporal coupling modeling on the training set and training the two-layer Transformer structure to obtain the target model includes: Based on the global features used for training the two-layer Transformer, a dual-branch structure of curve regression and focus classification is used to simultaneously output the future curve and the training fault confidence, thereby achieving continuous trend prediction and highly sensitive fault detection. The two-layer Transformer structure is iteratively trained using edge loss, and all weights of the first encoder and the second encoder converge to a preset termination condition under gradient-driven conditions to obtain the target model.

[0012] In some embodiments, the method further includes: Add causal masking constraints to the second encoder; By using the causal masking constraints added in the second encoder, the deep feature representation of the local features used for training is extracted to obtain the temporal representation sequence; The time-series representation sequence is subjected to feedforward-residual-layer normalization transformation, and finally the global features are obtained by average pooling.

[0013] According to a second aspect of this disclosure, a pipeline fault prediction device is provided, comprising: The acquisition unit is used to acquire multi-dimensional monitoring data of the pipeline system. The processing unit is used to fuse the multi-dimensional monitoring data within a single time step based on the first encoder in the target model to obtain local features, and to capture the global features corresponding to the local features along the time axis based on the second encoder in the target model under preset constraints. The prediction unit is used to predict pipeline faults in the pipeline system based on the global features and obtain the fault probability confidence level.

[0014] In some embodiments, the multi-dimensional detection data includes the temperature information, the pressure information, the flow rate information, the pipe location index, and the absolute time information; the device further includes: The first encoding unit is used to encode the temperature, pressure and flow information collected at a single point in the pipeline system at the same time after the acquisition unit acquires the multi-dimensional monitoring data of the pipeline system, and to obtain the spliced ​​feature vector. The second encoding unit is used to encode the pipeline position index and the absolute time information respectively to obtain the position feature vector and the time feature vector.

[0015] In some embodiments, the target model includes a Transformer model; The processing unit includes: The first determining module is used to divide the Transformer model into two layers to extract features from the spliced ​​feature vector, the position feature vector and the time feature vector. The first encoder in the first layer determines the data change pattern at a single point in the pipeline system to obtain the local features. The second determining module is used to determine the global pipeline data motion pattern by fusing the local features of all points in the pipeline system under the preset constraints through the second encoder in the second layer structure. The third determining module is used to capture the global features of temporal evolution in the global pipeline data through the time-series prediction module, wherein the Transformer model includes the time-series prediction module.

[0016] In some embodiments, the prediction unit includes: The mapping module is used to map the global features to obtain the failure probability confidence of the pipeline system in the next time window; The fourth determination module is used to compare the fault probability confidence level with a preset one-sided threshold. When the fault probability confidence level exceeds the preset one-sided threshold, it is determined that there is a fault in the pipeline system.

[0017] In some embodiments, the apparatus further includes: The push unit is used to trigger an alarm for the pipeline fault and push the fault location to the digital twin system so that the fault information can be displayed in the digital twin system, and the fault information includes at least the fault location.

[0018] In some embodiments, the apparatus further includes: The construction unit is used to acquire multi-physical quantity sensor data and filter the data of normal operation in the pipeline system as positive samples to construct a training set before the processing unit fuses the multi-dimensional monitoring data in a single time step based on the first encoder in the target model to obtain local features, and captures the global features corresponding to the local features along the time axis based on the second encoder in the target model under preset constraints. The training unit is used to perform spatiotemporal coupling modeling on the training set using a two-layer Transformer structure, and to train the two-layer Transformer structure to obtain the target model; wherein, the first encoder fuses the temperature, pressure and flow features of the current time step through a self-attention mechanism to obtain local features for training, and the second encoder models long-range dependencies of a preset duration along the time axis under preset constraints to obtain global features for training.

[0019] In some embodiments, the training unit includes: The generation module is used to generate a future curve and a training fault confidence score based on the global features used for training the two-layer Transformer, through a dual-branch structure of curve regression and focus classification, to achieve continuous trend prediction and highly sensitive fault detection. The training module is used to iteratively train the two-layer Transformer structure using edge loss. All weights of the first encoder and the second encoder converge to a preset termination condition under gradient-driven conditions to obtain the target model.

[0020] In some embodiments, the apparatus further includes: Add a module to add causal masking constraints to the second encoder; The extraction module is used to extract the deep feature representation of the training local features through the causal masking constraint added in the second encoder, so as to obtain the temporal representation sequence. The fifth determining module is used to transform the time-series representation sequence through feedforward-residual-layer normalization transformation, and finally obtain the global features by average pooling.

[0021] According to a third aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect above.

[0022] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in the first aspect above.

[0023] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.

[0024] In summary, the pipeline fault prediction method, apparatus, and electronic device provided in this disclosure include: acquiring multi-dimensional monitoring data of a pipeline system; fusing the multi-dimensional monitoring data within a single time step based on a first encoder in a target model to obtain local features; and capturing global features corresponding to the local features along a time axis based on a second encoder in the target model under preset constraints; and predicting pipeline faults of the pipeline system based on the global features to obtain a fault probability confidence level. Compared with related technologies, the solution of this disclosure can improve the accuracy of pipeline fault prediction by acquiring multi-dimensional monitoring data of a pipeline system; fusing the multi-dimensional monitoring data within a single time step using a first encoder in a target model to obtain local features; capturing global features corresponding to the local features along a time axis using a second encoder in the target model under preset constraints; and completing pipeline fault prediction based on the global features, thus providing reliable support for pipeline system operation and maintenance.

[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0026] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a flowchart illustrating a pipeline fault prediction method provided in some embodiments of this disclosure. Figure 2 This is a flowchart illustrating another method for predicting pipeline faults provided in some embodiments of this disclosure; Figure 3 This is a flowchart illustrating another method for predicting pipeline faults provided in some embodiments of this disclosure; Figure 4 This is a schematic diagram of time step stacking provided for some embodiments of the present disclosure; Figure 5 This is a flowchart illustrating another method for predicting pipeline faults provided in some embodiments of this disclosure; Figure 6This is a flowchart illustrating another method for predicting pipeline faults provided in some embodiments of this disclosure; Figure 7 This is a flowchart illustrating another method for predicting pipeline faults provided in some embodiments of this disclosure; Figure 8 This is a flowchart illustrating another method for predicting pipeline faults provided in some embodiments of this disclosure; Figure 9 This is a schematic diagram illustrating the verification of pipeline fault prediction results provided by some embodiments of this disclosure; Figure 10 A general logical framework diagram of a pipeline fault prediction method provided by some embodiments of this disclosure; Figure 11 A flowchart illustrating the specific implementation of a pipeline fault prediction method provided in some embodiments of this disclosure; Figure 12 This disclosure provides a task and model architecture illustration for pipeline fault prediction based on some embodiments. Figure 13 This is a schematic diagram of the structure of a pipeline fault prediction device provided in some embodiments of this disclosure; Figure 14 This is a schematic diagram of the structure of another pipeline fault prediction device provided in some embodiments of this disclosure; Figure 15 This is a schematic block diagram of an example electronic device provided for some embodiments of this disclosure. Detailed Implementation

[0027] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0028] The following describes, with reference to the accompanying drawings, a method, apparatus, and electronic device for predicting pipeline faults according to embodiments of the present disclosure.

[0029] Figure 1 This is a schematic flowchart illustrating a pipeline fault prediction method provided in an embodiment of the present disclosure.

[0030] like Figure 1 As shown, the method includes steps 101-103.

[0031] Step 101: Obtain multi-dimensional monitoring data of the pipeline system.

[0032] In some embodiments, multi-dimensional monitoring data refers to various monitorable data generated during the operation of the pipeline system that can reflect the system's operating status. Data is collected through monitoring devices deployed at different locations along the pipeline. These devices include, but are not limited to, sensors. The data collection process is performed at preset sampling intervals, which can be set according to the pipeline system's operating characteristics and monitoring requirements, ensuring that the collected data continuously and in real-time reflects the pipeline's operating status. The collected multi-dimensional monitoring data undergoes preliminary integrity verification, removing obviously missing or invalid data to ensure the accuracy of subsequent feature extraction and prediction processes.

[0033] The above methods can be used to obtain basic data reflecting the operating status of the pipeline system, providing data support for subsequent feature extraction and fault prediction.

[0034] Step 102: Based on the first encoder in the target model, the multi-dimensional monitoring data is fused within a single time step to obtain local features, and based on the second encoder in the target model, global features corresponding to the local features are captured along the time axis under preset constraints; wherein, the target model is obtained through a two-layer self-attention mechanism and trained using positive samples.

[0035] In some embodiments, the target model is a fault prediction model built based on machine learning, and its key structure employs a two-layer self-attention mechanism. The key to the self-attention mechanism is to automatically mine the internal correlation information of the data by calculating weights based on the similarity between data points. The formula is expressed as: Where Q, K, and V are the query vector, key vector, and value vector obtained by linear transformation of the data, respectively, and d is the vector dimension. The softmax function is used to normalize the weights, ensuring that the influence of different dimensions of data is adaptively adjusted according to their relevance. Positive samples refer to multi-dimensional monitoring data collected when the pipeline system is in normal operation. The selection criteria are no alarm records within a continuous time period and all monitoring indicators not exceeding the preset design threshold. Using positive samples to train the target model enables the model to learn the data pattern when the pipeline is in normal operation. The first encoder and the second encoder are key components in the target model for feature extraction. A single time step refers to the time unit corresponding to a single data acquisition, consistent with the sampling interval in step 101. The first encoder performs fusion processing on the multi-dimensional monitoring data within a single time step, and mines the inherent correlation of different dimensions of data within the same time step through a self-attention mechanism. The output local features can reflect the local operating status of the pipeline system within that time step. The preset constraints are rules set to ensure that the feature extraction process conforms to the temporal causal logic, and are used to avoid logical contradictions in data correlation analysis. The time axis refers to a sequence of multiple consecutive single time steps arranged in chronological order. The second encoder processes the local features of multiple consecutive time steps along this sequence, captures the pattern of local feature changes over time and the overall correlation between multiple local features, and finally outputs global features. The global features can reflect the overall operating status of the pipeline system over a period of time.

[0036] The above methods can extract local features reflecting the local operating status of pipelines and global features reflecting the overall operating trend from multi-dimensional monitoring data, providing effective feature support for fault prediction.

[0037] Step 103: Based on the global features, predict pipeline faults in the pipeline system to obtain the fault probability confidence level.

[0038] In some embodiments, the fault prediction process is implemented through the output layer of the target model. The output layer processes the global features and determines whether the pipeline operating status reflected by the global features deviates from the normal mode. The determination is based on a preset feature threshold, which is set based on the range of normal operating status features learned during positive sample training. When the global features exceed the feature threshold range, it is determined that the pipeline system has a fault risk.

[0039] The above methods enable effective prediction of pipeline system faults based on global features, and timely detection of abnormal states during pipeline operation.

[0040] In summary, the pipeline fault prediction method provided in this disclosure can acquire multi-dimensional monitoring data of the pipeline system; through a target model trained using a two-layer self-attention mechanism and positive samples, the first encoder fuses the multi-dimensional monitoring data in a single time step to obtain local features, and the second encoder captures the global features corresponding to the local features along the time axis under preset constraints; based on the global features, pipeline fault prediction of the pipeline system is completed, improving the accuracy of pipeline fault prediction and providing reliable support for pipeline system operation and maintenance.

[0041] Figure 2 A flowchart illustrating a pipeline fault prediction method provided in this disclosure embodiment is further shown, such as... Figure 2 As shown, the method may include steps 201-202.

[0042] Step 201: Perform self-attention encoding on the temperature, pressure, and flow information collected at a single point in the pipeline system at the same time to obtain a spliced ​​feature vector; wherein, the multi-dimensional monitoring data includes the temperature information, the pressure information, the flow information, the pipeline location index, and the absolute time information.

[0043] In some embodiments, a single monitoring point is a pre-defined monitoring location within the pipeline system. Sensors are deployed at each point to synchronously collect temperature, pressure, and flow information within the same time unit (i.e., time step). Temperature, pressure, and flow information are continuously changing physical quantities. The pipeline location index is a discrete identifier identifying the spatial location of the monitoring point, and the absolute time information is the specific timestamp of the data acquisition (i.e., absolute timestamp). Each time step requires the extraction of these five types of data to ensure the temporal continuity and integrity of the data. During the self-attention encoding process, the temperature, pressure, and flow information are first mapped to vectors of the same dimension through linear transformation, and then input into a single-head or multi-head self-attention layer. The attention output is defined as: Where Q, K, and V are the query vector, key vector, and value vector, respectively, after linear transformation of temperature, pressure, and flow rate information. , The concatenated feature vectors Here, d represents the trainable weights, d is the vector dimension, and the Softmax normalization coefficient ensures that the influence of different physical quantities on the output vector is adaptively adjusted according to their correlation. For temperature vector, For pressure vector, This is a flow vector. After encoding, three independent feature vectors are obtained, which are then concatenated. This is achieved by concatenating these three vectors along the feature dimension. The implementation methods include, but are not limited to, using NumPy's concatenate function or the concat interface of a deep learning framework, which fully preserves the coupling and correlation information of the three types of continuous features.

[0044] Step 202: Encode the pipeline location index and the absolute time information respectively to obtain the location feature vector and the time feature vector.

[0045] In some embodiments, the pipeline location index is discrete spatial information, treated as a one-dimensional discrete coordinate, and analyzed using the sine and cosine formulas. Encode, where Here, k represents the discrete value corresponding to the pipe location index, k is the index variable used to generate sine or cosine waves of different frequencies, and d is the feature vector dimension, which, after encoding, yields a location feature vector with the same dimension as the concatenated feature vector. This method can provide pipeline topology order information for the model without introducing learnable parameters, thus avoiding overfitting in sparse data locations. The encoding process for absolute time information is as follows: first, the absolute timestamp is decomposed into the cumulative number of seconds throughout the year. Then, the time feature vector representation is obtained through functions including but not limited to Time2Vec, as shown in the formula: ,in , These are preset parameters. Both the location feature vector and the time feature vector are fixed-dimensional numerical vectors, consistent with the dimension of the concatenated feature vector. Finally, the complete feature vector of a single point at the current time step can be represented as... The encoding methods for pipeline location indexes may include, but are not limited to, embedded encoding and one-hot encoding. The encoding methods for absolute time information may include, but are not limited to, integer encoding and cyclic encoding. All of these methods must ensure that the encoding results accurately reflect the location and time attributes.

[0046] Using the above method, five types of multi-dimensional monitoring data can be completely extracted at each time step. Continuous features, discrete location features, and periodic time features are converted into structured feature vectors through standardized coding, preserving the physical correlation, spatial attributes, and temporal attributes of the data, and providing standardized input for feature fusion and fault prediction in subsequent models.

[0047] Figure 3 A flowchart illustrating a pipeline fault prediction method provided by an embodiment of this disclosure is further illustrated. Based on Figure 2 The illustrated embodiment further explains step 102. Figure 3 This may include the following steps: Step 301: Within the Transformer model, a two-layer structure is divided to extract features from the spliced ​​feature vector, the position feature vector, and the time feature vector. The data change pattern at a single point in the pipeline system is determined by the first encoder in the first layer structure to obtain the local features.

[0048] In some embodiments, the Transformer model is a deep learning model with an encoder-decoder structure. Its two layers are independent and sequentially connected feature extraction units. The first layer is specifically adapted for feature processing at a single point. The data change pattern at a single point refers to the stable pattern exhibited by the encoded feature vector at that point across different time steps, including but not limited to the fluctuation range of continuous physical quantities and the numerical trend of the feature vector. The processing logic of the first encoder is based on a self-attention mechanism, which... Figure 2 Complete feature vector of a single point obtained in the embodiment As input, first use a linear transformation to... Project to query ,key ,value Three d-dimensional subspaces, among which Then through self-attention calculation Data correlation mining yields vector feature representations. It has integrated instantaneous coupling of temperature, pressure, and flow rate, and carries linear information of position and time components. This refers to local features. The first encoder may also include components such as layer normalization and residual connections. Layer normalization is used to unify the numerical distribution of feature vectors, and residual connections are used to alleviate the gradient vanishing problem in deep models. The implementation of these components includes, but is not limited to, the LayerNorm interface and Add interface in deep learning frameworks.

[0049] Step 302: The second encoder in the second layer structure fuses the local features of all points in the pipeline system under the preset constraints to determine the global pipeline data motion pattern.

[0050] In some embodiments, such as Figure 4 As shown, the local features of all points are arranged in time step order to form a temporal feature sequence. The temporal feature sequence of each time step contains the local features of all points within that time step. Then, the local features of the most recent N time steps are stacked in chronological order to obtain... Where N can be set to 2880, corresponding to the past 24 hours (sampling interval 30 seconds), covering both the daily cycle and retaining minute-by-minute details. The preset constraint is causal masking, achieved by constructing an upper triangular mask, as shown in the formula. Where i is the current step index and j is the historical step index, this mask is used to shield feature information after the current time step, ensuring that the information flow strictly follows the time logic from history to the future. The second encoder performs self-attention operation on the temporal feature sequence along the time axis, the calculation process is as follows: ,in This is the query vector for the features of the current step. The key vector is the feature of the historical step. This is a scaling factor to prevent excessively large dot products of high-dimensional vectors from causing softmax extrema. This operation fuses the correlation information of local features from different points and time steps to determine the global pipeline data motion pattern. The global pipeline data motion pattern refers to the overall regularity of local features across all points in the time dimension, including the coordinated change trend of features at different points and the fluctuation period of the overall data. The second encoder also includes a feedforward-residual-layer normalization transformation component, implemented using, but not limited to, the Linear, Add, and LayerNorm interfaces from deep learning frameworks, for nonlinear transformation and normalization of the features output by self-attention.

[0051] Step 303: The time-series prediction module captures the global features of temporal evolution in the global pipeline data, wherein the Transformer model includes the time-series prediction module.

[0052] In some embodiments, the temporal prediction module is a component in the Transformer model specifically designed to mine temporal dependencies. Its input is the temporal representation sequence output by the second encoder (a feature sequence after feedforward-residual-layer normalization transformation). This module performs average pooling on the temporal representation sequence to obtain a global vector. ,in This represents the value after normalization transformation with causal masking. This global vector has captured the statistical trends and abrupt changes of three physical quantities—temperature, pressure, and flow rate—over the past 24 hours. The time-series prediction module uses this global vector to separate time-evolution-related features, forming global features. These global features contain both spatial correlation information of all points and long-term temporal evolution patterns. The implementation methods of the time-series prediction module include, but are not limited to, long-series prediction architectures based on attention mechanisms and time-series analysis components based on statistical models, all of which can effectively capture time-evolution features.

[0053] Using the above method, the two-layer structure of the Transformer model and the time-series prediction module can be used to gradually extract the local features of a single point, the global motion patterns of all points, and the global features of temporal evolution from multi-dimensional monitoring data, fully preserving the spatial correlation and temporal dependence of the data, and providing support for subsequent fault prediction.

[0054] Figure 5 A flowchart illustrating a pipeline fault prediction method provided by an embodiment of this disclosure is further illustrated. Based on Figure 1 The illustrated embodiment further explains step 103. Figure 5 This may include the following steps: Step 401: Map the global features to obtain the failure probability confidence level of the pipeline system in the next time window.

[0055] In some embodiments, the global feature is the global vector output by the aforementioned time-series prediction module. This global vector has captured the statistical trends and abrupt changes in temperature, pressure, and flow rate over the past 24 hours. The affine mapping is achieved through a linear transformation plus a bias, first transforming the global vector... The input affine mapping layer generates log-odds values. The formula is: ,in For a trainable weight matrix, This is the bias term; then, the logarithmic probability value is compressed to the [0,1] interval using the sigmoid function to obtain the failure probability confidence level of the pipeline system within the next time window, as shown in the formula: The duration of the next time window can be set according to the pipeline system monitoring requirements (e.g., 30 seconds). The failure probability confidence level directly represents the probability of a pipeline system failure within this time window. The implementation of affine mapping includes, but is not limited to, the Linear layer in a deep learning framework, ensuring that the abstract spatiotemporal representation of global features can be converted into interpretable failure probability values.

[0056] Step 402: Compare the fault probability confidence level with a preset one-sided threshold. When the fault probability confidence level exceeds the preset one-sided threshold, it is determined that there is a fault in the pipeline system, and the fault location is located.

[0057] In some embodiments, the preset one-sided threshold is set based on the confidence distribution of fault probability under normal operating conditions learned during positive sample training, and can be adjusted according to actual operation and maintenance needs (e.g., setting 0.4 as the preset one-sided threshold (below 0.3 is considered normal, 0.3-0.4 is to be verified, and above 0.4 is a fault)). The fault probability confidence obtained in step 401 is used to... The system is compared numerically with a preset one-sided threshold. If the failure probability confidence level exceeds the preset one-sided threshold, a fault is determined to exist in the pipeline system. The fault location process is based on the correlation information of local features of each point contained in the global features. The pipeline location index (i.e., the location feature vector encoded in step 202 above) corresponding to the local features that deviate from the normal pattern in the global features is extracted. (Corresponding discrete identifiers) are used to match the physical location information of the pipeline system through the pipeline location index, thereby achieving accurate fault location. Fault location can be achieved by decomposing global features into the local feature contribution of each point, filtering points with abnormal contribution and associating them with their location indices.

[0058] The above method can transform abstract global features into interpretable fault probability confidence, achieve accurate fault determination by setting a unilateral threshold, and complete fault location by combining location features, thereby improving the interpretability and practicality of fault prediction.

[0059] Optionally, the pipeline fault prediction method provided in this disclosure embodiment further includes: An alarm for the pipeline fault is triggered and the fault location is pushed to the digital twin system so that the fault information can be displayed in the digital twin system, and the fault information includes at least the fault location.

[0060] In some embodiments, the triggering condition for the alarm is bound to the determination result of "determining that there is a fault in the pipeline system" in the aforementioned steps. When step 402 determines that there is a fault in the pipeline system (confidence exceeds a preset one-sided threshold) or that it is in a state pending verification (confidence is in the range of 0.3-0.4), the alarm mechanism is automatically triggered. Alarm methods include, but are not limited to, local audible and visual alarms, pop-up alarms on the operation and maintenance management platform, SMS notifications, and email reminders. Single or multiple alarm channel combinations can be configured according to the work scenario of the operation and maintenance team to ensure that alarm information can reach relevant personnel in a timely manner. The digital twin system is a virtual visualization system that maps 1:1 to the physical pipeline system. It can restore the topology, point distribution, and real-time operating status of the pipeline. Fault location information pushed to the system is matched with the virtual point coordinates in the digital twin system through the pipeline location index encoded in step 202 above, to achieve a precise correspondence between the physical location and the virtual location. In addition to the fault location, the displayed fault information may also include the corresponding confidence level value, the time window for fault determination, and associated abnormal temperature / pressure / flow data fragments. The display formats include highlighting the fault location on the virtual pipeline, displaying key fault information in a pop-up window, and generating a fault summary, making it convenient for maintenance personnel to intuitively obtain key fault information.

[0061] The above methods enable rapid triggering of multi-channel alarms after a fault is identified, ensuring timely response from maintenance personnel. At the same time, the visualization capabilities of the digital twin system clearly present key fault information, reducing the difficulty of fault location and handling, and improving the efficiency of emergency response to pipeline system faults.

[0062] Figure 6 A flowchart illustrating a pipeline fault prediction method provided in this disclosure embodiment is further shown, such as... Figure 6As shown, the method includes steps 501-502.

[0063] Step 501: Acquire multi-physical quantity sensor data and filter the data from the pipeline system that is operating normally as positive samples to construct a training set.

[0064] In some embodiments, multi-physical quantity sensor data is collected by sensors deployed at various points in the pipeline system. The collected physical quantities include temperature, pressure, and flow rate. Pipeline location indexes and absolute timestamps are recorded simultaneously. Data acquisition is performed at preset sampling intervals to ensure data continuity and integrity. The screening criteria for normally functioning data are: no alarm records from sensors for two consecutive weeks, and all monitored indicators such as temperature, pressure, and flow rate do not exceed the design thresholds of the pipeline system. Time periods meeting this standard are considered healthy segments, and the corresponding data are positive samples. After screening, the positive samples are divided into training, validation, and test sets in chronological order. The division process maintains the chronological order to avoid data overlap between different time periods, forming a consistent benchmark for model learning and evaluation, ensuring consistency between the training process and actual inference scenarios. When constructing the training set, sliding window slicing can also be applied to the data. The window size matches the time step length of the subsequent model input, ensuring that the training samples can cover various operating conditions of the pipeline system during normal operation.

[0065] Step 502: A two-layer Transformer structure is used to perform spatiotemporal coupling modeling on the training set, and the two-layer Transformer structure is trained to obtain the target model; wherein, the first encoder fuses the temperature, pressure and flow features of the current time step through a self-attention mechanism to obtain local features for training, and the second encoder models long-range dependencies of a preset duration along the time axis under preset constraints to obtain global features for training.

[0066] In some embodiments, the two-layer Transformer structure comprises an interconnected first-layer structure (first encoder) and a second-layer structure (second encoder). Spatiotemporal coupling modeling refers to simultaneously capturing the spatial correlation features and temporal evolution features of the data. The first encoder processes the temperature, pressure, and flow features of a single time step in the training set. It first maps each of the three types of features to vectors of the same dimension through linear transformation, then inputs them into a self-attention layer to perform operations that fuse the coupled correlations of temperature, pressure, and flow within the current time step, outputting local features for training. The second encoder's preset constraint is causal masking, achieved by constructing an upper triangular mask to shield feature information from future time steps. The preset duration can be set to 24 hours, corresponding to N=2880 time steps (sampling interval 30 seconds). The second encoder performs self-attention operations along the time axis on the local features for training over N consecutive time steps, capturing the temporal evolution patterns and long-range dependencies of the data within the preset duration, outputting global features for training. The training process of the two-layer Transformer structure uses the global features for training as the key, calculates the prediction error through a preset loss function, drives iterative updates of the model weights until the validation set metrics meet the convergence condition, and finally obtains the target model. The two-layer Transformer structure can also include components such as layer normalization, residual connections, and feedforward networks. The implementation methods include, but are not limited to, the LayerNorm interface, Add interface, and Linear interface in deep learning frameworks, which are used to improve the training stability and feature representation capabilities of the model.

[0067] The above methods enable the construction of a training set with balanced class distribution and reliable data quality. By leveraging a two-layer Transformer structure, collaborative modeling of spatial correlation and temporal dependence of data can be achieved. The trained target model has the ability to capture the normal operation mode of the pipeline system, providing a solid model foundation for subsequent fault prediction.

[0068] Figure 7 A flowchart illustrating a pipeline fault prediction method provided in this disclosure embodiment is further illustrated. Figure 6 The illustrated embodiment further explains step 502. Figure 7 This may include the following steps: Step 601: Based on the global features used for training the two-layer Transformer, the future curve and the training fault confidence are output simultaneously through a dual-branch structure of curve regression and focus classification, thereby achieving continuous trend prediction and highly sensitive fault detection.

[0069] In some embodiments, the global features used for training are the global vectors output by the two-layer Transformer. This global vector has captured the statistical trends and abrupt changes in temperature, pressure, and flow rate within a preset time period. The key to the curve regression branch is the affine mapping model, which uses a linear matrix to remap the abstract global vector back to the dimensions of the three physical quantities: temperature, pressure, and flow rate. This enables the prediction of the evolution trends of multiple physical quantities within future time windows. The formula is: ,in It is a linear transformation matrix. The bias term is k, which represents the number of future prediction steps (which can be set to 60 steps, corresponding to 30 minutes). This represents a sequence of three-dimensional physical quantities (temperature, pressure, flow rate) for the next k steps. The processing logic for the focus classification branch is consistent with the fault prediction inference process, first generating logarithmic probability values ​​through affine mapping. The fault confidence scores are then compressed to the [0,1] interval using the sigmoid function to obtain the scores for training. This confidence level is used to characterize the probability of a pipeline system failure within the next time window (consistent with the sampling interval, which can be set to 30 seconds). The curve regression branch and the focus classification branch are deployed in parallel, sharing global features used for training, to achieve collaborative training of multi-physical quantity trend prediction and failure probability assessment. The implementation methods of the branches include, but are not limited to, the Linear interface and Sigmoid activation function interface in deep learning frameworks.

[0070] Step 602: The two-layer Transformer structure is iteratively trained using edge loss. All weights of the first encoder and the second encoder converge to the preset termination condition under gradient-driven conditions to obtain the target model.

[0071] In some embodiments, the training process employs dual loss functions for collaborative optimization, corresponding to the curve regression branch and the focus classification branch, respectively. The loss function for the curve regression branch is the mean-square error (MSE), which measures the deviation between the predicted evolution trend of multiple physical quantities and the true sequence. The formula is: , where Y is the sequence of true physical quantities for the next k steps. The focus classification branch employs a boundary loss with edges to compress the training fault confidence of all positive samples (normal data) into a high-density submanifold, enhancing the model's sensitivity to anomalous patterns and avoiding model skew caused by class imbalance. The overall loss function is a weighted sum of the losses from the two branches. Through gradient backpropagation, the loss error is backpropagated to the first encoder, the second encoder, and the parameter layers of each branch of the two-layer Transformer, driving... , , , , All trainable weights are iteratively updated. Preset termination conditions include the number of iteration epochs and a convergence threshold. For example, when the loss value on the validation set does not decrease within 8 consecutive epochs and the prediction bias of the curve regression branch is lower than the convergence threshold (0.001℃ / bar / Ls), training stops and all current weight parameters are saved to obtain the target model.

[0072] The above method can simultaneously optimize the trend prediction accuracy of multiple physical quantities and the accuracy of fault confidence assessment through a dual-branch structure. It also solves the class imbalance problem by using edge loss, so that the trained target model has both accurate time series prediction capability and high sensitivity to identify fault modes, providing a reliable guarantee for fault prediction in the subsequent inference stage.

[0073] Figure 8 A flowchart illustrating a pipeline fault prediction method provided in this disclosure embodiment is further shown, such as... Figure 8 As shown, the method includes steps 701-703.

[0074] Step 701: Add causal masking constraints to the second encoder.

[0075] In some embodiments, the causal masking constraint is a mechanism to ensure that the second encoder strictly adheres to the temporal causal logic settings when modeling along the time axis. The purpose is to prevent the model from acquiring feature information from future time periods during training, thus preventing inconsistencies between training and inference. This constraint is implemented through a specific masking mechanism, which only allows features from the current time step and previous historical time steps to participate in the computation, while masking features from the current time step onwards. Implementation methods include, but are not limited to, generating a corresponding masking matrix using a deep learning framework to ensure that the masking directly affects the self-attention computation process, effectively isolating future information.

[0076] Step 702: Using the causal masking constraint added in the second encoder, extract the deep feature representation of the local features used for training to obtain the temporal representation sequence.

[0077] In some embodiments, the training local features input to the second encoder are arranged in chronological order to form a temporal feature sequence containing multiple consecutive time steps. The second encoder performs self-attention operation on this temporal feature sequence. Under the constraint of causal masking, it calculates association weights only based on the training local features of the current and historical time steps to explore long-range dependencies and co-associations between training local features of different time steps and different locations. Feature representations containing deep spatiotemporal associations are extracted from the training local features. These feature representations are arranged in the original chronological order to form a temporal representation sequence. This temporal representation sequence completely preserves the temporal evolution law and spatial association information of the features of each location during the operation of the pipeline system.

[0078] Step 703: The time-series representation sequence is subjected to feedforward-residual-layer normalization transformation, and finally the global features are obtained by average pooling.

[0079] In some embodiments, the feedforward-residual-layer normalization transformation is a series of feature processing operations: layer normalization is used to unify the numerical distribution of each feature vector in the temporal representation sequence, avoiding excessive numerical differences that could affect the stability of subsequent processing; residual connections are used to superimpose the temporal representation sequence before transformation with the sequence after layer normalization, alleviating the gradient vanishing problem in deep model training; the feedforward network enhances the features through linear transformation and nonlinear activation, improving the expressive power of the features. After the above transformation, average pooling is performed on the temporal representation sequence to calculate the mean of the feature vectors at all time steps, condensing the global feature. This global feature integrates the key information in the temporal representation sequence and can comprehensively represent the overall operating state of the pipeline system within a preset time period. The implementation of the feedforward-residual-layer normalization transformation includes, but is not limited to, the corresponding functional interfaces in the deep learning framework, and the implementation of average pooling includes, but is not limited to, the pooling components built into the framework.

[0080] The above method can fully explore the deep spatiotemporal correlations of local features used for training without introducing future information. After standardization transformation and pooling processing, high-quality global features are obtained, which not only ensures the rationality of model training, but also ensures that the global features can provide comprehensive and reliable feature support for subsequent training.

[0081] Figure 9 This is a schematic diagram illustrating the verification of pipeline fault prediction results provided in an embodiment of this disclosure, as shown below. Figure 9 As shown in the figure, the horizontal and vertical axes represent the failure probability confidence scores output by the target model. Each data point in the figure corresponds to a real sample within a 30-second time window. Blue dots represent samples that are actually in normal operation, while red dots represent samples that have actually failed. The background color is the fill color after clustering the sample points according to their confidence scores. The figure shows that the blue and red dots are generally separated, and the number of sample points within the preset verification interval of 0.3-0.4 is relatively sparse. This indicates that the classification results output by the target model are basically consistent with the actual results after manual verification, effectively distinguishing between normal and faulty samples and avoiding a large number of results being concentrated in the verification area. This demonstrates high practical value for pipeline failure prediction in production environments.

[0082] In some possible ways, Figure 10 A general logical framework diagram of a pipeline fault prediction method provided in this disclosure embodiment is shown below. Figure 10As shown, the framework comprises four parts: data acquisition and preprocessing, pipeline dataset construction, model training, and pipeline fault prediction model. The workflow is interconnected through result transmission. The data acquisition and preprocessing section includes steps such as time segmentation, health zone segmentation, and measurement point data acquisition. Through preliminary processing of the monitoring data of the pipeline system, it outputs five-dimensional feature codes corresponding to temperature, pressure, flow rate, time, and location. The pipeline dataset construction process includes steps such as window index generation, pipeline topology mapping, data dimension alignment, and partitioning of training, validation, and test sets. The preprocessed feature data is standardized and organized to form a dataset usable by the model. The pipeline fault prediction model takes five-dimensional feature encoding as input and sequentially passes through components such as time series module, single-point feature fusion, and global feature fusion to complete the temporal and spatial correlation mining of features and output feature results. The model training part is based on the feature results and sequentially performs data processing, fully connected mapping, affine mapping, geometric normalization and other steps. At the same time, through operations such as curve reconstruction and MSE loss calculation, the weight convergence of curve prediction and fault detection is realized respectively, and finally the model training and prediction functions are implemented.

[0083] Figure 11 A flowchart illustrating the specific implementation of a pipeline fault prediction method provided in this disclosure embodiment is shown below. Figure 11 As shown, this process takes raw data as input and sequentially completes data preprocessing, feature encoding, model feature fusion, and prediction information transfer: Data preprocessing and dataset construction stage: The raw data is first processed by precision adjustment and resampling, feature selection and computation. At the same time, a single classification strategy is adopted (only pipeline data under normal operation is selected) to complete the construction of the pipeline dataset. Then, the dataset is divided into training set, validation set and test set to provide data foundation for model training.

[0084] Feature encoding and fusion stage: The original data is used to extract 5-dimensional features consisting of temperature, pressure, flow rate, location information, and time. Feature encoding is achieved through a self-attention mechanism, location information is encoded using sine and cosine encoding, and time information is input into the time series module through a time attention mechanism. The encoded features are concatenated and input into the transformer single-point feature fusion model to obtain single-point features for a single time step. The single-point features of N consecutive time steps are integrated into the total features of a single time step and then input into the transformer global feature fusion model to complete the global fusion of features.

[0085] Prediction and Information Transmission Stage: Based on the results of global feature fusion, model training and prediction are performed, and finally the prediction information is transmitted to the digital twin scene to realize the visualization of the prediction results.

[0086] In some possible ways, Figure 12 This is an illustration of the task and model architecture for pipeline fault prediction provided in an embodiment of the present disclosure, as shown in the diagram. Figure 12 As shown in the diagram, this diagram, focusing on a pipeline scenario, clarifies the specific architecture for pipeline fault prediction from the dimensions of task, data, model, and input / output: Task Scenario and Description: The task scenario is a water-cooled pipeline in a data center building. It is essentially a classification-regression task, which involves building a dataset based on data collected from valves on the pipeline. A single classification method is used to enable the model to learn the data change trends and working modes when the pipeline is running healthily, thereby determining whether the data at the information points is abnormal (not considering the instantaneous opening and closing of the pipeline).

[0087] Dataset: The dataset consists of information points on all pipelines of a cold source group control system for a certain building. It needs to be highly structured and a single set of data (including flow rate, pressure, temperature, and location of information points) should be collected at the same time. The data size is 6,000-8,000 sets.

[0088] Model Structure: The inference strategy includes a single-classification strategy (trained only with data when the pipeline is working normally to avoid the impact of faulty data on dataset purity); a hierarchical structure learns the data change patterns of individual points and the movement patterns of global pipeline data; time-series prediction considers the temporal continuity of data; key parts adopt a self-attention mechanism (to mine deep data correlations) and an encoder-decoder architecture (lightweight structure to improve feature fusion performance and control training costs), while also equipped with functional components such as word embedding and layer normalization, as well as other functions such as mask generation and self-attention calculation.

[0089] Input and prediction: After receiving a set of data and inferring, the model outputs the probability of an anomaly (trend) at a certain information point in the future.

[0090] Corresponding to the pipeline fault prediction method described above, this invention also proposes a pipeline fault prediction device. Since the device embodiments of this invention correspond to the method embodiments described above, details not disclosed in the device embodiments can be referred to in the method embodiments described above, and will not be repeated here.

[0091] Figure 13 This is a schematic diagram of the structure of a pipeline fault prediction device provided in an embodiment of the present disclosure, as shown below. Figure 13 As shown, the device includes: Acquisition unit 81 is used to acquire multi-dimensional monitoring data of the pipeline system; The processing unit 82 is used to fuse the multi-dimensional monitoring data within a single time step based on the first encoder in the target model to obtain local features, and to capture the global features corresponding to the local features along the time axis based on the second encoder in the target model under preset constraints. The prediction unit 83 is used to predict pipeline faults in the pipeline system based on the global features and obtain the fault probability confidence level.

[0092] The pipeline fault prediction device provided in this embodiment can acquire multi-dimensional monitoring data of the pipeline system; through a target model obtained by a two-layer self-attention mechanism and training with positive samples, the first encoder fuses the multi-dimensional monitoring data in a single time step to obtain local features, and then the second encoder captures the global features corresponding to the local features along the time axis under preset constraints; based on the global features, the pipeline fault prediction of the pipeline system is completed, which improves the accuracy of pipeline fault prediction and provides reliable support for pipeline system operation and maintenance.

[0093] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 14 As shown, the multi-dimensional monitoring data includes the temperature information, the pressure information, the flow rate information, the pipeline location index, and the absolute time information. The device also includes: The first encoding unit 84 is used to encode the temperature information, pressure information and flow information collected at the same time by a single point in the pipeline system after the acquisition unit 81 acquires the multi-dimensional monitoring data of the pipeline system, and to obtain a spliced ​​feature vector. The second encoding unit 85 is used to encode the pipeline position index and the absolute time information respectively to obtain the position feature vector and the time feature vector.

[0094] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 14 As shown, the target model includes the Transformer model; The processing unit 82 includes: The first determining module 821 is used to divide the Transformer model into two layers to extract features from the spliced ​​feature vector, the position feature vector and the time feature vector. The first encoder in the first layer determines the data change pattern at a single point in the pipeline system to obtain the local features. The second determining module 822 is used to determine the global pipeline data motion pattern by fusing the local features of all points in the pipeline system under the preset constraints through the second encoder in the second layer structure. The third determining module 823 is used to capture the global features of temporal evolution in the global pipeline data through the time series prediction module, wherein the Transformer model includes the time series prediction module.

[0095] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 14 As shown, the prediction unit 83 includes: The mapping module 831 is used to map the global features to obtain the failure probability confidence of the pipeline system in the next time window. The fourth determining module 832 is used to compare the fault probability confidence level with a preset one-sided threshold. When the fault probability confidence level exceeds the preset one-sided threshold, it is determined that there is a fault in the pipeline system.

[0096] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 14 As shown, the device further includes: The push unit 86 is used to trigger an alarm for the pipeline fault and push the fault location to the digital twin system so that the fault information can be displayed in the digital twin system, and the fault information includes at least the fault location.

[0097] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 14 As shown, the device further includes: The construction unit 87 is used to acquire multi-physical quantity sensor data and filter the data of normal operation in the pipeline system as positive samples to construct a training set before the processing unit 82 fuses the multi-dimensional monitoring data in a single time step based on the first encoder in the target model to obtain local features, and captures the global features corresponding to the local features along the time axis based on the second encoder in the target model under preset constraints. Training unit 88 is used to perform spatiotemporal coupling modeling on the training set using a two-layer Transformer structure, and to train the two-layer Transformer structure to obtain the target model; wherein, the first encoder fuses the temperature, pressure and flow features of the current time step through a self-attention mechanism to obtain local features for training, and the second encoder models long-range dependencies of a preset duration along the time axis under preset constraints to obtain global features for training.

[0098] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 14 As shown, the training unit 88 includes: The generation module 881 is used to generate global features for training the two-layer Transformer, and through a dual-branch structure of curve regression and focus classification, simultaneously output future curves and training fault confidence, thereby achieving continuous trend prediction and highly sensitive fault detection. Training module 882 is used to iteratively train the two-layer Transformer structure using edge loss, and all weights of the first encoder and the second encoder converge to a preset termination condition under gradient-driven conditions to obtain the target model.

[0099] Furthermore, in one possible implementation of the embodiments of this disclosure, such as Figure 14 As shown, the device further includes: Add module 883 to add causal masking constraints in the second encoder; Extraction module 884 is used to extract the deep feature representation of the training local features through the causal masking constraint added in the second encoder, so as to obtain the temporal representation sequence; The fifth determining module 885 is used to transform the time-series representation sequence through feedforward-residual-layer normalization transformation, and finally obtain the global features by average pooling.

[0100] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of the embodiments of this disclosure, and the principle is the same. Therefore, the embodiments of this disclosure are not limited thereto.

[0101] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0102] Figure 15 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0103] like Figure 15As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 902 or a computer program loaded from storage unit 908 into RAM (Random Access Memory) 903. The RAM 903 can also store various programs and data required for the operation of the electronic device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. An I / O (Input / Output) interface 905 is also connected to bus 904.

[0104] Multiple components in electronic device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of displays, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows electronic device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0105] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as pipeline fault prediction methods. For example, in some embodiments, the pipeline fault prediction method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the aforementioned pipeline fault prediction method by any other suitable means (e.g., by means of firmware).

[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0107] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0108] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0110] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.

[0111] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0112] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0113] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0114] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for predicting pipeline faults, characterized in that, include: Acquire multi-dimensional monitoring data of the pipeline system; Based on the first encoder in the target model, the multi-dimensional monitoring data is fused within a single time step to obtain local features, and based on the second encoder in the target model, global features corresponding to the local features are captured along the time axis under preset constraints. Based on the global features, pipeline faults in the pipeline system are predicted to obtain the fault probability confidence level.

2. The method according to claim 1, characterized in that, The multi-dimensional detection data includes temperature information, pressure information, flow information, pipeline location index, and absolute time information; after acquiring the multi-dimensional monitoring data of the pipeline system, the method further includes: The temperature, pressure, and flow information collected at a single point in the pipeline system at the same time are subjected to self-attention encoding to obtain a spliced ​​feature vector. The pipeline location index and the absolute time information are encoded respectively to obtain the location feature vector and the time feature vector.

3. The method according to claim 2, characterized in that, The target model includes the Transformer model; The first encoder in the target model fuses the multi-dimensional monitoring data within a single time step to obtain local features, and based on the second encoder in the target model, captures the global features corresponding to the local features along the time axis under preset constraints, including: The Transformer model is divided into two layers to extract features from the spliced ​​feature vector, the position feature vector, and the time feature vector. The first encoder in the first layer determines the data change pattern at a single point in the pipeline system to obtain the local features. By fusing the local features of all points in the pipeline system under the preset constraints using the second encoder in the second layer structure, the global pipeline data motion pattern is determined. The time-series prediction module captures the global features of temporal evolution in the global pipeline data, wherein the Transformer model includes the time-series prediction module.

4. The method according to claim 1, characterized in that, The prediction of pipeline faults in the pipeline system based on the global features, to obtain a fault probability confidence level, includes: The global features are mapped to obtain the failure probability confidence level of the pipeline system in the next time window; The failure probability confidence level is compared with a preset one-sided threshold. When the failure probability confidence level exceeds the preset one-sided threshold, it is determined that there is a failure in the pipeline system.

5. The method according to claim 4, characterized in that, The method further includes: An alarm for the pipeline fault is triggered and the fault location is pushed to the digital twin system so that the fault information can be displayed in the digital twin system; wherein, the fault information includes at least the fault location.

6. The method according to any one of claims 1-5, characterized in that, Before the first encoder in the target model fuses the multi-dimensional monitoring data within a single time step to obtain local features, and the second encoder in the target model captures the global features corresponding to the local features along the time axis under preset constraints, the method further includes: Acquire multi-physical quantity sensor data and filter the data from the pipeline system that is operating normally as positive samples to construct a training set; A two-layer Transformer structure is used to perform spatiotemporal coupling modeling on the training set, and the two-layer Transformer structure is trained to obtain the target model. The first encoder fuses the temperature, pressure and flow features of the current time step through a self-attention mechanism to obtain local features for training, and the second encoder models long-range dependencies of a preset duration along the time axis under preset constraints to obtain global features for training.

7. The method according to claim 6, characterized in that, The step of employing a two-layer Transformer structure to perform spatiotemporal coupling modeling on the training set, and training the two-layer Transformer structure to obtain the target model, includes: Based on the global features used for training the two-layer Transformer, a dual-branch structure of curve regression and focus classification is used to simultaneously output the future curve and the training fault confidence, thereby achieving continuous trend prediction and highly sensitive fault detection. The two-layer Transformer structure is iteratively trained using edge loss, and all weights of the first encoder and the second encoder converge to a preset termination condition under gradient-driven conditions to obtain the target model.

8. The method according to claim 7, characterized in that, The method further includes: Add causal masking constraints to the second encoder; By using the causal masking constraints added in the second encoder, the deep feature representation of the local features used for training is extracted to obtain the temporal representation sequence; The time-series representation sequence is subjected to feedforward-residual-layer normalization transformation, and finally the global features are obtained by average pooling.

9. A pipeline fault prediction device, characterized in that, include: The acquisition unit is used to acquire multi-dimensional monitoring data of the pipeline system. The processing unit is used to fuse the multi-dimensional monitoring data within a single time step based on the first encoder in the target model to obtain local features, and to capture the global features corresponding to the local features along the time axis based on the second encoder in the target model under preset constraints. The prediction unit is used to predict pipeline faults in the pipeline system based on the global features and obtain the fault probability confidence level.

10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.