Blockage detection method, system and equipment of flow measuring device and medium
By generating the cost-induced modal function and using deep learning models to predict the probability of blockage, combining historical records and reward functions to balance false alarms and missed detection, the accuracy and reliability of blockage detection of the flow measurement device are solved, and efficient blockage risk assessment and automated detection are achieved.
Patent Information
- Application Number
- CN202510767374.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-06-10
AI Technical Summary
The existing flow measurement device blockage detection methods are highly subjective, and it is difficult to accurately judge the cause and degree of blockage, and are easily interfered by external factors, resulting in misjudgment and misjudgment.
By obtaining the original pressure signal and flow signal, the cost-effective mode function is generated, the time, space and frequency domain vectors are extracted, the dual-channel cross-attention mechanism is used for weighted fusion, the deep learning model is input to predict the probability of blockage, and the state space is constructed based on historical maintenance records and equipment operation time, and the reward function is used to balance false alarms and missed detection punishments to determine the execution operation.
It improves the accuracy and reliability of blockage detection, reduces the error caused by manual intervention and subjective judgment, achieves fast and accurate blockage risk judgment, and reduces maintenance costs.
Smart Images

Figure CN120293267A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of blockage detection, and specifically relates to a method, system, device, and medium for detecting blockage of a flow measurement device. Background Art
[0002] In many fields such as industrial production and fluid transportation, flow measurement is a crucial link. Accurate flow measurement can help enterprises achieve effective monitoring and control of the production process, improve production efficiency, reduce energy consumption, and ensure product quality. With the continuous progress of technology, flow measurement technology has also made remarkable developments. From traditional mechanical measuring instruments to today's intelligent sensors, the measurement accuracy and stability have been greatly improved.
[0003] In the daily use of flow measurement devices, blockage detection has always been a key issue. Currently, common means for detecting whether a flow measurement device is blocked include the direct observation method. This method mainly relies on operators to regularly check the device and judge whether there is a blockage phenomenon by visually observing the internal or external conditions of the device. There is also the pressure difference detection method, which monitors the pressure difference between the inlet and outlet of the device. When the pressure difference shows an abnormal change, it is inferred that the device may be blocked.
[0004] However, these existing blockage detection methods have obvious defects. The direct observation method is highly subjective, easily affected by the experience of operators and visual errors, and it is difficult to detect blockages in some hidden parts. The pressure difference detection method and the flow comparison method can only reflect the overall pressure and flow changes, and cannot accurately judge the specific cause and degree of blockage. Moreover, in practical applications, they are easily interfered by external factors, resulting in misjudgments and missed detections from time to time. Summary of the Invention
[0005] This application provides a method, system, device, and medium for detecting blockage of a flow measurement device, which improves the accuracy and reliability of blockage detection by combining multiple factors to construct a state space and using a reward function to balance false alarm and missed detection penalties.
[0006] In the first aspect of this application, a method for detecting blockage of a flow measurement device is provided, which is applied to a blockage detection platform. The method includes: Obtain the original pressure signal and original flow signal of the flow measurement device to be measured, and generate an intrinsic mode function according to the original pressure signal and the original flow signal; Extract the time vector, spatial vector, and frequency domain vector of the intrinsic mode function, obtain attention weights through a dual-channel cross-attention mechanism, and perform weighted fusion on the time vector, the spatial vector, the frequency domain vector, and the attention weights to obtain a multi-dimensional feature vector; Input the multi-dimensional feature vector into a pre-trained deep learning-based blockage probability prediction model to obtain a blockage probability value; Construct a state space based on the blockage probability value, historical maintenance records, and equipment operation duration, and combine a reward function to balance false alarm and missed detection penalties to determine an execution operation.
[0007] Optionally, the generating the intrinsic mode function according to the original pressure signal and the original flow signal includes: Add white noise with different amplitudes to the original pressure signal and the original flow signal multiple times to form multiple noisy signal sequences; Decompose each noisy signal sequence respectively to obtain multiple intrinsic mode function components; According to the signal sampling frequency and blockage detection requirements, determine the sliding time window size and step length. Within each sliding time window, calculate the cross-correlation coefficient between the target intrinsic mode function component and a preset reference signal, where the target intrinsic mode function component is any one of the multiple intrinsic mode function components; Record the number of sliding time windows whose cross-correlation coefficient is lower than a preset coefficient threshold. When the number is greater than or equal to a preset number threshold, determine the target intrinsic mode function component as an abnormal mode component caused by blockage. When the number is less than the preset number threshold, determine the target intrinsic mode function component as a normal mode component; Construct the intrinsic mode function according to the normal mode components.
[0008] Optionally, the decomposing each noisy signal sequence respectively to obtain multiple intrinsic mode function components includes: Identify all the maximum and minimum points from the noisy signal sequence, and use an interpolation method to construct an upper envelope line according to all the maximum points and a lower envelope line according to all the minimum points; Calculate the mean curve of the upper envelope line and the lower envelope line, and subtract the mean curve from the noisy signal sequence to obtain a new signal sequence; Judge whether the new signal sequence meets the preset conditions of the intrinsic mode function. If it meets the preset conditions, determine the new signal sequence as an intrinsic mode function component.
[0009] Optionally, the extracting the time vector, space vector, and frequency domain vector of the intrinsic mode function includes: Sample the intrinsic mode function on the time axis, record the function values corresponding to each sampling point, and arrange these function values in chronological order to form a time vector; Quantify the energy or amplitude of the intrinsic mode function on different frequency components, and use the quantified values as elements of the vector with frequency as the dimension to construct a space vector; The intrinsic mode function is transformed from the time domain to the frequency domain by Fourier transform to obtain the frequency-domain representation of the signal in the frequency domain. The target features of the frequency-domain representation are extracted, and the target features are arranged in a preset order to form a frequency-domain vector.
[0010] Optionally, obtaining the attention weights through the dual-path cross-attention mechanism includes: In the first path, the time vector is used as the query vector, the space vector is used as the key vector and the value vector, and in the second path, the time vector is used as the query vector, and the frequency-domain vector is used as the key vector and the value vector; Perform cross-attention calculation on the first path and the second path to obtain the first attention weight and the second attention weight; Different weights are assigned according to the importance levels of the first path and the second path, and the first attention weight and the second attention weight are linearly combined according to the weights to obtain the attention weights, where the attention weights include the time vector weight, the space vector weight, and the frequency-domain vector weight.
[0011] Optionally, obtaining the attention weights through the dual-path cross-attention mechanism includes: Calculate the similarity matrix between the query vector and the key vector in the first path, multiply it by the value vector after normalization to obtain the first attention output: In the second path, the multi-head attention mechanism is adopted. The query vector is divided into multiple head subspaces, and parallel calculations are respectively performed with the key vector and the value vector, and the second attention output is obtained after splicing the multi-head outputs; Input the first attention output and the second attention output into the gated fusion module, and dynamically adjust the contribution degrees of the dual-path information through the weight parameters to obtain the attention weights.
[0012] Optionally, constructing the state space according to the blockage probability value, the historical maintenance record, and the device operation duration includes: Segment the device operation duration, assign a unique coding value to each segmented interval, and generate an operation duration state coding vector according to the interval to which the actual device operation duration belongs; Generate a maintenance period matrix according to the historical maintenance record, and perform singular value decomposition on the maintenance period matrix to obtain a maintenance feature vector; Perform tensor splicing on the blockage probability value, the maintenance feature vector, and the operation duration state coding vector, and generate a temporal correlation feature according to the spliced tensor; Generate the state space according to the temporal correlation feature.
[0013] In a second aspect of the present application, a blockage detection system for a flow measurement device is provided, including an acquisition module, a vector module, a prediction module, and an execution module, where: The acquisition module is configured to obtain the original pressure signal and the original flow signal of the flow measurement device to be measured, and generate an intrinsic mode function according to the original pressure signal and the original flow signal; The vector module is configured to extract the time vector, space vector, and frequency domain vector of the intrinsic mode function, obtain attention weights through a dual-channel cross-attention mechanism, and perform weighted fusion on the time vector, the space vector, the frequency domain vector, and the attention weights to obtain a multi-dimensional feature vector; The prediction module is configured to input the multi-dimensional feature vector into a pre-trained deep learning-based blockage probability prediction model to obtain a blockage probability value; The execution module is configured to construct a state space according to the blockage probability value, historical maintenance records, and device operation duration, and balance false alarm and missed detection penalties in combination with a reward function to determine an execution operation.
[0014] In a third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions. Both the user interface and the network interface are used to communicate with other devices. The processor is used to execute the instructions stored in the memory so that the electronic device executes the method described in any one of the above.
[0015] In a fourth aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions that, when executed, execute the method described in any one of the above.
[0016] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By obtaining the original pressure signal and the original flow signal and generating an intrinsic mode function, it is possible to decompose signal components with different characteristic scales from complex original signals, and more accurately capture the inherent characteristics of the signals. Further extracting the time vector, space vector, and frequency domain vector of the intrinsic mode function comprehensively characterizes the signal characteristics from multiple dimensions, providing rich and effective feature information for subsequent analysis. Compared with single-dimensional feature extraction methods, it can more accurately reflect the operating state of the flow measurement device; 2. The attention weights are obtained by adopting a dual-channel cross-attention mechanism and weighted fused with time vectors, spatial vectors, and frequency-domain vectors to form a multi-dimensional feature vector. This fusion method can highlight the important information in different-dimensional features, suppress irrelevant or interfering information, enabling the multi-dimensional feature vector to more accurately represent the key features of the flow measurement device in blockage detection, enhancing the feature expression ability, and contributing to improving the accuracy of subsequent blockage detection; 3. The multi-dimensional feature vector is input into a pre-trained deep learning-based blockage probability prediction model. Utilizing the powerful non-linear fitting ability and learning ability of the deep learning model, it can learn the complex mapping relationship between features and blockage probability from a large amount of training data, thereby more accurately predicting the blockage probability value of the flow measurement device. Compared with traditional blockage detection methods, the prediction results are more reliable and accurate; 4. A state space is constructed based on the blockage probability value, historical maintenance records, and device operation duration, comprehensively considering multiple relevant factors, making the decision-making process more comprehensive and scientific. Combining a reward function to balance false alarm and missed detection penalties can find a reasonable balance between avoiding false alarms (i.e., wrongly judging the device to be blocked, resulting in unnecessary maintenance operations) and missed detections (i.e., failing to detect the device blockage in a timely manner, affecting normal production operations), determining the most appropriate execution operations according to the actual situation, such as whether maintenance is required and the urgency of maintenance, effectively reducing maintenance costs while ensuring the normal operation of the flow measurement device; 5. The entire method forms a complete and efficient blockage detection process from signal acquisition, feature extraction to blockage probability prediction and decision-making. Through automated signal processing and model prediction, it can quickly and accurately determine whether there is a blockage risk in the flow measurement device. Compared with traditional manual detection methods, it greatly improves the detection efficiency, reduces the errors caused by manual intervention and subjective judgment, and improves the reliability of blockage detection. Description of the Drawings
[0017] Figure 1 is a schematic flowchart of a blockage detection method for a flow measurement device disclosed in an embodiment of the present application; Figure 2 is a schematic block diagram of a blockage detection system for a flow measurement device disclosed in an embodiment of the present application; Figure 3 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
[0018] Description of the Reference Numerals: 201, acquisition module; 202, vector module; 203, prediction module; 204, execution module; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. Detailed Embodiments
[0019] To enable those skilled in the art to better understand the technical solutions in this specification, the following will clearly and completely describe the technical solutions in the embodiments of this specification in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments.
[0020] In the description of the embodiments of this application, words such as "for example" or "for illustration" are used to give examples, illustrations or explanations. Any embodiment or design solution described as "for example" or "for illustration" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "for example" or "for illustration" is intended to present relevant concepts in a specific manner.
[0021] In the description of the embodiments of this application, the meaning of the term "a plurality of" refers to two or more. For example, a plurality of systems refers to two or more systems, and a plurality of screen terminals refers to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly indicating the technical features indicated. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The terms "include", "comprise", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0022] This embodiment discloses a method for detecting blockage of a flow measurement device. Figure 1 is a schematic flow diagram of a method for detecting blockage of a flow measurement device disclosed in the embodiments of this application, as Figure 1 shown, the method includes the following steps: S101. Obtain the original pressure signal and the original flow signal of the flow measurement device to be measured, and generate an intrinsic mode function according to the original pressure signal and the original flow signal; S102. Extract the time vector, space vector and frequency domain vector of the intrinsic mode function, obtain attention weights through a dual-channel cross-attention mechanism, and perform weighted fusion on the time vector, the space vector, the frequency domain vector and the attention weights to obtain a multi-dimensional feature vector; S103. Input the multi-dimensional feature vector into a pre-trained deep learning-based blockage probability prediction model to obtain a blockage probability value; S104. Construct a state space according to the blockage probability value, historical maintenance records and device operation duration, and combine a reward function to balance false alarm and missed detection penalties to determine an execution operation.
[0023] During the operation of the flow measurement device, physical signals related to pressure and flow are generated. By installing appropriate sensors on the device, such as pressure sensors and flow sensors, the original pressure signal and the original flow signal of the flow measurement device to be measured can be collected in real time. These original signals contain rich information about the operating state of the device, but at the same time, they may be affected by factors such as noise and interference, showing complex and non-linear characteristics. The empirical mode decomposition (EMD) algorithm is used to generate intrinsic mode functions. EMD is an adaptive signal processing method that can decompose complex original signals into several intrinsic mode functions (IMFs). Each IMF satisfies two conditions: within the entire data range, the number of extreme points must be equal to or at most differ by one from the number of zero-crossing points; at any time, the average value of the upper envelope formed by local maximum points and the lower envelope formed by local minimum points is zero. Through EMD decomposition, the original signal is decomposed into IMFs with different frequency components. These IMFs reflect the characteristics of the signal at different time scales, which helps to analyze the essential characteristics of the signal more deeply and provides a basis for subsequent feature extraction and blockage detection.
[0024] The time vector reflects the characteristics of the signal varying with time. Time series data can be extracted from the intrinsic mode functions to analyze information such as the amplitude and variation trend of the signal at different time points and quantify it as a time vector. For example, statistics such as the average value, maximum value, and minimum value of each IMF in different time periods can be calculated, or the time-domain waveform characteristics of the signal, such as rise time and fall time, can be analyzed to construct the time vector. In a flow measurement device, the spatial vector may be related to the distribution or correlation of the signal at different spatial positions. If the device has multiple measurement points or sensors distributed at different positions, the relationships between the signals of the sensors at different positions, such as signal correlation and phase difference, can be analyzed and this information can be quantified as a spatial vector. Even if the structure of the device itself is relatively simple, the spatial characteristics can be considered from the perspectives of signal propagation and reflection to construct a spatial vector to describe the spatial characteristics of the signal. The frequency-domain vector is used to describe the characteristics of the signal in the frequency domain. By performing frequency-domain analysis methods such as Fourier transform on the intrinsic mode functions, the energy distribution, phase information, etc. of the signal at different frequency components can be obtained. Characteristics such as the main frequency, frequency bandwidth, and spectral energy of the signal can be extracted to construct a frequency-domain vector to reflect the frequency characteristics of the signal. The dual-channel cross-attention mechanism is a deep learning technique for processing multi-modal data (such as time vectors, spatial vectors, and frequency-domain vectors). It contains two input paths that process different types of vector data respectively. In each path, by calculating the similarity or correlation between vectors, an attention weight is assigned to each vector element. These attention weights reflect the degree of importance of different vector elements in the overall characteristics. The dual-channel cross-attention mechanism can automatically learn the association relationships between different vectors, enabling the model to pay more attention to the information that has an important impact on blockage detection and suppress irrelevant or interfering information. Multiply the extracted time vector, spatial vector, and frequency-domain vector by the corresponding attention weights obtained through the dual-channel cross-attention mechanism respectively, and then perform operations such as concatenation or summation on the weighted vectors to obtain a multi-dimensional feature vector. This weighted fusion method can integrate the important information of different-dimensional features, enabling the multi-dimensional feature vector to more comprehensively and accurately characterize the operating state and blockage characteristics of the flow measurement device and providing richer feature information for subsequent blockage probability prediction.
[0025] The clogging probability prediction model is constructed based on deep learning algorithms, usually adopting neural network structures such as convolutional neural networks (CNNs), recurrent neural networks (RNNs) and their variants (such as LSTMs, GRUs), etc., or combinations thereof. In the model training stage, a large amount of labeled data (including multi-dimensional feature vectors of flow measurement devices under different operating states and corresponding clogging labels) is used to train the model, enabling the model to learn the complex mapping relationship between multi-dimensional feature vectors and clogging probabilities. The obtained multi-dimensional feature vectors are input into a pre-trained clogging probability prediction model. The model processes and analyzes the input feature vectors, performs feature extraction, transformation and mapping through a series of neural network layers (such as convolutional layers, pooling layers, fully connected layers, etc.), and finally outputs a clogging probability value. This clogging probability value represents the likelihood of the flow measurement device being clogged, and its value range is usually between 0 and 1. The closer the value is to 1, the greater the likelihood of clogging; the closer the value is to 0, the smaller the likelihood of clogging.
[0026] The state space is a multi-dimensional space that comprehensively considers multiple factors such as the clogging probability value, historical maintenance records, and equipment operation duration. The clogging probability value reflects the likelihood of the current device being clogged; the historical maintenance records contain information such as the past maintenance time, maintenance content, and failure conditions of the device, which can provide a reference for judging the current state of the device; the equipment operation duration reflects the service life and wear degree of the device. The longer the operation time, the greater the likelihood of the device experiencing failures such as clogging. By quantifying these three factors and combining them into a multi-dimensional vector, the state space is constructed, such that each state point corresponds to a specific operating state of the device. The reward function is a mathematical function used to evaluate the effects of different execution operations. In the clogging detection scenario, two situations need to be considered: false alarms (wrongly judging the device to be clogged, resulting in unnecessary maintenance operations) and missed detections (failing to detect the device clogging in a timely manner, affecting normal production operations), and corresponding penalties are given. The reward function can assign different reward or penalty values to different execution operations according to the degrees of false alarms and missed detections. Based on the constructed state space and reward function, reinforcement learning or other decision algorithms are adopted to search for the optimal execution operation at different state points. The execution operations may include immediate maintenance, scheduling regular inspections, continuing monitoring, etc. By comprehensively considering the clogging probability, historical maintenance records, and equipment operation duration, and combining the balance of false alarms and missed detections by the reward function, the most appropriate execution operation in the current state is determined to achieve the goal of both reducing maintenance costs and ensuring the normal operation of the device.
[0027] Optionally, generating the intrinsic mode function according to the original pressure signal and the original flow signal includes: Add white noise with different amplitudes to the original pressure signal and the original flow signal multiple times to form multiple noisy signal sequences; Decompose each noisy signal sequence respectively to obtain multiple intrinsic mode function components; According to the signal sampling frequency and the blockage detection requirement, determine the size and step length of the sliding time window. Within each sliding time window, calculate the cross-correlation coefficient between the target intrinsic mode function component and the preset reference signal, where the target intrinsic mode function component is any one of the multiple intrinsic mode function components; Record the number of sliding time windows whose cross-correlation coefficient is lower than the preset coefficient threshold. When the number is greater than or equal to the preset number threshold, determine the target intrinsic mode function component as the abnormal mode component caused by blockage. When the number is less than the preset number threshold, determine the target intrinsic mode function component as the normal mode component; Construct the intrinsic mode function according to the normal mode components.
[0028] During the actual acquisition process of the original pressure signal and the original flow signal, they are often affected by various noises and interferences, resulting in poor signal quality and making it difficult to directly perform accurate analysis. By adding white noise to the original signal multiple times, the signal is evenly distributed in the time-frequency space, thereby alleviating the mode mixing problem existing in EMD. Mode mixing means that an IMF contains signal components with different time scales, or different IMFs contain signal components with the same time scale, which will lead to inaccurate signal decomposition and affect subsequent analysis and detection. In the original pressure signal and the original flow signal, add white noise with different amplitudes multiple times according to certain rules (such as randomly or in a specific sequence). After adding white noise each time, a new noisy signal sequence is formed. The number of times of adding white noise and the amplitude size need to be reasonably set according to the characteristics of the signal and the actual requirements. Generally speaking, the more times of adding, the more stable the decomposition result, but the computational amount will also increase accordingly; the amplitude of the white noise cannot be too large, otherwise it will mask the characteristics of the original signal, nor can it be too small, otherwise the mode mixing problem cannot be effectively alleviated.
[0029] The empirical mode decomposition algorithm is used to decompose each noisy signal sequence separately. EMD is an adaptive signal processing method that can decompose a complex signal into several intrinsic mode function components and a residual component. Each IMF satisfies two conditions: within the entire data range, the number of extreme points must be equal to or at most differ by one from the number of zero-crossing points; at any given time, the average value of the upper envelope formed by local maximum points and the lower envelope formed by local minimum points is zero. For each noisy signal sequence, first find all the local maximum points and local minimum points of the signal, and then respectively fit the upper envelope and the lower envelope through cubic spline interpolation. Calculate the average value of the upper and lower envelopes, and subtract this average value from the original signal to obtain a new signal. Repeat the above process until the new signal meets the conditions of the IMF, and the first IMF component is obtained. Subtract the first IMF component from the original signal to obtain a new signal, and repeat the above decomposition process for this new signal until the remaining signal becomes a monotonic function or meets certain stopping conditions, and all the IMF components and the residual component are obtained.
[0030] According to the signal sampling frequency and the clogging detection requirements, determine the size and step length of the sliding time window. The sliding time window is used for local analysis of the signal and can observe the characteristic changes of the signal in different time segments. The sampling frequency determines the time resolution of the signal. The higher the sampling frequency, the higher the time resolution, but the larger the data volume; the clogging detection requirements determine the time scale that needs to be concerned. For example, if the clogging is a slow-developing process, a larger time window may be required to capture its characteristics; if the clogging occurs suddenly, a smaller time window is needed to detect it in a timely manner. Within each sliding time window, calculate the cross-correlation coefficient between the target intrinsic mode function component (any one selected from multiple IMF components) and the preset reference signal. The preset reference signal is usually constructed based on the signal characteristics of the flow measurement device under normal operating conditions and represents the typical signal pattern when the device is working properly. The cross-correlation coefficient is used to measure the similarity between two signals, and its value ranges from -1 to 1. The closer the value is to 1, the more similar the two signals are; the closer the value is to -1, the less similar the two signals are; when the value is 0, it means the two signals are not correlated. By calculating the cross-correlation coefficient between the target IMF component and the preset reference signal, it can be determined whether the target IMF component deviates from the normal state within this time window.
[0031] A coefficient threshold is preset to determine whether the similarity between the target IMF component and the preset reference signal is within the normal range. The number of sliding time windows whose mutual correlation coefficient is lower than the preset coefficient threshold is recorded. This number reflects how many time segments the target IMF component has a large deviation from the normal state. A quantity threshold is preset. When the number of sliding time windows whose mutual correlation coefficient is lower than the preset coefficient threshold is greater than or equal to the preset quantity threshold, it means that the target IMF component has a significant difference from the normal state in more time segments, and it is determined as an abnormal modal component caused by blockage; when the number is less than the preset quantity threshold, it means that the target IMF component is less different from the normal state, and it is determined as a normal modal component. In this way, the abnormal modal components related to blockage can be distinguished from multiple IMF components, providing a basis for subsequent analysis and detection. All IMF components determined as normal modal components are combined to construct an intrinsic mode function. These normal mode components reflect the signal characteristics of the flow measurement device under normal operating conditions. By combining them, an intrinsic mode function that can represent the normal operating state of the device can be obtained. During the construction process, the normal mode components can be weighted, filtered, and processed as needed to further improve the quality and accuracy of the intrinsic mode function. The constructed intrinsic mode function will be used in subsequent steps such as feature extraction and blockage probability prediction to provide effective feature information for blockage detection of flow measurement devices.
[0032] The randomness of white noise enables the features of the signal to be more clearly separated at different scales, improving the stability and accuracy of signal decomposition. It can more effectively extract meaningful intrinsic mode function components from complex signals, providing a more reliable feature basis for subsequent analysis. The similarity between the target intrinsic mode function component and the reference signal can be quantified through the cross-correlation coefficient. When a blockage occurs, the signal characteristics generated by the flow measurement device change, resulting in a decrease in the similarity between the relevant intrinsic mode function component and the reference signal under normal conditions. Record the number of sliding time windows with a cross-correlation coefficient lower than the preset coefficient threshold and compare it with the preset number threshold to accurately determine whether the target intrinsic mode function component is an abnormal mode component or a normal mode component caused by the blockage. This method can accurately identify the abnormal features related to the blockage from numerous intrinsic mode function components, contributing to a more in-depth analysis of the impact of the blockage on the signal. Through the above process of identifying abnormal mode components, the signal changes caused by the blockage can be distinguished from the signal changes during normal operation of the device. The normal mode component reflects the normal working state of the device without blockage, while the abnormal mode component contains the feature information related to the blockage. Based on the normal mode component, an intrinsic mode function can be constructed to remove interference information such as blockage noise, making the constructed intrinsic mode function more accurately reflect the signal characteristics of the device in the normal state. In subsequent blockage detection, by comparing the actual signal with the model or features constructed based on the normal mode component, it is possible to more accurately determine whether the device is blocked, improving the accuracy and reliability of blockage detection. Determine the size and step length of the sliding time window, as well as the preset coefficient threshold and preset number threshold according to the signal sampling frequency and blockage detection requirements, making this method highly flexible and adaptable. Different flow measurement devices and blockage detection scenarios may have different signal characteristics and detection requirements. By adjusting these parameters, optimization can be carried out for specific situations to ensure that the signal changes caused by the blockage can be accurately captured and the blockage detection requirements in different application scenarios can be met.
[0033] Optionally, the step of respectively decomposing each noisy signal sequence to obtain multiple intrinsic mode function components includes: Identify all the maximum and minimum points from the noisy signal sequence, and use the interpolation method to construct the upper envelope line according to all the maximum points and the lower envelope line according to all the minimum points; Calculate the mean curve of the upper envelope line and the lower envelope line, and subtract the mean curve from the noisy signal sequence to obtain a new signal sequence; Judge whether the new signal sequence meets the preset conditions of the intrinsic mode function. If it meets the preset conditions, determine the new signal sequence as the intrinsic mode function component.
[0034] For a given noisy signal sequence, it is necessary to find all the maximum points and minimum points in the entire signal sequence. A maximum point refers to a point where the signal value is greater than the values of its adjacent points on both the left and right sides in its vicinity; a minimum point refers to a point where the signal value is smaller than the values of its adjacent points on both the left and right sides in its vicinity. This process can be achieved by comparing the magnitude relationships of adjacent data points in the signal sequence. For example, for the signal sequence x ( n ), if x ( n ) > x ( n - 1) and x ( n ) > x ( n + 1), then x ( n ) is a maximum point. Use interpolation methods to construct the upper envelope line based on all the maximum points. There are various interpolation methods, such as cubic spline interpolation. Cubic spline interpolation constructs cubic polynomials between adjacent maximum points, making these polynomials have not only equal function values but also continuous first and second derivatives at the maximum points, thus obtaining a smooth curve, which is the upper envelope line. It can well fit the distribution trend of the maximum points and always lies above the maximum points. Similarly, use interpolation methods to construct the lower envelope line based on all the minimum points. The upper envelope line and the lower envelope line jointly define the fluctuation range of the signal sequence in the vertical direction, providing a basis for subsequent extraction of the main components of the signal. After obtaining the upper envelope line and the lower envelope line, calculate the mean curve of these two envelope lines. The mean curve can be obtained by taking the average of the values of the upper envelope line and the lower envelope line at each corresponding point, that is, for each time point t , the mean curve m ( t ) = 2 u ( t ) + l ( t ), where u ( t ) is the value of the upper envelope line at time point t , and l ( t ) is the value of the lower envelope line at time point t . The mean curve reflects the average change trend of the signal sequence between the upper and lower envelope lines, and it contains the low-frequency components and overall trend information of the signal sequence. Subtract the mean curve m ( t ) from the noisy signal sequence x ( t ) to obtain the new signal sequence h ( t ) =x ( t ) - m ( t )。The purpose of this step is to remove the low-frequency trend component in the signal sequence, so that the new signal sequence h ( t ) focuses more on the high-frequency oscillation part of the signal. These high-frequency oscillation parts may contain important characteristic information of the signal, such as signal changes caused by blockages, etc.
[0035] The Intrinsic Mode Function (IMF) needs to meet the following two conditions. Condition 1: Throughout the data range, the number of extreme points and the number of zero-crossing points must be equal or differ by at most one. Extreme points reflect the local maximum and minimum values of the signal, and zero-crossing points are the points where the signal intersects the horizontal axis. This condition ensures the symmetry of the signal on the time scale, that is, the positive and negative half-cycles of the signal are relatively balanced in time, avoiding overly complex or irregular oscillation patterns in the signal. Condition 2: At any moment, the average value of the upper envelope formed by local maximum points and the lower envelope formed by local minimum points is zero. This means that the symmetry of the upper and lower envelopes of the signal is guaranteed within any local interval, the local average trend of the signal is zero, further emphasizing the high-frequency oscillation characteristics of the signal and removing the low-frequency trend component. Check the obtained new signal sequence h ( t ) to determine whether it meets the above two preset conditions. If it meets, it means that the new signal sequence h ( t ) is an Intrinsic Mode Function component and can be determined as an IMF. If it does not meet, the new signal sequence h ( t ) needs to be used as the new noisy signal sequence, and repeat the process of identifying extreme points, constructing envelopes, calculating the mean curve, and obtaining the new signal sequence until an IMF that meets the conditions is obtained.
[0036] Identify all the maximum and minimum points from the noisy signal sequence, and use interpolation methods to construct the upper envelope and the lower envelope respectively. This process can accurately outline the local fluctuation range of the signal. Interpolation methods (such as cubic spline interpolation, etc.) can smoothly and accurately fit the upper and lower boundaries of the signal based on the limited extreme point information, so as to more comprehensively capture the amplitude change characteristics of the signal at different times, laying a foundation for subsequent analysis of the internal components of the signal. By calculating the mean curve of the upper envelope and the lower envelope, and subtracting this mean curve from the noisy signal sequence to obtain a new signal sequence, this step plays a role in filtering to a certain extent. The noise components in the original noisy signal usually show random fluctuations, while the mean curve reflects the overall trend and main characteristics of the signal. After subtracting the mean curve, the relative influence of the noise in the new signal sequence is weakened, making the main characteristics of the signal more prominent, which helps to improve the stability and accuracy of signal decomposition and reduce the interference of noise on the subsequent extraction of intrinsic mode function components. Determine whether the new signal sequence meets the preset conditions of the intrinsic mode function. Only the new signal sequences that meet these conditions will be determined as intrinsic mode function components. This strict judgment criterion ensures that the extracted intrinsic mode function components have clear physical meanings and mathematical properties, can accurately reflect the inherent vibration modes of the signal at different frequency scales, avoids misidentifying signal components that do not meet the conditions as intrinsic mode function components, and improves the rationality of component extraction. Decompose the signal continuously according to the above method. Each time, extract an intrinsic mode function component that meets the conditions, separate this component from the original signal, and then repeat the above process for the remaining signal. This step-by-step decomposition method can decompose the complex noisy signal into a series of intrinsic mode function components with different frequency components. Each component represents the characteristics of the signal at different time scales, which helps to deeply analyze the composition structure of the signal and provides more detailed and effective feature information for subsequent signal processing, feature extraction, pattern recognition and other tasks.
[0037] Optionally, the extraction of the time vector, space vector and frequency domain vector of the intrinsic mode function includes: Sample the intrinsic mode function on the time axis, record the function values corresponding to each sampling point, and arrange these function values in chronological order to form a time vector; Quantify the energy or amplitude of the intrinsic mode function on different frequency components, and use the quantified values as the elements of the vector with frequency as the dimension to construct a space vector; Use Fourier transform to convert the intrinsic mode function from the time domain to the frequency domain, obtain the frequency domain representation of the signal in the frequency domain, extract the target features of the frequency domain representation, and arrange the target features in a preset order to form a frequency domain vector.
[0038] For a given intrinsic mode function, it is a time-varying signal. Sampling on the time axis means selecting a number of time points at a certain time interval (sampling interval). The choice of this sampling interval needs to be determined according to the characteristics of the signal and the analysis requirements. If the signal changes rapidly, in order to accurately capture the details of the signal, a smaller sampling interval needs to be selected; if the signal changes relatively slowly, the sampling interval can be appropriately increased to reduce the amount of data. At each sampling point, record the function value corresponding to the intrinsic mode function. These function values reflect the amplitude size of the signal at that moment. Then, arrange these function values in chronological order, and a time vector is formed. The time vector intuitively shows the change trend of the intrinsic mode function over time, contains the dynamic information of the signal in the time domain, such as characteristics like the rise, fall, and fluctuations of the signal, and provides the basic data for subsequent analysis of the time characteristics of the signal. Although the intrinsic mode function is a time-domain signal, it can be considered to be composed of components with different frequencies. To construct a spatial vector, it is necessary to analyze the energy or amplitude of the intrinsic mode function in different frequency components. Energy usually reflects the power size contained in a certain frequency range of the signal, and amplitude reflects the strength of the signal in that frequency component. Some signal processing methods (such as short-time Fourier transform, wavelet transform, etc.) can be used to estimate the energy or amplitude of the intrinsic mode function in different frequency components and perform quantization processing to convert it into specific numerical values. Taking frequency as the dimension, use the quantized energy or amplitude values on different frequency components as the elements of the vector. That is to say, each element of the vector corresponds to a specific frequency, and the value of this element represents the energy or amplitude size of the intrinsic mode function at that frequency. The spatial vector constructed in this way can describe the characteristics of the intrinsic mode function from the perspective of frequency, reflects the distribution of the signal in different frequency spaces, and helps to analyze the frequency characteristics of the signal and the mutual relationship between different frequency components. By performing a Fourier transform on the intrinsic mode function, the signal that originally changes on the time axis can be converted into a signal represented on the frequency axis, obtaining the frequency-domain representation of the signal in the frequency domain. The frequency-domain representation clearly shows various frequency components contained in the signal and their corresponding amplitude and phase information, enabling us to deeply analyze the characteristics of the signal from the frequency perspective. Extract target features from the frequency-domain representation, and these target features can be selected according to specific application requirements and analysis purposes. For example, the main frequency of the signal (i.e., the frequency component with the largest signal energy or amplitude), the frequency bandwidth (the frequency range where the signal energy or amplitude is non-zero), the spectral energy (the total energy of the signal at each frequency), etc. can be extracted. Then, arrange these target features in a preset order to form a frequency-domain vector. The frequency-domain vector centrally reflects the key features of the intrinsic mode function in the frequency domain and provides an important feature basis for subsequent signal analysis and pattern recognition tasks based on frequency-domain information.
[0039] Sample the intrinsic mode functions on the time axis, record the function values corresponding to each sampling point and arrange them in chronological order to form a time vector. This process can accurately capture the dynamic characteristics of the signal changing over time. Each element in the time vector represents the state of the signal at a specific moment. By analyzing these elements, the time-domain characteristics such as the amplitude change trend, periodicity, and mutation points of the signal can be understood, providing a detailed and accurate data basis for subsequent time-characteristic-based analysis (such as the judgment of the clogging occurrence moment, the study of the time-domain fluctuation law of the signal, etc.). The formed time vector is presented in the form of an intuitive numerical sequence, facilitating various time-series-related analysis operations. Quantify the energy or amplitude of the intrinsic mode functions on different frequency components and construct a spatial vector with frequency as the dimension, which can comprehensively and meticulously reflect the energy distribution of the signal in the frequency domain. Each element in the spatial vector corresponds to a specific frequency component, and its value represents the energy or amplitude size of that frequency component. By analyzing the spatial vector, the relative strengths of the various frequency components in the signal can be clearly understood, the main frequency components and secondary frequency components of the signal can be identified, which helps to discover the possible abnormal frequency characteristics in the signal and provides key information in the frequency dimension for tasks such as clogging detection. The constructed spatial vector represents the characteristics of the signal from the perspective of frequency energy, complementing other-dimensional feature vectors such as the time vector. In the subsequent feature fusion process, the spatial vector can be organically combined with other feature vectors to provide more comprehensive and rich signal feature information, which helps to improve the accuracy and robustness of the clogging probability prediction model based on methods such as deep learning, enabling the model to better capture the relationship between the characteristics of the signal in different dimensions and clogging. Use the Fourier transform to convert the intrinsic mode functions from the time domain to the frequency domain, obtain the representation of the signal in the frequency domain, and extract the target features (such as the main frequency, frequency bandwidth, spectral energy distribution, etc.) to form a frequency-domain vector. The Fourier transform can clearly display the hidden frequency information in the time-domain signal, and the extracted target features can accurately describe the key characteristics of the signal in the frequency domain. The formed frequency-domain vector contains the important feature information of the signal in the frequency domain in a concise form, facilitating rapid analysis and processing. In applications such as clogging detection, by directly analyzing the target features in the frequency-domain vector, it can be quickly determined whether the signal has abnormal frequency changes, thereby detecting faults such as clogging in a timely manner. At the same time, the conciseness of the frequency-domain vector also helps to reduce the computational complexity in the subsequent model training and inference processes and improve the operating efficiency of the system.
[0040] Optionally, the obtaining of the attention weights through the dual-path cross-attention mechanism includes: In the first path, use the time vector as the query vector, the spatial vector as the key vector and the value vector, and in the second path, use the time vector as the query vector, the frequency-domain vector as the key vector and the value vector; Perform cross-attention calculation on the first path and the second path to obtain a first attention weight and a second attention weight; Assign different weights according to the importance levels of the first path and the second path, and linearly combine the first attention weight and the second attention weight according to the weights to obtain an attention weight, where the attention weight includes a time vector weight, a space vector weight, and a frequency domain vector weight.
[0041] In the first path, the time vector is used as the query vector, and the spatial vector is used as the key vector and the value vector. In the attention mechanism, the query vector is used to query information related to itself, the key vector is used to be queried, and the value vector contains the actual information content. In this way, the first path mainly focuses on the correlation between the time vector and the spatial vector, and calculates the attention distribution of the time vector on the spatial vector. In the second path, the time vector is also used as the query vector, but the frequency-domain vector is used as the key vector and the value vector. This makes the second path focus on the connection between the time vector and the frequency-domain vector, and calculates the attention distribution of the time vector on the frequency-domain vector. This setting uses the time vector as a bridge to explore the correlations between time and space, and time and frequency respectively, which helps to uncover the internal connections between multi-dimensional features from different perspectives. In the first path, according to the calculation formula of the attention mechanism (usually dot-product attention, additive attention, etc.), the similarity between the time vector (query vector) and the spatial vector (key vector) is calculated to obtain the attention scores. Then these attention scores are normalized (such as using the Softmax function) to obtain the first attention weights. The first attention weights reflect the attention distribution of the time vector on different spatial vector elements. Similarly, in the second path, the similarity between the time vector (query vector) and the frequency-domain vector (key vector) is calculated and normalized to obtain the second attention weights. The second attention weights represent the attention distribution of the time vector on different frequency-domain vector elements, revealing the key points of the correlation between the time vector and the frequency-domain vector. Since the first path and the second path focus on different feature correlation dimensions respectively, their importance levels in the overall feature fusion process may be different. According to the actual application scenario and task requirements, the importance levels of the first path and the second path are determined through experiments, experience, or specific algorithms, and different weights are assigned to them. For example, if it is considered that the relationship between time and space is more crucial in the current task, then a larger weight can be assigned to the first path; conversely, if the relationship between time and frequency is more important, then a larger weight is assigned to the second path. According to the assigned weights, the first attention weights and the second attention weights are linearly combined. The formula for the linear combination is usually: Final attention weights = Weight 1 × First attention weights + Weight 2 × Second attention weights, where Weight 1 and Weight 2 are the weights of the first path and the second path respectively. The finally obtained attention weights include the time vector weights, the spatial vector weights, and the frequency-domain vector weights. These weights reflect the importance levels of different vectors in the overall features, and can automatically learn and highlight the feature information that is more crucial for the current task (such as blockage detection), and suppress irrelevant or interfering information.
[0042] Through cross-attention calculation, the model can deeply explore the internal correlations between temporal features and spatial features, as well as between temporal features and frequency-domain features. The obtained attention weights include temporal vector weights, spatial vector weights, and frequency-domain vector weights, which reflect the importance of different-dimensional features in the overall features. By linearly combining the attention weights of different paths, the effective fusion of information in the three dimensions of time, space, and frequency domain is achieved. This fusion method avoids the limitations of single-dimensional feature analysis, enabling the model to comprehensively consider information from multiple dimensions and more accurately represent the operating state of the flow measurement device, providing a richer feature basis for subsequent tasks such as blockage detection. Different weights are assigned according to the importance of the first path and the second path, and the first attention weight and the second attention weight are linearly combined to obtain the final attention weight. This process enables the model to dynamically adjust the degree of attention to temporal, spatial, and frequency-domain features according to the information value provided by different paths. The dual-path cross-attention mechanism can adaptively learn the importance of different-dimensional features without the need for artificially preset fixed feature weights. This adaptive feature selection method enables the model to better adapt to different data distributions and task requirements, accurately extracting the most valuable features for blockage detection in different operating scenarios of the flow measurement device, and improving the generalization ability and adaptability of the model. In the blockage detection task, temporal, spatial, and frequency-domain features may all contain information related to blockages. Through the attention weights obtained by the dual-path cross-attention mechanism, the model can more precisely locate the features closely related to blockages. For example, the temporal vector may reflect the moment of signal mutation when a blockage occurs, the spatial vector may indicate the change in sensor signals corresponding to the specific location of the blockage in the device, and the frequency-domain vector may reveal the change in frequency components caused by the blockage. By comprehensively utilizing these features with appropriate weights, the model can more accurately determine whether the device is blocked, improving the accuracy of blockage detection.
[0043] Optionally, obtaining the attention weights through the dual-path cross-attention mechanism includes: Calculating the similarity matrix between the query vector and the key vector in the first path, multiplying it by the value vector after normalization, and obtaining the first attention output: In the second path, using the multi-head attention mechanism, splitting the query vector into multiple head subspaces, performing parallel calculations with the key vector and the value vector respectively, and obtaining the second attention output after concatenating the multi-head outputs; Inputting the first attention output and the second attention output into the gated fusion module, and dynamically adjusting the contribution degrees of the dual-path information through weight parameters to obtain the attention weights.
[0044] In the first path, the query vector is usually served by the time vector, and the key vector is served by the space vector. The calculation of the similarity matrix is used to measure the similarity degree between each element in the query vector and the key vector. Common similarity calculation methods include dot product, cosine similarity, etc. Taking the dot product as an example, if the query vector Q = q 1, q 2,......, qn , and the key vector K = k 1, k 2,......, kn , then the element S in the similarity matrix Sij is qi · kj , i ∈[1, n , j ∈[1, n . By calculating the similarity matrix, the model can understand the correlation degree between time features and space features, providing a basis for subsequent attention allocation. The element values in the calculated similarity matrix S may have different dimensions and numerical ranges. For the convenience of subsequent calculations and comparisons, it is necessary to normalize it. The commonly used normalization method is the softmax function. The Softmax function converts each element Sij in the similarity matrix into a probability value aij . The sum of each row of elements in the normalized matrix A is 1, representing the attention allocation probability of each element in the time feature to each element in the space feature. The value vector is also served by the space vector. Multiply the normalized attention matrix A by the value vector V to obtain the first attention output O 1. The specific calculation is O 1= A · V . The purpose of this step is to perform a weighted sum of the space features according to the attention allocation probability, enabling the model to pay more attention to the part of the space features with a high correlation with the time features, thereby extracting more valuable feature information.
[0045] In the second path, the query vector is still the time vector, but the multi-head attention mechanism is adopted. The core idea of the multi-head attention mechanism is to divide the query vector, key vector, and value vector into multiple head subspaces. Suppose the query vector is divided into h heads, and the dimension of each head subspace is dk , then the dimension d model =h × dk 。Through splitting, the model can capture the relationships between features from different subspace perspectives, enhancing the model's expressive power and its ability to recognize different feature patterns. For each head subspace, attention calculations are performed separately with the key vector and the value vector. The calculation process is similar to that of the first path, that is, first calculate the similarity matrix between the query vector head and the key vector head, then perform normalization, and finally multiply with the value vector head to obtain the attention output of that head. Since multiple heads are calculated in parallel, feature information can be extracted from different perspectives simultaneously, greatly improving the computational efficiency. Concatenate the attention outputs of each head to obtain the second attention output O 2. The dimension of the concatenated vector is restored to the dimension of the original query vector d model 。Through parallel calculation and concatenation, the multi-head attention mechanism enables the model to comprehensively consider the feature information of different subspaces, thereby more comprehensively capturing the complex relationships between temporal features and frequency domain features.
[0046] Input the first attention output O 1 and the second attention output O 2 into the gated fusion module. These two outputs respectively represent the feature information extracted from different perspectives (time-space relationship and time-frequency relationship), and their contributions to the final attention weights may vary depending on the task requirements and data characteristics. The gated fusion module dynamically adjusts the contribution degrees of the two-way information by learning weight parameters. Specifically, the model will learn a set of weight parameters w 1 and w 2, which are used to weight the first attention output and the second attention output respectively. Then, fuse the weighted results to obtain the final attention weight O That is O = w 1· O 1+ w 2· O 2. The weight parameters w 1 and w 2 are automatically learned through the backpropagation algorithm during the model training process. They can adaptively adjust the relative importance of the two-way information according to the actual situation of the data and the task objective, enabling the model to better utilize the information of the two paths and improving the accuracy and effectiveness of the attention weights.
[0047] The dual-path cross-attention mechanism can respectively explore the correlation relationships between time and space, and time and frequency domain through different calculation paths, and then integrate them through a gating fusion module. It can capture the complex correlations between features more comprehensively and deeply, provide richer feature information for the model, and help improve the performance of the model in related tasks (such as congestion detection). The use of the multi-head attention mechanism and the gating fusion module makes the model have stronger flexibility and adaptability. The multi-head attention mechanism can extract features from multiple subspace perspectives, and the gating fusion module can dynamically adjust the contribution degrees of the dual-path information according to different situations, enabling the model to better adapt to different data distributions and task requirements and reducing the dependence on specific data and tasks. By comprehensively considering the information of the two paths and performing dynamic weighted fusion, the obtained attention weights can more accurately reflect the importance of different feature dimensions in the overall features, enabling the model to more precisely focus on key features, suppress irrelevant or interfering information, and thus improve the decision-making accuracy and reliability of the model.
[0048] Optionally, constructing the state space according to the congestion probability value, the historical maintenance record, and the device operation duration includes: Segment the device operation duration, assign a unique encoding value to each segmented interval, and generate an operation duration state encoding vector according to the interval to which the actual device operation duration belongs; Generate a maintenance cycle matrix according to the historical maintenance record, and perform singular value decomposition on the maintenance cycle matrix to obtain a maintenance feature vector; Perform tensor concatenation on the congestion probability value, the maintenance feature vector, and the operation duration state encoding vector, and generate a temporal correlation feature according to the concatenated tensor; Generate a state space according to the temporal correlation feature.
[0049] The operating duration of the device is a continuous variable. Directly using continuous operating duration data may lead to problems such as complex model processing and non-intuitive feature representation. By segmenting the operating duration of the device, the continuous operating duration can be transformed into discrete intervals, facilitating subsequent feature extraction and model processing. According to the actual operating conditions of the device and business requirements, the operating duration of the device is divided into several segmented intervals. For example, segmentation can be carried out according to principles such as the service life stage and maintenance cycle of the device. Suppose the normal operating duration range of the device is from 0 to 10,000 hours, and it can be divided into four intervals: 0 - 1,000 hours, 1,001 - 3,000 hours, 3,001 - 6,000 hours, and 6,001 - 10,000 hours. Assign a unique coding value to each segmented interval. Usually, a simple numerical coding method can be adopted. For example, the above four intervals can be coded as 0, 1, 2, and 3 respectively. Determine the interval to which the device belongs according to its actual operating duration. For example, if the actual operating duration of the device is 2,500 hours, then the interval it belongs to is 1,001 - 3,000 hours, and the corresponding coding value is 1. Convert this coding value into a vector form, that is, the operating duration status coding vector. In practical applications, for the convenience of subsequent tensor operations, the one-hot coding method is usually adopted. For the coding of the above four intervals, if the device operating duration coding is 1, then its one-hot coding vector is [0, 1, 0, 0]. The historical maintenance records contain important information such as the maintenance time, maintenance type, and maintenance content of the device. By analyzing these records, the maintenance situation of the device in different time periods can be statistically obtained, thereby constructing a maintenance cycle matrix. Taking time as the horizontal axis and maintenance type as the vertical axis, a two-dimensional matrix is constructed. Each element in the matrix represents the number or frequency of a specific type of maintenance at a specific time point. For example, suppose there are three types of maintenance, and the maintenance situation of each month in the past year is statistically obtained, resulting in a maintenance cycle matrix with 12 rows (12 months) and 3 columns (3 types of maintenance). Singular value decomposition is a commonly used matrix decomposition method, which can decompose a matrix into the product of three matrices, that is, A = UΣV T, where A is the original matrix, U and V are orthogonal matrices, and Σ is a diagonal matrix with the elements on the diagonal being singular values. The singular values reflect the importance of information in different directions of the matrix. After performing singular value decomposition on the maintenance period matrix, take the top k largest singular values and their corresponding left and right singular vectors, and obtain the maintenance eigenvectors through linear combination and other methods. These eigenvectors can extract the main characteristic information in the maintenance period matrix, such as the maintenance rules of the equipment and the change trend of the maintenance frequency. Concatenate the clogging probability value, the maintenance eigenvector, and the running duration status encoding vector into a tensor. The clogging probability value is usually a scalar, which can be extended to a vector form with the same dimension as the maintenance eigenvector and the running duration status encoding vector (for example, fill 0 at the appropriate positions), and then concatenate it with these two vectors. The concatenated tensor contains information about the equipment in three aspects: clogging probability, maintenance characteristics, and running duration. Since the operation of the equipment is a time-sequential process, there is a correlation between the state information at different time points. When generating time-sequential correlation features, some time-sequential models (such as the recurrent neural network RNN, long short-term memory network LSTM, etc.) can be considered to process the concatenated tensor to capture the time-sequential dependence relationship between the state information at different time points. Some simple time-sequential feature extraction methods can also be adopted, such as calculating the difference between tensors at adjacent time points, sliding window statistics, etc., to obtain a feature vector that can reflect the time-sequential change of the equipment state, that is, the time-sequential correlation feature. The state space is a multi-dimensional space, where each point represents a state of the equipment. Each element in the time-sequential correlation feature vector corresponds to a dimension in the state space, and the value in the vector represents the state value of the equipment in that dimension. Taking the time-sequential correlation feature vector as a point in the state space, by continuously collecting the time-sequential correlation feature vectors of the equipment at different time points, the entire state space can be constructed. The state space can intuitively display the change range and distribution of the equipment state, providing a basis for subsequent equipment state analysis, fault prediction, and decision-making. For example, by observing the distribution of points in the state space, it can be judged whether the equipment is in a normal state, a warning state, or a fault state.
[0050] By integrating multi-source information such as blockage probability values, historical maintenance records, and equipment operation duration, the constructed state space can more comprehensively and accurately characterize the operation state of the equipment. Different types of information complement each other, avoiding the limitations of a single information source and improving the accuracy and reliability of equipment state assessment. The process of generating time-series correlation features takes into account the time-series changes in the equipment state, enabling the state space to reflect the changing trend of the equipment state over time. This is of great significance for predicting the future state of the equipment and detecting potential faults in advance, helping to achieve predictive maintenance of the equipment, reduce equipment failure rates, and improve the operation efficiency and reliability of the equipment. The constructed state space provides an important basis for subsequent tasks such as equipment state analysis, fault diagnosis, and maintenance decision-making. Based on the state space, various machine learning and data analysis methods can be used to explore the potential relationships between equipment states and faults, formulate more scientific and reasonable maintenance strategies, and optimize the operation management of the equipment.
[0051] This embodiment also discloses a blockage detection system for a flow measurement device. Figure 2 As shown in the schematic diagram of the modules of a blockage detection system for a flow measurement device disclosed in an embodiment of the present application, Figure 2 As shown, the system includes an acquisition module 201, a vector module 202, a prediction module 203, and an execution module 204, where: The acquisition module 201 is configured to obtain the original pressure signal and the original flow signal of the flow measurement device to be measured, and generate an intrinsic mode function according to the original pressure signal and the original flow signal; The vector module 202 is configured to extract the time vector, spatial vector, and frequency domain vector of the intrinsic mode function, obtain attention weights through a dual-channel cross-attention mechanism, and perform weighted fusion on the time vector, the spatial vector, the frequency domain vector, and the attention weights to obtain a multi-dimensional feature vector; The prediction module 203 is configured to input the multi-dimensional feature vector into a pre-trained deep learning-based blockage probability prediction model to obtain a blockage probability value; The execution module 204 is configured to construct a state space according to the blockage probability value, historical maintenance records, and equipment operation duration, balance false alarm and missed detection penalties in combination with a reward function, and determine an execution operation.
[0052] Optionally, the acquisition module 201 is configured to: Add white noise with different amplitudes to the original pressure signal and the original flow signal multiple times to form multiple noisy signal sequences; Decompose each noisy signal sequence respectively to obtain multiple intrinsic mode function components; Determine the size and step of the sliding time window according to the signal sampling frequency and the requirements of blockage detection. Within each sliding time window, calculate the cross-correlation coefficient between the target intrinsic mode function component and the preset reference signal, where the target intrinsic mode function component is any one of multiple intrinsic mode function components; Record the number of sliding time windows in which the cross-correlation coefficient is lower than the preset coefficient threshold. When the number is greater than or equal to the preset number threshold, determine the target intrinsic mode function component as an abnormal mode component caused by blockage. When the number is less than the preset number threshold, determine the target intrinsic mode function component as a normal mode component; Construct the intrinsic mode function according to the normal mode components.
[0053] Optionally, the acquisition module 201 is configured to: Identify all the maximum points and minimum points from the noisy signal sequence, use the interpolation method to construct the upper envelope line according to all the maximum points, and construct the lower envelope line according to all the minimum points; Calculate the mean curve of the upper envelope line and the lower envelope line, and subtract the mean curve from the noisy signal sequence to obtain a new signal sequence; Judge whether the new signal sequence meets the preset conditions of the intrinsic mode function. If it meets the preset conditions, determine the new signal sequence as the intrinsic mode function component.
[0054] Optionally, the vector module 202 is configured to: Sample the intrinsic mode function on the time axis, record the function values corresponding to each sampling point, and arrange these function values in chronological order to form a time vector; Quantify the energy or amplitude of the intrinsic mode function on different frequency components, and use the quantified values as the elements of the vector with frequency as the dimension to construct a spatial vector; Use the Fourier transform to convert the intrinsic mode function from the time domain to the frequency domain, obtain the frequency domain representation of the signal in the frequency domain, extract the target features of the frequency domain representation, and arrange the target features in the preset order to form a frequency domain vector.
[0055] Optionally, the vector module 202 is configured to: In the first path, use the time vector as the query vector, use the spatial vector as the key vector and the value vector, and in the second path, use the time vector as the query vector, use the frequency domain vector as the key vector and the value vector; Perform cross-attention calculation on the first path and the second path to obtain the first attention weight and the second attention weight; Different weights are assigned according to the importance levels of the first path and the second path, and the first attention weight and the second attention weight are linearly combined according to the weights to obtain an attention weight, which includes a time vector weight, a space vector weight, and a frequency domain vector weight.
[0056] Optionally, the vector module 202 is configured to: Calculate a similarity matrix between a query vector and a key vector in the first path, multiply it by a value vector after normalization to obtain a first attention output: In the second path, use a multi-head attention mechanism to split the query vector into multiple head subspaces, perform parallel calculations with the key vector and the value vector respectively, and splice the multi-head outputs to obtain a second attention output; Input the first attention output and the second attention output into a gated fusion module, and dynamically adjust the contribution degrees of the dual-path information through weight parameters to obtain an attention weight.
[0057] Optionally, the execution module 204 is configured to: Segment the device running duration, assign a unique encoding value to each segmented interval, and generate a running duration status encoding vector according to the interval to which the actual device running duration belongs; Generate a maintenance period matrix according to the historical maintenance record, and perform singular value decomposition on the maintenance period matrix to obtain a maintenance feature vector; Perform tensor splicing on the blockage probability value, the maintenance feature vector, and the running duration status encoding vector, and generate a time-series correlation feature according to the spliced tensor; Generate a state space according to the time-series correlation feature.
[0058] It should be noted that: when the device provided in the above embodiment realizes its functions, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process can be seen in the method embodiment, which will not be elaborated here.
[0059] This embodiment also discloses an electronic device. Referring to Figure 3 , the electronic device may include: at least one processor 301, at least one communication bus 302, a user interface 303, a network interface 304, and at least one memory 305.
[0060] Among them, the communication bus 302 is used to realize the connection and communication between these components.
[0061] Among them, the user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may further include a standard wired interface and a wireless interface.
[0062] Among them, the network interface 304 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0063] Among them, the processor 301 may include one or more processing cores. The processor 301 connects various parts within the entire server through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling the data stored in the memory 305, the processor 301 performs various functions of the server and processes data. Optionally, the processor 301 may be implemented in at least one of the following hardware forms: digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 301 may integrate one or a combination of several of the following: a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, the user interface, and application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301 and may be implemented separately by a single chip.
[0064] Among them, the memory 305 may include random access memory (RAM) and may also include read-only memory. Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store the data involved in the above-mentioned method embodiments. Optionally, the memory 305 may further be at least one storage device located far from the aforementioned processor 301. Such as Figure 3As shown in the figure, the memory 305, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for the clogging detection method of a flow measurement device.
[0065] In Figure 3 In the electronic device shown in the figure, the user interface 303 is mainly used to provide an interface for the user to input data and obtain the data input by the user; while the processor 301 can be used to call the application program for the clogging detection method of a flow measurement device stored in the memory 305. When executed by one or more processors 301, the electronic device is caused to execute the method of one or more of the above embodiments.
[0066] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be in other sequences or performed simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0067] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0068] In several embodiments provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some service interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0069] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0070] In addition, in each embodiment of this application, the various functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0071] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory 305 and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. And the aforementioned memory 305 includes: various media such as USB flash drives, mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0072] The above are only exemplary embodiments of the present disclosure and should not be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. After considering the disclosure of the specification, those skilled in the art will readily think of other implementation schemes of the present disclosure. The present application aims to cover any variations, uses, or adaptive changes of the present disclosure, and these variations, uses, or adaptive changes follow the general principles of the present disclosure and include well-known common knowledge or conventional technical means in the technical field not recorded in the present disclosure. The specification and embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for detecting blockage of a flow measurement device, characterized in that, Applied to a blockage detection platform, the method includes: Obtain the original pressure signal and the original flow signal of the flow measurement device to be measured, and generate an intrinsic mode function according to the original pressure signal and the original flow signal; Extract the time vector, space vector and frequency domain vector of the intrinsic mode function, obtain the attention weight through a dual-channel cross-attention mechanism, and perform weighted fusion on the time vector, the space vector, the frequency domain vector and the attention weight to obtain a multi-dimensional feature vector; Input the multi-dimensional feature vector into a pre-trained deep learning-based blockage probability prediction model to obtain a blockage probability value; Construct a state space according to the blockage probability value, historical maintenance records and device operation duration, and combine a reward function to balance false alarm and missed detection penalties to determine the execution operation.
2. The clogging detection method of the flow measurement device according to claim 1, characterized in that, The generating the intrinsic mode function according to the original pressure signal and the original flow signal includes: Add white noise with different amplitudes to the original pressure signal and the original flow signal multiple times to form multiple noisy signal sequences; Decompose each noisy signal sequence respectively to obtain multiple intrinsic mode function components; According to the signal sampling frequency and blockage detection requirements, determine the sliding time window size and step length. Within each sliding time window, calculate the cross-correlation coefficient between the target intrinsic mode function component and a preset reference signal, where the target intrinsic mode function component is any one of the multiple intrinsic mode function components; Record the number of sliding time windows whose cross-correlation coefficient is lower than a preset coefficient threshold. When the number is greater than or equal to a preset number threshold, determine the target intrinsic mode function component as an abnormal mode component caused by blockage. When the number is less than the preset number threshold, determine the target intrinsic mode function component as a normal mode component; Construct the intrinsic mode function according to the normal mode components.
3. The plug detection method for the flow measurement device according to claim 2, characterized in that, The decomposing each noisy signal sequence respectively to obtain multiple intrinsic mode function components includes: Identify all the maximum points and minimum points from the noisy signal sequence, and use an interpolation method to construct an upper envelope line according to all the maximum points and a lower envelope line according to all the minimum points; Calculate the mean curve of the upper envelope line and the lower envelope line, and subtract the mean curve from the noisy signal sequence to obtain a new signal sequence; Judge whether the new signal sequence meets the preset conditions of the intrinsic mode function. If it meets the preset conditions, determine the new signal sequence as an intrinsic mode function component.
4. The clogging detection method of the flow measurement device according to claim 1, characterized in that The extracting the time vector, space vector and frequency domain vector of the intrinsic mode function includes: Sample the intrinsic mode function on the time axis, record the function values corresponding to each sampling point, and arrange these function values in chronological order to form a time vector; Quantify the energy or amplitude of the intrinsic mode function on different frequency components, and use the quantified values as the elements of the vector with frequency as the dimension to construct a space vector; The intrinsic mode function is transformed from the time domain to the frequency domain by Fourier transform to obtain the frequency domain representation of the signal in the frequency domain. The target features of the frequency domain representation are extracted, and the target features are arranged in a preset order to form a frequency domain vector.
5. The clogging detection method of the flow measurement device according to claim 1, characterized in that The obtaining of the attention weights through the dual-path cross-attention mechanism includes: In the first path, the time vector is used as the query vector, the spatial vector is used as the key vector and the value vector, and in the second path, the time vector is used as the query vector, and the frequency domain vector is used as the key vector and the value vector; Perform cross-attention calculation on the first path and the second path to obtain the first attention weight and the second attention weight; Assign different weights according to the importance of the first path and the second path, and linearly combine the first attention weight and the second attention weight according to the weights to obtain the attention weights, where the attention weights include the time vector weight, the spatial vector weight, and the frequency domain vector weight.
6. The clogging detection method of the flow measurement device according to claim 5, characterized in that, The obtaining of the attention weights through the dual-path cross-attention mechanism includes: Calculate the similarity matrix between the query vector and the key vector in the first path, multiply it by the value vector after normalization to obtain the first attention output: In the second path, use the multi-head attention mechanism to divide the query vector into multiple head subspaces, perform parallel calculations with the key vector and the value vector respectively, and splice the multi-head outputs to obtain the second attention output; Input the first attention output and the second attention output into the gated fusion module, and dynamically adjust the contribution degrees of the dual-path information through the weight parameters to obtain the attention weights.
7. The clogging detection method of the flow measurement device according to claim 1, characterized in that, The constructing of the state space according to the blockage probability value, the historical maintenance record, and the device operation duration includes: Segment the device operation duration, assign a unique coding value to each segmented interval, and generate an operation duration state coding vector according to the interval to which the actual device operation duration belongs; Generate a maintenance period matrix according to the historical maintenance record, and perform singular value decomposition on the maintenance period matrix to obtain a maintenance feature vector; Perform tensor splicing on the blockage probability value, the maintenance feature vector, and the operation duration state coding vector, and generate a time-series correlation feature according to the spliced tensor; Generate a state space according to the time-series correlation feature.
8. A clogging detection system for a flow measurement device, characterized in that, It includes an acquisition module, a vector module, a prediction module, and an execution module, where: The acquisition module is configured to obtain the original pressure signal and the original flow signal of the flow measurement device to be measured, and generate an intrinsic mode function according to the original pressure signal and the original flow signal; The vector module is configured to extract the time vector, the spatial vector, and the frequency domain vector of the intrinsic mode function, obtain the attention weights through the dual-path cross-attention mechanism, and perform weighted fusion on the time vector, the spatial vector, the frequency domain vector, and the attention weights to obtain a multi-dimensional feature vector; The prediction module is configured to input the multi-dimensional feature vector into a pre-trained deep learning-based blockage probability prediction model to obtain a blockage probability value; An execution module, configured to construct a state space based on the blockage probability value, historical maintenance records, and device operation duration, balance false alarm and missed detection penalties in combination with a reward function, and determine an execution operation.
9. An electronic device, characterized in that, It includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions. Both the user interface and the network interface are used to communicate with other devices. The processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1-7 is executed.
Citation Information
Patent Citations
City large-scale road network traffic speed prediction method based on deep integrated learning
CN110299005A
Transformer fault diagnosis method based on double attention mechanism
CN117272102A
Method and device for predicting blockage of filling pipeline
CN117709519A
Fault signal denoising method based on adaptive information entropy and wavelet threshold function
CN118310749A
Intelligent control system of pneumatic conveying equipment
CN118778445A
Cited By
Blockage detection method, device and equipment, storage medium and program product
CN120907614A
Automatic control method for water meter detection process
CN121113236A
Blockage self-healing control method for material conveying pipeline
CN121209357A
A self-healing control method for blockages in material conveying pipelines
CN121209357B