High-end control valve fault grading diagnosis method and system based on attention mechanism

A high-end control valve fault diagnosis system was constructed by using a ResNet18 model based on an attention mechanism. This system solved the problem of insufficient fault intensity discrimination in control valves, and achieved simultaneous identification of fault type and intensity, thereby improving diagnostic accuracy and system reliability.

CN121834499APending Publication Date: 2026-04-10Liupanshan Laboratory
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Liupanshan Laboratory
Filing Date
2025-12-24
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately determine the severity level of control valve failures, resulting in a lack of targeted maintenance strategies and affecting system reliability.

Method used

By employing the ResNet18 model based on the attention mechanism and combining spatial and channel attention mechanisms, a fault diagnosis model for high-end control valves is constructed through the generation and preprocessing of fault data, enabling simultaneous identification of fault type and intensity.

Benefits of technology

It enables accurate identification of fault types and intensities, supports differentiated maintenance strategies, reduces production risks, optimizes operation and maintenance costs, and ensures stable system operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834499A_ABST
    Figure CN121834499A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of valve fault diagnosis, and particularly discloses a high-end control valve fault grading diagnosis method and system based on an attention mechanism, and the method comprises the steps: generating fault data of a control valve under different fault intensities, and selecting a stroke, an input and a deviation between the stroke and the input as original data features; the selected original data features are sequentially converted into one-dimensional time sequence data and two-dimensional data to serve as a training set; a Resnet18 model is taken as a baseline model, an improved attention mechanism is embedded, a control valve fault diagnosis model is constructed, and the training set is adopted to carry out fine tuning training on the control valve fault diagnosis model; and performing real-time fault grading diagnosis on the control valve based on the trained control valve fault diagnosis model. According to the invention, quantitative evaluation of the fault degree of the control valve can be realized, and different fault intensities from slight fault intensity to severe fault intensity can be effectively distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of valve fault diagnosis technology, and more specifically to a high-end control valve fault classification diagnosis method and system based on attention mechanism. Background Technology

[0002] In the field of industrial automation, high-end control valves are core components ensuring precise control and safe operation of production processes. Their operational status directly affects the efficiency and maintenance costs of the entire system. During actual operation, control valves may be affected by various complex factors, such as pressure reducing valve mismatch, loose actuator bolts, and diaphragm wear. These factors can all cause faults of different types and intensities. It is worth noting that faults often occur at different intensities, and the impact of faults of different intensities on the system varies significantly: minor faults may only cause valve response delays or slight leaks; moderate faults may cause insufficient actuator power or abnormal valve opening and closing; while high-intensity faults may cause valve jamming or even complete failure. Therefore, different fault intensities lead to different consequences, and the corresponding maintenance strategies should also differ. Thus, to achieve more accurate maintenance decisions, it is not enough to simply identify the fault type; it is essential to further effectively determine the fault intensity.

[0003] Traditional control valve fault diagnosis methods often rely on subjective assessments based on human experience or determine fault occurrence based on a single threshold, making it difficult to accurately distinguish faults of different severity levels. These methods are inefficient, costly, and lack the ability to quantitatively analyze fault evolution. In recent years, with the development of intelligent fault diagnosis technology, techniques such as feature extraction-based assessment methods and dynamic data-driven fault evolution analysis have gradually enabled rapid and accurate identification of fault types, significantly improving diagnostic accuracy and efficiency. However, existing methods still primarily focus on fault type classification, exhibiting significant shortcomings in fault intensity grading diagnosis—a systematic and reliable intensity assessment system has not yet been established, particularly lacking effective quantitative means for different fault severity levels. Due to the failure to fully integrate the valve's fluid dynamics and mechanical structure, existing technologies struggle to capture the dynamic evolution of fault intensity under different operating conditions. This leads to problems in practical applications, such as minor faults being overlooked and delayed responses to severe faults, resulting in untargeted maintenance strategies and severely impacting the overall reliability of the system.

