Valve inner leakage detection method and device and valve detection equipment

By using machine learning models, especially support vector machine models, and utilizing valve pressure, temperature, and flow data, a dynamic parameter dataset is constructed. This solves the problem of large flow prediction errors in valves, enabling accurate flow prediction and internal leakage detection under complex operating conditions, and improving the reliability and safety of detection.

CN121323959APending Publication Date: 2026-01-13NAT NUCLEAR DEMONSTRATION POWER PLANT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511606275.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

In existing technologies, valve flow prediction relies on linear models or empirical formulas, which cannot effectively handle complex nonlinear relationships, resulting in large errors and high misjudgment rates in the flow prediction results.

Method used

By employing machine learning models, especially support vector machines, dynamic parameter datasets are constructed by collecting pressure, temperature, and flow data from valves. These datasets are then trained and tested, and model parameters are adjusted until the prediction accuracy reaches the set requirements, enabling real-time determination of whether the valve has internal leakage.

Benefits of technology

It enables accurate learning of flow nonlinearity under complex operating conditions, reduces prediction errors, improves the reliability and stability of internal leakage detection, and can quickly detect potential internal leakage, thus avoiding fluid waste and safety accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121323959A_ABST
    Figure CN121323959A_ABST
Patent Text Reader

Abstract

The invention discloses a valve inner leakage detection method and device and valve detection equipment. The valve inner leakage detection method comprises the steps that pressure data, temperature data and flow data of a valve are collected, and a detection data set is formed; the detection data set is preprocessed, and a dynamic parameter data set is obtained through calculation according to the pressure data, the temperature data and the flow data; dividing the dynamic parameter data set into a training set and a test set; training a machine learning model by using the training set, and determining initial parameters of the machine learning model; testing the prediction accuracy of the machine learning model by adopting the test set; if the prediction accuracy cannot meet the set requirement, adjusting set parameters in the machine learning model until the prediction accuracy meets the set requirement; and inputting the pressure data acquired in real time into the machine learning model to predict the flow of the valve, and judging whether the inner leakage condition exists in the valve or not. According to the embodiment of the invention, the accuracy of valve inner leakage detection can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of valve detection, and in particular to a valve inner leakage detection method, device and valve detection equipment. BACKGROUND

[0002] In an industrial fluid system, as a key component for regulating fluid, the performance stability of a valve is directly related to the safe operation of the system. Affected by various factors such as operation errors, material wear, chemical corrosion and natural aging of equipment, valve inner leakage accidents occur frequently, so it is particularly important to monitor and warn the valve flow in real time.

[0003] In the prior art, valve flow prediction is usually achieved by fitting a linear model or an empirical formula based on the pressure difference before and after the valve. The general steps are as follows: determining the fluid physical property parameters; collecting the pressure difference data before and after the valve; using the collected data to fit and correct the model parameters; collecting the pressure difference data under the new working condition and substituting it into the optimized model to calculate the flow.

[0004] However, such a model is usually based on fixed parameters and assumptions, and cannot effectively handle the nonlinear relationship existing in actual operation. In a fluid control system, the relationship between valve flow and pressure difference is affected by various factors, showing complex nonlinear characteristics. The existing linear model or empirical formula cannot accurately describe this relationship, resulting in large errors in the flow prediction results. SUMMARY

[0005] The embodiments of the present application provide a valve inner leakage detection method, device and valve detection equipment to solve the problem of large errors in valve flow prediction results.

[0006] To achieve the above technical problems, the present application adopts the following technical solutions:

[0007] In a first aspect, the embodiments of the present application provide a valve inner leakage detection method, comprising:

[0008] Collecting pressure data, flow data and temperature data under the current environment of the valve to form a detection data set;

[0009] Preprocessing the detection data set, and calculating a dynamic parameter data set according to the pressure data, the temperature data and the flow data;

[0010] Dividing the dynamic parameter data set into a training set and a test set;

