Method, device and equipment for monitoring water hammer in a pipeline

By utilizing microsecond-level timestamps and physical sparse feature analysis technology in the SCADA system, the problem of low accuracy in pipeline water hammer monitoring has been solved, achieving higher-precision water hammer positioning and reducing safety risks to pipelines and equipment.

CN120873828BActive Publication Date: 2026-02-10RICHFIT INFORMATION TECH +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511406240.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-02-10
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of monitoring water hammer in pipelines is low, making it difficult to effectively identify and locate the location of water hammer effects, which increases the risk of pipeline rupture and equipment damage.

Method used

By responding to the trigger signals of fluid control equipment in the SCADA system, the pressure and flow signals of the oil pipeline are acquired. Using microsecond-level timestamps as the time reference, physical sparsity feature analysis techniques, including first-order difference, zero-drift correction, asymmetric complex wavelet compression, sound velocity adaptive extended convolution, and learnable mask gating, are employed to determine the occurrence of water hammer events.

Benefits of technology

It improved the accuracy of water hammer positioning, eliminated inter-station clock synchronization errors, and enhanced the accuracy of time difference measurement from milliseconds to microseconds, significantly improving the accuracy of water hammer monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873828B_ABST
    Figure CN120873828B_ABST
Patent Text Reader

Abstract

The pipeline water hammer monitoring method, device and equipment provided by the application relate to the oil and gas pipeline monitoring technical field. The method is applied to an SCADA system, and includes: in response to detecting a trigger signal of a fluid control device in an oil pipeline, acquiring a pressure signal and a flow signal in the oil pipeline, the pressure signal and the flow signal being based on a microsecond-level time stamp corresponding to the trigger signal as a time reference; determining a physical sparse feature according to the pressure signal and the flow signal; and determining whether an event corresponding to the trigger signal is water hammer based on the physical sparse feature. Through the application, the accuracy of water hammer positioning is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of oil and gas pipeline monitoring, and in particular to a pipeline water hammer monitoring method, device and equipment. BACKGROUND

[0002] Oil, as an important resource, its transportation mainly relies on a huge network of oil pipelines. These pipeline systems usually span across vast areas, involving complex pump stations, valves and control equipment. During the operation of the oil pipeline, the fluid dynamics phenomenon poses a major challenge to the safety and stability of the system. In particular, the water hammer effect caused by the instantaneous fluctuation of fluid pressure in the pipe, which can lead to pipe rupture, equipment damage and even environmental pollution, has always been a key technical problem in the oil and gas storage and transportation field that needs to be solved urgently.

[0003] Currently, the industry usually relies on the SCADA (Supervisory Control And Data Acquisition) system for remote pipeline water hammer monitoring. For example, patent application CN116146906A discloses a pipeline water hammer monitoring method, the execution process of which mainly includes: first, obtaining the monitoring data of the start and end of the field pipeline network; then, comparing the monitoring data with the preset data to determine the position of the water hammer effect; further, based on the determined position of the water hammer effect, obtaining the monitoring data of the middle part of the field pipeline network and comparing it again with the preset data; finally, based on the comparison result, reviewing the accuracy of the positioning. The patent aims to determine and verify the position of the water hammer effect through this segmented comparison and review method. However, the above method results in low accuracy of pipeline water hammer monitoring. SUMMARY

[0004] The present application provides a pipeline water hammer monitoring method, device and equipment to improve the accuracy of pipeline water hammer monitoring.

[0005] In a first aspect, the present application provides a pipeline water hammer monitoring method applied to a SCADA system, the method comprising:

[0006] In response to detecting a trigger signal of a fluid control device in the oil pipeline, obtaining a pressure signal and a flow signal in the oil pipeline, the pressure signal and the flow signal being based on a microsecond-level timestamp corresponding to the trigger signal as a time reference;

[0007] Determining a physical sparse feature according to the pressure signal and the flow signal;

[0008] Determining whether the trigger signal corresponds to a water hammer event based on the physical sparse feature.

[0009] In a possible implementation, the physical sparse feature is determined according to the pressure signal and the flow signal, including: determining a water hammer origin according to the pressure signal; based on the time corresponding to the water hammer origin, signal data of a preset time length is intercepted from the pressure signal and the flow signal at the water hammer origin to generate a main window data frame; and the physical sparse feature is determined according to the main window data frame.

[0010] In a possible implementation, the water hammer origin is determined according to the pressure signal, including: performing first-order difference on the pressure signal based on a flow stability constraint to determine a point corresponding to a maximum instantaneous drop rate in the pressure signal; and the point corresponding to the maximum instantaneous drop rate is determined as the water hammer origin.

[0011] In a possible implementation, the physical sparse feature is determined according to the main window data frame, including: based on the pipe segment length of the oil pipeline and the fluid sound speed, the main window data frame is divided into a plurality of sub-piece data frames; based on the first sub-piece data frame and the tail sub-piece data frame in the plurality of sub-piece data frames, zero drift processing is performed on the pressure signal in the main window data frame to obtain a zero drift corrected pressure signal; an asymmetric complex wavelet compression operation is performed on the flow signal in the main window data frame to obtain a compressed flow signal; based on an instantaneous pressure-flow coupling factor, inverse stretching is performed on the compressed flow signal to generate a conservative flow signal; and the physical sparse feature is generated according to the zero drift corrected pressure signal and the conservative flow signal.

[0012] In a possible implementation, the physical sparse feature is generated according to the zero drift corrected pressure signal and the conservative flow signal, including: a tensor signal is determined according to the zero drift corrected pressure signal and the conservative flow signal; an acoustic speed adaptive expansion convolution operation is performed on the tensor signal to obtain a convolution feature, wherein a convolution kernel base length of the acoustic speed adaptive expansion convolution is calculated in real time from a sound speed round trip sampling distance; based on an annular difference matrix, an annular difference is applied to the convolution feature to obtain a residual vector, the annular difference matrix being determined according to a rotational speed period of the fluid control device; and the physical sparse feature is determined based on the residual vector.

[0013] In a possible implementation, the physical sparse feature is determined based on the residual vector, including: an energy alignment feature is determined based on the residual vector; the energy alignment feature is processed by a learnable mask gate to obtain a target feature, the learnable mask gate being generated based on a friction coefficient and an instantaneous Reynolds number mapping; and the physical sparse feature is determined according to the target feature by using a mask sparse autoencoder.

[0014] In a possible implementation, the determining, based on the physical sparse feature, whether the event corresponding to the trigger signal is water hammer includes: determining, based on the physical sparse feature, a posterior probability and a double uncertainty of the event corresponding to the trigger signal; and determining, according to the posterior probability and the double uncertainty, whether the event corresponding to the trigger signal is water hammer.

[0015] In a possible implementation, the determining, based on the physical sparse feature, the posterior probability and the double uncertainty of the event corresponding to the trigger signal includes: obtaining a feature package based on the physical sparse feature; and determining, according to the feature package, the posterior probability and the double uncertainty of the event corresponding to the trigger signal by using a variational Gaussian mixture model combined with measurement noise covariance and cognitive noise covariance.

[0016] In a possible implementation, the obtaining, based on the physical sparse feature, the feature package includes: performing diagonal scaling on the physical sparse feature to obtain a first physical sparse feature; and splicing the first physical sparse feature to obtain the feature package.

[0017] In a possible implementation, the method further includes: freezing weights in the variational Gaussian mixture model, and traversing any mask vector in a mask vector set, wherein the mask vector set is determined according to the learnable mask gating; and determining, for any mask vector, a mutual information weight vector corresponding to the mask vector based on the frozen variational Gaussian mixture model; and determining, according to the mutual information weight vector, the non-discriminative feature.

[0018] In a possible implementation, after the non-discriminative feature is determined, the method further includes: generating a new mask vector set based on the non-discriminative feature; determining, according to the new mask vector set, a sparse vector and a reconstruction residual; determining, based on the sparse vector and the reconstruction residual, whether the variational Gaussian mixture model is compressed successfully; and solidifying the new mask vector set as an online lightweight model when the variational Gaussian mixture model is compressed successfully.

[0019] In a possible implementation, after the posterior probability and the double uncertainty are determined, the method further includes: determining, according to the double uncertainty, a comprehensive uncertainty; determining, according to the posterior probability, a maximum a posteriori probability; and grading the event based on the comprehensive uncertainty and the maximum a posteriori probability.

[0020] In a second aspect, the present application provides a pipeline water hammer monitoring device, applied to a SCADA system, and the device includes:

[0021] The acquisition module is configured to, in response to detecting a trigger signal of a fluid control device in an oil pipeline, acquire a pressure signal and a flow signal in the oil pipeline, the pressure signal and the flow signal being based on a microsecond-level time stamp corresponding to the trigger signal as a time reference.

[0022] The determination module is used to determine the physical sparsity characteristics based on the pressure signal;

[0023] The determination module is also used to determine whether the event corresponding to the trigger signal is a water hammer based on physical sparsity characteristics.

