A quality flowmeter fault diagnosis method based on convolutional neural network

CN122595201APending Publication Date: 2026-08-18TIANJIN CHANGHE MEASUREMENT & CONTROL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610733140.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-26
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

现有工程应用中常采用阈值判别、规则库、经验特征提取与人工巡检相结合的方式进行故障判断,当前方法通常依赖于稳定工况假设与人工选取的统计特征,面对噪声干扰与工况波动时容易产生误报与漏报,并且对早期弱故障、渐变型故障以及不同工况下的同类故障缺乏一致的识别能力,难以满足复杂现场的在线监测与精细化运维需求

Benefits of technology

本发明通过对质量流量计运行数据进行分段、去趋势、去噪与归一化预处理,将样本片段数据进行时频变换后按通道堆叠构成多通道二维特征张量,结合改进SegNeXt模型实现对复杂工况波动、噪声干扰与零点漂移条件下的稳健表征与异常区域聚焦。与现有主要依赖阈值设定、经验规则及人工特征提取的诊断方式相比,本发明在编码侧引入方向感知卷积与局部-全局混合感知,使模型同时增强对时频图中方向性异常纹理、局部突变特征以及全局趋势漂移的表达能力,并在解码侧引入位置注意蒸馏与故障多视角重构,获得空间位置关注增强特征与重构误差图的重构输出特征,从而降低工况变化引起的误报漏报,提高对弱故障、渐变型故障与隐蔽异常的检出稳定性与可解释性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122595201A_ABST
    Figure CN122595201A_ABST
Patent Text Reader

Abstract

The application discloses a kind of quality flowmeter fault diagnosis methods based on convolutional neural network, comprising: collecting quality flowmeter operation data, pre-processing generates sample segment data;Time-frequency transformation is carried out, and multi-channel two-dimensional feature tensor is constituted;Improved SegNeXt model is constructed, and reconstruction output feature is obtained;Patch distribution modeling module is constructed, and abnormal probability field and abnormal score are output;Fault classification head is constructed, and fault class probability vector is output;Fusion decision is carried out, and diagnostic result and severity grade are generated;Fault early warning information is output, and real-time update and record are carried out.The application realizes the high accuracy, strong robust automatic identification and real-time early warning to quality flowmeter fault by improving SegNeXt model and patch distribution modeling module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flow measurement technology, and in particular to a fault diagnosis method for mass flow meters based on convolutional neural networks. Background Technology

[0002] Mass flow meters are widely used in continuous production processes in chemical, energy, pharmaceutical, and food industries. The measurement results directly impact process control, metering and settlement, and product quality. During long-term operation, mass flow meters are susceptible to factors such as changes in media composition, temperature and pressure fluctuations, pipeline vibration, electromagnetic interference, and zero-point drift, leading to malfunctions or degradation such as measurement drift, signal distortion, drive abnormalities, and phase differences. Current engineering applications often employ a combination of threshold discrimination, rule bases, empirical feature extraction, and manual inspection for fault diagnosis. These methods typically rely on assumptions of stable operating conditions and manually selected statistical features, making them prone to false alarms and missed alarms when faced with noise interference and operating condition fluctuations. Furthermore, they lack consistent identification capabilities for early weak faults, gradual faults, and similar faults under different operating conditions, making it difficult to meet the needs of online monitoring and refined operation and maintenance in complex environments.

[0003] In recent years, fault diagnosis methods based on machine learning or deep learning have been used for industrial equipment condition identification, but their applicability in mass flow meter scenarios remains insufficient. Obtaining fault samples for mass flow meters is difficult; faults occur infrequently and sporadically; historical data shows far more normal samples than fault samples, and fault categories are often significantly unbalanced. Significant differences in signal morphology across different devices, media, and operating conditions lead to inconsistent characteristic manifestations of the same fault in different scenarios, increasing the difficulty of data annotation and model transfer. Field operation data is often accompanied by distribution drift, strong noise, and zero-point drift, making it difficult to maintain stable identification by relying solely on single time-domain features or fixed threshold rules. Industrial sites typically require online or edge deployment; limited by computing power, storage, and power consumption, the model needs to complete inference under low latency and continuously output results usable for maintenance decisions. Maintenance scenarios not only need to output fault categories but also provide clues to the location of abnormal areas, anomaly assessments, and multi-level alarm strategies for rapid troubleshooting and closed-loop handling.

[0004] Therefore, how to provide a method for diagnosing mass flow meter faults based on convolutional neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a fault diagnosis method for mass flow meters based on convolutional neural networks. This invention comprehensively utilizes time-frequency representation of operating data, convolutional attention feature extraction, and statistical distribution modeling techniques. It details the entire process from mass flow meter operating data acquisition and preprocessing, time-frequency transformation to construct multi-channel two-dimensional feature tensors, improved SegNeXt model feature extraction, patch distribution modeling module anomaly probability field and anomaly score output, fault classification and fusion decision, to edge warning update records. In terms of model structure, it innovatively introduces direction-aware convolution, local-global hybrid perception, positional attention distillation, and multi-view fault reconstruction into SegNeXt. In the patch distribution modeling module, it introduces distribution migration matrix modeling and spatial-probabilistic co-editing structure to achieve stable representation and low false alarm / missed alarm diagnosis under complex operating conditions, noise interference, and zero-point drift. At the same time, it achieves highly accurate and robust fault identification and early warning under the constraints of scarce fault samples and edge deployment.

[0006] A method for diagnosing mass flow meter faults based on a convolutional neural network according to an embodiment of the present invention includes: Collect mass flow meter operating data, preprocess the mass flow meter operating data, and generate sample fragment data; The time-frequency transformation of the sample fragment data is performed to construct a multi-channel two-dimensional feature tensor; An improved SegNeXt model is constructed, which encodes the directional features of the multi-channel two-dimensional feature tensor based on orientation-aware convolution, performs context fusion through a local-global hybrid perception module, introduces a position attention distillation module to enhance spatial position attention, and uses a fault multi-view reconstruction module to perform multi-view reconstruction to obtain the reconstructed output features. A patch distribution modeling module is constructed. The reconstructed output features are modeled by a distribution migration matrix to obtain the migration matrix and calculate the migration deviation. Based on the spatial-probabilistic combined structure, the probability field is constructed and propagated to output the anomaly probability field and anomaly score. A fault classification head is constructed using deep feature maps, and a fault category probability vector is output based on sample fragment data. The fault category probability vector, anomaly probability field, anomaly score and reconstructed output features are fused and judged to generate diagnostic results and severity levels; Based on the diagnostic results and severity level, fault warning information is output and updated and recorded in real time at the edge.