[0011] Training a machine learning model using the training set to determine the initial parameters of the machine learning model;

[0012] Testing the prediction accuracy of the machine learning model using the test set;

[0013] If the prediction accuracy cannot meet the set requirement, adjusting a set parameter in the machine learning model until the prediction accuracy meets the set requirement.

[0014] Inputting the real-time collected pressure data into the machine learning model for valve flow prediction to determine whether the valve has an internal leakage.

[0015] Optionally, the machine learning model is a support vector machine model; wherein the support vector machine model is a nonlinear mapping relationship model constructed by a Gaussian kernel function.

[0016] Optionally, the dynamic parameter data set is calculated according to the pressure data, the temperature data, and the flow data, including:

[0017] According to the pressure data, a pressure difference between an upstream and a downstream of the valve and a pressure difference change rate are calculated.

[0018] According to the temperature data and the pressure difference, a temperature-corrected pressure difference is calculated.

[0019] According to the pressure difference, the pressure difference change rate, and the temperature-corrected pressure difference, an interaction feature matrix is calculated.

[0020] The pressure difference, the pressure difference change rate, the temperature-corrected pressure difference, and the interaction feature matrix constitute the dynamic parameter data set.

[0021] Optionally, the machine learning model is trained using the training set to determine initial parameters of the machine learning model, including:

[0022] According to a decision hyperplane weight vector, a penalty coefficient, a slack variable, and a number of training sets, a target function is constructed.

[0023] According to the decision hyperplane weight vector, the dynamic parameter data set, a decision hyperplane parameter, and the slack variable, a constraint condition is constructed.

[0024] According to the decision hyperplane weight vector, the dynamic parameter data set, and the decision hyperplane parameter, a decision hyperplane expression is constructed.

[0025] According to the target function, the constraint condition, and the decision hyperplane expression, iterative training is performed to obtain the initial parameters of the machine learning model.

[0026] Optionally, the inputting the real-time collected pressure data into the machine learning model for valve flow prediction to determine whether the valve has an internal leakage includes:

[0027] If the real-time collected pressure data falls within the internal leakage determination range set by the decision hyperplane expression, then the valve is determined to have internal leakage.

[0028] If the real-time collected pressure data does not fall within the internal leakage determination range set by the decision hyperplane expression, then it is determined that the valve does not have internal leakage.

[0029] Optionally, the preprocessing of the detection dataset includes:

[0030] The detection dataset is subjected to outlier removal, missing value imputation, and normalization.

[0031] Optionally, the method for determining whether the prediction accuracy meets the set requirements includes:

[0032] If the mean square error between the predicted flow rate data and the actual flow rate data of the valve is less than the set mean square error, and the fitting coefficient in the machine learning model is less than the set fitting coefficient, then the prediction accuracy meets the set requirements.

[0033] Optionally, before inputting the real-time collected pressure data into the machine learning model to predict valve flow and determine whether the valve has internal leakage, the method further includes:

[0034] The machine learning model is embedded into the valve control system.

[0035] Secondly, embodiments of the present invention also provide a valve internal leakage detection device, comprising:

[0036] The data acquisition module is used to collect pressure data, temperature data, and flow data from the valve to form a detection dataset;

[0037] The data processing module is used to preprocess the detection dataset;

[0038] The model training module is used to calculate a dynamic parameter dataset based on the pressure data, the temperature data, and the flow rate data; divide the dynamic parameter dataset into a training set and a test set; train the machine learning model using the training set, and determine the initial parameters of the machine learning model.

[0039] The data testing module is used to test the prediction accuracy of the machine learning model using the test set.

[0040] The parameter adjustment module is used to adjust the initial parameters in the machine learning model until the prediction accuracy reaches the set requirements if the prediction accuracy cannot meet the set requirements.

[0041] The flow prediction module is used to input real-time collected pressure data into the machine learning model to predict valve flow and determine whether the valve has internal leakage.

[0042] Thirdly, embodiments of the present invention also provide a valve testing device, comprising:

[0043] A data acquisition interface, which is used to acquire pressure data from the valve;

[0044] At least one processor; and

[0045] A memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the valve internal leakage detection method according to any one of claims 1-8.

[0047] This invention addresses the problems of traditional valve internal leakage detection, which relies on linear models or empirical formulas, struggles to handle complex nonlinear operating conditions, suffers from large prediction errors, and has a high false positive rate, by training a machine learning model using a dynamic parameter dataset. It achieves the beneficial effects of accurately learning the nonlinear flow patterns under complex operating conditions and effectively reducing prediction errors. Firstly, the preprocessing step ensures that the model training data better matches the detection requirements, reducing data noise interference with the detection results from the source, thereby lowering the false positive rate for internal leakage detection. Secondly, by validating and adjusting the machine learning model's parameters using a test set, overfitting or underfitting can be avoided, enabling the model to adapt to different valve types and operating condition fluctuations, maintaining stable prediction performance even in complex industrial environments, and preventing detection failure due to scene changes. Finally, by collecting pressure data in real time and inputting it into the optimized machine learning model, the presence of internal leakage in the valve can be quickly determined. Compared to traditional manual inspections or periodic checks, this allows for the immediate detection of potential internal leakage, preventing fluid waste and safety accidents.

[0048] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention 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 the content of the embodiments of the present invention and these drawings without creative effort.

[0050] Figure 1 This is a flowchart of a valve internal leakage detection method provided in an embodiment of the present invention;

[0051] Figure 2 This is a schematic diagram of the structure of a valve internal leakage detection device provided in an embodiment of the present invention;

[0052] Figure 3 This is a structural schematic diagram of a valve testing device provided in an embodiment of the present invention. Detailed Implementation

[0053] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0054] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0055] Figure 1 This is a flowchart of a valve internal leakage detection method provided by an embodiment of the present invention. The method can be executed by a valve internal leakage detection device, which can be implemented in hardware and / or software, and can be configured in valve testing equipment. Figure 1 As shown, the method includes the following steps:

[0056] S110: Collect valve pressure data, flow data, and temperature data under the current environment to form a detection dataset;

[0057] S120. Preprocess the detection dataset and calculate the dynamic parameter dataset based on the pressure data, temperature data, and flow data.

[0058] S130. Divide the dynamic parameter dataset into a training set and a test set;

[0059] S140. Train the machine learning model using the training set and determine the initial parameters of the machine learning model.

[0060] S150. Use a test set to test the prediction accuracy of the machine learning model;

[0061] S160. If the prediction accuracy cannot meet the set requirements, adjust the set parameters in the machine learning model until the prediction accuracy meets the set requirements.

[0062] S170. Input the real-time collected pressure data into the machine learning model to predict valve flow and determine whether there is internal leakage in the valve.

[0063] The data is collected by pressure sensors, specifically the pressure upstream and downstream of the valve; temperature data is collected by temperature sensors, specifically the current ambient temperature; and flow data is collected by flow meters, specifically the flow rate downstream of the valve. For example, the pressure sensors are differential pressure sensors with a range of 0-1 MPa and an accuracy of ±0.1%; the temperature sensors are thermometers with a range of -10℃ to 50℃ and an accuracy of ±0.2%; and the flow meters are ultrasonic flow meters with a range of 0-500 m³ / h and an accuracy of ±0.5%. Data is collected once per second for a set number of days, forming a multidimensional dataset containing time, pressure, temperature, and flow. Preprocessing the detection dataset ensures data quality and makes the detection results more accurate. The dynamic parameter dataset transforms the detected raw data into effective information that accurately reflects the valve's operating status and is suitable for machine model learning. For example, 80% of the dynamic parameter dataset is allocated as a training set, and the remaining 20% ​​as a test set.