[0004] Therefore, how to achieve quantitative assessment and accurate prediction of the severity of control valve failure is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of the above problems, the present invention proposes a high-end control valve fault classification diagnosis method and system based on attention mechanism, so as to overcome the above problems or at least partially solve the above problems.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for hierarchical diagnosis of faults in high-end control valves based on an attention mechanism, comprising the following steps: S1. Generate fault data for control valves under different fault intensities, and select stroke, input, and the deviation between stroke and input as raw data features; S2. The selected original data features are successively converted into one-dimensional time series data and two-dimensional data as training sets; S3. Using the ResNet18 model as the baseline model, an improved attention mechanism is embedded to construct a control valve fault diagnosis model. The training set is used to fine-tune the control valve fault diagnosis model. S4. Obtain real-time operating data of the control valve and perform real-time fault classification diagnosis of the control valve based on the trained control valve fault diagnosis model.

[0007] Furthermore, in S1, the movement process of the control valve under different control modes is simulated, and fault data of various intensities under multiple fault categories are collected. The fault categories include at least three categories: pressure reducing valve mismatch, bolt loosening, and diaphragm wear. Each fault category contains at least three fault intensities, namely weak, medium, and severe. Fault data and fault-free data are used together as the raw data features.

[0008] Furthermore, S2 includes: Using the time column in the original data features as an index, we construct one-dimensional time-series data for the input column, the trip column, and the deviation column between the trip and the input, where the deviation = |trip - input|. The sliding window method is used to segment the one-dimensional time series data, and the segmented input, travel, and bias sequences are scaled to the range (-1, 1), respectively. The Gram angle difference field method is used to transform the scaled sequence data into a polar coordinate system, treating the numerical values ​​as the cosine of the included angle and the time series as the radius, thus converting the one-dimensional time series data of the input column, travel column, and deviation column into two-dimensional data. The converted two-dimensional data are stitched together according to the channel dimension to form three-channel data.

[0009] Furthermore, in S3, a ResNet18 model pre-trained on the ImageNet dataset is used as the baseline model. The spatial attention mechanism layer is applied to the output of the ResNet18 model's layer 2, and the channel attention mechanism layer is applied to the output of the ResNet18 model's layer 3, forming a control valve fault diagnosis model. The base layers of the ResNet18 model are frozen, and the layers 2, 3, and 4 of the ResNet18 model are unfrozen and jointly fine-tuned with the classification head and the newly added attention mechanism layer.

[0010] Furthermore, in S3, the spatial attention mechanism layer performs the following processing flow on the original feature map output by layer 2: The original feature map output from layer 2 is processed by average pooling and max pooling respectively. The features after the two pooling processes are concatenated to obtain the basic feature map. Parallel convolutions at two different scales are performed on the basic feature map to extract multi-scale spatial features and fuse them to obtain the main feature map; Channel compression is performed on the original feature map output from layer 2 to generate an auxiliary feature map; The main feature map and auxiliary feature map are weighted, smoothed after passing through the Sigmoid activation function, and then the attention map is obtained. Multiply the attention map and the original feature map output from layer 2 to obtain the enhanced spatial feature map after strengthening the key spatial regions, which is then used as the input to layer 3.

[0011] Furthermore, in S3, the channel attention mechanism layer performs the following processing flow on the original feature map output by layer 3: The original feature maps output from layer 3 are processed by global average pooling and global max pooling respectively to obtain statistical features of two channels; The statistical characteristics of the two channels are processed separately using a shared MLP layer; The channel weights are generated by summing the features from the two MLP layers element by element and then applying the Sigmoid activation function. The channel weights are multiplied by the original feature map output from layer 3 to obtain the enhanced channel features that highlight the channels sensitive to fault intensity, which are then used as the input to layer 4.

[0012] Furthermore, in S1, a control valve fault reproduction test bench is built to inject faults into the test control valve, and the control valve movement process under different fault modes is simulated in the step signal test module to generate fault data under simulated actual working conditions.