[0007] Optionally, the mass flow meter operating data includes mass flow measurement values, density measurement values, medium temperature measurement values, drive gain signal, and phase difference measurement values.

[0008] Optionally, the generation of sample fragment data includes: Mass flow rate measurement, density measurement, medium temperature measurement, drive gain signal and phase difference measurement are collected from the mass flow meter. The collected data are timestamped and aligned to form a multivariate operating data sequence arranged in chronological order. The multivariate running data sequence is subjected to detrending, denoising and normalization processing. Detrending processing calculates the baseline sequence of the sequence within the window in a sliding window manner. The original sequence is subtracted from the baseline sequence to obtain the detrended sequence. Dedenoising processing performs bandpass filtering on the detrending sequence to obtain the denoised sequence. Normalization processing calculates the mean and standard deviation of the denoised sequence according to the window. The mean is subtracted from the denoised sequence and then divided by the standard deviation to obtain the normalized sequence. The normalized sequence is segmented according to a fixed window length and a fixed step size. Each sample segment is composed of consecutive fixed window length sampling points in the normalized sequence starting from the corresponding step size. Each sample segment is assigned a corresponding time interval identifier to obtain sample segment data.

[0009] Optionally, the multi-channel two-dimensional feature tensor comprises: Time-frequency transformation is performed on each time series in the sample data segment. The sample data segment is divided into frames according to a preset window function. Discrete Fourier transform is performed on each frame of data to form a complex spectrum. The amplitude of the complex spectrum is taken to form a time-frequency energy matrix, and the corresponding time-frequency characterization diagram is obtained. The time-frequency characterization maps are subjected to size unification processing. Time-frequency characterization maps with different time-frequency resolutions are cropped and resampled. Each time-frequency characterization map is numerically scaled to meet the numerical range, resulting in a time-frequency characterization map with uniform size. By stacking time-frequency representation images of uniform size according to channel dimensions, a multi-channel two-dimensional feature tensor is obtained.

[0010] Optionally, obtaining the reconstructed output features includes: Construct an improved encoder and decoder structure for the SegNeXt model, and input a multi-channel two-dimensional feature tensor into the encoder to form an initial feature map; In the multi-scale convolutional attention unit of the encoder, a direction-aware convolutional layer is set up, including two sets of depth-separable convolutions along the time axis and along the frequency axis, and the initial feature map is encoded with directional features to obtain directional encoded features. In the encoder, a local-global hybrid perception module is set up, which includes local branches and global branches. The local branches perform local convolution aggregation on the directional encoding features to form local context features. The global branches perform large receptive field convolution aggregation on the directional encoding features to form global context features. The local context features and global context features are concatenated in the channel dimension and then mixed in the channels by one-to-one convolution to obtain fused features. On the decoding side, a position attention distillation module is set up to generate a spatial position attention map from the fused features. The spatial position attention map is then multiplied element-wise with the fused features to form position enhancement features. A fault multi-view reconstruction module is set up on the decoding side to perform multi-view reconstruction operations on the location enhancement features. The location enhancement features are processed by two reconstruction branches and the corresponding reconstruction results are output. The difference between the reconstruction results and the location enhancement features forms a reconstruction error map. A deep feature map and a candidate anomaly region map formed based on the spatial location attention map are output to obtain the reconstruction output features.

[0011] Optionally, the output anomaly probability field and anomaly score include: A patch distribution modeling module is constructed, which divides the deep feature map in the reconstructed output features into patch features according to spatial location. The patch features are composed of the channel vectors of the deep feature map at the corresponding spatial location, forming a patch feature set. The migration matrix is ​​modeled by distribution migration matrix to perform migration matrix acquisition and migration deviation calculation on patch feature set. The migration matrix acquisition includes constructing a reference distribution representation based on normal sample patch feature set and constructing a target distribution representation based on the patch feature set of sample to be diagnosed. The linear mapping matrix between the reference distribution representation and the target distribution representation is used as the migration matrix. The migration deviation calculation includes measuring the difference between the migration matrix and the preset normal migration matrix to form the migration deviation. Based on the spatial-probabilistic binding structure, the migration deviation is subjected to probability field construction and propagation processing. The probability field construction maps the migration deviation to the initial probability field according to the spatial position of the patch. The propagation processing performs neighborhood propagation operation on the initial probability field to form a propagation probability field. The neighborhood propagation operation takes the set of probability values ​​within a preset neighborhood range for each patch position and performs convolution filtering operation to update the probability value of the patch position. The propagation probability field is numerically normalized to form an anomaly probability field. The anomaly probability field is then aggregated in the spatial dimension to form an anomaly score. The anomaly probability field and anomaly score are then output.

[0012] Optionally, the step of constructing a fault classification head through deep feature maps and outputting a fault category probability vector based on sample fragment data includes: Deep feature maps are obtained from the reconstructed output features. The deep feature maps are then size-aligned to meet the input size requirements of the fault classification head. Global average pooling is performed on the deep feature maps in the spatial dimension, and the channel responses at each spatial location are aggregated to form a fixed-length feature vector. The feature vector is input into the fault classification head, and a fully connected mapping operation is performed. The fault classification head includes two fully connected layers and a non-linear activation layer. The first fully connected layer transforms the dimension of the feature vector to form an intermediate representation, and the non-linear activation layer performs an activation operation on the intermediate representation. The second fully connected layer maps the activated intermediate representation and outputs the classification score vector corresponding to each fault category. A normalized probability mapping operation is performed on the classification score vector to form a fault category probability vector. The normalized probability mapping operation includes taking the natural index of each category score in the classification score vector, normalizing each category natural index with the sum of all category natural indices as the denominator, and obtaining the probability value corresponding to each fault category, thus forming the fault category probability vector.

[0013] Optionally, generating the diagnostic results and severity levels includes: Obtain the fault category probability vector, anomaly probability field, anomaly score, and reconstructed output features, and perform spatial size alignment processing on the anomaly probability field and reconstructed output features; The system performs region generation and region scoring on the anomaly probability field, performs threshold segmentation on the anomaly probability field to form a binary region map, performs connected component extraction on the binary region map to obtain a set of candidate anomaly regions, performs region aggregation operation on the probability value of each candidate anomaly region to form a set of region anomaly scores, and the region aggregation operation is a maximum value operation to determine the maximum region anomaly score in the set of region anomaly scores. The system performs a fusion decision based on the anomaly score, the maximum regional anomaly score, and the fault category probability vector. The anomaly score and the maximum regional anomaly score are compared with preset grading thresholds to determine the anomaly level. The fault category with the highest probability value in the fault category probability vector is selected as the diagnosis result to determine the severity level. The diagnosis result and severity level are then output.