[0064] This invention addresses the problems of traditional valve internal leakage detection, which relies on linear models or empirical formulas, struggles to handle complex nonlinear operating conditions, suffers from large prediction errors, and has a high false positive rate, by training a machine learning model using a dynamic parameter dataset. It achieves the beneficial effects of accurately learning the nonlinear flow patterns under complex operating conditions and effectively reducing prediction errors. Firstly, the preprocessing step ensures that the model training data better matches the detection requirements, reducing data noise interference with the detection results from the source, thereby lowering the false positive rate for internal leakage detection. Secondly, by validating and adjusting the machine learning model's parameters using a test set, overfitting or underfitting can be avoided, enabling the model to adapt to different valve types and operating condition fluctuations, maintaining stable prediction performance even in complex industrial environments, and preventing detection failure due to scene changes. Finally, by collecting pressure data in real time and inputting it into the optimized machine learning model, the presence of internal leakage in the valve can be quickly determined. Compared to traditional manual inspections or periodic checks, this allows for the immediate detection of potential internal leakage, preventing fluid waste and safety accidents.

[0065] Based on the above embodiments, optionally, the machine learning model is a support vector machine model; wherein, the support vector machine model is a nonlinear mapping relationship model constructed using a Gaussian kernel function.

[0066] Specifically, Support Vector Machine (SVM) models are suitable for machine learning models with small sample sizes and high-dimensional data, accurately finding the optimal decision boundary among complex features. In valve internal leakage detection scenarios, where dynamic parameter datasets have high dimensionality, SVM models effectively avoid overfitting while maintaining prediction accuracy. The Gaussian kernel function can map low-dimensional nonlinear data to a high-dimensional feature space, making the originally linearly inseparable relationship between parameters and flow rate linearly separable in the high-dimensional space. This allows SVM models to accurately learn these complex nonlinear laws, perfectly meeting the operational requirements of valve internal leakage detection.

[0067] This invention combines support vector machines and Gaussian kernel functions to address the nonlinear relationship between dynamic parameter datasets and valve flow rates. It leverages the high-dimensional data fitting advantages of support vector machine models while overcoming the limitations of linear models through kernel functions, ultimately improving the accuracy of flow prediction and the reliability of internal leakage detection.

