A method and apparatus for detecting an internal leak in a valve

The internal leakage valve detection method combining stress wave analysis and RNN model solves the problems of high cost and inaccuracy of traditional detection methods, and realizes efficient and automated valve internal leakage detection, reducing production accidents and economic losses.

CN122192749APending Publication Date: 2026-06-12CHINA PETROLEUM & CHEMICAL CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA PETROLEUM & CHEMICAL CORP
Filing Date
2024-12-12
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Traditional methods for detecting internal leakage in valves are costly, complex to operate, and have inaccurate data processing, which affects production efficiency and safety.

Method used

By combining stress wave analysis and deep learning technology, stress wave data is obtained by selecting the valve to be tested, a preset frequency band energy ratio sequence is constructed, and a trained RNN model is used to detect internal leakage, automatically processing and analyzing the data.

Benefits of technology

It reduces hardware investment and maintenance costs, improves detection efficiency and accuracy, adapts to different types and operating conditions of valves, reduces the risk of misjudgment, and enhances the reliability and safety of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122192749A_ABST
    Figure CN122192749A_ABST
Patent Text Reader

Abstract

The application discloses an inner leakage valve detection method and device, and the inner leakage valve detection method comprises the following steps: selecting a valve to be detected and acquiring stress wave data of the valve to be detected; a preset frequency band energy proportion sequence is constructed according to the stress wave data; the preset frequency band energy proportion sequence is input into a trained RNN model to obtain an energy proportion prediction value; and if the energy proportion prediction value is greater than a preset inner leakage threshold value, it is determined that the valve to be detected has inner leakage. By adopting the application, the problems of high cost, complex operation and inaccurate data processing in the traditional valve inner leakage detection method can be effectively solved by combining stress wave analysis and deep learning technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of valve testing, and more particularly to a method and apparatus for detecting internal leakage valves. Background Technology

[0002] Traditional differential pressure and flow monitoring methods require additional detection devices to be installed at both ends of the valve. This not only increases hardware costs but also necessitates regular maintenance, resulting in high long-term operating costs. Both methods typically require shutdown for inspection, impacting production efficiency. Furthermore, data processing for differential pressure and flow monitoring methods relies on manual experience and fixed formulas, making them susceptible to environmental factors and prone to misjudgments. Summary of the Invention

[0003] This invention provides a method and apparatus for detecting internal leakage valves, which combines stress wave analysis and deep learning technology to effectively solve the problems of high cost, complex operation, and inaccurate data processing in traditional valve internal leakage detection methods.

[0004] To achieve the above objectives, a first aspect of this application provides a method for detecting internal leakage valves, comprising:

[0005] Select the valve to be tested and obtain the stress wave data of the valve to be tested;

[0006] Based on the stress wave data, a preset frequency band energy percentage sequence is constructed;

[0007] The preset frequency band energy proportion sequence is input into the trained RNN model to obtain the predicted energy proportion value;

[0008] If the predicted energy percentage is greater than the preset internal leakage threshold, the valve under test is determined to have internal leakage.

[0009] In one possible implementation of the first aspect, before selecting the valve to be tested and acquiring the stress wave data of the valve to be tested, the method further includes:

[0010] A device tree is constructed based on the hierarchical relationship between several devices; the device tree includes valve information of each device recorded in the device ledger; the valve information includes valve model, valve diameter and valve pressure range.

[0011] In one possible implementation of the first aspect, selecting the valve to be tested and acquiring the stress wave data of the valve to be tested specifically includes:

[0012] Select a data node and the valve to be tested corresponding to the data node from the device tree;

[0013] Place the sensor on the valve to be tested, record the sensor data after the sensor receives the ultrasonic wave, and use the sensor data as stress wave data after preprocessing.

[0014] In one possible implementation of the first aspect, constructing a preset frequency band energy proportion sequence based on the stress wave data specifically includes:

[0015] A ratio sequence is obtained based on the ratio of the frequency band energy value of the stress wave data within the preset detection frequency band to the total energy value of the stress wave data;

[0016] The ratio sequence is normalized and differentiated to construct a preset frequency band energy ratio sequence.

[0017] In one possible implementation of the first aspect, before inputting the preset frequency band energy percentage sequence into the trained RNN model, the method further includes:

[0018] Acquire several sets of historical measurement data of the valve under test at different time periods and within a preset detection frequency band;

[0019] The aforementioned sets of historical measurement data are divided according to a preset ratio to obtain a validation set and a training set;