[0014] Optionally, the step of outputting fault warning information based on the diagnostic results and severity level includes: Receive diagnostic results and severity levels, generate early warning information, including fault category identifier, severity level identifier, anomaly score, maximum area anomaly score, and corresponding time interval identifier; Based on the severity level, perform graded alarm processing, match the severity level with the preset alarm level mapping table, output the corresponding alarm level, and trigger the corresponding alarm action; The system updates and records early warning information in real time at the edge, writes early warning information for continuous sample segments into local storage in chronological order, and sends early warning information to the host computer or cloud platform according to the upload cycle.

[0015] The beneficial effects of this invention are: This invention preprocesses mass flow meter operating data by segmenting, detrending, denoising, and normalizing it. After time-frequency transformation, the sample data segments are stacked by channel to form a multi-channel two-dimensional feature tensor. Combined with an improved SegNeXt model, this achieves robust characterization and anomaly region focusing under complex operating conditions, fluctuations, noise interference, and zero-point drift. Compared to existing diagnostic methods that primarily rely on threshold settings, empirical rules, and manual feature extraction, this invention introduces direction-aware convolution and local-global hybrid sensing on the encoding side. This enhances the model's ability to simultaneously express directional anomaly textures, local abrupt changes, and global trend drift in the time-frequency graph. Furthermore, on the decoding side, it introduces positional attention distillation and multi-view fault reconstruction to obtain spatial positional attention enhancement features and reconstructed output features of the reconstruction error map. This reduces false alarms and missed alarms caused by changes in operating conditions, and improves the detection stability and interpretability of weak faults, gradual faults, and hidden anomalies.

[0016] This invention constructs a patch distribution modeling module to perform distribution migration matrix calculation and migration deviation calculation on the reconstructed output features. Based on a spatial-probabilistic co-editing structure, it completes the probability field construction and propagation processing, outputting an anomaly probability field and anomaly score. Simultaneously, it constructs a fault classification head based on deep feature maps, outputting fault category probability vectors. Then, it fuses and judges the fault category probability vectors, anomaly probability fields, anomaly scores, and reconstructed output features to generate diagnostic results and severity levels, and outputs warning information. Compared with existing supervised diagnostic schemes that rely on a large number of fault samples and are susceptible to class imbalance, this invention utilizes distribution migration matrix modeling to improve the ability to distinguish between operating condition migration and fault migration, uses a spatial-probabilistic co-editing structure to improve the stability and noise resistance of anomaly spatial distribution, and meets online deployment requirements through real-time edge updating and recording processes. It maintains high diagnostic accuracy, robustness, and engineering feasibility even under conditions of scarce fault samples, distribution drift, and limited computing power. Attached Figure Description

[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a mass flow meter fault diagnosis method based on a convolutional neural network proposed in this invention; Figure 2 This is a block diagram of the improved SegNeXt model for a mass flow meter fault diagnosis method based on a convolutional neural network proposed in this invention. Figure 3 This is a functional diagram of the patch distribution modeling module of a mass flow meter fault diagnosis method based on convolutional neural networks proposed in this invention. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0019] refer to Figure 1 , Figure 2 and Figure 3 A method for fault diagnosis of mass flow meters based on convolutional neural networks, comprising: Collect mass flow meter operating data, preprocess the mass flow meter operating data, and generate sample fragment data; The time-frequency transformation of the sample fragment data is performed to construct a multi-channel two-dimensional feature tensor; An improved SegNeXt model is constructed, which encodes the directional features of the multi-channel two-dimensional feature tensor based on orientation-aware convolution, performs context fusion through a local-global hybrid perception module, introduces a position attention distillation module to enhance spatial position attention, and uses a fault multi-view reconstruction module to perform multi-view reconstruction to obtain the reconstructed output features. A patch distribution modeling module is constructed. The reconstructed output features are modeled by a distribution migration matrix to obtain the migration matrix and calculate the migration deviation. Based on the spatial-probabilistic combined structure, the probability field is constructed and propagated to output the anomaly probability field and anomaly score. A fault classification head is constructed using deep feature maps, and a fault category probability vector is output based on sample fragment data. The fault category probability vector, anomaly probability field, anomaly score and reconstructed output features are fused and judged to generate diagnostic results and severity levels; Based on the diagnostic results and severity level, fault warning information is output and updated and recorded in real time at the edge.

[0020] In this embodiment, the operating data of the mass flow meter includes mass flow measurement value, density measurement value, medium temperature measurement value, drive gain signal, and phase difference measurement value.

[0021] In this embodiment, generating sample fragment data includes: Mass flow rate measurement, density measurement, medium temperature measurement, drive gain signal and phase difference measurement are collected from the mass flow meter. The collected data are timestamped and aligned to form a multivariate operating data sequence arranged in chronological order. The multivariate running data sequence is subjected to detrending, denoising and normalization processing. Detrending processing calculates the baseline sequence of the sequence within the window in a sliding window manner. The original sequence is subtracted from the baseline sequence to obtain the detrended sequence. Dedenoising processing performs bandpass filtering on the detrending sequence to obtain the denoised sequence. Normalization processing calculates the mean and standard deviation of the denoised sequence according to the window. The mean is subtracted from the denoised sequence and then divided by the standard deviation to obtain the normalized sequence. The normalized sequence is segmented according to a fixed window length and a fixed step size. Each sample segment is composed of consecutive fixed-length sampling points from the normalized sequence starting from the corresponding step size. Each sample segment is assigned a corresponding time interval identifier to obtain sample segment data. The segmentation of the normalized sequence according to a fixed window length and a fixed step size is specifically as follows: The window length is set to the number of consecutive sampling points, and the step size is the sampling point interval between adjacent window start points. The first sampling point of the sequence is taken as the first window start point. The window start points are moved sequentially according to the step size. At each window start point, a continuous window length of sampling points is extracted as a sample segment. The extraction process is repeated from the first sample segment to the last sample segment until the end of the window reaches the end of the sequence and still contains a complete window length of sampling points. For each sample segment, the start timestamp corresponding to the start sampling point and the end timestamp corresponding to the end sampling point are recorded as the time interval identifier of the current sample segment, forming sample segment data.