[0024] In one possible implementation, the determining module is specifically used to: determine the water hammer origin based on the pressure signal; based on the time corresponding to the water hammer origin, extract signal data of a preset time length from the pressure signal and flow signal at the water hammer origin to generate a main window data frame; and determine the physical sparsity characteristics based on the main window data frame.

[0025] In one possible implementation, the determining module is specifically used to: perform a first-order difference on the pressure signal based on the flow stability constraint to determine the point corresponding to the maximum instantaneous rate of decrease in the pressure signal; and determine the point corresponding to the maximum instantaneous rate of decrease as the water hammer origin.

[0026] In one possible implementation, the determining module is specifically used to: divide the main window data frame into multiple sub-data frames based on the pipeline segment length and fluid sound velocity; perform zero-drift processing on the pressure signal in the main window data frame based on the first and last sub-data frames to obtain a zero-drift corrected pressure signal; perform asymmetric complex wavelet compression on the flow signal in the main window data frame to obtain a compressed flow signal; perform inverse stretching on the compressed flow signal based on the instantaneous pressure-flow coupling factor to generate a conserved flow signal; and generate physical sparsity features based on the zero-drift corrected pressure signal and the conserved flow signal.

[0027] In one possible implementation, the pipeline water hammer monitoring device further includes a generation module, which is specifically used for: determining a tensor signal based on the zero-drift corrected pressure signal and the conserved flow signal; performing a sound speed adaptive expanding convolution operation on the tensor signal to obtain convolution features, wherein the base length of the convolution kernel of the sound speed adaptive expanding convolution is calculated in real time by the sound speed round-trip sampling distance; applying a ring difference to the convolution features based on a ring difference matrix to obtain a residual vector, wherein the ring difference matrix is ​​determined according to the rotational speed period of the fluid control equipment; and determining physical sparsity features based on the residual vector.

[0028] In one possible implementation, the determination module is specifically used to: determine energy alignment features based on the residual vector; process the energy alignment features through a learnable mask gating to obtain target features, wherein the learnable mask gating is generated based on the mapping of friction coefficient and instantaneous Reynolds number; and determine physical sparsity features using a mask sparse autoencoder based on the target features.

[0029] In one possible implementation, the determining module is specifically used to: determine the posterior probability and double uncertainty of the event corresponding to the trigger signal based on physical sparsity features; and determine whether the event corresponding to the trigger signal is water hammer based on the posterior probability and double uncertainty.

[0030] In one possible implementation, the determining module is specifically used to: obtain a feature package based on physical sparse features; and, based on the feature package, determine the posterior probability and dual uncertainty of the event corresponding to the trigger signal using a variational Gaussian mixture model that combines measurement noise covariance and cognitive noise covariance.

[0031] In one possible implementation, the pipe water hammer monitoring device further includes an obtaining module, which is specifically used for: diagonally scaling and mapping physical sparse features to obtain a first physical sparse feature; and splicing the first physical sparse feature to obtain a feature package.

[0032] In one possible implementation, the monitoring device for water hammer in pipelines further includes a processing module, which is specifically used to: freeze the weights in the variational Gaussian mixture model and traverse any mask vector in the mask vector set, wherein the mask vector set is determined based on learnable mask gating; for any mask vector, determine the mutual information weight vector corresponding to the mask vector based on the frozen variational Gaussian mixture model; and determine the non-discriminatory features based on the mutual information weight vector.

[0033] In one possible implementation, the processing module is further configured to: generate a new set of mask vectors based on non-discriminatory features; determine sparse vectors and reconstruction residuals based on the new set of mask vectors; determine whether the variational Gaussian mixture model has been successfully compressed based on the sparse vectors and reconstruction residuals; and solidify the new set of mask vectors into an online lightweight model when the variational Gaussian mixture model has been successfully compressed.

[0034] In one possible implementation, the processing module is further configured to: determine the combined uncertainty based on the dual uncertainty; determine the maximum a posteriori probability based on the posterior probability; and classify the event based on the combined uncertainty and the maximum a posteriori probability.

[0035] Thirdly, this application provides an electronic device, including: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the first aspect and / or various possible embodiments of the first aspect as described above.

[0036] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible embodiments of the first aspect.

[0037] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0038] This application provides a method, apparatus, and equipment for monitoring water hammer in pipelines, relating to the field of oil and gas pipeline monitoring technology. The method, applied to a SCADA system, includes: responding to a detected trigger signal from a fluid control device in an oil pipeline; acquiring pressure and flow signals in the oil pipeline, with the pressure and flow signals using a microsecond-level timestamp corresponding to the trigger signal as a time reference; determining physical sparsity features based on the pressure and flow signals; and determining whether the event corresponding to the trigger signal is a water hammer based on the physical sparsity features. In responding to a detected trigger signal from a fluid control device in an oil pipeline, this application acquires pressure and flow signals in the oil pipeline, using a microsecond-level timestamp corresponding to the trigger signal as a time reference. By aligning waveforms using the trigger moment of the fluid control device as a unified time reference, the absolute clock synchronization error between stations is eliminated, improving the time difference measurement accuracy from milliseconds of the NTP to microseconds of the local clock. Based on the pressure and flow signals, physical sparsity features are determined, and based on the determined physical sparsity features, it is determined whether the event corresponding to the trigger signal is a water hammer, thereby improving the accuracy of water hammer location. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0040] Figure 1 A flowchart illustrating the pipeline water hammer monitoring method provided in this application embodiment. Figure 1 ;

[0041] Figure 2 A flowchart of zero-drift processing provided in the embodiments of this application;

[0042] Figure 3 A schematic diagram of the process for generating physically sparse features provided in an embodiment of this application;

[0043] Figure 4 A flowchart illustrating the pipeline water hammer monitoring method provided in this application embodiment. Figure 2 ;

[0044] Figure 5 A schematic diagram of the structure of the pipeline water hammer monitoring device provided in the embodiments of this application;

[0045] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0046] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0047] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0048] Currently, another method for monitoring water hammer in pipelines uses trigger signals from electrical contacts such as pump start-up / shutdown or rapid valve opening / closing as a time reference. A Programmable Logic Controller (PLC) generates precise timestamps and labels the data, then uploads this event information to a SCADA system to form an event index. Simultaneously, the SCADA system also collects high-frequency signals such as pressure and flow rate within the pipeline. By precisely aligning these high-frequency signals with the timeline generated by the PLC, the water hammer waveform is described, enabling monitoring and preliminary analysis of water hammer events. However, this method for monitoring water hammer in pipelines still suffers from low accuracy.

[0049] To address the aforementioned issues, this application provides a method for monitoring water hammer in pipelines. This method involves responding to a trigger signal from a fluid control device in an oil pipeline, acquiring pressure and flow signals from the pipeline, and using a microsecond-level timestamp corresponding to the trigger signal as a time reference. Based on the pressure and flow signals, physical sparsity characteristics are determined. Based on these physical sparsity characteristics, it is then determined whether the event corresponding to the trigger signal is a water hammer.

[0050] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0051] Figure 1 A flowchart illustrating the pipeline water hammer monitoring method provided in this application embodiment. Figure 1 ,like Figure 1 As shown, the method includes:

[0052] S101. In response to the detection of the trigger signal of the fluid control device in the oil pipeline, the pressure signal and flow signal in the oil pipeline are acquired. The pressure signal and flow signal are based on the microsecond-level timestamp corresponding to the trigger signal as the time reference.

[0053] In this step, it can be understood that to detect water hammer in an oil pipeline, it is necessary to acquire the pressure and flow signals in the pipeline while detecting the trigger signals of the fluid control equipment. The trigger signals of the fluid control equipment include, but are not limited to, the instantaneous electrical state reversal signals detected at the hard contacts of the pump start / stop relay.

[0054] For example, at the instant the hard contacts of the pump start / stop relay electrically reverse, a microsecond-level timestamp is generated using the PLC's internal high-frequency time base. Write to the interrupt register The timestamp serves as the reference for subsequent high-frequency pressure and flow sampling sequences and pump actions. A virtual trigger register is created in the station control SCADA point table / message mapping. The PLC will send each acquisition frame soon. Mapped to The SCADA system utilizes a fixed clock difference between the station control SCADA system and the PLC. With frame-by-frame network jitter vector PLC time series Perform absolute alignment to obtain , It can be expressed by the following formula: Where 1 represents a column vector consisting entirely of 1s. To achieve a unified time coordinate across the entire network, the above-mentioned dynamic compensation for network jitter is used to achieve a unified time coordinate across the entire network, eliminating the impact of inter-station time offset on waveform analysis.

[0055] Furthermore, within the PLC sampling thread, Pressure signal With flow signal Encapsulate the same frame to form a data frame. It continuously outputs data via zero-copy direct memory access (DMA) and splices it into a complete 300kHz continuous high-frequency raw stream.

[0056] It is also understandable that, when generating microsecond-level timestamps, the PLC sampling thread needs to collect the flow and pressure signals in the oil pipeline corresponding to the microsecond-level timestamps. Pressure signals and flow signals are encapsulated in the same frame to form a data frame. It continuously outputs data via zero-copy DMA and splices it into a complete 300kHz continuous high-frequency raw stream.

