Valve fault diagnosis method and system based on artificial intelligence
By constructing a semantic skeleton of valve mechanism and an improved dynamic time warping method, combined with a temporal convolutional network model based on attention mechanism, the problem of misjudgment in traditional valve fault diagnosis under complex working conditions is solved, and accurate valve fault diagnosis and structural part location are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG XINOU AUTOMATIC CONTROL INSTR CO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-05-08
AI Technical Summary
Traditional valve fault diagnosis technology has a high misjudgment rate under complex working conditions and cannot effectively distinguish between normal vibration amplitude fluctuations caused by complex working conditions and abnormal changes in vibration amplitude caused by mechanical abnormalities of the valve itself.
An AI-based approach is used to construct a semantic skeleton of valve mechanism. An improved dynamic time warping method is used to calculate the fault residual sequence. Then, a temporal convolutional network model based on attention mechanism is used for training and diagnosis to extract valve fault feature data.
It enables accurate diagnosis of valve faults under complex operating conditions, improves the accuracy of fault identification and the accuracy of structural part positioning, and reduces the false judgment rate.
Smart Images

Figure CN121997149A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of valve technology, specifically to a valve fault diagnosis method and system based on artificial intelligence. Background Technology
[0002] Valves, as core components for fluid transport, pressure regulation, and media on / off control in industrial production processes, are widely used in numerous fields such as petrochemicals, power generation, metallurgy, and municipal water supply. The stability of their operational status directly impacts the continuous operation of production systems, the precise control of process parameters, and on-site safety. During long-term service, valves are susceptible to various malfunctions due to multiple factors, including media corrosion, mechanical wear, and fluctuations in operating conditions. These malfunctions can lead to issues such as valve stem wear, sealing surface damage, and valve core jamming. Failure to identify and address these issues promptly can result in anything from reduced production efficiency and increased energy consumption to, in severe cases, media leakage, equipment shutdowns, and even safety accidents, causing significant economic losses. Therefore, conducting research on precise valve fault diagnosis to achieve early fault identification and condition assessment is a crucial requirement in the field of industrial equipment condition monitoring.
[0003] Traditional valve fault diagnosis technology mainly relies on the analysis of vibration amplitude changes. Vibration sensors are installed in key structural parts such as the valve body and valve stem to continuously collect vibration signals generated during valve operation. The vibration amplitude is extracted from the vibration signals and compared with a preset amplitude threshold. When the vibration amplitude exceeds the threshold range, it is determined that the valve has a mechanical abnormality fault, thus completing the valve fault diagnosis and identification.
[0004] However, traditional methods rely solely on vibration amplitude for fault diagnosis, which cannot adapt to the dynamic changes in signals under complex working conditions such as the coordinated vibration of surrounding equipment and environmental noise interference in industrial sites. As a result, they cannot effectively distinguish between normal vibration amplitude fluctuations of valves caused by complex working conditions and abnormal changes in vibration amplitude caused by mechanical abnormalities of the valve itself. Ultimately, this leads to a significant increase in the misdiagnosis rate of fault diagnosis, making it difficult to maintain stable diagnostic accuracy under complex working conditions. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a valve fault diagnosis method and system based on artificial intelligence to solve the problems existing in the background technology.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a valve fault diagnosis method and system based on artificial intelligence, comprising the following steps: Step S1: Construct the mechanistic semantic skeleton of the valve, and obtain the theoretical response sequence of the valve based on the mechanistic semantic skeleton; Step S2: Collect historical valve fault response sequences, calculate the difference between the historical valve fault response sequences and the theoretical valve response sequences using the improved dynamic time warping method, and calculate the valve fault residual sequence; extract features from the valve fault residual sequence to obtain valve fault feature data; Step S3: Use the valve fault feature data as the training set to train the attention-based temporal convolutional network model to obtain the trained temporal convolutional network model. Step S4: Collect real-time valve fault feature data and input it into the trained temporal convolutional network model to output valve fault results; based on the valve fault results, calculate the final fault confidence and classify the fault level, thereby realizing the diagnosis of valve faults.
[0007] Preferably, the construction of the valve's mechanistic semantic skeleton includes the following specific steps: The mechanism framework includes valve core and valve plate motion constraints, valve stem force transmission chain, actuator output characteristics, sealing and clamping section characteristics, and flow channel resistance characteristics; the complete valve operation process is broken down into three operation stages: starting to overcome static friction, continuous displacement change, and sealing and clamping to form termination.
[0008] Preferably, the step of calculating the difference between the historical valve fault response sequence and the theoretical valve response sequence using the improved dynamic time warping method to obtain the valve fault residual sequence includes the following steps: Calculate the theoretical valve response sequence during the i-th action stage. Compared with historical valve failure response sequences initial normalized distance , where i is the index of the action stage; Phase compensation is performed on the valve's theoretical response sequence to obtain the phase-compensated valve theoretical response sequence. Calculate the theoretical response sequence of the valve after phase compensation Compared with historical valve failure response sequences The derivative of the derivative is used to construct the distance matrix; Resampling based on the distance matrix yields the aligned historical valve fault response sequence. (t) and the aligned valve theoretical response sequence ; Aligned historical valve fault response sequence (t) and the aligned valve theoretical response sequence Subtracting and normalizing yields the valve fault residual sequence. .
[0009] Preferably, the phase compensation of the valve's theoretical response sequence includes the following steps: The theoretical valve response sequence under the i-th action stage According to the phase angle θ from 0 to 2π Step size offset, to obtain the offset valve theoretical response sequence. ; Calculate the normalized distance after each offset Filter out those that meet the requirements < All phase angles θ, and select the normalized distance after offset. minimum distance Corresponding phase angle As the optimal phase compensation angle, the optimal time offset is calculated based on the optimal phase compensation angle. Phase compensation is performed on the valve's theoretical response sequence to obtain the phase-compensated valve theoretical response sequence. , = .
[0010] Preferably, the construction of the distance matrix specifically involves: Construct a distance matrix, the elements of which are: ; in, This represents the value of an element in the distance matrix where row j is j2 and column j2 is j2. This is the derivative of the ith action phase and the 2nd sampling point in the historical valve fault response sequence. denoted as the derivative of the j-th sampling point in the i-th action stage of the valve theoretical response sequence, where j is the index of the sampling point in the valve theoretical response sequence, J is the length of the valve theoretical response sequence, j2 is the index of the historical valve fault response sequence, and J2 is the length of the historical valve fault response sequence.
[0011] Preferably, the step of extracting features from the valve fault residual sequence to obtain valve fault feature data includes the following steps: For the valve fault residual sequence of the i-th action stage Extract its global temporal features and local sliding window features, and then concatenate the global temporal features and local sliding window features in an orderly manner according to three action stages to form a complete residual feature; Based on residual characteristics, residual structure templates and residual evolution trajectory templates are calculated, and valve fault characteristic data are finally obtained.
[0012] Preferably, the step of using valve fault feature data as a training set to train the attention-based temporal convolutional network model to obtain a trained temporal convolutional network model includes the following specific steps: Construct a temporal convolutional network model based on an attention mechanism; The total loss function of the temporal convolutional network model is: ; Where Loss is the total loss function value. The loss function is used for classifying fault mechanisms. The loss function for classifying structural parts. For the weight coefficients of the classification task; The temporal convolutional network model is trained using the Adam optimizer. Valve fault feature data is used as the training set to train the attention-based temporal convolutional network model, resulting in a well-trained temporal convolutional network model.
[0013] Preferably, the construction of the temporal convolutional network model based on the attention mechanism specifically involves: The attention-based temporal convolutional network model includes: an input layer, a temporal convolutional module, an ECA attention module, a pyramid pooling layer, a fully connected layer, and an output layer.
[0014] Preferably, the calculation of the final fault confidence level based on the valve fault results is specifically as follows: Final Fault Confidence The calculation formula is as follows: ; in, For the final fault confidence level, For core fault confidence, This is a fault-free correction item.
[0015] An artificial intelligence-based valve fault diagnosis system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0016] This invention provides a valve fault diagnosis method based on artificial intelligence, involving machine learning and deep learning technologies, which has the following beneficial effects: (1) An improved dynamic time warping method is adopted, which achieves accurate time alignment between theoretical and actual response sequences through phase compensation. This effectively eliminates signal deviations caused by minor fluctuations in operating conditions such as fluid pressure fluctuations and coordinated vibrations of surrounding equipment. Furthermore, the derivative distance is used instead of the traditional Euclidean distance to construct the distance matrix, which more accurately captures the dynamic change characteristics of the sequence. It can effectively filter out interference factors in complex operating conditions, accurately calculate the fault response residuals that reflect the actual operating state of the valve, and the extracted residual features have both temporal integrity and fault correlation. This avoids the introduction of invalid and interference features, providing a real, reliable, and high-quality feature data source for subsequent in-depth mining of fault features and model training.
[0017] (2) A temporal convolutional network model is constructed, employing a convolutional block design that combines causal convolution with multi-scale dilation coefficients. This model can fully capture the short-distance and long-distance dependencies of valve fault residual features in the time dimension, completely preserving the temporal correlation and staged patterns of residual features, which aligns with the continuous action sequence characteristics of valve startup, displacement change, and sealing tightening. Simultaneously, the model adopts a mini-batch gradient descent training strategy and introduces regularization techniques such as weight decay and Dropout, effectively improving the model's generalization ability and avoiding overfitting. It can deeply extract and identify patterns in the residual features of different action stages and different physical quantities of the valve, significantly improving the basic accuracy of valve fault mechanism and structural part classification, thus laying a model foundation for accurate fault diagnosis.
[0018] (3) An attention-based temporal convolutional network model is adopted. An ECA attention module is embedded in the basic temporal convolutional network, and a pyramid pooling layer is introduced. This achieves precise enhancement and multi-scale fusion of fault features, resulting in superior fault diagnosis performance. The ECA attention module, through channel weighting, automatically identifies and enhances the weights of fault-sensitive features while suppressing invalid features caused by operating condition interference, allowing the model to focus more on core fault-related features. The pyramid pooling layer employs a multi-scale global average pooling strategy, compressing the temporal dimension while fully preserving the multi-scale information of fault features, effectively compensating for the limitations of single-scale feature extraction. The combination of these two technologies with the basic temporal convolutional network enables the model to more accurately and comprehensively uncover the core patterns of fault features. Combined with the parallel fault mechanism and structural part classification branches in the output layer, this further improves the accuracy of fault identification and the precision of structural part localization. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the steps of an artificial intelligence-based valve fault diagnosis method proposed in this invention. Figure 2 This is a framework diagram of the temporal convolutional network model based on the attention mechanism in the valve fault diagnosis method based on artificial intelligence proposed in this invention; Figure 3 This is a hierarchical diagram of the steps involved in obtaining valve fault feature data in an artificial intelligence-based valve fault diagnosis method proposed in this invention. Detailed Implementation
[0021] 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.
[0022] Please see Figures 1-3 The present invention provides a technical solution: a valve fault diagnosis method based on artificial intelligence.
[0023] Step S1: Construct the mechanistic semantic skeleton of the valve, and obtain the valve's theoretical response sequence based on the mechanistic semantic skeleton.
[0024] To construct the mechanistic semantic skeleton of a valve, a dedicated mechanistic skeleton is first built based on the actual structural type and actuation form of the target valve. The mechanistic skeleton includes five core components: valve core or valve plate motion constraints, valve stem force transmission chain, actuator output characteristics, sealing and clamping section characteristics, and flow channel resistance characteristics.
[0025] In the process of building the mechanism framework, based on the actual operation observation results of the physical valve on site, the complete action stage of the valve is broken down into three continuous and interconnected action stages with quantifiable and definable stage boundaries: starting to overcome static friction, continuous displacement change, and sealing and tightening to form termination.
[0026] The physical characteristics of the mechanism skeleton correspond to each action stage in coordination with the physical laws of valve action. A single physical characteristic can play a role across multiple action stages, enabling the mechanism skeleton to be quantitatively explained in stages according to the divided action stages, and realizing a precise staged correspondence between the mechanism skeleton and the actual valve action process.
[0027] It should be noted that a single physical characteristic can function across multiple action stages, allowing the mechanistic framework to be quantitatively explained in stages according to the defined action stages. The following calibration is based on the common industrial operating conditions (medium temperature water, working pressure 1.0 MPa) of the DN50 and PN16 electric linear control valves, specifically illustrating the cross-stage numerical performance and synergistic effects of each physical characteristic. For example, the actuator output characteristic dominates the power output throughout the entire process, providing the core driving force for valve action. In the initial stage of overcoming static friction, it outputs an initial driving force of 300N to overcome the static friction of the valve core and initiate the action. In the stage of continuous displacement change, it linearly outputs a gradual driving force of 200N-250N as the valve core displacement increases from 5mm to 50mm, adapting to the power requirements of uniform valve core displacement. In the stage of sealing and clamping termination, it outputs a constant clamping driving force of 350N to meet the force requirements of the sealing pair. This characteristic continuously exerts its power output function across three action stages.
[0028] It should be noted that, during the construction of the mechanism framework, corresponding quantitative calculation models were established for five core physical characteristics: valve core or valve plate motion constraints, valve stem force transmission chain, actuator output characteristics, sealing and clamping section characteristics, and flow channel resistance characteristics. The time variable is t, and the total time for a single complete valve action is... , The valve core or valve plate motion constraint module constructs a time-series calculation model for displacement trajectory and limiting range based on second-order dynamic differential equations. The core equation is... ,in This refers to the real-time displacement of the valve core or valve plate. The equivalent mass of the valve core or valve plate. Let be the damping coefficient of the valve core movement. This refers to the stiffness of the internal spring of the valve. This is the net force acting on the valve core or valve plate, and , The effective driving force acting on the valve core, The frictional force experienced by the valve core is calculated using an extended Coulomb friction model that includes static friction, dynamic friction, and viscous friction, let v(t) = v(t) is the instantaneous velocity of the valve core, and its expression is: ; in, This represents the maximum static friction force of the valve core. For the dynamic friction force of the valve core (satisfying) < Let b be the viscous friction coefficient of the valve core, and sgn() be the sign function. When the valve core is stationary, the frictional force is opposite to the net external force attempting to push the valve core and its magnitude does not exceed the maximum static frictional force. When the valve core is moving, the frictional force is the sum of the kinetic friction component opposite to the direction of motion and the viscous friction component proportional to the velocity and opposite to it. For fluid forces, the calculation is as follows: , This is the effective force-bearing area of the valve core. The pressure difference between the upstream and downstream sides of the valve. For sealing force; the valve stem transmission chain module constructs a conversion model of transmission efficiency and power transmission based on power transmission efficiency, with the core equation being: ,in The force transmission efficiency of the valve stem transmission chain. , The actuator outputs force; the actuator output characteristic module constructs a time-series calculation model of output force and action response speed based on input-output characteristics, with the core equation being: ,in For actuator gain coefficient, To input control signals to the actuator, if the effect of displacement on the output force needs to be considered, it can be expanded to... The sealing and clamping section characteristic module is based on linear elasticity to construct a calculation model relating clamping force, deformation, and displacement. The core equation is: ,in This is the stiffness coefficient of the sealing pair. For the sealing contact displacement threshold, when hour, The sealing properties are not activated when When the sealing characteristic is activated, the clamping force increases linearly with the increase of displacement; the flow resistance characteristic module constructs a conversion model based on the fluid dynamics flow coefficient method to match the flow area, pressure loss, and valve core displacement, with the core equation being: ,in The flow rate of the medium through the valve. The flow coefficient is a function of the valve core displacement. The actual density of the medium under operating conditions, and the flow area. and They show a linear positive correlation. , This is the flow channel structure coefficient, calibrated by the valve flow channel design parameters.
[0029] When the mechanism framework simulates the complete action process of a physical valve starting up, overcoming static friction, undergoing continuous displacement change, and terminating with sealing compression, it follows the action semantics and stage division criteria aligned with the physical valve. At each action stage, it performs coordinated, time-sequential numerical solutions based on calibrated module parameters and physical laws. That is, it solves all the core equations sequentially according to the time step, obtaining the physical quantity values at each time node. The theoretical displacement response curve is obtained by combining the second-order dynamic differential equations of the valve core or valve plate motion constraint module with the actuator output characteristic module. Valve stem transmission chain module calibration Calculated By performing a collaborative solution, the displacement values of the valve core or valve plate at each time point are obtained sequentially. The valve is formed by connecting the various stages of its operation along the time axis, accurately reflecting the change in displacement over time during each stage of the valve's operation under healthy conditions. The theoretical drive output curve is obtained by solving the core equations of the actuator output characteristic module. Furthermore, combined with the calibrated force transmission efficiency correction coefficient of the valve stem force transmission chain module... Calculated The actuator output force values at each time point are obtained sequentially and connected in series according to the action time axis to accurately reflect the change law of driving force of valve in each action stage under healthy conditions. The theoretical upstream and downstream pressure curves are first obtained by the flow channel resistance characteristic module based on the displacement of valve core or valve plate. Calculate the corresponding flow area With flow coefficient Then, by substituting the values into the core equation of the flow channel resistance and solving it time-series, the pressure difference between the upstream and downstream valves at each time point is obtained. The data is generated in series according to the action time axis, which accurately reflects the change of upstream and downstream pressure over time in each action stage of the valve under healthy conditions.
[0030] After semantic alignment of the mechanism framework and the action phase, parameter convergence is performed on the mechanism framework. The core objective of parameter convergence is to minimize the deviation between theoretical calculations and actual collected values. First, a period of 24 hours of continuous, fault-free, and stable operation of the target valve is selected as the initial healthy operating window. Within this window, actual operating data of displacement response, drive output change trends, and upstream and downstream pressure change trends generated during at least 50 complete actions of the target valve are collected. The actual displacement at time t of the h-th action is denoted as... The actual output force of the actuator is The actual pressure difference between the upstream and downstream is h=1,2,..,50, the actual operational data collected is split according to the action stage, the temporal characteristics and quantized values of the data in each stage are retained, and then the loss function is constructed: ; in, For loss function, The set of model parameters for the mechanistic framework, including , , , , , , Wait for all parameters to be calibrated, The number of actions collected. , , The weighting coefficients are determined based on the engineering importance of each physical quantity, using the Analytic Hierarchy Process (AHP). =0.3, =0.3, =0.3.
[0031] It should be noted that in the loss function , , The linear weighting coefficients are used to balance the numerical magnitude differences between displacement, actuator output force, and upstream / downstream pressure difference, while also matching the engineering importance of each physical quantity. The linear form allows for flexible adjustment of the contribution percentage of each deviation to the total loss. It is the weighted squared term of the valve core / valve plate displacement. The real-time displacement of the valve core / valve plate at time t is calculated based on the mechanistic framework theory. The formula represents the actual displacement of the valve core / plate at time t during the h-th valve action. It assigns a weight of 0.3 to the squared deviation between the theoretical and actual displacement dimensions, reflecting the simulation accuracy of the valve core motion constraint module. It is the weighted squared deviation term of the actuator's output force. The actuator output force at time t is calculated using the mechanistic framework theory. The formula represents the actual output force of the actuator at time t during the h-th valve action, and assigns a weight of 0.3 to the squared deviation between the theoretical and actual power output dimensions after quantization. This reflects the simulation accuracy of the actuator output characteristic module and the valve stem transmission chain module. It is the weighted squared deviation of the pressure difference between the upstream and downstream sides of the valve. The pressure difference between the upstream and downstream of the valve at time t is calculated based on the mechanistic framework theory. The formula represents the actual pressure difference between the upstream and downstream of the valve at time t during the h-th valve action. After squaring the theoretical and actual deviations of the flow channel characteristic dimension, the formula assigns a weight of 0.3 to reflect the simulation accuracy of the flow channel resistance characteristic module. All three weights are calibrated to 0.3 using the analytic hierarchy process, indicating that the valve core displacement, actuator output force, and upstream and downstream pressure difference of the valve are of basically equal importance in the simulation of the valve mechanism skeleton. During the parameter convergence process, the deviations of the three will be balanced and corrected, so that each module of the mechanism skeleton can synchronously fit the actual characteristics of the physical valve.
[0032] By leveraging the repeatable operational patterns exhibited by the target valve through multiple actions, the gradient descent method (learning rate 0.001, maximum iterations 1000) is used to iteratively adjust and optimize the various characterization parameters of the five core physical properties of the mechanistic framework, targeting the motion constraints of the valve core or valve plate. , , Quantitative parameters for limit deviation and trajectory offset are used to adjust the force transmission efficiency of the valve stem transmission chain. The correction factor is adjusted according to the output characteristics of the actuator. Matching parameters such as output force and response speed are adjusted to suit the characteristics of the sealing and clamping section. The correlation coefficient between constant clamping force and deformation is adjusted to suit the flow channel resistance characteristics. The conversion parameters between flow area and pressure loss are iteratively adjusted by comparing the theoretical data of displacement response, drive output change trend, and upstream and downstream pressure change trend of the mechanism skeleton at each action stage with the actual operating data of the physical valve under the same action semantics. The average deviation between the theoretical and actual data at each stage is calculated. If the deviation exceeds the preset thresholds of 0.02mm displacement deviation, 5N drive force deviation, and 0.01MPa pressure deviation based on valve manufacturing precision level and industrial operation and maintenance standards, the corresponding physical characteristic characterization parameters are adjusted according to the gradient descent direction of the loss function until the deviation values of all physical quantities output by the mechanism skeleton at each action stage corresponding to the same action semantics are all lower than the preset thresholds, and the deviation fluctuation range is ≤0.001mm, 0.5N, and 0.001MPa in 20 consecutive action simulations. At this point, the loss function... The convergence to the minimum value completes the parameter convergence of the mechanism skeleton, ultimately forming a mechanism skeleton that is semantically aligned with the actual valve action and has completed parameter calibration. This mechanism skeleton serves as a theoretical reference that can be continuously calibrated. Its valve theoretical response sequence (including theoretical displacement response curve, theoretical drive output curve, and theoretical upstream and downstream pressure curve) output by the formula solution provides a unique and reliable theoretical benchmark for subsequent residual construction and pattern matching work.
[0033] Step S2: Collect historical valve fault response sequences, calculate the difference between the historical valve fault response sequences and the theoretical valve response sequences using the improved dynamic time warping method, and calculate the valve fault residual sequence; extract features from the valve fault residual sequence to obtain valve fault feature data.
[0034] The theoretical valve response sequence output in step S1 (t) marked with an asterisk (*) includes theoretical displacement. (t), Output force of theoretical execution mechanism (t), theoretically, the pressure difference between upstream and downstream (t); Historical valve failure response sequence (t) is marked with the superscript "act" and includes the actual displacement. (t) Output force of the actual implementing agency (t), actual upstream and downstream pressure difference (t); according to the three action stages defined in step S1, i=1,2,3, where i is the index of the action stage.
[0035] For each type of valve theoretical response sequence, a derivative dynamic time warping algorithm based on phase compensation is used to eliminate the differences in action rhythm and the singularity at the beginning and end points caused by small fluctuations in operating conditions. First, phase compensation is performed, and the valve theoretical response sequence for the i-th action stage is calculated. With the historical valve failure response sequence The initial alignment distance , and then the theoretical valve response sequence is offset by a step size from 0 to 2π in terms of the phase angle θ to obtain the offset theoretical valve response sequence , θ = 0, , ,..., 2π
[0036] Calculate the alignment distance after each offset = ( , ), and filter out all θ that satisfy < , and select the phase angle corresponding to the minimum distance as the optimal phase compensation angle, and calculate the optimal time offset , and perform phase compensation on the theoretical valve response sequence to obtain the phase-compensated theoretical valve response sequence , = .
[0037] For the phase-compensated theoretical valve response sequence and the historical valve failure response sequence , the derivatives at each time step are calculated respectively by the central difference method to obtain the derivative of the theoretical valve response sequence (1 < j < J, j is the index of the theoretical valve response sequence, J is the length of the theoretical valve response sequence), the derivative of the historical valve failure response sequence (1 < j2 < J2, j2 is the index of the historical valve failure response sequence, J2 is the length of the historical valve failure response sequence), and the distance matrix is constructed by replacing the Euclidean distance with the derivative distance, and the elements are ; based on the distance matrix, the optimal alignment path is found by the dynamic programming method, and the optimal alignment relationship between each data point of the historical valve failure response sequence and the theoretical valve response sequence is solved, that is, the alignment path Γ. According to this path Γ, the historical valve failure response sequence is resampled based on the sampling length of the theoretical valve response sequence, and the theoretical valve response sequence is synchronously calibrated at equal intervals. The resampling is specifically as follows: according to the corresponding relationship of each data point mapped in the alignment path Γ, the mean value of the many-to-one data points mapped in the path of the historical valve failure response sequence is taken for downsampling, and the one-to-many data points mapped in the path are upsampled by linear interpolation to ensure that the sampling length and time nodes of the resampled historical valve failure response sequence are exactly matched with the theoretical valve response sequence, and the aligned historical valve failure response sequence (t) and the theoretical valve response sequence .
[0038] After alignment, the original residuals of various physical quantities in the i-th stage are calculated sequentially. , The original residuals were normalized to obtain the valve fault residual sequence. .
[0039] Based on the valve fault residual sequence of the i-th action stage The staged features were extracted to construct residual features. The extracted features included two categories: global time-domain features (mean, variance, trend slope, and number of abrupt change points, where abrupt change points are represented as...). - The mutation threshold, preset at 5%, is used to characterize the statistical and trend properties of the residuals throughout the entire period. Local sliding window features (local means and trend slopes extracted through a sliding window to capture detailed fluctuations in the residuals within a period; the length of the sliding window is a fraction of the total time length T) are also considered. The step size is equal to the total time length. Subsequently, all normalized residual sequences of stage i are correlated and integrated with their corresponding global and local feature values. Finally, all three action stages are sequentially concatenated to form the complete residual feature R={ , , }, Let R be the residual feature of the i-th action stage. This complete residual feature R is the residual representation unit, which serves as the unified input unit for subsequent template construction and fault matching.
[0040] Failure mechanisms were categorized and corresponding samples were collected. Based on typical failure modes of industrial valves, the failure mechanisms were divided into M non-overlapping categories. (e.g., valve stem wear, sealing surface damage, etc.), for each type Collect Q (Q≥30) residual characterization unit samples with the same mechanism and the same working conditions (all samples are from engineering-verifiable fault conditions).
[0041] Based on this type of sample, a staged residual structure template for the m-th type of fault is constructed. The specific method is as follows: A statistical aggregation method is used to calculate the time mean and standard deviation of the normalized valve fault residual sequence for the same action stage of Q samples at each time point. The mean ± 3 times the standard deviation constitutes the typical trend interval of the residual for that stage, covering 99.7% of the sample data. For the global time-domain features (mean, variance, trend slope, number of abrupt change points) and the local sliding window features (local mean, local trend slope), the minimum and maximum values of the corresponding features for Q samples are calculated respectively. The range of [minimum value, maximum value] is used as the value range of the feature template to ensure that the template can cover the residual feature fluctuation range of faults with the same mechanism.
[0042] Staged residual structure template The final complete structure consists of a feature set integrated according to the time sequence of three action stages. Specifically, it comprises three parts, each corresponding to one action stage: 1. The trend interval of the normalized residual sequence for each action stage (i.e., the interval formed by the mean ± 3 times the standard deviation of the mean calculated for Q samples at each time point in that action stage, used to characterize the temporal distribution pattern of the residuals in that stage); 2. The range of global temporal features for each action stage (corresponding to four types of features: mean, variance, trend slope, and number of abrupt change points; each type of feature is represented by [minimum value, maximum value], depicting the overall statistical and trend characteristics of the residuals in that stage); 3. The range of local sliding window features for each action stage (corresponding to two types of features: local mean and local trend slope; each type of feature is represented by [minimum value, maximum value], capturing the detailed fluctuation characteristics of the residuals in that stage). These three parts are integrated sequentially according to the action time sequence, forming a fixed-dimensional staged residual structure template. It fully covers the residual structure characteristics of the m-th type of fault in each action stage, providing a clear and verifiable template basis for subsequent fault matching.
[0043] Based on residual characterization unit samples of K (preferably 5-10 consecutive action cycles) consecutive action cycles (each action cycle includes 3 action stages: starting to overcome static friction stage → continuous displacement change stage → sealing and tightening to form termination stage), a residual evolution trajectory template for the m-th type of fault is constructed. The specific calculation and construction method is as follows: Quantify the characteristic change law of the fault from the initial stage to the later stage, and define the evolution feature vector of each cycle (containing the global time domain features of each action stage and each physical quantity. One action cycle contains 3 action stages, and each action stage has 4 global time domain features, so each action cycle contains 12 global time domain features. Therefore, each physical quantity contains 12 global time domain features in one action cycle). For each physical quantity y (displacement, output force F, pressure difference) For P, taking the action cycle number k as the independent variable and the global time-domain feature of the corresponding cycle as the dependent variable, for each of the 12 global time-domain features of the physical quantity, an evolution trend function is fitted, and the evolution trend function of each feature is obtained through linear fitting: ( This is the evolutionary trend coefficient. These are the initial eigenvalues. (This is the evolution fit value for the k-th action cycle), only the fit determination coefficient is retained. To ensure that the evolutionary patterns are significant.
[0044] Residual evolution trajectory template The final complete structure consists of: a set of dynamic evolutionary features integrated sequentially according to three action stages, and a staged residual structure template. One-to-one correspondence, specifically including three core parts: 1. Evolutionary trend function coefficients of each action stage and each global time-domain feature. Initial eigenvalues Coefficient of determination 2. Mean data for each action stage and each global time-domain feature per action cycle (i.e., the actual mean value of the feature corresponding to each cycle in K consecutive action cycles, used to reconstruct the original trajectory of feature evolution); 3. Allowable fluctuation range for each action stage and each global time-domain feature (i.e., the range of the mean value of the feature corresponding to K consecutive action cycles ± 3 times the standard deviation, used to define the normal fluctuation boundary in the evolution process of faults with the same mechanism and eliminate the interference of small fluctuations in operating conditions). The above three parts are integrated in an orderly manner according to action stage and feature type to form a residual evolution trajectory template. This fully characterizes the dynamic evolution of the m-th type of fault from its initial to its later stages, providing a dynamic template for subsequent fault severity assessment.
[0045] Establish a one-to-one mapping relationship between residual form and fault mechanism, structural part, and maintenance and inspection method, and define the mapping function. This function is calibrated using engineering verification data: if The middle seal is pressed to form the termination section. The mean of the normalized residuals of the pressure difference exceeded three times the standard deviation of the healthy sample, and Corresponding feature evolution trend coefficient The cycle is then mapped to "damage to the sealing surface," corresponding to the structural parts. "Valve core and seat sealing pair"; if starting to overcome static friction section The mean of the normalized residuals of the driving force is significantly higher, and the evolution trend coefficient is also higher. The cycle is mapped to "insufficient power of the actuator", corresponding to the structural part "output end of the actuator".
[0046] All Residual structure template corresponding to the type of fault Fault residual evolution trajectory template and the associated fault mechanism tags Structural component labels Integrate the data to form valve fault characteristic data. All template parameters in the library are determined through statistical aggregation and engineering calibration, and are verifiable in engineering.
[0047] Step S3: Use the valve fault feature data as the training set to train the attention-based temporal convolutional network model to obtain the trained temporal convolutional network model.
[0048] A temporal convolutional network model is constructed, which, based on an attention mechanism, includes an input layer, a temporal convolutional module, an ECA attention module, a pyramid pooling layer, a fully connected layer, and an output layer. This model embeds an ECA attention module and introduces a pyramid pooling layer on top of a traditional temporal convolutional network (TCN). While preserving the correlation of residual temporal features, it enhances the weights of key channel features, improving the classification accuracy of fault mechanisms and structural components.
[0049] From residual structure template Normalized residual sequences of three types of physical quantities (displacement, actuator output force, and upstream-downstream pressure difference) × three action stages (starting to overcome static friction, continuous displacement change, and sealing and tightening to form termination) are extracted. The time length of each type of sequence is fixed at 128 (corresponding to the number of sampling points for a single complete valve action). After being spliced according to the "physical quantity - action stage" time sequence, a residual structure feature matrix with a dimension of 9×128 is formed; Evolution trajectory feature extraction: from the fault residual evolution trajectory template The evolutionary trend coefficients 'a' and initial feature values 'b' corresponding to the above 9 sets of residual sequences are extracted, resulting in a total of 18 scalar features (9 sets × 2 parameters). These are then flattened into an 18-dimensional evolutionary trajectory feature vector. Feature fusion: The 9×128 residual structure feature matrix and the 18-dimensional evolutionary trajectory feature vector are concatenated along the feature dimensions to finally form a 27×128 dimension sample input feature. (27 = 9 + 18, 128 is the timing length); Tag construction: Connecting fault mechanism tags to the pattern library (8 categories: valve stem wear, sealing surface damage, insufficient actuator power, valve core jamming, valve seat deformation, packing leakage, abnormal pressure difference, no fault) are converted into an 8-dimensional unique heat tag vector. Label the structural parts (8 categories: valve stem, valve core and seat sealing pair, actuator output end, valve core, valve seat, stuffing box, differential pressure sensor, and fault-free) are converted into 8-dimensional unique heat tag vectors. The module ultimately outputs a training sample set for 8 types of faults, containing 27×128 input features. With the corresponding ( , The label pairs serve as the sole data source for the model's input layer.
[0050] The input layer receives 27×128 sample input features output by the sample construction module. LayerNorm normalization is performed on the input features to obtain a feature map with a size of 27×128.
[0051] The temporal convolution module contains four convolutional blocks. The first convolutional block takes the 27×128 feature map output from the input layer as input, uses 64 causal convolutional kernels of size 3×1 (3 for the temporal window length, 1 for the feature dimension window), with a dilation factor of 1. After the convolution operation, a 64-dimensional bias term b1 is added, followed by a ReLU activation function, outputting a convolutional feature map of size 64×128. ; The second convolutional block takes the 64×128 feature map output from the first convolutional block as input, uses 64 causal convolutional kernels of size 3×1 with a dilation factor of 2, adds a 64-dimensional bias term b2 after the convolution operation, and then follows a ReLU activation function to output a convolutional feature map of size 64×128. ; The third convolutional block: It takes the 64×128 feature map output from the second convolutional block as input, uses 64 causal convolutional kernels of size 3×1 with a dilation factor of 4, adds a 64-dimensional bias term b3 after the convolution operation, and then follows a ReLU activation function, outputting a convolutional feature map of size 64×128. ; The fourth convolutional block takes the 64×128 feature map output from the third convolutional block as input, uses 64 causal convolutional kernels of size 3×1 with a dilation factor of 8, adds a 64-dimensional bias term b4 after the convolution operation, and then follows a ReLU activation function to output a convolutional feature map of size 64×128. .
[0052] The ECA attention module uses the 64×128 feature map output by the temporal convolution module. As input, the weights of fault-sensitive features are enhanced through channel weighting, and the following operations are performed internally in sequence: First, global average pooling is performed on the 128-dimensional temporal features of each channel, compressing the 64×128 feature map into a 64×1 channel feature vector. A 1D convolutional kernel of size 3 is used to convolve the 64×1 channel feature vector (stride 1, no padding). The convolution result is mapped to the [0,1] interval using a Sigmoid activation function, outputting a 64×1 attention weight vector. The attention weight vector is then compared with the convolutional feature map. Attention-enhanced features that are multiplied element-wise but still output a size of 64×128.
[0053] The pyramid pooling layer takes the 64×128 attention-enhanced features output by the ECA attention module as input and employs a 4-scale global average pooling strategy to compress the temporal dimension and retain multi-scale features: 1×1 pooling: performs 1×128 global average pooling on the 64×128 feature map, outputting a 64×1 feature vector; 2×2 pooling: performs 1×64 average pooling (stride 2) on the 64×128 feature map, outputting a 64×1 feature vector; 4×4 pooling: performs 1×32 average pooling (stride 4) on the 64×128 feature map, outputting a 64×1 feature vector; 8×8 pooling: performs 1×16 average pooling (stride 8) on the 64×128 feature map, outputting a 64×1 feature vector; the pooling results of the above 4 scales are concatenated along the channel dimension to finally output a one-dimensional feature vector with dimension 256.
[0054] The fully connected layer: This layer contains two fixed-dimensional linear transformations, taking the 256-dimensional one-dimensional feature vector output from the pyramid pooling layer as input to extract high-level fault features: The first fully connected layer: Performs a linear transformation using a 256×512 weight matrix W1 and a 512-dimensional bias term b1, outputting a 512-dimensional feature vector. The second fully connected layer: As input, a linear transformation is performed using a 512×256 weight matrix W2 and a 256-dimensional bias term b2, followed by a ReLU activation function to introduce non-linearity, ultimately outputting a 256-dimensional high-level feature vector. .
[0055] The output layer contains two parallel classification branches, both outputting 256-dimensional high-level feature vectors from fully connected layers. For input, the labels directly correspond to the valve fault characteristic data. , Fault mechanism classification branch: A linear transformation is performed using a 256×8 weight matrix WC and an 8-dimensional bias term bC, followed by a Softmax activation function, outputting an 8-dimensional fault mechanism prediction probability vector. Each element in the vector corresponds to the predicted probability of a type of fault mechanism in Lib (valve stem wear, sealing surface damage, insufficient actuator power, valve core jamming, valve seat deformation, packing leakage, abnormal pressure difference, no fault).
[0056] Structural Part Classification Branch: A linear transformation is performed using a 256×8 weight matrix WP and an 8-dimensional bias term bP, followed by a Softmax activation function, outputting an 8-dimensional structural part prediction probability vector. Each element in the vector corresponds to the predicted probability of a fault-related structural part in Lib (valve stem, valve core and seat sealing pair, actuator output end, valve core, valve seat, stuffing box, differential pressure sensor, no fault).
[0057] The total loss function of the temporal convolutional network model is: ; Where Loss is the total loss function value. The cross-entropy loss function is used to classify the failure mechanism and measures the probability distribution of the failure mechanism predicted by the model. With true unique heat-coded labels The differences between them For the structural part classification loss, the cross-entropy loss function is also used to measure the probability distribution of the structural parts predicted by the model. With real labels The differences between them This is the weighting coefficient for the classification task, with a default value of 0.5.
[0058] The model is trained using a mini-batch gradient descent strategy, specifically configured as follows: the Adam optimizer is used, with an initial learning rate set to 1× The learning rate can be dynamically adjusted by multiplying it by a decay factor (e.g., 0.5) if the validation set loss does not decrease for five consecutive epochs. The total number of training epochs is set to 100 to ensure sufficient convergence, and the batch size is set to 32, meaning that 32 samples are randomly selected in each iteration to calculate the gradient and update the parameters. To prevent overfitting and improve the model's generalization ability, regularization techniques are introduced during training, including setting the weight decay (L2 regularization) coefficient to 1×10⁻ in the optimizer. 4 And introduce Dropout operation in fully connected layers (e.g., after the first fully connected layer), with a random drop rate set to 0.5.
[0059] Step S4: Collect real-time valve fault feature data and input it into the trained temporal convolutional network model to output valve fault results; based on the valve fault results, calculate the final fault confidence and classify the fault level, thereby realizing the diagnosis of valve faults.
[0060] The fault deviation features generated during the real-time operation of the valve (including the normalized residual sequences of three physical quantities—displacement, actuator output force, and upstream-downstream pressure difference—in the three action stages of starting to overcome static friction, continuous displacement change, and sealing and tightening to form the termination stage, as well as the core features such as the evolution trend coefficient and initial feature value of the corresponding residuals) are transformed into valve feature data with a dimension of 27×128 according to the feature splicing and dimension regularization method consistent with the model training stage. This valve feature data is then input into a temporal convolutional model with an ECA attention mechanism that has been trained and whose optimal parameters have been saved. Finally, the two parallel classification branches of the output layer synchronously output fault mechanism prediction probability vectors and structural part prediction probability vectors with a dimension of 8. The category corresponding to the maximum value of the two probability vectors is selected as the final judgment result, that is, the specific valve fault category and the associated structural part corresponding to the fault are output, thus completing the fault identification and accurate location of the valve's real-time operating status.
[0061] The overall failure probability is calculated using a weighted summation method. For the first 7 failure dimensions (m=1,2,...,7), the failure probability after "mechanism-location" fusion is calculated: ; in, Let be the overall failure probability of the m-th type of failure. The weight of the failure mechanism probability is 0.6 by default. This represents the weight of the probability of the structural part, with a default value of 0.4.
[0062] The maximum value of the fusion probability of the top 7 fault types is extracted as the core fault confidence score. The inherent severity level is determined by combining the fault type. For the eighth type of fault-free probability, the minimum value of the "fault-free mechanism probability" and the "fault-free location probability" is taken as the fault-free correction term. We take the minimum value of "probability of fault-free mechanism" and "probability of fault-free part" to ensure that the correction term is close to 1 and the severity is close to 0 only when both categories are judged to be fault-free.
[0063] The final fault confidence is obtained by combining the fault confidence and the no-fault correction term. The calculation formula is as follows: ; in, For the final fault confidence level, For core fault confidence, This is a fault-free correction item.
[0064] It should be noted that the final fault confidence level... This indicator represents the model's overall confidence level in the existence of a specific type of valve fault. It integrates the fusion fault probability of both the fault mechanism and the fault structure, and incorporates a fault-free correction term for cross-validation correction. It is a comprehensive quantitative representation of the dual-branch diagnostic results. The value only reflects the model's confidence in the existence of this type of fault and does not represent the actual severity of the fault itself. This indicator is an important basis for carrying out differentiated fault handling based on the inherent severity level of the fault type. The higher the value, the stronger the model's confidence in the existence of the fault, and the higher the priority of fault risk management and handling.
[0065] Based on the inherent severity level of the fault type and the final fault confidence. The system has two dimensions: it sets classification thresholds and corresponding engineering handling suggestions for valve failure scenarios that have been verified and adapted through engineering. Among them, the inherent severity level of the failure type is marked by the typical failure case library of industrial valves (minor failures such as slight packing leakage and abnormal pressure difference are considered minor failures; moderate failures such as valve stem wear and slight valve core jamming are considered moderate failures; and severe failures such as sealing surface damage, insufficient actuator power, and valve core jamming are considered severe failures). To determine the overall confidence level of the model regarding the existence of this type of valve failure, 0.1, 0.4, and 0.7 are the threshold values for different levels of model confidence. Based on the inherent severity of the failure, differentiated handling suggestions are provided, and the judgment rules are as follows: <0.1: The model is completely confident that the valve is fault-free, operating normally, and requires no intervention; 0.1≤ <0.4: The model determines that the valve has a certain type of fault with low confidence, indicating a potential risk. Based on the inherent fault level, only targeted monitoring and regular inspections are needed, without immediate intervention; 0.4≤ <0.7: The confidence level in the model indicates that the valve has a certain type of fault. It is considered that the risk of the fault is clear. Based on the inherent level of the fault, a planned shutdown and maintenance is required to prevent the fault from worsening during operation. ≥0.7: The model has a high confidence level and determines that the valve has a certain type of fault. It is believed that the risk of the fault has become apparent. Based on the inherent level of the fault, it is necessary to shut down the machine immediately and carry out maintenance to prevent production interruption or safety accidents.
[0066] It should be noted that the final confidence level of the fault... The grading thresholds are 0.1, 0.4, and 0.7: First, based on a large amount of valve health operation data, the final confidence level of the fault is analyzed. Based on the statistical distribution, the upper limit of "no faults" (e.g., 0.1) is set at the mean of healthy data plus several times the standard deviation (e.g., mean + 3). The location of the fault is used to distinguish between normal fluctuations in valve operating data and early-stage anomalies; secondly, by retrospectively analyzing the historical fault case database, different fault handling requirements (such as monitoring only, planned maintenance, and emergency shutdown) are identified. The values are clustered to define the numerical boundaries of low confidence (0.1-0.4), medium confidence (0.4-0.7), and high confidence (≥0.7). Finally, these preliminary thresholds are tested in a real production environment and fine-tuned based on on-site feedback such as early warning accuracy and maintenance response. Ultimately, customized confidence thresholds are formed that precisely match the safety requirements, maintenance costs, and risk tolerance of specific industrial scenarios.
[0067] Furthermore, based on the above method embodiments, the present invention also provides a fault diagnosis system, including a memory, a processor, and a computer program stored in the memory, which is adapted to be loaded and executed by the processor to implement the above-described artificial intelligence-based valve fault diagnosis method.
[0068] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, the phrase "comprising an element defined as..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0069] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A valve fault diagnosis method based on artificial intelligence, characterized in that: Includes the following steps: Step S1: Construct the mechanistic semantic skeleton of the valve, and obtain the theoretical response sequence of the valve based on the mechanistic semantic skeleton; Step S2: Collect historical valve fault response sequences, calculate the difference between the historical valve fault response sequences and the theoretical valve response sequences using the improved dynamic time warping method, and calculate the valve fault residual sequence; extract features from the valve fault residual sequence to obtain valve fault feature data; Step S3: Use the valve fault feature data as the training set to train the attention-based temporal convolutional network model to obtain the trained temporal convolutional network model. Step S4: Collect real-time valve fault feature data and input it into the trained temporal convolutional network model to output valve fault results; based on the valve fault results, calculate the final fault confidence and classify the fault level, thereby realizing the diagnosis of valve faults.
2. The valve fault diagnosis method based on artificial intelligence according to claim 1, characterized in that: The construction of the valve's mechanistic semantic skeleton includes the following specific steps: The mechanism framework includes valve core and valve plate motion constraints, valve stem force transmission chain, actuator output characteristics, sealing and clamping section characteristics, and flow channel resistance characteristics; the complete valve operation process is broken down into three operation stages: starting to overcome static friction, continuous displacement change, and sealing and clamping to form termination.
3. The valve fault diagnosis method based on artificial intelligence according to claim 2, characterized in that: The method of calculating the difference between the historical valve fault response sequence and the theoretical valve response sequence using the improved dynamic time warping method, and then calculating the valve fault residual sequence, includes the following steps: Calculate the theoretical valve response sequence during the i-th action stage. Compared with historical valve failure response sequences initial normalized distance , where i is the index of the action stage; Phase compensation is performed on the valve's theoretical response sequence to obtain the phase-compensated valve theoretical response sequence. Calculate the theoretical response sequence of the valve after phase compensation Compared with historical valve failure response sequences The derivative of the derivative is used to construct the distance matrix; Resampling based on the distance matrix yields the aligned historical valve fault response sequence. (t) and the aligned valve theoretical response sequence ; Aligned historical valve fault response sequence (t) and the aligned valve theoretical response sequence Subtracting and normalizing yields the valve fault residual sequence. .
4. The valve fault diagnosis method based on artificial intelligence according to claim 3, characterized in that: The phase compensation of the valve's theoretical response sequence includes the following steps: The theoretical valve response sequence under the i-th action stage According to the phase angle θ from 0 to 2π Step size offset, to obtain the offset valve theoretical response sequence. ; Calculate the normalized distance after each offset Filter out those that meet the requirements < All phase angles θ, and select the normalized distance after offset. minimum distance Corresponding phase angle As the optimal phase compensation angle, the optimal time offset is calculated based on the optimal phase compensation angle. Phase compensation is performed on the valve's theoretical response sequence to obtain the phase-compensated valve theoretical response sequence. , = .
5. The valve fault diagnosis method based on artificial intelligence according to claim 4, characterized in that: The construction of the distance matrix is specifically as follows: Construct a distance matrix, the elements of which are: ; in, This represents the value of an element in the distance matrix where row j is j2 and column j2 is j2. This is the derivative of the ith action phase and the 2nd sampling point in the historical valve fault response sequence. denoted as the derivative of the j-th sampling point in the i-th action stage of the valve theoretical response sequence, where j is the index of the sampling point in the valve theoretical response sequence, J is the length of the valve theoretical response sequence, j2 is the index of the historical valve fault response sequence, and J2 is the length of the historical valve fault response sequence.
6. The valve fault diagnosis method based on artificial intelligence according to claim 5, characterized in that: The process of extracting features from the valve fault residual sequence to obtain valve fault feature data includes the following steps: For the valve fault residual sequence of the i-th action stage Extract its global temporal features and local sliding window features, and then concatenate the global temporal features and local sliding window features in an orderly manner according to three action stages to form a complete residual feature; Based on residual characteristics, residual structure templates and residual evolution trajectory templates are calculated, and valve fault characteristic data are finally obtained.
7. The valve fault diagnosis method based on artificial intelligence according to claim 6, characterized in that: The step of using valve fault feature data as a training set to train an attention-based temporal convolutional network model to obtain a trained temporal convolutional network model includes the following specific steps: Construct a temporal convolutional network model based on an attention mechanism; The total loss function of the temporal convolutional network model is: ; Where Loss is the total loss function value. The loss function is used for classifying fault mechanisms. The loss function for classifying structural parts. For the weight coefficients of the classification task; The temporal convolutional network model is trained using the Adam optimizer. Valve fault feature data is used as the training set to train the attention-based temporal convolutional network model, resulting in a well-trained temporal convolutional network model.
8. The valve fault diagnosis method based on artificial intelligence according to claim 7, characterized in that: The construction of the attention-based temporal convolutional network model specifically involves: The attention-based temporal convolutional network model includes: an input layer, a temporal convolutional module, an ECA attention module, a pyramid pooling layer, a fully connected layer, and an output layer.
9. The valve fault diagnosis method based on artificial intelligence according to claim 8, characterized in that: The final fault confidence level is calculated based on the valve fault results, specifically as follows: Final Fault Confidence The calculation formula is as follows: ; in, For the final fault confidence level, For core fault confidence, This is a fault-free correction item.
10. A valve fault diagnosis system based on artificial intelligence, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-9.