[0022] In this embodiment, the multi-channel two-dimensional feature tensor comprises: The time-frequency transformation process is performed on each time series in the sample data segment. The sample data segment is then framed according to a preset window function. A discrete Fourier transform is performed on each frame to form a complex spectrum. The amplitude of the complex spectrum is taken to form a time-frequency energy matrix, resulting in the corresponding time-frequency representation map. Specifically, the process of framing the sample data segment according to the preset window function is as follows: The preset window function is a sequence of windowing weight coefficients determined before framing. The type is fixed as Blackman window, and the number of window coefficients is consistent with the number of sampling points in the frame. The same set of window coefficients is used for each frame. The first sampling point of the sample segment is taken as the starting point of the first frame. The starting point of each frame is determined in sequence according to the frame shift. At the starting point of each frame, a continuous frame length of sampling points starting from the current starting point is extracted to form a frame of data. The windowing process is completed by multiplying each sampling point of the frame data with the window coefficient at the corresponding position of the preset window function. The time-frequency characterization maps are subjected to size unification processing. Time-frequency characterization maps with different time-frequency resolutions are cropped and resampled. Each time-frequency characterization map is numerically scaled to meet the numerical range, resulting in a time-frequency characterization map with uniform size. By stacking time-frequency representation images of uniform size according to channel dimensions, a multi-channel two-dimensional feature tensor is obtained.

[0023] In this embodiment, obtaining the reconstructed output features includes: An improved encoder and decoder structure for the SegNeXt model is constructed. A multi-channel two-dimensional feature tensor is input into the encoder to form an initial feature map, where: The construction of the improved SegNeXt model specifically involves: In the SegNeXt backbone encoder structure, the spatial modeling convolution of the multi-scale convolutional attention unit is replaced with a direction-aware convolutional layer that includes convolutions along the time axis and convolutions along the frequency axis. A local-global hybrid perception module is set at the feature mixing position of each encoding stage, so that the same stage contains both local convolutional aggregation branches and large receptive field convolutional aggregation branches, and the concatenation and one-to-one convolutional channel mixing are completed in the channel dimension. A positional attention distillation module is added to the decoding side. The positional attention distillation module generates a spatial positional attention map with the same spatial size as the input feature space by a convolutional layer. It is multiplied element-wise with the input feature to form a positional enhancement feature. A fault multi-view reconstruction module is set in parallel on the decoding side. The fault multi-view reconstruction module contains two reconstruction branches with different structures and outputs two reconstruction results. The reconstruction results are subtracted element-wise from the positional enhancement feature to form a reconstruction error map. The process of inputting a multi-channel two-dimensional feature tensor into the encoder to form an initial feature map is as follows: the multi-channel two-dimensional feature tensor is used as the encoder input tensor, and channel mapping and local feature extraction are performed through the two-dimensional convolutional layer at the encoder entrance. The kernel size, stride, and padding of the two-dimensional convolutional layer are configured according to the input size to complete downsampling. Batch normalization and non-linear activation operations are performed on the convolution output in sequence. According to the encoder's hierarchical structure, the feature resolution is adjusted to the output resolution of the first stage of the encoder through downsampling convolution to form the initial feature map. In the multi-scale convolutional attention unit of the encoder, a direction-aware convolutional layer is set, including two sets of depth-separable convolutions along the time axis and along the frequency axis. The initial feature map is then used to encode directional features, resulting in directional encoded features, where: The setting of the orientation-aware convolutional layer is specifically as follows: In the multi-scale convolutional attention unit of the encoder, the spatial modeling part is configured into two sets of depth-separable convolutional operation units, corresponding to the time axis direction and the frequency axis direction respectively. The depth-separable convolution in the time axis direction consists of time-directed bar depth convolution and pointwise convolution, and the depth-separable convolution in the frequency axis direction consists of frequency-directed bar depth convolution and pointwise convolution. The number of input and output channels of the two sets of depth-separable convolutions is consistent with the number of channels of the unit. Batch normalization and nonlinear activation are configured after each set of convolutions to form an orientation-aware convolutional layer. The process of encoding directional features in the initial feature map to obtain directional encoded features is as follows: the initial feature map is input into a depthwise separable convolution along the time axis and a depthwise separable convolution along the frequency axis to obtain time-direction response features and frequency-direction response features. The time-direction response features and frequency-direction response features are added element-wise along the channel dimension to form a fused directional response feature. The fused directional response feature is then subjected to pointwise convolution to perform channel mixing. The channel-mixed feature is added to the initial feature map through a residual connection. Batch normalization and non-linear activation are performed on the addition result to obtain directional encoded features containing time-direction and frequency-direction information. A local-global hybrid sensing module is set up in the encoder, containing local and global branches. The local branch performs local convolution aggregation on the directional encoded features to form local context features, and the global branch performs large receptive field convolution aggregation on the directional encoded features to form global context features. The local and global context features are concatenated along the channel dimension and then mixed through a one-to-one convolution to obtain the fused features, where: The execution of local convolution aggregation specifically involves: inputting directional encoding features into a local branch; using standard two-dimensional convolution to aggregate the neighborhood of each spatial location; the convolution kernel of the two-dimensional convolution has a fixed small size of three in both the time axis and frequency axis directions; using unit stride and symmetrical padding corresponding to the convolution kernel to make the output spatial size consistent with the input; the two-dimensional convolution output is sequentially processed by batch normalization and nonlinear activation, and two layers of two-dimensional convolution of the same scale are concatenated to expand the local aggregation depth to obtain local context features; The execution of large receptive field convolutional aggregation is specifically as follows: the directional encoding features are input into the global branch, and the global branch uses large kernel depth separable convolution to form large receptive field aggregation. The length of the convolution kernel of the large kernel depth convolution in the time axis and frequency axis is a fixed value greater than the length of the local branch convolution kernel, which is set to five. Unit stride and symmetrical padding are used to keep the output space size consistent with the input. The output of the large kernel depth convolution is mixed by point-by-point convolution, and then batch normalization and nonlinear activation are performed in sequence to obtain global context features. On the decoding side, a positional attention distillation module is set up to generate a spatial positional attention map from the fused features. The spatial positional attention map is then multiplied element-wise with the fused features to form position-enhanced features. Specifically, generating the spatial positional attention map from the fused features involves: The fused feature is input into the attention distillation module. The fused feature is compressed into one channel through a set of two-dimensional convolutional layers, while maintaining the spatial size consistent with the fused feature. Batch normalization and nonlinear activation are performed on the compressed feature, and it is further mapped into a single-channel response map through a one-to-one convolution. The single-channel response map is then subjected to numerical normalization in the spatial dimension. The numerical normalization process uses the natural exponent of the response value at each spatial location and normalizes it by using the sum of the natural exponents of all spatial locations as the denominator. This generates a spatial attention map with the same spatial size as the fused feature and a value range of zero to one. A fault multi-view reconstruction module is set up on the decoding side to perform multi-view reconstruction operations on the location enhancement features. Two reconstruction branches are applied to the location enhancement features, and corresponding reconstruction results are output. The difference between the reconstruction results and the location enhancement features forms a reconstruction error map. A deep feature map and a candidate anomaly region map based on the spatial location attention map are output to obtain the reconstruction output features. Specifically, the two reconstruction branches for the location enhancement features and the corresponding reconstruction results are applied as follows: The location enhancement features are simultaneously input into the first and second reconstruction branches. The first reconstruction branch uses convolutional reconstruction consisting of two-dimensional convolution, batch normalization, and nonlinear activation. First, channel mapping is performed through a 1x1 convolution, then spatial reconstruction is performed through a 3x3 convolution, and finally, the number of channels is restored to be consistent with the location enhancement features through a 1x1 convolution, and the first reconstruction result is output. The second reconstruction branch uses encoding and decoding reconstruction consisting of transposed convolutions. It performs downsampling encoding through a convolution with a stride of 2, then upsampling through a transposed convolution plus a 3x3 convolution for upsampling decoding, so that the output spatial size is consistent with the location enhancement features, and the number of channels is restored to be consistent with the location enhancement features through a 1x1 convolution, and the second reconstruction result is output.