[0013] Secondly, the present invention provides a high-end control valve fault classification and diagnosis system based on an attention mechanism, comprising: The fault data generation module is used to generate fault data for control valves under different fault intensities, and selects stroke, input, and the deviation between stroke and input as raw data features; The data preprocessing module is used to convert the selected raw data features into one-dimensional time series data and two-dimensional data in sequence, which are used as training sets. The training module is used to build a control valve fault diagnosis model by embedding an improved attention mechanism with the ResNet18 model as the baseline model, and to fine-tune the control valve fault diagnosis model using the training set. The inference module is used to acquire real-time operating data of the control valve and perform real-time fault classification diagnosis of the control valve based on the trained control valve fault diagnosis model.

[0014] Thirdly, the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it implements the steps of the high-end control valve fault classification diagnosis method based on the attention mechanism described above.

[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the high-end control valve fault classification diagnosis method based on the attention mechanism described above.

[0016] As can be seen from the above technical solution, compared with the prior art, the present invention has the following beneficial effects: 1. This invention collects fault data of different intensity levels under actual operating conditions and introduces a ResNet18 model with an attention fusion mechanism to achieve simultaneous identification of fault type and intensity level. This model not only provides maintenance personnel with a clear reference for fault intensity, supporting the formulation of differentiated maintenance strategies, but also enables early warning and graded prevention and control of fault evolution. This effectively suppresses the development of faults from low to high intensity, minimizes production risks, optimizes maintenance costs, and provides technical support for the long-term stable operation of industrial automation systems.

[0017] 2. At the data preprocessing level, this invention transforms one-dimensional data into two-dimensional image data using Gram angle field, fully preserving the temporal correlation of travel, input, and deviation. Combined with normalization and sliding window segmentation, it eliminates the need for manual feature design, adapting to ResNet18 input requirements while avoiding feature redundancy, providing a high-quality data foundation for subsequent diagnosis. This solves the problems of feature loss and difficulty in adapting traditional one-dimensional temporal data to deep learning models.

[0018] 3. In terms of model improvement, this invention adopts a dual attention mechanism to focus on the key areas of the fault type and the differences in the intensity characteristics of the same fault, thereby improving the feature discrimination ability. Through this model, accurate prediction of 9 types of faults and non-faults can be achieved.

[0019] 4. This invention outputs the fault type and intensity results at the hierarchical diagnosis level, which directly supports the subsequent staff in formulating differentiated operation and maintenance plans, filling the gap in the existing technology that only identifies the type but does not distinguish the intensity. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0021] Figure 1 This is a flowchart of a high-end control valve fault classification and diagnosis method based on attention mechanism provided in an embodiment of the present invention; Figure 2 This is a structural diagram of the control valve fault diagnosis model provided in the embodiments of the present invention; Figure 3 This is a schematic diagram of a confusion matrix used by the control valve fault diagnosis model provided in this embodiment of the invention to classify fault types. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] like Figure 1 As shown in the figure, this invention discloses a method for fault classification and diagnosis of high-end control valves based on an attention mechanism, including the following steps: S1. Generate fault data for control valves under different fault intensities, and select stroke, input, and the deviation between stroke and input as raw data features; S2. The selected original data features are successively converted into one-dimensional time series data and two-dimensional data as training sets; S3. Using the ResNet18 model as the baseline model, an improved attention mechanism is embedded to construct a control valve fault diagnosis model. The training set is used to fine-tune the control valve fault diagnosis model. S4. Obtain real-time operating data of the control valve and perform real-time fault classification diagnosis of the control valve based on the trained control valve fault diagnosis model.

[0024] The following is a further explanation of each of the above steps.

[0025] S1. Fault Intensity Grading Data Generation: By building a control valve fault reproduction test bench and injecting faults into the test control valve using a reasonable reproduction method, the step signal test module in ValveLink software of Fisher positioner is used to collect three types of fault intensity data under simulated actual working conditions.