[0057] It should be noted that the SCADA system includes the station control SCADA system and the dispatch center. The dispatch center is the upper-level master station SCADA system, responsible for network-wide data aggregation, event numbering, and control; the station control SCADA system is the field system and reports data upwards.

[0058] In summary, since existing oil and gas stations mostly rely on Network Time Protocol (NTP) to synchronize the PLC and the master station at the second level, there is a microsecond-level clock drift between the pump and valve electrical contact trigger signals and the high-frequency waveform acquisition, resulting in insufficient accuracy of cross-site waveform alignment and water hammer event tracing. Therefore, the embodiments of this application directly bind the pump action and the PLC high-frequency time base to eliminate the microsecond-level clock drift and improve the cross-site waveform alignment accuracy.

[0059] S102. Determine the physical sparsity characteristics based on the pressure signal and flow signal.

[0060] In the monitoring and diagnosis of oil pipeline systems, it is necessary to continuously collect pressure and flow signals, which reflect the dynamic behavior of the fluids inside the pipeline. For most of the normal operation of the oil pipeline system, these signals typically exhibit a relatively stable and slowly changing background state. However, when specific physical events occur in the oil pipeline system, such as water hammer, leakage, or rapid valve operation, the pressure and flow signals can change dramatically and significantly in an instant. Physical sparsity specifically refers to these pressure and / or flow signals that exhibit instantaneous, localized, discontinuous, high-amplitude variations, or significant deviations from the normal background in both time and / or spatial dimensions.

[0061] Therefore, in order to monitor water hammer in pipelines, it is necessary to find and filter those signals with high information value that are generated by transient, local physical events, and are distributed "sporadically" in the data representation, based on the obtained pressure and flow signals.

[0062] This operation effectively filters out background noise and highlights the essential characteristics of abnormal events, thus providing a more accurate and efficient data foundation for subsequent water hammer location and detection, thereby significantly improving the accuracy of anomaly detection in oil pipeline systems.

[0063] S103. Based on the physical sparsity characteristics, determine whether the event corresponding to the trigger signal is a water hammer.

[0064] In this step, it is understood that it is necessary to perform feature analysis on signals with high information value that are generated by transient, local physical events and are distributed "sporadically" in data representation, in order to determine whether the event corresponding to the trigger signal is water hammer.

[0065] In this embodiment, when a trigger signal from a fluid control device in an oil pipeline is detected, pressure and flow signals in the pipeline are acquired. These signals are based on a microsecond-level timestamp corresponding to the trigger signal. By aligning waveforms using the trigger moment of the fluid control device as a unified time reference, inter-station absolute clock synchronization errors are eliminated, improving the time difference measurement accuracy from milliseconds of the NTP to microseconds of the local clock. Based on the pressure and flow signals, physical sparsity characteristics are determined, and based on these characteristics, it is determined whether the event corresponding to the trigger signal is a water hammer, thereby improving the accuracy of water hammer location.

[0066] Based on the above embodiments, S102 describes determining physical sparsity features based on pressure signals and flow signals, including: determining the water hammer origin based on the pressure signal; extracting signal data of a preset time length from the pressure signal and flow signal based on the time corresponding to the water hammer origin, and generating a main window data frame; and determining physical sparsity features based on the main window data frame.

[0067] In this embodiment, it can be understood that determining the physical sparsity features requires determining the water hammer origin based on the pressure signal obtained in S101. Specifically, determining the water hammer origin based on the pressure signal includes: performing a first-order difference on the pressure signal based on flow stability constraints to determine the point corresponding to the maximum instantaneous rate of decrease in the pressure signal; and determining the point corresponding to the maximum instantaneous rate of decrease as the water hammer origin.

[0068] Before performing first-order differential on the pressure signal, each pump needs to be assigned a unique index using the pump network topology table stored in the dispatch center. When the station control SCADA system detects Flip edge, about to Hash function Generate a unique event number, which can be expressed by the following formula: The unique event ID is monotonous and non-repeating across the entire network, ensuring that the same start-stop process can be aggregated across different sites.

[0069] in, Flip edge refers to The register data is updated (flipped), indicating that a trigger flag has been successfully received from the PLC.

[0070] Furthermore, after generating a unique event number, a capacity of L needs to be constructed in the edge box of the station control SCADA system. s Seconds of circular buffer Only when the frame ID evt Write only when the current monitoring event is equal Otherwise, the old data is overwritten, thus retaining only the waveforms before and after the target start and stop, which can further reduce the load on the central link.

[0071] Furthermore, a first-order difference is performed on the pressure signal within the annular buffer, and the flow rate stability interval is defined to locate the sample index of the maximum instantaneous pressure drop. This refers to the point corresponding to the maximum instantaneous rate of decrease in the location pressure signal. The sample index for the maximum instantaneous pressure drop can be expressed by the following formula:

[0072] .

[0073] in, The average flow rate is the value of the pump in the 10ms before it starts and stops. For traffic tolerance. Use it as the zero-offset anchor point for subsequent transient window segmentation to eliminate alignment errors caused by traditional timed frame interception; Represents a column vector of all 1s (dimension AND) (same), used to put Add elements to the entire time column.

[0074] Write the maximum instantaneous voltage drop sample index to the synchronization pointer. Then, the synchronization pointer is called. The sample index referred to And assume The steepest pressure drop point at that moment. As the origin of the water hammer, the time coordinates of all subsequent sampled values ​​are uniformly shifted to [the original point]. This further eliminates the interference of inter-station clock drift on cross-station waveforms.

[0075] Based on the time corresponding to the water hammer origin, the pressure signal and flow signal obtained from the above embodiments are used to determine the main window data frame. Specifically, the main window data frame can be determined by the following operation: taking signal data of a preset time length before and after the time corresponding to the water hammer origin, thereby forming the main window data frame. Optionally, around... Take 150ms forward and backward to construct the main window. The preset time length needs to be able to cover the entire process of the sound velocity traveling back and forth within the pipe section and the valve's first rebound, so as to ensure that both normal impact and cavitation spikes are recorded.

[0076] Next, the determined main window data frame is processed to obtain physical sparsity features. In some examples, physical sparsity features are determined based on the main window data frame, including: dividing the main window data frame into multiple sub-frames based on the pipeline segment length and fluid sound velocity; performing zero-drift processing on the pressure signal in the main window data frame based on the first and last sub-frames to obtain a zero-drift corrected pressure signal; performing asymmetric complex wavelet compression on the flow signal in the main window data frame to obtain a compressed flow signal; performing inverse stretching on the compressed flow signal based on the instantaneous pressure-flow coupling factor to generate a conserved flow signal; and generating physical sparsity features based on the zero-drift corrected pressure signal and the conserved flow signal.

[0077] In these examples, it can be understood that if the above physical sparsity characteristics are to be determined through the main window data frame, the main window data frame needs to be divided into multiple sub-slice data frames.