[0024] In this embodiment, the output anomaly probability field and anomaly score include: A patch distribution modeling module is constructed, which divides the deep feature map in the reconstructed output features into patch features according to spatial location. Each patch feature is composed of the channel vectors of the deep feature map at its corresponding spatial location, forming a patch feature set. Specifically, dividing the deep feature map in the reconstructed output features into patch features according to spatial location involves: The spatial dimensions of the deep feature map are determined by the number of positions along the time axis and the number of positions along the frequency axis. The map is traversed position by position on the spatial grid. For each spatial position, the values ​​of all channels at that position are read and arranged into a fixed-length channel vector in channel order. The channel vector is defined as the patch feature corresponding to the spatial position. All the patch features corresponding to the spatial positions are arranged in order according to the spatial position index to form a patch feature set. Each patch feature is bound to the corresponding spatial position index. The migration matrix is ​​modeled using a distribution migration matrix, and migration deviation is calculated for the patch feature set. The migration matrix calculation involves constructing a reference distribution representation based on the normal sample patch feature set and a target distribution representation based on the sample patch feature set to be diagnosed. The linear mapping matrix between the reference and target distribution representations serves as the migration matrix. The migration deviation calculation involves measuring the difference between the migration matrix and a preset normal migration matrix to form the migration deviation. The transfer matrix calculation is specifically performed as follows: During the training phase, a reference distribution representation is constructed for the patch feature set of normal samples. The patch feature vectors of normal samples at the same spatial location are stacked according to the sample dimension to form a reference feature matrix. During the diagnosis phase, a target distribution representation is constructed for the patch feature set of samples to be diagnosed. The patch feature vectors of samples to be diagnosed at the corresponding spatial locations are stacked according to the spatial position order to form a target feature matrix. The goal is to minimize the sum of squared differences between the elements of the reference feature matrix and the target feature matrix after linear mapping. The linear mapping matrix is ​​obtained by least squares calculation and is determined as the transfer matrix. The migration deviation calculation is specifically performed as follows: the normal migration matrix is ​​obtained in the same way on the normal operation data and stored as a preset normal migration matrix. The difference measurement is performed between the migration matrix obtained for the sample to be diagnosed and the preset normal migration matrix. The corresponding elements of the two are subtracted one by one to form a difference matrix. The square root of the sum of the squares of each element in the difference matrix is ​​used to form the matrix difference value. The matrix difference value is used as the migration deviation. Based on a spatial-probabilistic binding structure, probability field construction and propagation processing are performed on the migration deviation. Probability field construction maps the migration deviation to an initial probability field according to the spatial location of the patches. Propagation processing performs neighborhood propagation operations on the initial probability field to form a propagated probability field. The neighborhood propagation operation takes a set of probability values ​​within a preset neighborhood range for each patch location and performs convolutional filtering operations to update the probability values ​​of the patch locations. Where: The process of mapping migration deviation to an initial probability field based on patch spatial location is as follows: determine the correspondence between patch spatial location and deep feature map spatial grid; construct a two-dimensional matrix with the same spatial size as the deep feature map based on the time axis position number and the frequency axis position number as the initial probability field; for each patch spatial location, read the migration deviation value corresponding to the patch and write it into the matrix element in the initial probability field corresponding to the patch spatial location number; when the migration deviation is a single global value, fill all matrix elements of the initial probability field with the same global value; after filling, an initial probability field aligned with the patch spatial location is obtained. The process of performing neighborhood propagation operation on the initial probability field to form a propagation probability field is as follows: the neighborhood range is set as a 3x3 fixed-size rectangular window centered on the current patch position; the convolutional filter kernel is set as a 3x3 fixed-size two-dimensional kernel with each element of the filter kernel being a preset constant of one-ninth; a two-dimensional convolution operation is performed on the initial probability field, using unit stride and symmetrical filling to make the output matrix space size consistent with the initial probability field; the two-dimensional convolution operation takes the probability value set in the neighborhood range at each patch position, multiplies it element-by-element with the convolutional filter kernel and sums it, and uses it as the update probability value of the patch position; after completing the convolution update for all patch positions, the propagation probability field is obtained. The propagation probability field is numerically normalized to form an anomaly probability field. The anomaly probability field is then aggregated in the spatial dimension to form an anomaly score. The anomaly probability field and anomaly score are then output.

[0025] In this embodiment, the step of constructing a fault classification head through deep feature maps and outputting a fault category probability vector based on sample fragment data includes: Deep feature maps are obtained from the reconstructed output features. The deep feature maps are then size-aligned to meet the input size requirements of the fault classification head. Global average pooling is performed on the deep feature maps in the spatial dimension, and the channel responses at each spatial location are aggregated to form a fixed-length feature vector. The feature vector is input into the fault classification head, and a fully connected mapping operation is performed. The fault classification head includes two fully connected layers and a non-linear activation layer. The first fully connected layer transforms the dimension of the feature vector to form an intermediate representation, and the non-linear activation layer performs an activation operation on the intermediate representation. The second fully connected layer maps the activated intermediate representation and outputs the classification score vector corresponding to each fault category. A normalized probability mapping operation is performed on the classification score vector to form a fault category probability vector. The normalized probability mapping operation includes taking the natural index of each category score in the classification score vector, normalizing each category natural index with the sum of all category natural indices as the denominator, and obtaining the probability value corresponding to each fault category, thus forming the fault category probability vector.