[0020] The mean squared error is selected as the loss function and the Adam optimizer is selected as the optimizer. The training set is then input into the configured RNN model for training.

[0021] In one possible implementation of the first aspect, before selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, and before training the RNN model with the training set input, the method further includes:

[0022] The RNN model is set as a single-layer RNN model; wherein the number of neurons is set to 50, the RNN layer uses tanh as the activation function, and the output layer has 1 neuron and uses a linear activation function.

[0023] In one possible implementation of the first aspect, after selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, and training the RNN model with the training set input, the method further includes:

[0024] The validation set is input into the RNN model for validation, and the length of the input sequence and the number of neurons are adjusted according to the validation results.

[0025] In one possible implementation of the first aspect, after obtaining the predicted energy percentage, the method further includes:

[0026] The stress wave data is added as new data to the several sets of historical measurement data until the ratio of the new data to the non-new data in the several sets of historical measurement data is 1:1.

[0027] In one possible implementation of the first aspect, the preset detection frequency band is specifically 30kHz to 35kHz, and the preset internal leakage threshold is 90%.

[0028] A second aspect of this application provides an internal leakage valve detection device, comprising:

[0029] The selection module is used to select the valve to be tested and acquire the stress wave data of the valve to be tested;

[0030] The construction module is used to construct a preset frequency band energy proportion sequence based on the stress wave data;

[0031] The input module is used to input the preset frequency band energy proportion sequence into the trained RNN model to obtain the energy proportion prediction value;

[0032] The determination module is used to determine the internal leakage of the valve under test if the predicted energy percentage is greater than a preset internal leakage threshold.

[0033] Compared to existing technologies, the internal leakage valve detection method and apparatus provided in this invention allows for the selection of valves to be detected based on actual needs, eliminating the need for disassembly or damage to the valve structure and reducing maintenance costs. By obtaining a ratio sequence based on the frequency energy values ​​of stress wave data within a preset detection frequency band (e.g., 30kHz–35kHz), the processed ratio sequence is input into a trained RNN model as the preset frequency band energy proportion sequence. The data is automatically processed and analyzed using sensors and a machine learning model, improving detection efficiency and accuracy. Through continuous model updates, the system can adapt to different types and operating conditions of valves, enhancing its generalization ability.

[0034] The above methods can effectively detect internal leakage in valves, reduce production accidents and economic losses caused by internal leakage, and improve the reliability and safety of the monitoring system. Attached Figure Description

[0035] Figure 1 This is a flowchart illustrating an embodiment of the present invention for a method of detecting internal leakage valves;

[0036] Figure 2 This is a flowchart illustrating the training process of an RNN model according to an embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram of the structure of an internal leakage valve detection device provided in an embodiment of the present invention. Detailed Implementation

[0038] 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.

[0039] Please see Figure 1 One embodiment of this application provides a method for detecting internal leakage valves, including:

[0040] S10. Select the valve to be tested and obtain the stress wave data of the valve to be tested.

[0041] S11. Based on the stress wave data, construct a preset frequency band energy ratio sequence.

[0042] S12. Input the preset frequency band energy ratio sequence into the trained RNN model to obtain the predicted energy ratio value.

[0043] S13. If the predicted energy percentage is greater than the preset internal leakage threshold, the valve to be tested is determined to have internal leakage.

[0044] S10 selects the valves to be inspected based on actual needs. S11 constructs a preset frequency band energy percentage sequence with a standardized format, facilitating input into a machine learning model for processing. S12 utilizes a trained RNN model to analyze the preset frequency band energy percentage sequence, automatically identifying and predicting valve internal leakage, improving detection accuracy and reliability. The RNN model can quickly process large amounts of data, achieving real-time or near real-time internal leakage detection, thus improving detection efficiency. S13, by setting a reasonable internal leakage threshold (e.g., 90%), effectively distinguishes between normal and internal leakage states, avoiding misjudgments. When the predicted energy percentage exceeds the threshold, the system immediately issues an alarm, reminding operators to inspect and repair, preventing potential production accidents.

[0045] The entire detection method requires no additional physical testing equipment, reducing hardware investment and maintenance costs. By acquiring and analyzing stress wave data in real time, it can promptly detect internal leakage in valves, improving production safety and efficiency. The entire process is highly automated, requiring relatively low technical skills from operators, making it suitable for large-scale application. Furthermore, by continuously updating the model and adjusting thresholds, it can adapt to different types of valves and operating conditions, improving the system's robustness and reliability.