[0068] Based on the above embodiments, optionally, a dynamic parameter dataset is calculated according to pressure data, temperature data, and flow data, including: calculating the pressure difference (denoted as ΔP) upstream and downstream of the valve and the rate of change of the pressure difference (denoted as ΔP) based on the pressure data. Based on the temperature data and pressure difference, the temperature-corrected pressure difference (denoted as ΔP') is calculated; based on the pressure difference, the rate of change of pressure difference, and the temperature-corrected pressure difference, the interaction feature matrix is ​​calculated; among them, the pressure difference, the rate of change of pressure difference, the temperature-corrected pressure difference, and the interaction feature matrix constitute the dynamic parameter dataset.

[0069] Specifically, the pressure difference is the pressure upstream of the valve minus the pressure downstream of the valve, and it is a parameter reflecting the resistance of fluid passing through the valve; the rate of change of pressure difference can capture the rhythm of pressure fluctuations and reflect the dynamic changes in operating conditions. The formula for calculating the rate of change of pressure difference is: In the formula: This represents the pressure difference at the current moment. ΔP represents the pressure difference at the previous moment; Δt represents the time interval. Temperature affects the density, viscosity, and other properties of a fluid, thus influencing the relationship between pressure difference and flow rate. Correcting ΔP using collected temperature data allows the parameters to better reflect actual operating conditions and improves versatility across different temperature environments. The formula for calculating temperature-corrected pressure difference is: ΔP' = ΔP(1 - k(T - T0)), where: T is the current ambient temperature; T0 is the preset reference temperature; and k is the temperature correction coefficient, representing the sensitivity of pressure to temperature changes. The interactive feature matrix consists of three types of matrix operation results: the product of the pressure difference matrix and the temperature-corrected pressure difference matrix, the product of the pressure difference rate of change matrix and the temperature-corrected pressure difference matrix, and the product of the pressure difference matrix and the pressure difference rate of change matrix.

[0070] The embodiments of the present invention transform the original data into features that can reflect complex nonlinear laws by using pressure difference, pressure difference change rate, temperature-corrected pressure difference, and interactive feature matrix, which can match the learning requirements of support vector machine model and improve model accuracy.

[0071] Based on the above embodiments, optionally, S140 includes: constructing an objective function based on the decision hyperplane weight vector, penalty coefficient, slack variables, and the number of training sets; constructing constraints based on the decision hyperplane weight vector, dynamic parameter dataset, decision hyperplane parameters, and slack variables; constructing a decision hyperplane expression based on the decision hyperplane weight vector, dynamic parameter dataset, and decision hyperplane parameters; and performing iterative training based on the objective function, constraints, and decision hyperplane expression to obtain the initial parameters of the machine learning model.

[0072] The objective function is expressed as follows: In the formula, w is the weight vector of the decision hyperplane. ε represents the margin of the decision hyperplane; the smaller the value, the larger the classification margin on both sides of the hyperplane, and the less prone the model is to overfitting; C is the penalty coefficient; the larger C is, the greater the penalty for classification errors, and the stricter the classification; the smaller C is, the higher the tolerance for classification errors, and the more lenient the classification; s is the size of the training set; ε i Let be a slack variable, representing the degree to which the training set deviates from the ideal classification boundary. The expression for the constraint is: , representing the acceptable classification range of the training set samples. In the formula, y iLet be the true label of the i-th training set, representing the two distinct categories of valve leakage or no leakage. For example, y i +1 represents internal leakage of the valve, y i A value of -1 indicates that the valve has no internal leakage; Let be the feature vector of the i-th input training set; b is the parameter of the decision hyperplane. The hyperplane expression is: The hyperplane divides the feature space into two parts, corresponding to y and y respectively. i =+1 and y i =-1 are two categories. During the iteration process, the decision hyperplane weight vector and decision hyperplane parameters are continuously adjusted until the objective function reaches its optimal value. The variable values ​​at this point are the initial parameters of the model.

[0073] This invention employs mathematical methods to find the optimal initial parameters for the adaptive model, enabling the model to possess good valve internal leakage detection capabilities from the initial stage. This reduces prediction errors caused by parameter deviations, thereby lowering the false positive and false negative rates for internal leakage detection.

[0074] Based on the above embodiments, optionally, S170 includes: if the real-time collected pressure data falls within the internal leakage determination interval set by the decision hyperplane expression, then it is determined that the valve has internal leakage; if the real-time collected pressure data does not fall within the internal leakage determination interval set by the decision hyperplane expression, then it is determined that the valve does not have internal leakage.

[0075] For example, if the real-time collected pressure data falls within... If the pressure data falls within the specified range, it is determined that the valve does not have internal leakage; if the real-time collected pressure data falls within the specified range... If the valve is within the specified range, it is determined that there is internal leakage. The internal leakage judgment range corresponding to the decision hyperplane expression is an objective threshold learned by the model through training data. Regardless of changes in the operating conditions corresponding to the real-time pressure data, the judgment standard always uses this hyperplane range as a unified benchmark, effectively avoiding the inconsistency in judgment results caused by differences in personnel experience in traditional manual inspections, and significantly improving the reliability of internal leakage judgment results. In addition, the setting of the decision hyperplane range has fully incorporated the complex operating conditions features, including pressure fluctuations and temperature changes, in the training set, and the model has been adapted to different scenarios through parameter adjustments during the optimization phase. Therefore, even if there are fluctuations in the operating conditions corresponding to the real-time pressure data, as long as the relevant dynamic parameters fall within the set range, it can accurately determine that there is internal leakage in the valve, without missed or false judgments due to complex operating conditions, ensuring that this judgment method is stable and effective in the complex environment of industrial sites.

[0076] Based on the above embodiments, optionally, the detection dataset is preprocessed, including outlier removal, missing value imputation, and normalization.

[0077] In industrial settings, sensor malfunctions, signal interference, or sudden operational changes can lead to outliers in the collected pressure and flow data, such as jumps far exceeding the normal range. Removing these outliers ensures the dataset accurately reflects the valve's actual operating status, reducing data noise interference with subsequent analysis. Simultaneously, data loss may occur during acquisition due to sensor offline issues or transmission interruptions. Directly deleting data with missing values ​​reduces sample size, disrupts data distribution, and results in the loss of crucial operational information. Imputing missing values ​​effectively maintains the integrity and continuity of the dataset, ensuring logical consistency in dynamic parameter calculations and preventing feature distortion due to data breaks. Furthermore, the original pressure, temperature, and flow data exhibit significant differences in units and numerical ranges. Normalization maps these different parameters to the same numerical range, such as [0,1], eliminating dimensional differences and ensuring equal weight for each parameter during model training. This guarantees the model can fairly learn the correlation between features and flow rates, thereby improving training efficiency and prediction stability. Specifically, the normalization expression is: In the formula, X represents the raw data of pressure difference and flow rate; Xmin represents the minimum value in the detection dataset; and Xmax represents the maximum value in the detection dataset.

[0078] This invention, through preprocessing, transforms potentially noisy, fragmented, and dimensionally inconsistent raw data into a high-quality dataset that is accurate, complete, and well-organized. This ensures the accuracy of dynamic parameter calculations, enabling machine learning models to efficiently learn the core principles of valve operation. It lays the foundation for subsequent model training, parameter optimization, and real-time internal leakage detection, ultimately improving internal leakage detection accuracy and reducing false positives and false negatives.

[0079] Based on the above embodiments, optionally, the method for determining whether the prediction accuracy meets the set requirements includes: if the mean square error (MSE) between the predicted flow data and the actual flow data of the valve is less than the set mean square error, and the fitting coefficient (R) in the machine learning model is less than the set mean square error, then... 2 If the coefficient of fit is less than the set coefficient of fit, then the prediction accuracy meets the set requirements.

[0080] The formula for calculating MSE is as follows: In the formula, x 实际 This represents the actual flow rate; x 预测 R represents the predicted flow rate. 2 The calculation formula is: In the formula, This represents the average actual flow rate. For example, the mean squared error (MSE) is set to 0.004, and the coefficient of performance (COP) is set to 1. The MSE directly reflects the degree of fit between the model's predicted and actual values. An MSE less than the set threshold indicates that the model's flow prediction error is within an acceptable range and will not cause the internal leakage detection to fail due to excessive numerical deviation. The closer R² is to 1, the more flow variation patterns the model can explain, and the better the fit. If the prediction accuracy does not meet the set requirements, the γ value in the kernel function and the penalty coefficient in the objective function are adjusted to obtain the optimal decision hyperplane expression.

[0081] In this embodiment of the invention, MSE and R 2 The combination of the two not only limits the upper limit of error in a single prediction, but also ensures the fitting quality of the overall pattern. It is more comprehensive than a single indicator and avoids situations where the MSE is small but the fit is poor, or the fit is good but the local error is large.

[0082] Optionally, prior to S170, the method further includes embedding a machine learning model into the valve control system.

[0083] The valve control system enables automatic valve adjustment, status monitoring, and fault response, ensuring stable pressure and controllable flow in the fluid system. By embedding a machine learning model into the valve control system, detection and judgment can be completed without manual intervention. Real-time collected pressure data is directly input into the system's built-in model, enabling rapid internal leakage detection. Once internal leakage is detected, the valve control system can automatically trigger preset control commands, such as adjusting valve opening, activating backup valves, and issuing shutdown warnings, thereby minimizing fluid waste and equipment damage caused by internal leakage and improving system safety.

[0084] Figure 2 This is a schematic diagram of a valve internal leakage detection device provided in an embodiment of the present invention. This valve internal leakage detection device can be implemented in hardware and / or software, and can be configured in valve testing equipment. See also... Figure 2 The device includes:

[0085] Data acquisition module 210 is used to collect pressure data, temperature data and flow data of the valve to form a detection dataset;

[0086] Data processing module 220 is used to preprocess the detection dataset;

[0087] The model training module 230 is used to calculate a dynamic parameter dataset based on pressure data, temperature data, and flow data; divide the dynamic parameter dataset into a training set and a test set; train the machine learning model using the training set and determine the initial parameters of the machine learning model.

[0088] Data testing module 240 is used to test the predictive accuracy of machine learning models using a test set;

[0089] The parameter adjustment module 250 is used to adjust the initial parameters in the machine learning model until the prediction accuracy meets the set requirements if the prediction accuracy cannot meet the set requirements.

[0090] The flow prediction module 260 is used to input real-time collected pressure data into a machine learning model to predict valve flow and determine whether the valve has internal leakage.

[0091] Based on the above embodiments, optionally, the model training module 230 is specifically used to: calculate the pressure difference and pressure difference change rate between the upstream and downstream of the valve based on the pressure data; calculate the temperature-corrected pressure difference based on the temperature data and the pressure difference; and calculate the interaction feature matrix based on the pressure difference, the pressure difference change rate, and the temperature-corrected pressure difference.

[0092] Based on the above embodiments, optionally, the model training module 230 is further specifically used to: construct an objective function based on the decision hyperplane weight vector, penalty coefficient, slack variables, and the number of training sets; construct constraints based on the decision hyperplane weight vector, dynamic parameter dataset, decision hyperplane parameters, and slack variables; construct a decision hyperplane expression based on the decision hyperplane weight vector, dynamic parameter dataset, and decision hyperplane parameters; and perform iterative training based on the objective function, constraints, and decision hyperplane expression to obtain the initial parameters of the machine learning model.

[0093] Based on the above embodiments, optionally, the flow prediction module 260 is specifically used to: determine that the valve has internal leakage if the real-time collected pressure data falls within the internal leakage determination interval set by the decision hyperplane expression; and determine that the valve does not have internal leakage if the real-time collected pressure data does not fall within the internal leakage determination interval set by the decision hyperplane expression.

[0094] Based on the above embodiments, optionally, the data processing module 220 is specifically used to: remove outliers, impute missing values, and normalize the detection dataset.

[0095] The valve internal leakage detection device is used to execute the valve internal leakage detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.

[0096] Figure 3 This is a structural schematic diagram of a valve testing device provided in an embodiment of the present invention. See also... Figure 3The valve detection device includes: a data acquisition interface 310 for acquiring valve pressure data; at least one processor 320; and a memory 330 communicatively connected to the at least one processor 320; wherein the memory 330 stores a computer program that can be executed by the at least one processor 320, and the computer program is executed by the at least one processor 320 to enable the at least one processor 320 to perform the valve internal leakage detection method of any of the above embodiments.

[0097] The data acquisition interface 310, processor 320, and memory 330 in the valve testing equipment can be connected via a bus 340. The memory 330 in this equipment, as a computer-readable storage medium, can be used to store one or more programs. These programs can be software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the valve internal leakage detection method provided in this embodiment of the invention (e.g., attached...). Figure 2 The modules in the device shown include: a data acquisition module 210, a data processing module 220, a model training module 230, a data testing module 240, a parameter adjustment module 250, and a flow prediction module 260. The processor 320 executes various functional applications and data processing of the terminal device by running software programs, instructions, and modules stored in the memory 330, thereby realizing the valve internal leakage detection method in the above method embodiment.

[0098] The memory 330 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory 330 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 330 may further include memory remotely located relative to the processor 320.

[0099] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0100] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method of detecting valve internal leakage, the method comprising: The method comprises the following steps: Collecting pressure data, flow data and temperature data of the valve under the current environment to form a detection data set; Preprocessing the detection data set and calculating a dynamic parameter data set according to the pressure data, the temperature data and the flow data; Dividing the dynamic parameter data set into a training set and a test set; Training a machine learning model using the training set to determine the initial parameters of the machine learning model; Testing the prediction accuracy of the machine learning model using the test set; If the prediction accuracy cannot meet the set requirements, adjusting the set parameters in the machine learning model until the prediction accuracy meets the set requirements; Inputting real-time collected pressure data into the machine learning model to predict the valve flow and determine whether the valve has an internal leakage.