[0026] In this embodiment, generating the diagnostic results and severity level includes: Obtain the fault category probability vector, anomaly probability field, anomaly score, and reconstructed output features, and perform spatial size alignment processing on the anomaly probability field and reconstructed output features; The process involves generating and scoring regions within the anomaly probability field, performing threshold segmentation to form a binary region map, extracting connected components from the binary region map to obtain a set of candidate anomaly regions, and performing a region aggregation operation on the probability value within each candidate anomaly region to form a set of region anomaly scores. This region aggregation operation is a maximum value operation, and the maximum region anomaly score is determined from the set of region anomaly scores. The process of performing threshold segmentation on the abnormal probability field to form a binary region map is as follows: a threshold of 0.5 is preset, the probability value of each spatial location in the abnormal probability field is compared with the threshold, when the probability value is greater than or equal to the threshold, the binary output of the current spatial location is set to one, and when the probability value is less than the threshold, the binary output of the spatial location is set to zero. After completing point-by-point comparison and assignment for all spatial locations in the abnormal probability field, a binary region map with the same spatial size as the abnormal probability field and element values ​​of only zero or one is obtained. The process of extracting candidate abnormal regions from the binary region map by performing connected component extraction is as follows: using the eight-neighbor connectivity criterion, pixels with a value of one in the binary region map are taken as foreground pixels. For any foreground pixel, pixels with a value of one in the eight adjacent positions (up, down, left, right, and four diagonal directions) are determined to be connected. By traversing the binary region map, connected component growth is initiated once for all unmarked foreground pixels. All foreground pixels connected to the eight neighbors of the current pixel are marked as the same connected component. A unique number is assigned to each connected component. All connected components are summarized according to their numbers to form a candidate abnormal region set. A fusion decision is performed based on the anomaly score, the maximum regional anomaly score, and the fault category probability vector. The anomaly score and the maximum regional anomaly score are compared with preset grading thresholds to determine the anomaly level. The fault category with the highest probability value in the fault category probability vector is selected as the diagnostic result to determine the severity level. The diagnostic result and severity level are then output. Specifically, the output of the diagnostic result and severity level is as follows: The anomaly score grading thresholds are set to 0.3 and 0.6, and the maximum area anomaly score grading thresholds are set to 0.5 and 0.7. The anomaly score is compared with 0.3 and 0.6, and the maximum area anomaly score is compared with 0.5 and 0.7. When the anomaly score is less than 0.3 and the maximum area anomaly score is less than 0.5, the anomaly level is determined to be Level 1. When the anomaly score is greater than or equal to 0.3 and less than 0.6, or the maximum area anomaly score is greater than or equal to 0.5 and less than 0.7, the anomaly level is determined to be Level 2. When the anomaly score is greater than or equal to 0.6, or the maximum area anomaly score is greater than or equal to 0.7, the anomaly level is determined to be level three. When the anomaly level is level one, the diagnostic result is output as non-fault. When the anomaly level is level two or three, the category with the highest probability value is selected from the fault category probability vector as the diagnostic result, and the anomaly level is output as severity level one, two, or three. The diagnostic result and severity level are output at the same time.

[0027] In this embodiment, the step of outputting fault warning information based on the diagnostic results and severity level includes: Receive diagnostic results and severity levels, generate early warning information, including fault category identifier, severity level identifier, anomaly score, maximum area anomaly score, and corresponding time interval identifier; Based on the severity level, a tiered alarm processing procedure is performed. The severity level is matched against a preset alarm level mapping table, the corresponding alarm level is output, and the corresponding alarm action is triggered. Specifically, outputting the corresponding alarm level and triggering the corresponding alarm action involves: An alarm level mapping table is established, mapping severity level 1 to alarm level 1, severity level 2 to alarm level 2, and severity level 3 to alarm level 3. Upon receiving a severity level, the corresponding alarm level is retrieved from the mapping table, and an alarm level identifier is output. When the alarm level is 1, a local prompt action is triggered, displaying the warning information on the edge interface and recording a log. When the alarm level is 2, an on-site alarm action is triggered, driving the audible and visual alarm to sound continuously and sending an alarm message to the host computer. When the alarm level is 3, an emergency alarm action is triggered, driving the audible and visual alarm to sound continuously and sending a series of alarm messages to the host computer. Simultaneously, alarm contact signals are output through the control platform interface. The system updates and records early warning information in real time at the edge, writes early warning information for continuous sample segments into local storage in chronological order, and sends early warning information to the host computer or cloud platform according to the upload cycle.

[0028] Example 1: To verify the feasibility of this invention in practice, it was applied to a continuous production unit where the mass flow meter operates under conditions of fluctuating medium properties and pipeline vibrations. The operating data also suffers from increased random noise, accumulated low-frequency zero-point drift, and baseline changes caused by operating condition switching. Existing practices relied primarily on threshold values ​​and manual experience, leading to false alarms triggered by operating condition switching, missed alarms due to slow drift development, and difficulty in early warning of minor faults. Maintenance personnel often only took action after significant fluctuations or increased measurement deviations, resulting in delayed maintenance response and multiple ineffective inspections. This embodiment uses mass flow measurement, density measurement, medium temperature measurement, drive gain signal, and phase difference measurement as operating data inputs. The operating data sampling frequency is 200 points per second, using fixed window segmentation. The window length is 2048 consecutive sampling points, and the step size is 512 consecutive sampling points. The sample segments are detrended, bandpass denoised, and standardized within the window to form normalized sequence segments.