[0078] In one implementation, the geometric length of the oil pipeline segment is used. Calculate the frequency f in relation to the fluid sound velocity c. s Then, based on the frequency, calculate the number of half-millisecond sampling points. The number of half-millisecond sampling points refers to... In this example f s =300 kHz, N 0s =150 (sample points). The main window is ±150 ms, for a total of 300 ms, based on Δt. blk =1ms = 2 × 0.5ms is a sub-segment division, and the number of samples in each sub-segment is N. seg =2N 0s =300, number of sub-slices N blk =300ms / 1ms=300, which is the main window data frame. Divide into N in sequence blk =300 sub-pieces (k=1:N blk This data is bound with a serial number k to provide coordinates for locating the reflection path piece by piece. By dynamically dividing the main window data frames, it can be ensured that all abnormal features within the sound speed round trip cycle are completely captured.

[0079] Figure 2 A flowchart illustrating the zero-drift processing provided in an embodiment of this application. For example... Figure 2 As shown, when performing zero drift processing, it is necessary to extract the beginning and end of the main window. Using a statically stable sample, zero drift driven by environmental temperature and humidity is estimated in real time. The zero-drift calculation method proposed in this application uses both the first-end mean and the last-end mean simultaneously to avoid bias caused by single-end sampling. Zero drift... It can be expressed by the following formula:

[0080] .

[0081] in, This is the pressure signal in the main window after the time axis has been shifted. .Will The pressure signal is uniformly offset to the main window pressure signal to obtain a zero-drift corrected pressure signal, thereby reducing the impact of seasonal operating condition differences on subsequent thresholds.

[0082] Furthermore, asymmetric complex wavelet compression is performed on the flow signal channel of the main window, so that the scaling function focuses on the >1kHz frequency band, suppressing high-frequency noise from motor meshing and cavitation jets; and the <100Hz components in the wavelet detail coefficients are fully preserved to present the low-frequency pulsations caused by the elastic deformation of the medium volume.

[0083] It should be noted that existing data acquisition typically uses a fixed sampling frequency of tens to hundreds of kilohertz. While this can roughly describe the water hammer profile, it is difficult to obtain higher-frequency details such as valve rebound and cavitation spikes, and it fails to effectively distinguish water hammer waveforms from other non-steady-state pressure waveforms, such as waveforms of abnormal operating conditions (cavitation, jamming, or backflow) in conventional pump systems. Therefore, this application improves the data acquisition by using the maximum instantaneous pressure drop corresponding to the synchronization pointer as the zero scale, dividing the data in the main window into equal segments driven by sound velocity and pipe length, proposing dual-end statically stable samples to cancel zero drift, and reconstructing a dual-channel sequence that satisfies mass conservation using asymmetric complex wavelet compression and conserved flow inverse stretching, thereby achieving synchronous preservation of high-frequency cavitation spikes and low-frequency elastic pulsations.

[0084] Furthermore, based on the instantaneous pressure-flow coupling factor, the compressed flow signal is inversely stretched to generate a conserved flow rate. The instantaneous pressure-flow coupling factor can be expressed by the following formula: Conservative flow It can be expressed by the following formula:

[0085] .

[0086] Where D is the pipe diameter; Where A is the density of the medium; A is the cross-sectional area; The time interval is the round trip period of the speed of sound. By restoring the conservation equations between the pressure and flow signals, the misdiagnosis of sensor jitter as leakage or backflow anomalies can be avoided.

[0087] After confirming the conservation of the zero-drift-corrected pressure signal and the conserved flow signal, physical sparsity features are generated using these signals. For example, generating physical sparsity features based on the zero-drift-corrected pressure signal and the conserved flow signal includes: determining a tensor signal based on the zero-drift-corrected pressure signal and the conserved flow signal; performing a sound speed adaptive expanding convolution operation on the tensor signal to obtain convolution features, wherein the base length of the convolution kernel of the sound speed adaptive expanding convolution is calculated in real time by the sound speed round-trip sampling distance; applying a ring difference to the convolution features based on a ring difference matrix to obtain a residual vector, wherein the ring difference matrix is ​​determined according to the rotational speed period of the fluid control equipment; and determining the physical sparsity features based on the residual vector.

[0088] Figure 3 This is a schematic diagram illustrating the process of generating physically sparse features provided in an embodiment of this application. Figure 3 As shown, generating physical sparsity features first requires determining the tensor signal based on the zero-drift corrected pressure signal and the conserved flow signal. The determination of the tensor signal needs to be based on... The compensated main window is divided into early impacts. , mid-term reflex With late decay Three tensors, with energy matrices calculated simultaneously for each segment:

[0089]

[0090] It should be noted that the data in the compensated main window mentioned above includes the pressure signal and the conserved flow signal after zero drift correction.

[0091] Furthermore, the determined tensor signal and energy matrix are output together to the next stage of physical sparse coding to provide data for subsequent physical sparse features. The tensor signal and energy matrix also need to be stored in the scheduling host buffer.

[0092] Read the tensor signal from the scheduling host buffer, i.e., read the early tensor. Intermediate tensor Late tensor Each tensor signal consists of a zero-drift corrected pressure signal and a conserved flow rate signal, with the time axis shifted to the water hammer origin t0. The event number ID is further assigned. evt Write the water hammer origin coordinates t0 into the header field h to ensure that subsequent models can trace the same start-up and shutdown process across the entire network.

[0093] For each tensor signal, the sampling frequency f is determined based on the fluid sound velocity c in this pipe section. s =300kHz and actual tube length L segThe round-trip sampling distance of the speed of sound is dynamically calculated using the following formula:

[0094] .

[0095] The round-trip sampling distance of the sound speed is directly set as the base length of the kernel of the adaptively expanded convolution. Furthermore, an expansion rate is applied to the s-th level feature map. This forms a dynamic dilated convolution operator, where the s-th level feature map refers to the one-dimensional feature map output by the sound speed adaptive dilated convolution at the s-th layer. The s-th level feature map is calculated using the following formula:

[0096] .

[0097] in, It is a non-linear activation. Indicates the expansion rate d s One-dimensional convolution, Let be the k-th weight kernel of the s-th level. The above formula ensures that the convolutional receptive field accurately covers a single round trip of the sound velocity, without losing sharp water hammer textures due to differences in pipe diameter.

[0098] Next, the highest-scale convolutional feature F Smax Expand to the time vector f. Define the rotational speed period of the fluid control device, such as defining the pump rotational speed period T. r =60 / N rpm Construct a ring difference matrix Its (i, j)th element satisfies When j=i, -1 when j=(iT r (mod T), 0; otherwise, apply a cyclic difference to f to obtain the residual vector. In summary, the residual vector can be expressed by the following formula: .

[0099] The above operation can actively filter out the load baseline with a cycle of whole rotational speed, so that seasonal flow fluctuations will not mask abnormal peaks, i.e., the cycle difference removed by the rotational speed in the above operation.

[0100] After determining the residual vector, physical sparsity features are determined based on the residual vector. In one implementation, determining physical sparsity features based on the loop difference vector includes: determining energy alignment features based on the residual vector; processing the energy alignment features through learnable mask gating to obtain target features, wherein the learnable mask gating is generated based on the mapping between the friction coefficient and the instantaneous Reynolds number; and determining physical sparsity features using a mask sparse autoencoder based on the target features.

[0101] In this implementation, after determining the physical sparsity characteristics, a pressure-flow energy alignment operation is required to highlight the mismatch. This involves calculating the differential pressure energy based on the residual vector. Energy of differential flow The scaling factor was calculated based on the annular differential pressure energy and annular differential flow energy. , r Q enlarge r P reduce Forming energy alignment features The energy alignment feature is derived from the amplified r Q and the reduced r P Composed of [various components]. Through the above energy alignment steps, the abnormal pattern of pressure mutation-flow non-response can obtain a higher norm in the feature space, thereby enabling early detection of valve jamming and cavitation.

[0102] After determining the energy alignment characteristics, the Dracy-Weisbach friction coefficient was... Mapping the instantaneous Reynolds number Re to the gating threshold in learnable mask gating It is also understandable that learnable mask gating is generated based on the mapping of Dracy-Weisbach friction coefficient and instantaneous Reynolds number.

[0103] Initialize mask vector The energy alignment features are processed, for example, by performing a hard threshold operation on them, to obtain the target features. The nodes in the target features satisfy the damping-energy dual physical conditions. The hard threshold operation can be expressed by the following formula:

[0104] .

[0105] The z mentioned above represents the target feature. The gating process described above can limit the model activation rate within the friction-derived threshold, preventing noisy nodes from misleading subsequent sparse solutions.

[0106] The target features, after the above gating process, are encoded and decoded using a masked sparse autoencoder to obtain their physical sparse features and corresponding reconstruction residuals. The physical sparse features are the sparse coefficients output by the encoder.

[0107] Specifically, the mask sparse autoencoder learns a dictionary by optimizing its internal weights. This process encodes the target features into sparse coefficients, and then attempts to reconstruct the target features based on this dictionary, obtaining the reconstruction residual. In other words, the mask sparse autoencoder introduces a dictionary into the target features z. This is used to solve for the sparsity coefficient. and reconstructed residuals Furthermore, by combining sparsity, gating consistency, and physical energy regularity, the objective function is determined, which can be expressed by the following formula:

[0108] .

[0109] in, The energy covariance matrix, This is the regularization weight.

[0110] After initially obtaining the sparse vector and its corresponding reconstruction residual, the sparse vector is further iteratively optimized until convergence to minimize the reconstruction residual and enhance sparsity; subsequently, the optimized sparse vector is solidified. The final reconstruction residual is recorded and can be expressed by the following formula: .

[0111] Will According to the protocol, features are buffered to shared memory to provide highly compressed and physically consistent feature representations for the next step of inference.

[0112] Obtain the sparse vectors solidified in the above embodiments. With the final reconstruction residual And synchronously cache the real-time speed N of the pump shaft r Oil temperature T0 and dynamic viscosity One point needs to be clarified: the solidified sparse vectors Sparse vectors It is a vector.

[0113] Optionally, after determining the physical sparsity features, the process involves determining whether the event corresponding to the trigger signal is a water hammer event based on these features. This includes: determining the posterior probability and double uncertainty of the event corresponding to the trigger signal based on the physical sparsity features; and determining whether the event corresponding to the trigger signal is a water hammer event based on the posterior probability and double uncertainty. It can be understood that to determine whether the time corresponding to the aforementioned trigger signal is a water hammer event, it is necessary to determine the posterior probability and double uncertainty of the time corresponding to the aforementioned trigger signal based on the physical sparsity features.

[0114] In some examples, the posterior probability and double uncertainty of the event corresponding to the trigger signal are determined based on physically sparse features. This includes: obtaining a feature bag based on the physically sparse features; and using a variational Gaussian mixture model combining measurement noise covariance and cognitive noise covariance based on the feature bag to determine the posterior probability and double uncertainty of the event corresponding to the trigger signal. In these examples, the feature bag needs to be obtained based on the physically sparse features. Obtaining the feature bag based on physically sparse features includes: diagonally scaling and mapping the physically sparse features to obtain the first physically sparse features; and concatenating the first physically sparse features to obtain the feature bag.

[0115] Considering the requirement for dimensional consistency in long-distance transmission of SCADA systems, the embodiments of this application first use a diagonally scaled matrix. The three working condition sub-vectors V are linearly mapped to the sparse vector norm range to obtain the first physical sparse feature; then, the first physical sparse feature is concatenated to obtain the feature package. Feature package It can be expressed by the following formula:

[0116] .

[0117] The formula for the above feature package deeply binds instantaneous sparse features to the pump operating environment, solving the pain point of poor model generalization caused by seasonal operating conditions, and ensuring that the distance is calculated in the same metric space with historical nearest neighbor samples.

[0118] After determining the feature packet, it is necessary to further determine the posterior probability and double uncertainty of the event corresponding to the trigger signal based on the feature packet. It is understandable that determining the posterior probability and double uncertainty requires constructing a local operating surface. When constructing the local operation plane, it needs to retrieve the feature packets of the most recent M start / stop events from the circular cache pool of the edge nodes. And targeting feature packets For each historical sample, a weighted Mahalanobis distance is calculated and a Gaussian kernel weight is applied. The k most similar nearest neighbors are automatically selected to form the local operating surface. It can be expressed by the following formula:

[0119] .

[0120] in, The historical covariance matrix, The micro-regularization factor suppresses singularities. The above formula for constructing the local operating surface ensures that heterogeneous operating conditions such as high-altitude cold zones and light oil zones are removed from the nearest neighbor samples, achieving a comparison benchmark that uses only environments with the same temperature and viscosity as the current pump, thus addressing the issue of threshold drift caused by remote perturbations.

[0121] After constructing the local operating surface, tangential plane extraction and instrument noise channel separation are performed. Specifically, local singular value decomposition is performed on the local operating surface to obtain... Keep the first r singular vectors U r As a tangent basis, the feature packet to be measured is used. Projecting onto this tangential base yields planar coordinates. Simultaneously, the residual channel will be reconstructed. The noise is directly written into the instrument noise channel to shield against common offsets caused by the aging of pressure / flow sensors. The tangential basis can be referred to as the basis vector.

[0122] Furthermore, the residual channels will be reconstructed. Directly writing to the instrument noise channel means incorporating the instrument noise channel as an independent field into the feature message / frame. Specifically, this can be achieved by appending it to the feature packet. This makes the feature package Where e represents the reconstructed residual vector of the observation sequence z by the sparse autoencoder within the current feature window. Its purpose is to separate measurement noise from physical features for subsequent estimation. To avoid the point-by-point shape of e interfering with the nearest neighbor metric, noise intensity is characterized only by energy.

[0123] Next, calculation ,in, Representing the eigenvector The vertical distance from the orthogonal residual energy of the local tangent space relative to the current operating condition to the manifold is measured. The degree to which the current characteristic deviates from the manifold of the operating condition; the larger the value, the more inconsistent the current characteristic is with the known internal structure of the operating condition. If Exceeding the dynamic threshold Then the tangent vector is adjusted by the incremental Jacobian, where the incremental Jacobian can be expressed as follows: The adjustment of the tangential basis can be expressed by the following formula: The step size The real-time calculation window adheres to the limitations of the SCADA system. By adjusting and correcting the tangential base as described above, it is ensured that manifold bending caused by cavitation peaks or recirculation inflection points will not be misclassified as entirely new and unknown faults, achieving the requirement of second-level online explainability.

[0124] The aforementioned correction to the local operating surface basis vectors can directly affect the posterior and dual uncertainties:

[0125] 1. After the update, the coordinates of the feature on the local manifold More stable, orthogonal residuals The decline makes the Mahalanobis distance estimates of each mixture component more accurate, and the degree of responsibility... More concentrated It exhibits a sharper distribution, with decreased posterior entropy and increased class confidence;

[0126] Second, the dual uncertainty decomposition is more reliable: As an external manifold indicator, it is mapped to cognitive uncertainty. The up-regulation or gating signal, after the base update Decrease, due to measurement noise This approach prioritizes avoiding the misinterpretation of curvature / operating condition deformation as an unknown fault. Consequently, under the same threshold strategy, more robust discrimination and more stable handling triggers can be achieved.

[0127] Furthermore, a variational Gaussian mixture model is constructed and the measurement noise covariance is included. Covariance with cognitive noise This addresses the problem that existing alarm outputs, which rely primarily on single confidence levels or hard thresholds, fail to quantify measurement noise and lack representation of model blind spots, leading to uncertainty in on-site speed-limiting or emergency stopping decisions. For each known anomaly cluster center... Calculate the multifactor Mahalanobis distance and output the posterior probability and double uncertainty. Here, the outlier cluster refers to the known category cluster in the variational Gaussian mixture model. The parameters are It is obtained from historical samples (same working conditions, same tangential surface). The posterior probability and double uncertainty can be calculated using the following formula:

[0128] .

[0129] and .

[0130] The formula based on posterior probability and dual uncertainty can simultaneously quantify the posterior probability of valve jamming, cavitation, and backflow abnormalities and the measured noise contribution of the SCADA system, directly providing an operable confidence level to address the pain point of the inability to classify the values ​​between the original waveforms.

[0131] Furthermore, define the measurement threshold. With cognitive threshold ,like If a secondary diagnostic mark is automatically added, the event will be pushed into a high-priority queue for review by regional experts within 30 seconds, achieving a hybrid closed loop of second-level automatic and minute-level manual intervention.

[0132] Finally, the posterior probability vector Double uncertainty and local curvature index Write risk package The risk package is synchronized back to the SCADA system via the OPC-UA secure channel.

[0133] In summary, the distinction between water hammer and other unsteady pressure waveforms (valve jamming, cavitation, backflow, etc.) is based on four key physical quantities: 1. Maximum instantaneous pressure drop. It must appear 1. Nearby; 2. Consistency of reflection period The distance between the main peaks of the early, middle, and late autocorrelation is approximately equal to the round-trip period of the speed of sound; 3. Pressure-flow hysteresis 4. Energy distribution ratio meets the threshold in water hammer scenarios; The aforementioned indicators are explicitly mapped in a sparse feature space, and different abnormal operating conditions exhibit statistical differences across these dimensions. If... Maximum and overall uncertainty below the threshold If the probability is high, the event is classified as water hammer; otherwise, it is filed according to the remaining categories with the highest probability, or transferred to manual review if the uncertainty is too high.

[0134] This achieves the classification of unsteady pressure wave anomalies entirely based on local data within the end-to-end link of the SCADA system, effectively distinguishing water hammer waveforms from other unsteady pressure waveforms and completing water hammer monitoring. Furthermore, a dual uncertainty assessment is provided to meet the real-time operation and maintenance needs of oil and gas pipeline networks with multiple sites, long distances, and minimal staffing.

[0135] In some embodiments, the pipeline water hammer monitoring method provided in this application further includes: freezing the weights in the variational Gaussian mixture model and traversing any mask vector in the mask vector set, wherein the mask vector set is determined according to learnable mask gating; for any mask vector, determining the mutual information weight vector corresponding to the mask vector based on the frozen variational Gaussian mixture model; and determining non-discriminatory features based on the mutual information weight vector.

[0136] In the above embodiments, determining non-discriminative features requires freezing the weights in the variational Gaussian mixture model and iterating through any mask vector in the set of mask vectors generated by learnable mask gating. Then, for each mask vector, a mutual information weight vector corresponding to the mask vector needs to be determined. Next, using the mutual information weight vector, non-discriminative features are determined from the target feature z determined in the above embodiments, and these features are pruned from the target feature z, leaving only discriminative features.

[0137] In one example, the posterior probability determined in the above embodiments is received. With double uncertainty Among them, P n Indicates normal operating condition; P val Indicates valve jamming / pressure spike condition; P cav : Cavitation condition; P rev This indicates a return / reverse situation. It also reads the handling tags recorded by the scheduling system in real time. This forms a hard truth value that reflects the real concerns of operations and maintenance. Among them, 0 indicates maintaining operation, and 1 indicates speed limit / emergency stop.

[0138] For the sparse vectors determined through the above embodiments Perform symbol binarization Accumulate N within the scrolling window. s Samples, based on high-dimensional joint histogram statistical estimation of mutual information: ,and .

[0139] in, Indicates: Regarding the disposal category variable Perform summation; The small dots represent dummy variables that are distinguished from the fixed y elsewhere, and their scope is the set of all categories. ; Representation: For symbolic variables To sum; similarly The apostrophe in the text is a dummy variable notation, and its value is... ; This indicates the simultaneous occurrence count when the symbol of the j-th sparse dimension is b and the treatment label is y. This is synonymous with the previous formula, except that the sign bit is written as the variable used for summation. ; often appears in the context of In the edge counting of summation.

[0140] It is understandable that the above operations can establish an information entropy correlation between sparse node triggering and actual scheduling, thereby solving the historical defect of SCADA systems that can only provide simple thresholds and cannot distinguish complex patterns.

[0141] Furthermore, the weight vector of mutual information This serves as the priority order for subsequent mask filtering nodes.

[0142] Freeze all weights of the variational Gaussian mixture model constructed in the above embodiments, and traverse the mask vectors M. Determine any mask vector M. j The corresponding mutual information weight vector ,like Immediately set the gate bit to 0, i.e., m j =0, which allows node z to be pruned from the computation graph. j That is, removing node z from node z that meets the dual physical conditions of damping and energy. j .in, In the SCADA system's central configuration center, the data is issued based on the current period's underreporting tolerance.

[0143] It should be noted that performing the above operation once can stop flow paths that do not contribute to the current temperature-viscosity conditions from participating in the inference, thereby alleviating the real-time load on the edge box CPU in multi-site high-concurrency scenarios.

[0144] Furthermore, calculate the set of remaining nodes. Average activation level And the gating threshold will be dynamically increased: .in, The compression factor is adjustable for the edge box; Pre-labeled pressure spikes and flow lag physical critical nodes will never be pruned; This is the gating baseline threshold for the previous round / previous time window.

[0145] Based on the above formula, cognitive uncertainty is... By directly introducing a gating threshold adjustment, this prevents the variational Gaussian mixture model from failing to adequately understand new operating conditions. If the compression rate is high, it will automatically slow down the compression pace to avoid accidentally cutting out critical information paths.

[0146] Following this, in some examples, after determining the non-discriminative features, the pipeline water hammer monitoring method provided in this application embodiment further includes: generating a new mask vector set based on the non-discriminative features; determining sparse vectors and reconstruction residuals based on the new mask vector set; determining whether the variational Gaussian mixture model is successfully compressed based on the sparse vectors and reconstruction residuals; and solidifying the new mask vector set into an online lightweight model when the variational Gaussian mixture model is successfully compressed.

[0147] Optionally, a new mask vector is generated based on non-discriminative features. In the new mask The sparse vector is obtained by re-encoding. With reconstructed residuals .like And the posterior category changes If the compression is successful, the prior mixed weights are updated synchronously. and will Solidify into a lightweight online model .

[0148] The average inferred delay of 30 pump start-stop cycles continuously monitored since distillation completion. With false alarm rate Compared with the original model benchmark In comparison, if If distillation is successful, then it is considered valid. It should be noted that distillation completion refers to the completion of recoding the sparse vectors and reconstructing the residuals, and, upon successful model compression, the new mask vector set is solidified into a lightweight online model. This is then transmitted via a dedicated NCC channel. OTA delivery to all edge boxes across the network, old version Reserved as a hot standby, satisfying the principles of distributed, rollbackable, and uninterrupted operation and maintenance for SCADA.

[0149] The temperature T0 and viscosity of the SCADA system at the continuous monitoring station are continuously monitored. With rotational speed N r If any of the three exceeds the seasonal or load threshold, then it shall be handled according to... Raise the mutual information screening threshold and restart a new round of online steaming. Here, v represents the growth rate coefficient.

[0150] The closed-loop operation described above can solve the problem that existing water hammer alarm models often use non-real-time nighttime training methods for updates, resulting in untimely model updates and limited accuracy in scenarios of sudden load changes or seasonal transitions. This ensures that the model does not drift due to seasonal-operating-condition cumulative drift caused by historical compression, and enables continuous self-adaptation of the SCADA system in long-distance, low-attendance environments.

[0151] In some examples, after determining the posterior probability and the double uncertainty, the process includes: determining the combined uncertainty based on the double uncertainty; determining the maximum a posteriori probability based on the posterior probability; and classifying the event based on the combined uncertainty and the maximum a posteriori probability.

[0152] This means that the obtained posterior probability can be used... and double uncertainty Using event ID evt In real-time caching Locate the water hammer origin t0 internally. Then append a field to the same data frame containing the water hammer origin t0. Wherein, CLS represents the classification result of the water hammer event. By verifying the OPC-UA time contact with the PLC local oscillator clock, it is ensured that the three types of information—tag, waveform, and PLC trigger—are aligned within microsecond precision, thus mitigating the risk of human misreading caused by time scale drift over long-distance links.

[0153] Furthermore, the overall uncertainty based on sensor noise weighting is calculated: ,in, For the sensor calibration variance within the station control SCADA system, Determine the cognitive covariance of the model. Determine the maximum posterior probability. .like And p max If the corresponding category has the largest value among {normal, stuck, cavitation, backflow, blade damage}, then the classification is determined immediately. This multi-source weighting mechanism integrates on-site noise and model blind spots into a single quantitative indicator, meeting the project's need for second-level automatic judgment.

[0154] when If there are ties for the highest posterior probability, the corresponding event is written to the unclassified queue and pushed to the regional diagnostic team via the 5G private network. At this time, the client automatically loads three waveform segments, a sparse feature heatmap, and historical similar events, requiring experts to confirm within 30 seconds in an interactive window to avoid misclassifying unknown trends as safe. If the timeout is exceeded, the unclassified status is maintained and a conservative control strategy is implemented.

[0155] Furthermore, for events confirmed as abnormal, the peak pressure difference is extracted. Volumetric flow rate lag Posterior severity coefficient Here, "tag" represents the single score ultimately compressed from the risk label vector, used to correlate with the threshold. Compare and trigger PLC control, tag= Q ref (t) represents the reference volumetric flow rate baseline, taken from the steady-state average 30 seconds before start-up and shutdown. It can be updated in real time through second-order IIR filtering and used to calculate the volumetric flow rate lag.

[0156] Next, in the safety weight matrix Next, calculate the hazard score:

[0157] .

[0158] in, The peak differential pressure weight can be taken as 0.35–0.45 based on the design pressure margin. The lag weight for volumetric flow rate can be set to 0.25–0.35 based on the flow rate sensitivity. The weighting for the pressure drop rate can be set to 0.15–0.25, referencing the API-579 limit. This represents the weight of the remaining flow coefficient, which can be taken as 0.1–0.2 based on the critical flow rate of the pipe section. One point needs to be noted... The specific value can be obtained by adjusting parameters through the HAZOP risk matrix or historical incident replay.

[0159] Furthermore, if The station control edge box immediately issues speed limit / emergency stop Modbus commands to the pump station PLC and displays them in a pop-up window on the dispatch screen, and then synchronizes them to the safety management system through a high-priority channel; otherwise, it only records and generates an inspection work order to meet the needs of scenarios with fewer staff and tiered handling.

[0160] Will Write data to the SCADA system's historical database, automatically generate JSON-LD notifications, and push them to mobile devices and email gateways via MQTT. This ensures that multiple departments, including scheduling, maintenance, and HSSE, share a single source of fact. Simultaneously, archive data according to API-1169 requirements to meet pipeline integrity auditing needs.

[0161] in, Take discrete values ​​{0,1,2,3} or {Ⅰ,Ⅱ,Ⅲ,Ⅳ}, and then... The three elements are obtained through mapping using a decision table: and → Level 1; only one of them is satisfied → Level 2 / 1; both exceed the threshold but →Level III / 2; →Level IV / 3. And... The risk action threshold (a dimensionless scalar) is set based on the HSSE risk matrix. For example, the matrix score corresponding to a major hazard—requiring an emergency stop—is projected onto... After scaling, we get Alternatively, the optimal point with a false negative rate of ≤2% can be selected on the validation set using the ROC curve.

[0162] The enumerated values ​​for control commands sent to the PLC are: 0 indicates no action; 1 indicates speed limiting (VFD speed reduced to 70-90%); 2 indicates orderly pump shutdown; 3 indicates rapid closure of the emergency stop / shutdown valve. It should be noted that... can be By rules Direct mapping is also possible, or the configuration can be changed at the main station via process constraints.

[0163] Furthermore, the original waveform, sparse vector, final labels, and expert review annotations are packaged into... Write to the online memory pool And has a built-in index key as .

[0164] Next, taking pump start-up and shutdown as an example, the pipeline water hammer monitoring method provided in this application embodiment will be described in detail. Figure 4 A flowchart illustrating the pipeline water hammer monitoring method provided in this application embodiment. Figure 2 .like Figure 4 As shown, the method includes the following steps:

[0165] S1: Event triggering and time baseline establishment.

[0166] Taking pump start-stop as an example, the process is as follows: the PLC's internal high-frequency time base generates a microsecond-level timestamp and writes it to the interrupt register the instant the pump start-stop relay contacts flip. The SCADA system performs absolute alignment of the PLC time series based on the station control-PLC fixed clock difference and the frame-by-frame network jitter vector. Within the PLC sampling thread, the pressure signal and flow signal are encapsulated and output in the same frame using zero-copy DMA, and set as the unique event number for the current pump start-stop. At the edge box of the station-end SCADA system, only the data frames matching the event number are stored in the pre-set capacity ring buffer, and the pressure signal is differentially analyzed to locate the maximum instantaneous pressure drop sample by combining the flow stability constraint, and recorded as a synchronization pointer.

[0167] S2: Transient window physical preprocessing.

[0168] The sample index pointed to by the synchronization pointer is called, and the time axis is shifted so that the water hammer origin corresponds to time zero. A certain time period, such as 150ms, is taken around the origin to form the main window, which is divided into equal-length sub-slices according to pipe length and sound velocity. The first and last statically stable samples of the main window are extracted, the zero drift is estimated and canceled out as a whole. After performing asymmetric complex wavelet compression on the flow signal, the conserved flow rate is generated by inverse extension according to the instantaneous pressure-flow coupling factor. The compensated main window is divided into three tensors: early impact, mid-term reflection and late attenuation, and the energy matrix is ​​calculated synchronously.

[0169] S3: Physically Constrained Sparse Coding.

[0170] Three tensors are read, and the round-trip sampling distance of the sound velocity is calculated based on the sound velocity of this pipe segment, the sampling frequency and the pipe length, and set as the base length of the convolution kernel. Sound velocity adaptive dilated convolution is constructed to extract texture features. Rotation speed driven ring difference suppression is implemented on the highest scale features and pressure-flow energy alignment is performed. Learnable mask gating is generated based on the Darcy-Weisbach friction coefficient and instantaneous Reynolds number. For the retained nodes, the sparse coefficients are solved and the residuals are reconstructed through a mask sparse autoencoder. The obtained sparse vectors and residuals are written to shared memory.

[0171] S4: Local nearest neighbor reasoning and calculation of double uncertainty.

[0172] The sparse vector, residual, and real-time pump shaft speed, oil temperature, and dynamic viscosity are diagonally scaled and concatenated into a feature package. At the edge nodes, the historical feature package is called to calculate the weighted Mahalanobis distance and the nearest neighbor sample is selected to construct the local operating surface. The plane coordinates are obtained through tangential plane projection and incremental Jacobian correction. Based on the variational Gaussian mixture model, the posterior probability of each anomaly category, as well as the measurement uncertainty and cognitive uncertainty, are output.

[0173] S5: Online self-distillation and model compression.

[0174] Within a rolling window, the scheduling system is used to calculate mutual information based on the actual processing of labels and the binarization results of sparse vectors, and this information is used as the node importance weight. After freezing the inference network, the mask vector is traversed, and the gating threshold is dynamically adjusted according to the mutual information weight and cognitive uncertainty to remove low-contribution nodes. After recoding and verifying that the posterior category is consistent, the model is solidified into a lightweight model and distributed via over-the-air (OTA) download.

[0175] S6: Risk solidification and closed-loop control.

[0176] The system receives the posterior probability and dual uncertainty, locates the water hammer origin in the real-time buffer according to the event number, and verifies it with the PLC local oscillator clock. It classifies the event based on the comprehensive uncertainty, and issues a speed limit or emergency stop command to the pump station PLC when the hazard score reaches the preset threshold. Otherwise, it records and generates an inspection work order, and archives the original waveform, features, and labels to the online memory pool.

[0177] In summary, the pipeline water hammer monitoring method provided in this application is improved in the following four aspects, thereby enabling the provided pipeline water hammer monitoring method to achieve microsecond-level time synchronization, full-frequency data acquisition, dynamic adaptive updates of operating conditions, and simultaneous provision of measurement uncertainty and model cognitive uncertainty in long-distance, multi-site oil pipeline networks:

[0178] Regarding time synchronization, this application proposes for the first time to directly bind the pump start / stop hard contact trigger and the PLC high-frequency time base to the same microsecond-level interrupt in the oil pipeline network. Then, the time code is connected to the SCADA system through the virtual trigger register to form a unified and traceable microsecond-level time axis across sites. All high-frequency pressure and flow frames are indexed by this time axis, and the event number and circular buffer ensure that only the target start / stop segment is saved, providing a basis for high-precision transient analysis.

[0179] In terms of signal processing, the maximum instantaneous voltage drop corresponding to the synchronization pointer is used as the zero scale. The data in the window is divided into equal slices driven by sound speed and tube length. Then, a double-ended statically stable sample is proposed to cancel zero drift. Asymmetric complex wavelet compression and conserved flow inverse extension are used to reconstruct a dual-channel sequence that satisfies mass conservation, so as to achieve synchronous preservation of high-frequency cavitation spikes and low-frequency elastic pulsations.

[0180] In terms of feature extraction, an original sound speed adaptive dilated convolution is proposed. The kernel length is calculated in real time based on the round-trip sampling distance of the sound speed, and the dilation rate is dynamically adjusted with scale to ensure that the receptive field is strictly consistent with the actual water hammer propagation path. The features are processed through rotational speed loop difference suppression, pressure-flow energy alignment, and learnable gating based on Darcy-Weisbach friction threshold, and finally input into a mask sparse autoencoder to obtain highly compressed and physically consistent sparse vectors.

[0181] In terms of model inference, the inference side concatenates sparse vectors with speed, oil temperature, and viscosity in a dimensionally consistent manner, and runs a variational Gaussian mixture model in the nearest neighbor tangential plane under the same operating conditions. It simultaneously outputs the measurement noise covariance and the model cognitive covariance, providing dual uncertainty. Furthermore, leveraging mutual information-driven gated pruning and online self-distillation, the model can automatically compress iterations during rapid seasonal and load changes and supports OTA rollback, forming a complete closed-loop chain from algorithm to deployment.

[0182] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0183] Figure 5 This is a schematic diagram of the structure of a pipeline water hammer monitoring device provided in an embodiment of this application. This device is applied to a SCADA system. Figure 5 As shown, the pipeline water hammer monitoring device 500 provided in this embodiment includes:

[0184] The acquisition module 501 is used to respond to the trigger signal of the fluid control device in the oil pipeline and acquire the pressure signal and flow signal in the oil pipeline. The pressure signal and flow signal are based on the microsecond-level timestamp corresponding to the trigger signal as the time reference.

[0185] The determination module 502 is used to determine the physical sparsity characteristics based on the pressure signal;

[0186] The determination module 502 is also used to determine whether the event corresponding to the trigger signal is a water hammer based on physical sparsity characteristics.

[0187] In one possible implementation, the determining module 502 is specifically used to: determine the water hammer origin based on the pressure signal; based on the time corresponding to the water hammer origin, extract signal data of a preset time length from the pressure signal and flow signal with the water hammer origin, and generate a main window data frame; and determine the physical sparsity features based on the main window data frame.

[0188] In one possible implementation, the determining module 502 is specifically used to: perform a first-order difference on the pressure signal based on the flow stability constraint to determine the point corresponding to the maximum instantaneous rate of decrease in the pressure signal; and determine the point corresponding to the maximum instantaneous rate of decrease as the water hammer origin.

[0189] In one possible implementation, the determining module 502 is specifically used to: divide the main window data frame into multiple sub-data frames based on the pipeline segment length and fluid sound velocity; perform zero-drift processing on the pressure signal in the main window data frame based on the first and last sub-data frames in the multiple sub-data frames to obtain a zero-drift corrected pressure signal; perform asymmetric complex wavelet compression on the flow signal in the main window data frame to obtain a compressed flow signal; perform inverse stretching on the compressed flow signal based on the instantaneous pressure-flow coupling factor to generate a conserved flow signal; and generate physical sparsity features based on the zero-drift corrected pressure signal and the conserved flow signal.

[0190] In one possible implementation, the pipeline water hammer monitoring device further includes a generation module (not shown), which is specifically used for: determining a tensor signal based on the zero-drift corrected pressure signal and the conserved flow signal; performing a sound speed adaptive expanding convolution operation on the tensor signal to obtain convolution features, wherein the base length of the convolution kernel of the sound speed adaptive expanding convolution is calculated in real time by the sound speed round-trip sampling distance; applying a ring difference to the convolution features based on a ring difference matrix to obtain a residual vector, wherein the ring difference matrix is ​​determined according to the rotational speed period of the fluid control equipment; and determining physical sparsity features based on the residual vector.

[0191] In one possible implementation, the determining module 502 is specifically used to: determine energy alignment features based on the residual vector; process the energy alignment features through a learnable mask gating to obtain target features, wherein the learnable mask gating is generated based on the mapping of friction coefficient and instantaneous Reynolds number; and determine physical sparsity features using a mask sparse autoencoder according to the target features.

[0192] In one possible implementation, the determining module 502 is specifically used to: determine the posterior probability and double uncertainty of the event corresponding to the trigger signal based on physical sparsity features; and determine whether the event corresponding to the trigger signal is a water hammer based on the posterior probability and double uncertainty.

[0193] In one possible implementation, the determining module 502 is specifically used to: obtain a feature package based on physical sparse features; and, based on the feature package, determine the posterior probability and double uncertainty of the event corresponding to the trigger signal using a variational Gaussian mixture model that combines measurement noise covariance and cognitive noise covariance.

[0194] In one possible implementation, the pipe water hammer monitoring device further includes an obtaining module (not shown), which is specifically used for: diagonally scaling the mapping of physical sparse features to obtain a first physical sparse feature; and splicing the first physical sparse feature to obtain a feature package.

[0195] In one possible implementation, the monitoring device for water hammer in the pipeline further includes a processing module (not shown), which is specifically used to: freeze the weights in the variational Gaussian mixture model and traverse any mask vector in the mask vector set, wherein the mask vector set is determined according to learnable mask gating; for any mask vector, determine the mutual information weight vector corresponding to the mask vector based on the frozen variational Gaussian mixture model; and determine the non-discriminatory features based on the mutual information weight vector.

[0196] In one possible implementation, the processing module is further configured to: generate a new set of mask vectors based on non-discriminatory features; determine sparse vectors and reconstruction residuals based on the new set of mask vectors; determine whether the variational Gaussian mixture model has been successfully compressed based on the sparse vectors and reconstruction residuals; and solidify the new set of mask vectors into an online lightweight model when the variational Gaussian mixture model has been successfully compressed.

[0197] In one possible implementation, the processing module is further configured to: determine the combined uncertainty based on the dual uncertainty; determine the maximum a posteriori probability based on the posterior probability; and classify the event based on the combined uncertainty and the maximum a posteriori probability.

[0198] The pipeline water hammer monitoring method provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0199] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, a processing module can be a separate processing element, or it can be integrated into a chip within the device. Alternatively, it can be stored as program code in the device's memory, and its functions can be called and executed by a processing element. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0200] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-On-a-Chip (SOC).