2. The valve leak detection method of claim 1, wherein, The machine learning model is a support vector machine model; wherein the support vector machine model is a nonlinear mapping relationship model constructed by a Gaussian kernel function.

3. The valve leak detection method of claim 1, wherein, The calculation of the dynamic parameter data set according to the pressure data, the temperature data and the flow data comprises: According to the pressure data, the pressure difference and the pressure difference rate between the upstream and downstream of the valve are calculated; According to the temperature data and the pressure difference, the temperature corrected pressure difference is calculated; According to the pressure difference, the pressure difference rate and the temperature corrected pressure difference, an interaction feature matrix is calculated; Wherein, the pressure difference, the pressure difference rate, the temperature corrected pressure difference and the interaction feature matrix constitute the dynamic parameter data set.

4. The valve leak detection method of claim 1, wherein, The training of the machine learning model using the training set to determine the initial parameters of the machine learning model comprises: According to the decision hyperplane weight vector, the penalty coefficient, the relaxation variable and the number of training sets, a target function is constructed; According to the decision hyperplane weight vector, the dynamic parameter data set, the decision hyperplane parameter and the relaxation variable, a constraint condition is constructed; According to the decision hyperplane weight vector, the dynamic parameter data set and the decision hyperplane parameter, a decision hyperplane expression is constructed; According to the target function, the constraint condition and the decision hyperplane expression, iterative training is performed to obtain the initial parameters of the machine learning model.