[0026] The step signal test module simulates the movement of control valves under different control modes, collects fault data of various intensities under multiple fault categories, and specifically generates a simulation dataset containing three fault types. The initial parameters include time (s), stroke (%), input (%), drive (%), and supply pressure (psi), as well as secondary parameters such as limit point, gain, dead time, overload, error, and stroke time. Here, s, %, and psi represent the unit names.

[0027] The fault categories include at least three types: pressure reducing valve mismatch, bolt loosening, and diaphragm wear. Each fault category contains at least three fault intensities: weak, moderate, and severe. Time, stroke, input, and the absolute value of the difference between stroke and input (i.e., deviation) are selected as data features. At the same time, fault data and fault-free data are used together as raw data features.

[0028] S2. Data Preprocessing: Based on the input characteristics of the ResNet18 model, before constructing the training and test datasets, the original data needs to be preprocessed. The ResNet18 model accepts input data in two-dimensional form, while the original data is one-dimensional. Here, the Gram angle field method is used to convert the original data into two-dimensional data. The specific process includes: Using the time column in the original data features as an index, we construct one-dimensional time-series data for the input column, the trip column, and the deviation column between the trip and the input, where the deviation = |trip - input|. The sliding window method is used to segment the one-dimensional time series data. This operation is to reduce the feature dimension of the two-dimensional data to shorten the training time and increase the sample size. Then, the segmented input, run, and bias sequences are scaled to the range (-1, 1) using the MinMaxScaler method. The Gram angle difference field method is used to transform the scaled sequence data into a polar coordinate system, treating the numerical values ​​as the cosine of the included angle and the time series as the radius, thus converting the one-dimensional time series data of the input column, travel column, and deviation column into two-dimensional data. The two-dimensional data after each conversion are spliced ​​together according to the channel dimension to form three-channel data, which is used as the initial input data for the model.

[0029] S3. Construction and training of a control valve fault diagnosis model incorporating attention mechanisms: such as Figure 2 As shown, a ResNet18 model pre-trained on the ImageNet dataset is used as the baseline model. Its internal residual structure can alleviate the training difficulties of deep networks, accelerate training and improve performance, and its overall structure is simple and easy to deploy. To solve the key feature information extraction of fault category and fault intensity, a spatial attention mechanism layer is applied to the output of the ResNet18 model's layer 2, based on the baseline model. At this point, the spatial information is relatively rich, and spatial features of different ranges are captured through multi-scale convolution. A channel attention mechanism layer is applied to the output of the ResNet18 model's layer 3, at which point the channel information is relatively rich and non-redundant. Then, a dual-pooling branch fuses global and local channel information to form a control valve fault diagnosis model. The base layer and layer 1 of the ResNet18 model are frozen, while layers 2, 3, and 4 are unfrozen and jointly fine-tuned with the classification head and the newly added attention mechanism layer. The basic layers of the ResNet18 model include conv1 convolutional layers, bn1 batch normalization layers, ReLU activation layers, and maxpooling layers; layers 1 through 4 are each composed of two identical residual blocks.

[0030] Specifically, the spatial attention mechanism layer performs the following processing flow on the original feature map output by layer 2: 1) Perform average pooling and max pooling on the original feature map output from layer 2, and then concatenate the features after the two pooling processes to obtain the basic feature map. 2) Perform parallel convolutions at two different scales on the basic feature map to extract multi-scale spatial features and fuse them to obtain the main feature map; 3) Perform channel compression on the original feature map output from layer 2 to generate an auxiliary feature map; 4) Weight the main feature map and auxiliary feature map, smooth them after applying the sigmoid activation function, and obtain the attention map; 5) Multiply the attention map and the original feature map output from layer 2 to obtain the enhanced spatial feature map after strengthening the key spatial regions, which is used as the input to layer 3.