[0046] Through the above steps and technical effects, this method can effectively detect internal leakage in valves, reduce production accidents and economic losses caused by internal leakage, and improve the reliability and safety of the system.

[0047] For example, before selecting the valve to be tested and acquiring the stress wave data of the valve to be tested, the method further includes:

[0048] A device tree is constructed based on the hierarchical relationship between several devices; the device tree includes valve information of each device recorded in the device ledger; the valve information includes valve model, valve diameter and valve pressure range.

[0049] A device tree can be constructed based on the hierarchical relationship between several devices. The device tree includes valve information for each device recorded in the equipment ledger, including valve model, pipe diameter, and pressure range. It's important to note that constructing a device tree allows for the systematic management and recording of information for all devices and their valves, facilitating subsequent selection and testing. The device tree contains detailed valve information (such as model, pipe diameter, and pressure range), providing comprehensive data support for selecting the valve to be tested. Furthermore, the device tree allows operators to quickly locate and select the valve to be tested, improving the efficiency of the testing process.

[0050] For example, the step of selecting the valve to be tested and acquiring the stress wave data of the valve to be tested specifically includes:

[0051] Select a data node and the valve to be tested corresponding to the data node from the device tree;

[0052] Place the sensor on the valve to be tested, record the sensor data after the sensor receives the ultrasonic wave, and use the sensor data as stress wave data after preprocessing.

[0053] Based on the hierarchical relationship in the device tree, select a node (i.e., a device or group of devices). From this node, select a specific valve to be tested. Factors such as valve model, pipe diameter, and pressure range can be considered during selection. Selecting the valve to be tested through the device tree ensures that the selected valve meets the testing requirements, improving the specificity of the testing.

[0054] Next, a sensor can be placed on the valve under test to record the ultrasonic signals received by the sensor. The sensor data is preprocessed to remove noise and unnecessary information, resulting in clean stress wave data. Obtaining stress wave data by placing a sensor on the valve eliminates the need to disassemble or damage the valve structure, reducing maintenance costs and time. The sensor can record ultrasonic signals in real time and accurately, ensuring data integrity and reliability. Selecting the valve under test and placing the sensor are relatively simple operations that can be performed by ordinary technicians, reducing operational difficulty.

[0055] For example, constructing a preset frequency band energy proportion sequence based on the stress wave data specifically includes:

[0056] A ratio sequence is obtained based on the ratio of the frequency band energy value of the stress wave data within the preset detection frequency band to the total energy value of the stress wave data;

[0057] The ratio sequence is normalized and differentiated to construct a preset frequency band energy ratio sequence.

[0058] The frequency band energy values ​​of stress wave data within a preset detection frequency band (e.g., 30kHz–35kHz) can be used as the basis for calculation. The ratio of these frequency band energy values ​​to the total energy value of the stress wave data is then calculated, resulting in a ratio sequence. Normalization and differential processing of the extracted ratio sequence eliminates noise and redundant information in the data, enhances signal characteristics, and improves the accuracy of subsequent analysis. The constructed preset frequency band energy ratio sequence has a standardized format, facilitating input into machine learning models for processing.

[0059] It should be noted that the reason for choosing 30kHz to 35kHz here is that the stress wave generated by the internal leakage of the valve is a transient elastic wave, and its frequency range is mainly concentrated in the range of 30kHz to 35kHz.

[0060] See Figure 2 For example, before inputting the preset frequency band energy proportion sequence into the trained RNN model, the method further includes:

[0061] Acquire several sets of historical measurement data of the valve under test at different time periods and within a preset detection frequency band;

[0062] The aforementioned sets of historical measurement data are divided according to a preset ratio to obtain a validation set and a training set;

[0063] The mean squared error is selected as the loss function and the Adam optimizer is selected as the optimizer. The training set is then input into the configured RNN model for training.

[0064] Before training the RNN model, stress wave data of the valve under test needs to be collected at different time periods (e.g., different dates, different shifts). Ensure that the collected data is within a preset detection frequency band (e.g., 30kHz–35kHz). By collecting data from different time periods, the model can learn the characteristics under different operating conditions, improving its generalization ability. This allows it to better adapt to various situations in real-world applications and reduces the risk of overfitting.

[0065] Next, the collected historical measurement data can be divided into training and validation sets according to a certain ratio (e.g., 70% for training and 30% for validation). By dividing the data into training and validation sets, the model's performance can be evaluated during training, and its shortcomings can be identified and corrected in a timely manner. The validation set is used to verify the model's generalization ability, ensuring that the model performs well on unseen data.