[0201] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 600 provided in this application embodiment may include: a processor 601, and a memory 602 communicatively connected to the processor, wherein:

[0202] The memory stores the instructions that the computer executes;

[0203] The processor executes computer execution instructions stored in memory to implement the method described in the foregoing method embodiments.

[0204] It should be understood that processor 601 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor. Memory 602 may include high-speed random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk storage device, or a USB flash drive, external hard drive, read-only memory, disk, or optical disc, etc.

[0205] Optionally, the electronic device 600 may also include a communication interface 603. In specific implementations, if the communication interface 603, memory 602, and processor 601 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.

[0206] Optionally, in a specific implementation, if the communication interface 603, memory 602, and processor 601 are integrated on a single chip, then the communication interface 603, memory 602, and processor 601 can communicate through an internal interface.

[0207] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the methods described in any of the foregoing embodiments.

[0208] It is understood that the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0209] An exemplary computer-readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be a component of the processor. The processor and the computer-readable storage medium can reside in an ASIC. Alternatively, the processor and the computer-readable storage medium can exist as discrete components in an electronic device.

[0210] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a computer-readable storage medium, include several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application.

[0211] This application also provides a computer program product, including a computer program that, when executed, implements the method described in any of the foregoing embodiments.

[0212] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

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

[0214] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0215] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0216] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for monitoring water hammer in pipelines, characterized in that, Applied to SCADA systems, the method includes: In response to the detection of a trigger signal from a fluid control device in an oil pipeline, the pressure signal and flow signal in the oil pipeline are acquired, and the pressure signal and flow signal are based on a microsecond-level timestamp corresponding to the trigger signal as a time reference. The origin of the water hammer is determined based on the pressure signal. Based on the time corresponding to the water hammer origin, signal data of a preset time length is extracted from the pressure signal and the flow signal at the water hammer origin to generate a main window data frame; Based on the pipeline segment length and fluid sound velocity, the main window data frame is divided into multiple sub-slice data frames; Based on the first and last sub-slice data frames in the multiple sub-slice data frames, the pressure signal in the main window data frame is subjected to zero-drift processing to obtain the zero-drift corrected pressure signal. Perform asymmetric complex wavelet compression on the flow signal in the main window data frame to obtain the compressed flow signal; Based on the instantaneous pressure-flow coupling factor, the compressed flow signal is inversely extended to generate a conserved flow signal; The tensor signal is determined based on the zero-drift corrected pressure signal and the conserved flow rate signal; Perform a sound speed adaptive expanding convolution operation on the tensor signal to obtain convolution features, wherein the base length of the convolution kernel of the sound speed adaptive expanding convolution is calculated in real time by the sound speed round-trip sampling distance; Based on the circular difference matrix, a circular difference is applied to the convolutional features to obtain the residual vector. The circular difference matrix is ​​determined according to the rotational speed cycle of the fluid control equipment. Based on the residual vector, determine the physical sparsity characteristics; Based on the physical sparsity characteristics, the posterior probability and dual uncertainty of the event corresponding to the trigger signal are determined; Based on the posterior probability and the dual uncertainty, determine whether the event corresponding to the trigger signal is a water hammer.