[0029] Each sample segment is subjected to a short-time Fourier transform with a frame length of 256 consecutive sampling points and a frame shift of 128 consecutive sampling points. A Hamming window is used with the window coefficient length consistent with the frame length. The mass flow rate, drive gain and phase difference time-frequency characterization maps are stacked in channels. An additional phase difference time-frequency characterization map is constructed and the residual characterization map is formed by subtracting the baseline time-frequency characterization map and stacked together to form a four-channel two-dimensional feature tensor. After inputting a four-channel two-dimensional feature tensor into the improved SegNeXt model, directional encoding along the time and frequency axes is performed by direction-aware convolution. Context fusion is then achieved by a local-global hybrid perception module. A positional attention distillation module generates a spatial positional attention map, which is then multiplied element-wise with the fused features to form positional enhancement features. A multi-view reconstruction module outputs reconstruction results through two reconstruction branches, forming a reconstruction error map. Simultaneously, it outputs a deep feature map and a candidate anomaly region map as reconstruction output features. After the reconstruction output features are input into the patch distribution modeling module, patch feature sets are extracted according to spatial location. An initial probability field is formed by calculating the distribution migration matrix and migration deviation. Then, an anomaly probability field and an anomaly score are generated through a spatial-probability co-editing structure using three-by-three neighborhood propagation. The deep feature map outputs a fault category probability vector through a fault classification head. Finally, the fault category probability vector, anomaly probability field, anomaly score, and reconstruction output features are fused to determine the diagnostic results and severity level. At the edge, alarm levels are mapped according to the severity level, and corresponding alarm actions are triggered.

[0030] To verify the beneficial effects, over 18,000 normal sample segments were collected over several cycles of continuous operation of the device. Combined with maintenance and shutdown records, over 60 abnormal events were identified, including abnormal drive gain, abnormal phase difference, abnormal zero-point drift, and short-term anomalies caused by external vibration interference. Deployed to the edge computing unit without altering the on-site hardware, the single-window end-to-end inference latency remained stable within the 40-millisecond range. Daily operation generated over 10,000 diagnostic log entries with no packet loss. Verification against maintenance work orders revealed over 20 warnings with severity levels of 2 or higher, the vast majority of which were consistent with confirmed anomalies. Early warnings were provided in several cases of gradually developing zero-point drift, allowing maintenance personnel to complete calibration or repairs before the measurement deviation increased. For changes in the measurement baseline caused by operating condition switching, the anomaly probability field exhibited short-term local clustering, rapidly receding after propagation, and the fusion decision remained a non-fault or unknown operating condition indication, reducing invalid alarms and unnecessary inspections caused by single-point threshold triggers.

[0031] Table 1. Comparison of Overall Performance of Mass Flow Meter Fault Diagnosis Methods

[0032] As shown in Table 1, in terms of overall recognition performance, this invention achieves the best results in all four core metrics: accuracy, recall, precision, and F1 score. The accuracy of this invention is 96.4%, higher than SegNeXt+PaDiM's 93.0%, and significantly better than ResNet18's 91.2% and 1D-CNN's 89.7%. In terms of recall, this invention reaches 94.1%, an improvement of 4.7 percentage points compared to SegNeXt+PaDiM and 20.5 percentage points compared to threshold rules, indicating more thorough detection of real faults. In terms of precision, this invention achieves 95.0%, an improvement of 11.5 percentage points compared to statistical features + SVM, reflecting a significant reduction in false positives. The overall F1 score is 94.5%, demonstrating superior performance in balancing detection and false positives.

[0033] From the perspective of false alarms and false negatives, this invention exhibits the lowest false alarm and false negative rates, demonstrating its robustness under fluctuating operating conditions and noise interference. The threshold rule method has a false alarm rate of 9.8% and a false negative rate of 12.7%, indicating that traditional methods are sensitive to changes in operating conditions but insensitive to weak faults. While the statistical feature + SVM method reduces the false alarm rate to 7.1% and the false negative rate to 9.4%, it is still affected by feature selection and distribution drift. This invention achieves a false alarm rate of 2.6% and a false negative rate of 2.9%, demonstrating that by improving SegNeXt's four structural innovations and superimposing distribution migration matrix modeling and spatial-probabilistic coherence structure, it can more effectively distinguish between operating condition migration and fault migration, and suppress noise-triggered isolated anomalies, thereby simultaneously reducing both false alarms and false negatives.

[0034] From an engineering deployment perspective, this invention falls within an acceptable range for inference latency and memory usage among deep learning models. The average latency of threshold rules and statistical features + SVM is 6 milliseconds and 14 milliseconds respectively, significantly lighter, but with higher false positive and false negative rates. Among deep learning methods, 1D-CNN is 22 milliseconds, ResNet18 is 28 milliseconds, and this invention is 36 milliseconds, mainly due to improvements in structure and probability field propagation calculations. Regarding memory usage, this invention is 172MB, higher than ResNet18's 128MB, but while achieving significantly higher diagnostic accuracy, recall, and lower false positives and false negatives, it remains within the range of models deployable at the edge. Furthermore, when lower resources are needed, deployment costs can be further optimized by reducing the number of channels, lowering the input resolution, or compressing model parameters.

[0035] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for fault diagnosis of mass flow meters based on convolutional neural networks, characterized in that, include: Collect mass flow meter operating data, preprocess the mass flow meter operating data, and generate sample fragment data; The time-frequency transformation of the sample fragment data is performed to construct a multi-channel two-dimensional feature tensor; An improved SegNeXt model is constructed, which encodes the directional features of the multi-channel two-dimensional feature tensor based on orientation-aware convolution, performs context fusion through a local-global hybrid perception module, introduces a position attention distillation module to enhance spatial position attention, and uses a fault multi-view reconstruction module to perform multi-view reconstruction to obtain the reconstructed output features. A patch distribution modeling module is constructed. The reconstructed output features are modeled by a distribution migration matrix to obtain the migration matrix and calculate the migration deviation. Based on the spatial-probabilistic combined structure, the probability field is constructed and propagated to output the anomaly probability field and anomaly score. A fault classification head is constructed using deep feature maps, and a fault category probability vector is output based on sample fragment data. The fault category probability vector, anomaly probability field, anomaly score and reconstructed output features are fused and judged to generate diagnostic results and severity levels; Based on the diagnostic results and severity level, fault warning information is output and updated and recorded in real time at the edge.

2. The method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The operating data of the mass flow meter includes mass flow measurement, density measurement, medium temperature measurement, drive gain signal, and phase difference measurement.

3. The method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The generated sample fragment data includes: Mass flow rate measurement, density measurement, medium temperature measurement, drive gain signal and phase difference measurement are collected from the mass flow meter. The collected data are timestamped and aligned to form a multivariate operating data sequence arranged in chronological order. The multivariate running data sequence is subjected to detrending, denoising and normalization processing. Detrending processing calculates the baseline sequence of the sequence within the window in a sliding window manner. The original sequence is subtracted from the baseline sequence to obtain the detrended sequence. Dedenoising processing performs bandpass filtering on the detrending sequence to obtain the denoised sequence. Normalization processing calculates the mean and standard deviation of the denoised sequence according to the window. The mean is subtracted from the denoised sequence and then divided by the standard deviation to obtain the normalized sequence. The normalized sequence is segmented according to a fixed window length and a fixed step size. Each sample segment is composed of consecutive fixed window length sampling points in the normalized sequence starting from the corresponding step size. Each sample segment is assigned a corresponding time interval identifier to obtain sample segment data.