[0066] Then, you can choose Mean Squared Error (MSE) as the loss function to evaluate the difference between the model's predictions and the true values. You can choose the Adam optimizer to optimize the model parameters and accelerate convergence. Input the training set into the pre-configured RNN model for training. Mean Squared Error is a commonly used loss function for regression problems, effectively measuring the difference between the model's predictions and the true values. Using MSE as the loss function ensures that the model minimizes prediction error during training, improving the model's prediction accuracy. The Adam optimizer combines the advantages of momentum gradient descent and adaptive learning rate, effectively accelerating the model's convergence while maintaining high stability. Using the Adam optimizer can find the optimal solution faster, improving training efficiency.

[0067] Finally, the training set is input into the pre-configured RNN model for training. By training the RNN model with the training set, the model can learn the time-series features in the stress wave data, thereby more accurately predicting the internal leakage of the valve. The memory function of the RNN model enables it to capture dynamic changes in the data, improving the accuracy and reliability of detection.

[0068] By collecting data from different time periods and dividing the training and validation sets, the model is ensured to adapt to various working conditions, thus improving its generalization ability. The selection of the Adam optimizer and mean squared error loss function accelerates the convergence speed of the model and improves training efficiency. The RNN model can learn the time series features in stress wave data, improving the accuracy and reliability of internal leakage detection. Through the evaluation of the validation set, the model is ensured to perform well on unseen data, thus improving the stability and reliability of the system.

[0069] The above-mentioned techniques can effectively train a high-performance RNN model for detecting valve internal leakage, reducing production accidents and economic losses caused by internal leakage, and improving the reliability and safety of the system.

[0070] For example, before training the RNN model with the training set input by selecting mean squared error as the loss function and Adam optimizer as the optimizer, the method further includes:

[0071] The RNN model is set as a single-layer RNN model; wherein the number of neurons is set to 50, the RNN layer uses tanh as the activation function, and the output layer has 1 neuron and uses a linear activation function.

[0072] The single-layer RNN model used in the above steps has a simple structure, reducing model complexity and lowering training time and resource consumption. Setting it to 50 neurons balances the model's expressive power and computational efficiency, capturing features from stress wave data without being overly complex. The tanh activation function maps input values ​​to between -1 and 1, aiding in model learning and convergence. Linear activation functions in the output layer ensure unrestricted output values, making it suitable for regression tasks.

[0073] For example, after selecting mean squared error as the loss function and Adam optimizer as the optimizer, and training the RNN model with the training set input, the method further includes:

[0074] The validation set is input into the RNN model for validation, and the length of the input sequence and the number of neurons are adjusted according to the validation results.

[0075] The steps described above use validation set data to evaluate the model's performance. The validation set assesses the model's prediction accuracy and generalization ability, ensuring good performance even on unseen data. It also helps identify model weaknesses promptly, preventing overfitting or underfitting.

[0076] Adjusting the length of the input sequence can better capture the features of different time scales in stress wave data, improving the accuracy of the model. Appropriately shortening the length of the input sequence can reduce redundant information and improve the training efficiency of the model; appropriately increasing the length of the input sequence can enhance the model's ability to extract long-term features and improve detection accuracy.

[0077] Increasing the number of neurons can improve the model's expressive power and better capture complex stress wave features. Appropriately reducing the number of neurons can prevent overfitting and improve the model's generalization ability. Reasonably adjusting the number of neurons can balance model complexity and computational resource consumption, ensuring efficient operation of the model in practical applications.

[0078] Through the aforementioned technical means and effects, this method can effectively train and optimize RNN models for detecting internal leakage in valves, reducing production accidents and economic losses caused by internal leakage, and improving the reliability and safety of the system.

[0079] For example, after obtaining the predicted energy percentage, the method further includes:

[0080] The stress wave data is added as new data to the several sets of historical measurement data until the ratio of the new data to the non-new data in the several sets of historical measurement data is 1:1.

[0081] The above steps add the currently detected stress wave data as new data to the historical measurement dataset. By continuously adding new data, the model can continuously learn the latest features and patterns, improving detection accuracy and generalization ability. Maintaining a 1:1 ratio of new to non-new data ensures a balanced distribution, preventing the model from favoring one type of data and improving fairness and accuracy. A balanced dataset helps the model generalize better to new data, avoiding overfitting or underfitting. As new data is continuously added, the model can dynamically adapt to new working conditions and changes, maintaining good performance.