2. The method according to claim 1, characterized in that, Determining the water hammer origin based on the pressure signal includes: Based on the flow stability constraint, a first-order difference is performed on the pressure signal to determine the point corresponding to the maximum instantaneous rate of decrease in the pressure signal; The point corresponding to the maximum instantaneous descent rate is determined as the water hammer origin.

3. The method according to claim 1, characterized in that, The determination of physical sparsity features based on the residual vector includes: Based on the residual vector, determine the energy alignment features; The energy alignment features are processed by a learnable mask gating to obtain target features. The learnable mask gating is generated based on the mapping between the friction coefficient and the instantaneous Reynolds number. Based on the target features, physical sparse features are determined using a mask sparse autoencoder.

4. The method according to any one of claims 1 to 3, characterized in that, The determination of the posterior probability and dual uncertainty of the event corresponding to the trigger signal based on the physical sparsity features includes: Based on the aforementioned physical sparse features, a feature packet is obtained; Based on the feature package, the posterior probability of the event corresponding to the trigger signal and the dual uncertainty are determined using a variational Gaussian mixture model that combines measurement noise covariance and cognitive noise covariance.

5. The method according to claim 4, characterized in that, The feature package obtained based on the physical sparse features includes: The physical sparse features are diagonally scaled and mapped to obtain the first physical sparse features; The first physical sparse feature is spliced ​​together to obtain the feature package.