[0031] The channel attention mechanism layer performs the following processing flow on the original feature map output by layer 3: 1) Perform global average pooling and global max pooling on the original feature map output from layer 3 to obtain statistical features for two channels; 2) The statistical characteristics of the two channels are processed separately through a shared MLP layer; 3) The two features processed by the MLP layer are summed element by element, and then activated by the Sigmoid function to generate channel weights; 4) Multiply the channel weights with the original feature map output from layer 3 to obtain the enhanced channel features that highlight the channels sensitive to fault intensity, and use them as the input to layer 4.

[0032] Model hyperparameters were set as follows: BATCH_SIZE = 128, RANDOM_SEED = 42, NUM_EPOCHS = 50, LR = 2e-4 = 0.0002, WEIGHT_DECAY = 1e-3 = 0.001. The Adam optimizer was used for model optimization. Fault classification data under the corresponding path were input into the constructed model, and the training set and test set data were divided into a 7:3 ratio. During training, the first 5 layers of ResNet18 (conv1 to layer1) were frozen, and layers 2, 3, and 4 were unfrozen. The attention mechanism layer and classification layer were all unfrozen for training. The Adam optimizer was used to update the parameters of the unfrozen layers simultaneously through backpropagation. Finally, a 10-dimensional vector was output through a fully connected layer. The data was flattened to 512 dimensions, then reduced to 256 dimensions through a linear layer, and then reduced to 10 dimensions through another linear layer, finally achieving a 10-class output. The output was then converted into a probability distribution of 10 types of faults (3 types of faults × 3 levels of intensity + no fault) through Softmax.

[0033] After training, the trained model is evaluated and validated using a validation dataset to ensure its performance on both the original and new tasks, thus obtaining the final control valve fault classification and diagnosis model.

[0034] S4. During the operation of the control valve, its operating data is collected in real time and input into the final control valve fault classification and diagnosis model for real-time fault classification and diagnosis.

[0035] Next, a specific example will be used to further illustrate the method of the present invention.

[0036] S1. Data Preparation: Fault data of different intensities under three types were collected using the step signal test module in ValveLink software, which comes with the Fisher positioner. The fault types were pressure reducing valve mismatch, bolt loosening, and diaphragm wear. The intensities were divided into weak, moderate, and severe. In addition, no fault data was collected, for a total of 3 major categories and 10 subcategories of faults. The format of each category dataset was 1050*5 (1050 samples, 5 features: time, stroke, input, drive, and supply pressure). The fault types and intensities are shown in Table 1.

[0037] Table 1 Fault Types and Intensities

[0038] S2, Dataset Construction: Based on the raw fault data (no faults + 3 types of faults × 3 intensity levels) collected during the data preparation phase, complete the dataset construction according to the following steps: (1) From the original 5-dimensional features (time, stroke, input, drive, and air supply pressure), the 3 types of features most critical for fault diagnosis (stroke, input, and deviation, where deviation = |stroke - input|) are selected, and 3 independent one-dimensional time series sequences are constructed with time as the index, with each sequence having 1050 samples. (2) A sliding window with a window length of 175 and a step size of 25 is used to segment the one-dimensional time series. Each sample with a length of 1050 can be divided into 36 samples, which reduces the feature dimension and increases the amount of data. (3) Use the MinMaxScaler tool to uniformly scale the segmented subsequences to the (-1,1) interval; (4) The Gram Angular Difference Field (GADF) method is used to convert each one-dimensional subsequence into a 175×175 two-dimensional image. Then, the three two-dimensional images corresponding to the travel, input, and deviation are stitched together according to the channel dimension to form a 175×175×3 three-channel image data, which is fully compatible with the input specifications of the ResNet18 model. (5) The training set and the test set were randomly divided in a 7:3 ratio, resulting in a training set of 1473 samples and a test set of 651 samples.

[0039] S3. Fault Diagnosis Model Construction: (1) Load the ResNet18 model pre-trained on the ImageNet dataset, freeze the first 4 feature extraction layers (conv1, bn1, relu, maxpool) to retain its general image feature extraction capability.