4. The method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The multi-channel two-dimensional feature tensor includes: Time-frequency transformation is performed on each time series in the sample data segment. The sample data segment is divided into frames according to a preset window function. Discrete Fourier transform is performed on each frame of data to form a complex spectrum. The amplitude of the complex spectrum is taken to form a time-frequency energy matrix, and the corresponding time-frequency characterization diagram is obtained. The time-frequency characterization maps are subjected to size unification processing. Time-frequency characterization maps with different time-frequency resolutions are cropped and resampled. Each time-frequency characterization map is numerically scaled to meet the numerical range, resulting in a time-frequency characterization map with uniform size. By stacking time-frequency representation images of uniform size according to channel dimensions, a multi-channel two-dimensional feature tensor is obtained.

5. The method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The obtained reconstructed output features include: Construct an improved encoder and decoder structure for the SegNeXt model, and input a multi-channel two-dimensional feature tensor into the encoder to form an initial feature map; In the multi-scale convolutional attention unit of the encoder, a direction-aware convolutional layer is set up, including two sets of depth-separable convolutions along the time axis and along the frequency axis, and the initial feature map is encoded with directional features to obtain directional encoded features. In the encoder, a local-global hybrid perception module is set up, which includes local branches and global branches. The local branches perform local convolution aggregation on the directional encoding features to form local context features. The global branches perform large receptive field convolution aggregation on the directional encoding features to form global context features. The local context features and global context features are concatenated in the channel dimension and then mixed in the channels by one-to-one convolution to obtain fused features. On the decoding side, a position attention distillation module is set up to generate a spatial position attention map from the fused features. The spatial position attention map is then multiplied element-wise with the fused features to form position enhancement features. A fault multi-view reconstruction module is set up on the decoding side to perform multi-view reconstruction operations on the location enhancement features. The location enhancement features are processed by two reconstruction branches and the corresponding reconstruction results are output. The difference between the reconstruction results and the location enhancement features forms a reconstruction error map. A deep feature map and a candidate anomaly region map formed based on the spatial location attention map are output to obtain the reconstruction output features.

6. The method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The output anomaly probability field and anomaly score include: A patch distribution modeling module is constructed, which divides the deep feature map in the reconstructed output features into patch features according to spatial location. The patch features are composed of the channel vectors of the deep feature map at the corresponding spatial location, forming a patch feature set. The migration matrix is ​​modeled by distribution migration matrix to perform migration matrix acquisition and migration deviation calculation on patch feature set. The migration matrix acquisition includes constructing a reference distribution representation based on normal sample patch feature set and constructing a target distribution representation based on the patch feature set of sample to be diagnosed. The linear mapping matrix between the reference distribution representation and the target distribution representation is used as the migration matrix. The migration deviation calculation includes measuring the difference between the migration matrix and the preset normal migration matrix to form the migration deviation. Based on the spatial-probabilistic binding structure, the migration deviation is subjected to probability field construction and propagation processing. The probability field construction maps the migration deviation to the initial probability field according to the spatial position of the patch. The propagation processing performs neighborhood propagation operation on the initial probability field to form a propagation probability field. The neighborhood propagation operation takes the set of probability values ​​within a preset neighborhood range for each patch position and performs convolution filtering operation to update the probability value of the patch position. The propagation probability field is numerically normalized to form an anomaly probability field. The anomaly probability field is then aggregated in the spatial dimension to form an anomaly score. The anomaly probability field and anomaly score are then output.

7. The method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The process of constructing a fault classification head using deep feature maps and outputting a fault category probability vector based on sample fragment data includes: Deep feature maps are obtained from the reconstructed output features. The deep feature maps are then size-aligned to meet the input size requirements of the fault classification head. Global average pooling is performed on the deep feature maps in the spatial dimension, and the channel responses at each spatial location are aggregated to form a fixed-length feature vector. The feature vector is input into the fault classification head, and a fully connected mapping operation is performed. The fault classification head includes two fully connected layers and a non-linear activation layer. The first fully connected layer transforms the dimension of the feature vector to form an intermediate representation, and the non-linear activation layer performs an activation operation on the intermediate representation. The second fully connected layer maps the activated intermediate representation and outputs the classification score vector corresponding to each fault category. A normalized probability mapping operation is performed on the classification score vector to form a fault category probability vector. The normalized probability mapping operation includes taking the natural index of each category score in the classification score vector, normalizing each category natural index with the sum of all category natural indices as the denominator, and obtaining the probability value corresponding to each fault category, thus forming the fault category probability vector.

8. The method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The generation of diagnostic results and severity levels includes: Obtain the fault category probability vector, anomaly probability field, anomaly score, and reconstructed output features, and perform spatial size alignment processing on the anomaly probability field and reconstructed output features; The system performs region generation and region scoring on the anomaly probability field, performs threshold segmentation on the anomaly probability field to form a binary region map, performs connected component extraction on the binary region map to obtain a set of candidate anomaly regions, performs region aggregation operation on the probability value of each candidate anomaly region to form a set of region anomaly scores, and the region aggregation operation is a maximum value operation to determine the maximum region anomaly score in the set of region anomaly scores. The system performs a fusion decision based on the anomaly score, the maximum regional anomaly score, and the fault category probability vector. The anomaly score and the maximum regional anomaly score are compared with preset grading thresholds to determine the anomaly level. The fault category with the highest probability value in the fault category probability vector is selected as the diagnosis result to determine the severity level. The diagnosis result and severity level are then output.

9. A method for fault diagnosis of a mass flow meter based on a convolutional neural network according to claim 1, characterized in that, The process of outputting fault warning information based on diagnostic results and severity levels includes: Receive diagnostic results and severity levels, generate early warning information, including fault category identifier, severity level identifier, anomaly score, maximum area anomaly score, and corresponding time interval identifier; Based on the severity level, perform graded alarm processing, match the severity level with the preset alarm level mapping table, output the corresponding alarm level, and trigger the corresponding alarm action; The system updates and records early warning information in real time at the edge, writes early warning information for continuous sample segments into local storage in chronological order, and sends early warning information to the host computer or cloud platform according to the upload cycle.