[0082] In summary, by continuously incorporating new stress wave data, the model can continuously learn and improve, enhancing detection accuracy and generalization ability. Maintaining a balanced ratio of new and non-new data prevents the model from favoring one type of data, improving its fairness and accuracy. With the continuous addition of new data, the model can dynamically adapt to new working conditions and changes, maintaining good performance. Through validation set evaluation and data balancing, the model is ensured to perform well on unseen data, improving the system's stability and reliability.

[0083] For example, the preset detection frequency band is specifically 30kHz to 35kHz, and the preset internal leakage threshold is 90%.

[0084] The preset detection frequency band is specifically set to 30kHz to 35kHz because this band falls within the ultrasonic range, which typically avoids common sources of electromagnetic interference (such as radio broadcasts and Wi-Fi), thereby reducing the impact of external noise on the detection results. Ultrasonic waves have good propagation characteristics within this frequency band, providing high resolution and sensitivity, making it suitable for precision testing.

[0085] The ultrasonic signals generated by internal leakage are often concentrated in certain specific frequency bands. Through experiments and data analysis, it has been found that 30kHz to 35kHz is the frequency band where internal leakage signals are more pronounced. Within this frequency band, the ultrasonic signal intensity generated by internal leakage is relatively high, making it easier for sensors to capture and analyze.

[0086] Furthermore, many ultrasonic sensors exhibit high sensitivity and signal-to-noise ratio in this frequency band, enabling high-quality signal acquisition. Selecting an appropriate frequency band can fully utilize the sensor's performance, improving detection accuracy and reliability.

[0087] In industrial applications, internal leakage in valves can lead to media leaks, causing safety hazards or economic losses. Setting a strict internal leakage threshold can ensure the safety of system operation. A 90% threshold means that an alarm will only be triggered when the valve's sealing performance deteriorates to a certain level (i.e., internal leakage exceeds 10%). This effectively prevents false alarms caused by minor internal leakage while ensuring that major internal leakage problems are detected in a timely manner.

[0088] Setting the threshold too low (e.g., 80%) may lead to frequent false alarms, increasing unnecessary maintenance costs and workload. Setting the threshold too high (e.g., 95%) may miss some potential internal leaks, resulting in security vulnerabilities. 90% is a relatively reasonable trade-off point, which can reduce the probability of false alarms and missed alarms while ensuring system security.

[0089] Compared to existing technologies, the internal leakage valve detection method provided in this invention allows for the selection of valves to be detected based on actual needs, eliminating the need for disassembly or damage to the valve structure and reducing maintenance costs. By obtaining a ratio sequence based on the frequency energy values ​​of stress wave data within a preset detection frequency band (e.g., 30kHz–35kHz), the processed ratio sequence is input into a trained RNN model as the preset frequency band energy proportion sequence. The data is then automatically processed and analyzed using sensors and a machine learning model, improving detection efficiency and accuracy. Through continuous model updates, the method can adapt to different types and operating conditions of valves, enhancing the system's generalization ability.

[0090] The above methods can effectively detect internal leakage in valves, reduce production accidents and economic losses caused by internal leakage, and improve the reliability and safety of the monitoring system.

[0091] See Figure 3 One embodiment of this application provides an internal leakage valve detection device, including a selection module 201, a construction module 202, an input module 203, and a determination module 204.

[0092] Selection module 201 is used to select the valve to be tested and acquire the stress wave data of the valve to be tested;

[0093] Construction module 202 is used to construct a preset frequency band energy ratio sequence based on the stress wave data;

[0094] Input module 203 is used to input the preset frequency band energy proportion sequence into the trained RNN model to obtain the energy proportion prediction value;

[0095] The determination module 204 is used to determine the internal leakage of the valve under test if the predicted energy percentage is greater than the preset internal leakage threshold.

[0096] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be elaborated upon here.

[0097] Compared to existing technologies, the internal leakage valve detection device provided in this invention allows for the selection of valves to be detected based on actual needs, eliminating the need for disassembly or damage to the valve structure and reducing maintenance costs. By obtaining a ratio sequence based on the frequency energy values ​​of stress wave data within a preset detection frequency band (e.g., 30kHz–35kHz), the processed ratio sequence is input into a trained RNN model as the preset frequency band energy proportion sequence. The data is then automatically processed and analyzed using sensors and a machine learning model, improving detection efficiency and accuracy. Through continuous model updates, the device can adapt to different types and operating conditions of valves, enhancing the system's generalization ability.