5. The valve leak detection method of claim 4, wherein, The input of real-time collected pressure data into the machine learning model to predict the valve flow and determine whether the valve has an internal leakage comprises: If the real-time collected pressure data falls within the internal leakage judgment interval set by the decision hyperplane expression, it is determined that the valve has an internal leakage; If the real-time collected pressure data does not fall within the internal leakage judgment interval set by the decision hyperplane expression, it is determined that the valve does not have an internal leakage.

6. The valve leak detection method of claim 1, wherein, The preprocessing of the detection data set comprises: Performing outlier rejection, missing value interpolation and normalization processing on the detection data set.

7. The valve leak detection method of claim 1, wherein, The method for determining whether the prediction accuracy meets the set requirements comprises: If the mean square error of the predicted flow data of the valve and the actual flow data is less than a set mean square error, and the fitting coefficient in the machine learning model is less than a set fitting coefficient, the prediction accuracy meets the set requirement.

8. The valve leak detection method of claim 1, wherein, Before the valve flow prediction by inputting the real-time collected pressure data into the machine learning model and determining whether the valve has internal leakage, the method further comprises: embedding the machine learning model into a valve control system.

9. A valve leakage detection apparatus, characterized by, The method comprises: collecting pressure data, temperature data and flow data of the valve to form a detection data set; preprocessing the detection data set; calculating a dynamic parameter data set according to the pressure data, the temperature data and the flow data; dividing the dynamic parameter data set into a training set and a test set; training the machine learning model with the training set to determine initial parameters of the machine learning model; testing the prediction accuracy of the machine learning model with the test set; if the prediction accuracy cannot meet the set requirement, adjusting the initial parameters in the machine learning model until the prediction accuracy meets the set requirement; a flow prediction module for inputting real-time collected pressure data into the machine learning model to predict the flow of the valve and determine whether the valve has internal leakage.

10. A valve testing apparatus, characterized by The valve detection device comprises: a data acquisition interface for collecting pressure data of the valve; at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the valve internal leakage detection method of any one of claims 1-8.