[0040] (2) An enhanced spatial attention mechanism layer is inserted after the output of layer 2 of ResNet18. The spatial attention mechanism layer captures spatial features of different ranges through 3×3 and 5×5 multi-scale convolutions to enhance the features of key fault regions. After the output of layer 3, a channel attention mechanism layer is inserted. Global and local channel information are fused through average pooling and max pooling branches to highlight the feature differences of different intensities of the same fault.

[0041] (3) Replace the original fully connected layer of ResNet18 to construct a classification of 512→256→10; unfreeze the three feature extraction layers of layer2, layer3, and layer4, and fine-tune them together with the attention mechanism layer and the classification head.

[0042] Model evaluation: The model was evaluated using a validation dataset, and various performance metrics such as accuracy, recall, F1 score, and confusion matrix were calculated, as shown in Table 2 and... Figure 3 As shown, the best average prediction accuracy for the 10 types of faults currently reaches 94%.

[0043] Table 2 Model Diagnostic Output Results

[0044] S4. Model Application: The trained control valve fault diagnosis model is deployed into the actual automatic fault diagnosis device system to adapt to changes and trends in data in real time, and to make accurate judgments on high-end control valve faults based on real-time monitoring data.

[0045] The control valve fault diagnosis model proposed in this invention can accurately identify the various fault types and intensities of control valves. Combined with historical maintenance experience and guidance manuals, the system will output relevant fault handling strategies and suggestions. This is especially valuable for newly hired maintenance personnel, providing them with important learning opportunities and improving their control valve maintenance capabilities, thus ensuring the safe and stable operation of control valves.

[0046] In other embodiments, the present invention also provides a high-end control valve fault classification and diagnosis system based on an attention mechanism, comprising: The fault data generation module is used to generate fault data for control valves under different fault intensities, and selects stroke, input, and the deviation between stroke and input as raw data features; The data preprocessing module is used to convert the selected raw data features into one-dimensional time series data and two-dimensional data in sequence, which are used as training sets. The training module is used to build a control valve fault diagnosis model by embedding an improved attention mechanism with the ResNet18 model as the baseline model, and to fine-tune and validate the control valve fault diagnosis model using the training set. The inference module is used to acquire real-time operating data of the control valve and perform real-time fault classification diagnosis of the control valve based on the validated control valve fault diagnosis model.

[0047] In other embodiments, the present invention provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it implements the steps of the attention mechanism-based high-end control valve fault classification diagnosis method as described above.

[0048] In another embodiment, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the attention mechanism-based high-end control valve fault classification diagnosis method as described above.

[0049] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0050] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An attention mechanism-based high-end control valve fault classification diagnosis method, characterized in that, The method comprises the following steps: S1, generating fault data of the control valve under different fault intensities, selecting stroke, input and deviation between stroke and input as original data features; S2, converting the selected original data features into one-dimensional time sequence data and two-dimensional data in turn as a training set; S3, taking a Resnet18 model as a baseline model, embedding an improved attention mechanism to build a control valve fault diagnosis model, and using the training set to fine-tune the control valve fault diagnosis model; S4, obtaining real-time running data of the control valve, and based on the trained control valve fault diagnosis model, performing real-time fault classification diagnosis on the control valve.

2. The attention mechanism based high end control valve fault classification and diagnosis method of claim 1, wherein, In S1, the motion process of the control valve under different control modes is simulated, and fault data of multiple intensities under multiple fault categories are collected. The fault categories include at least three categories of pressure reducing valve mismatch, bolt loosening and diaphragm wear, and each fault category contains at least three fault intensities, namely weak, medium and severe. The fault data and fault-free data are collectively used as original data features.