6. The method according to claim 4, characterized in that, The method further includes: Freeze the weights in the variational Gaussian mixture model and iterate through any mask vector in the mask vector set, wherein the mask vector set is determined according to learnable mask gating; For any of the mask vectors, a mutual information weight vector corresponding to the mask vector is determined based on the frozen variational Gaussian mixture model. Based on the mutual information weight vector, non-discriminatory features are determined.

7. The method according to claim 6, characterized in that, After determining the non-discriminative features, the method further includes: Based on the aforementioned non-discriminatory features, a new set of mask vectors is generated; Based on the new set of mask vectors, determine the sparse vectors and reconstruct the residuals; Based on the sparse vectors and the reconstructed residuals, determine whether the variational Gaussian mixture model has been successfully compressed; When the variational Gaussian mixture model is successfully compressed, the new set of mask vectors is solidified into an online lightweight model.

8. The method according to claim 4, characterized in that, After determining the posterior probability and the dual uncertainty, the method further includes: Based on the aforementioned dual uncertainties, determine the comprehensive uncertainty; Determine the maximum posterior probability based on the posterior probability; The event is classified based on the combined uncertainty and the maximum a posteriori probability.

9. A device for monitoring water hammer in pipelines, characterized in that, The device, used in SCADA systems, includes: The acquisition module is used to respond to the detection of a trigger signal from a fluid control device in an oil pipeline and acquire the pressure signal and flow signal in the oil pipeline. The pressure signal and flow signal are based on the microsecond-level timestamp corresponding to the trigger signal as a time reference. The determination module is used for: The origin of the water hammer is determined based on the pressure signal. Based on the time corresponding to the water hammer origin, signal data of a preset time length is extracted from the pressure signal and the flow signal at the water hammer origin to generate a main window data frame; Based on the pipeline segment length and fluid sound velocity, the main window data frame is divided into multiple sub-slice data frames; Based on the first and last sub-slice data frames in the multiple sub-slice data frames, the pressure signal in the main window data frame is subjected to zero-drift processing to obtain the zero-drift corrected pressure signal. Perform asymmetric complex wavelet compression on the flow signal in the main window data frame to obtain the compressed flow signal; Based on the instantaneous pressure-flow coupling factor, the compressed flow signal is inversely extended to generate a conserved flow signal; The tensor signal is determined based on the zero-drift corrected pressure signal and the conserved flow rate signal; Perform a sound speed adaptive expanding convolution operation on the tensor signal to obtain convolution features, wherein the base length of the convolution kernel of the sound speed adaptive expanding convolution is calculated in real time by the sound speed round-trip sampling distance; Based on the circular difference matrix, a circular difference is applied to the convolutional features to obtain the residual vector. The circular difference matrix is ​​determined according to the rotational speed cycle of the fluid control equipment. Based on the residual vector, determine the physical sparsity characteristics; The determining module is further configured to: Based on the physical sparsity characteristics, the posterior probability and dual uncertainty of the event corresponding to the trigger signal are determined; Based on the posterior probability and the dual uncertainty, determine whether the event corresponding to the trigger signal is a water hammer.

10. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.

12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Pipe network water hammer effect monitoring and positioning method, device and equipment and storage medium

    CN116146906A

  • Water supply network water hammer control method and system based on multifunctional module fusion

    CN120372875A

  • Water supply network anomaly identification method and device, electronic equipment and storage medium

    CN120492901A