[0098] The above methods can effectively detect internal leakage in valves, reduce production accidents and economic losses caused by internal leakage, and improve the reliability and safety of the monitoring system.

[0099] One embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the internal leakage valve detection method described above.

[0100] The computer device may be a smartphone, tablet, desktop computer, or cloud server, among other computing devices. This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the figures are merely examples of computer devices and do not constitute a limitation on the computer device. It may include more or fewer components than illustrated, or a combination of certain components, or different components, such as input / output devices, network access devices, etc.

[0101] The processor referred to can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0102] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard drive, Smart Memory Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the computer device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or will be output.

[0103] This application provides a computer program product that, when run on a computer device, enables the computer device to execute the steps described in the various method embodiments above.

[0104] In the several embodiments provided in this application, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.

[0105] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0106] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for detecting internal leakage valves, characterized in that, include: Select the valve to be tested and obtain the stress wave data of the valve to be tested; Based on the stress wave data, a preset frequency band energy percentage sequence is constructed; The preset frequency band energy proportion sequence is input into the trained RNN model to obtain the predicted energy proportion value; If the predicted energy percentage is greater than the preset internal leakage threshold, the valve under test is determined to have internal leakage.

2. The method for detecting internal leakage valves as described in claim 1, characterized in that, Before selecting the valve to be tested and acquiring the stress wave data of the valve to be tested, the method further includes: A device tree is constructed based on the hierarchical relationship between several devices; the device tree includes valve information of each device recorded in the device ledger; the valve information includes valve model, valve diameter and valve pressure range.

3. The method for detecting internal leakage valves as described in claim 2, characterized in that, The step of selecting the valve to be tested and acquiring the stress wave data of the valve to be tested specifically includes: Select a data node and the valve to be tested corresponding to the data node from the device tree; Place the sensor on the valve to be tested, record the sensor data after the sensor receives the ultrasonic wave, and use the sensor data as stress wave data after preprocessing.

4. The method for detecting internal leakage valves as described in claim 1, characterized in that, The step of constructing a preset frequency band energy proportion sequence based on the stress wave data specifically includes: A ratio sequence is obtained based on the ratio of the frequency band energy value of the stress wave data within the preset detection frequency band to the total energy value of the stress wave data; The ratio sequence is normalized and differentiated to construct a preset frequency band energy ratio sequence.

5. The method for detecting internal leakage valves as described in claim 1, characterized in that, Before inputting the preset frequency band energy proportion sequence into the trained RNN model, the method further includes: Acquire several sets of historical measurement data of the valve under test at different time periods and within a preset detection frequency band; The aforementioned sets of historical measurement data are divided according to a preset ratio to obtain a validation set and a training set; The mean squared error is selected as the loss function and the Adam optimizer is selected as the optimizer. The training set is then input into the configured RNN model for training.

6. The method for detecting internal leakage valves as described in claim 5, characterized in that, Before training the RNN model by selecting mean squared error as the loss function and Adam optimizer as the optimizer, the process further includes: The RNN model is set as a single-layer RNN model; wherein the number of neurons is set to 50, the RNN layer uses tanh as the activation function, and the output layer has 1 neuron and uses a linear activation function.

7. The method for detecting internal leakage valves as described in claim 5, characterized in that, After selecting the mean squared error as the loss function and the Adam optimizer as the optimizer, and training the RNN model with the training set input, the method further includes: The validation set is input into the RNN model for validation, and the length of the input sequence and the number of neurons are adjusted according to the validation results.

8. The method for detecting internal leakage valves as described in claim 5, characterized in that, After obtaining the predicted energy percentage, the method further includes: The stress wave data is added as new data to the several sets of historical measurement data until the ratio of the new data to the non-new data in the several sets of historical measurement data is 1:

1.

9. The method for detecting internal leakage valves as described in claim 4, characterized in that, The preset detection frequency band is specifically 30kHz to 35kHz, and the preset internal leakage threshold is 90%.

10. A device for detecting internal leakage valves, characterized in that, include: The selection module is used to select the valve to be tested and acquire the stress wave data of the valve to be tested; The construction module is used to construct a preset frequency band energy proportion sequence based on the stress wave data; The input module is used to input the preset frequency band energy proportion sequence into the trained RNN model to obtain the energy proportion prediction value; The determination module is used to determine the internal leakage of the valve under test if the predicted energy percentage is greater than a preset internal leakage threshold.