3. The attention mechanism based high-end control valve fault ranking and diagnostic method of claim 1, wherein S2 It includes: Taking the time column in the original data features as an index, one-dimensional time sequence data of the input column, the stroke column and the deviation column between the stroke and the input are constructed, wherein the deviation = |stroke-input|; The one-dimensional time sequence data is segmented by using the sliding window method, and the input, stroke and deviation sequences after segmentation are scaled to (-1, 1); The scaled sequence data is converted to a polar coordinate system by using the Gram angle difference field method, the numerical value is regarded as the cosine value of the angle, and the time sequence is regarded as the radius. The one-dimensional time sequence data of the input column, the stroke column and the deviation column are converted into two-dimensional data; The two-dimensional data after respective conversion are spliced according to the channel dimension to form three-channel data.

4. The attention mechanism based high end control valve fault ranking diagnostic method of claim 1, wherein, In S3, the Resnet18 model trained in advance on the ImageNet data set is taken as the baseline model, the spatial attention mechanism layer is applied to the output of the layer2 layer of the Resnet18 model, and the channel attention mechanism layer is applied to the output of the layer3 layer of the Resnet18 model to form a control valve fault diagnosis model. The basic layer of the Resnet18 model is frozen, and the layer2 layer, the layer3 layer and the layer4 layer of the Resnet18 model are unfrozen, and are jointly fine-tuned with the classification head and the newly added attention mechanism layer.

5. The attention mechanism based high end control valve fault ranking diagnostic method of claim 4, wherein, In S3, the spatial attention mechanism layer performs the following processing procedure on the original feature map output by the layer2 layer: The original feature map output by the layer2 layer is respectively subjected to average pooling and maximum pooling processing, the features after the two kinds of pooling processing are spliced to obtain a basic feature map; The basic feature map is respectively subjected to parallel convolution of two scales to extract multi-scale spatial features and fuse them to obtain a main feature map; The original feature map output by the layer2 layer is subjected to channel compression to generate an auxiliary feature map; The main feature map and the auxiliary feature map are weighted, and after the Sigmoid activation function, they are subjected to smoothing processing to obtain an attention map; The attention map and the original feature map output by the layer2 layer are multiplied to obtain an enhanced spatial feature map after strengthening the key spatial region, as the input of the layer3 layer.

6. The attention mechanism based high end control valve fault ranking diagnostic method of claim 4, wherein, In S3, the channel attention mechanism layer performs the following processing procedure on the original feature map output by the layer3 layer: The original feature map output by the layer3 layer is respectively subjected to global average pooling and global maximum pooling processing to obtain two channel statistical features; The two channel statistical features are respectively processed by the shared MLP layer; The two features processed by the MLP layer are added element by element, and then subjected to the Sigmoid activation function to generate a channel weight. The channel weight and the original feature map output by the layer3 layer are multiplied to obtain an enhanced channel feature after highlighting the channels sensitive to the fault intensity, as the input of the layer4 layer.

7. The attention mechanism based high end control valve fault ranking diagnostic method of claim 1, wherein, In S1, a control valve fault reproduction test bench is built to perform fault injection on the test control valve, and the control valve movement process under different fault modes is simulated in the step signal test module to generate fault data simulating actual working conditions.

8. An attention mechanism-based high-end control valve fault classification diagnosis system, characterized in that, The method comprises the following steps: a fault data generation module for generating fault data under different fault intensities of the control valve, and selecting stroke, input and deviation between stroke and input as original data features; a data preprocessing module for converting the selected original data features into one-dimensional time series data and two-dimensional data in sequence as a training set; a training module for embedding an improved attention mechanism in a Resnet18 model as a baseline model to construct a control valve fault diagnosis model, and fine-tuning the control valve fault diagnosis model using the training set; an inference module for obtaining real-time running data of the control valve and performing real-time fault classification diagnosis on the control valve based on the trained control valve fault diagnosis model.

9. An electronic device comprising: The memory, the processor and the computer program stored on the memory and executable on the processor; characterized in that the processor executes the computer program to implement the steps of the high-end control valve fault classification diagnosis method based on the attention mechanism as claimed in any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the high-end control valve fault classification diagnosis method based on the attention mechanism as claimed in any one of claims 1-7.