A valve optimization control method and system based on scene adaptation
Patent Information
- Application Number
- CN202511860075.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2045-12-10
AI Technical Summary
[0003]针对上述的相关技术,传统阀门控制方法缺乏基于目标区域实时特征的动态适配能力,且阀门与管道参数匹配脱节,导致实际流速偏离目标区域需求、控制精准度低的问题
1.实现多场景精准适配控流,通过场景特征识别、目标流速匹配、阀门和管道参数协同优化的闭环流程,动态适配小盆栽、灌溉区等不同场景的流速需求,解决传统控制中流速偏离实际需求的问题,大幅提升阀门控制精准度;
Smart Images

Figure CN121680063B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of valve control, and in particular to a valve optimization control method and system based on scenario adaptation. Background Technology
[0002] As the core control and regulation component of a fluid transport system, the valve's flow channel structure directly determines the velocity distribution, pressure transmission, energy loss, and flow stability of the fluid during its flow, making it a crucial element in ensuring the precise operation of the entire system. With the increasing diversification of fluid applications, different scenarios have placed significantly different demands on water flow performance. For example, watering flowers in agricultural irrigation requires low-velocity, steady-flow fluid transport; while flushing operations in municipal cleaning require high-velocity, high-kinetic-energy water flow.
[0003] Regarding the aforementioned technologies, traditional valve control methods lack the ability to dynamically adapt to the real-time characteristics of the target area, and the valve and pipeline parameters are mismatched, resulting in the actual flow rate deviating from the target area requirements and low control accuracy. Summary of the Invention
[0004] To achieve precise control of valve flow rate for different scenarios, this invention provides a scenario-adaptive valve optimization control method and system.
[0005] In a first aspect, the present invention provides a valve optimization control method based on scenario adaptation, which adopts the following technical solution: A scenario-adaptive valve optimization control method includes: Step 1: Acquire images of the target area in real time; Step 2: Determine the features of the target region based on the target region image; Step 3: Determine the current target area based on the characteristics of the target area and the preset scene feature library; Step 4: Determine the target flow rate range corresponding to the current target area through a preset target flow rate database; Step 5: Obtain valve flow path parameters; Step 6: Determine the optimal valve parameters based on the target flow rate range and valve flow path parameters; Step 7: Based on the target flow rate range and optimized valve parameters, traverse the target pipe parameters corresponding to the pipe numbers in the preset pipe number library; Step 8: Determine the expected flow velocity range based on the target pipeline parameters and optimized valve parameters; Step 9: Determine the target pipe number when the expected flow rate falls within the target flow rate range; Step 10: Perform valve control operations based on the target pipeline number.
[0006] By adopting the above technical solution, the problem of flow velocity deviation from requirements in traditional valve control is effectively solved. Through matching the scene feature library and the target flow velocity database, combined with the traversal analysis of valve flow channel parameters and pipe number library, accurate adaptation of valve parameters under different scenarios is achieved, significantly improving the accuracy and reliability of valve control.
[0007] Optionally, a method for correcting the target pipeline number is also included, which includes: Step 11: Determine the rate of change in real time based on the target area image. The rate of change is the number of pixels in the same target area whose pixel grayscale value changes more than a preset pixel grayscale change threshold per unit time. Step 12: Determine the rate of change deviation value when the rate of change does not fall within the preset global rate of change range; Step 13: Determine the target flow velocity range for correction based on the rate of change deviation value; Step 14: Based on the corrected target flow rate range, redetermine the target pipe number and perform the pipe replacement operation.
[0008] By adopting the above technical solution, when the flow rate demand in the target area changes, the system can quickly respond and correct the pipe number through real-time monitoring and dynamic adjustment, thereby ensuring that the flow rate remains within the target range. This method not only reduces the need for manual intervention but also significantly reduces the system operation risk caused by flow rate deviations.
[0009] Optionally, methods for determining the rate of change in real time based on the target region image include: Step 110: Obtain the brightness variance of the target region image; Step 111: When the brightness variance of the target area image falls within the preset effective brightness variance threshold, obtain the average brightness of the target area image; Step 112: Determine the grayscale change threshold of the current pixel based on the average brightness of the target region image and the preset grayscale change threshold mapping table; Step 113: Determine the rate of change based on the target region image and the current pixel grayscale change threshold.
[0010] By employing the above technical solution and conducting multi-level analysis of image brightness features, ambient light interference is effectively filtered out, ensuring the accuracy of the rate of change calculation. Simultaneously, the dynamic adjustment mechanism based on the grayscale change threshold further enhances the system's adaptability to complex scenarios, providing reliable data support for subsequent pipe number correction and valve control operations.
[0011] Optionally, a verification method may also be included after the pipeline replacement operation has been performed, the method comprising: Step 15: Monitor the rate of change after the pipe replacement operation is completed; Step 16: When the rate of change falls within the preset abnormal rate of change range, determine the water flow trajectory and the location of the first expected gap based on the target area image; Step 17: Determine the location of the second predicted gap based on the water flow trajectory; Step 18: Execute the pipeline pullback operation when the first and second expected gap positions coincide.
[0012] By adopting the above technical solution, after performing the pipeline replacement operation, the system monitors the rate of change to determine if there are any abnormalities. When the rate of change falls within a preset abnormal rate of change range, the system analyzes the water flow trajectory based on the target area image and further determines the first and second expected gap locations. If these two locations coincide, it indicates that there is a gap in the current target area. In this case, the pipeline adjustment operation is redundant, and the system will automatically perform a pipeline reversal operation.
[0013] Optionally, it also includes a method for performing a pipeline callback operation when the first expected gap position and the second expected gap position do not coincide or there is no first expected gap position, the method comprising: Step 180: Determine the center point of the second predicted gap based on the water flow trajectory; Step 181: Determine the image of the second expected gap region based on the center point of the second expected gap; Step 182: Determine the edge features of the second predicted gap based on the image of the second predicted gap region; Step 183: Determine the edge features around the second predicted gap based on the target region image and the second predicted gap region image; Step 184: Identify suspected obstacles based on the edge features of the second predicted gap and the edge features surrounding the second predicted gap; Step 185: When a suspected obstacle exists, obtain the average gray value of the pixels in the target area image and define it as the baseline gray value; Step 186: Obtain the average gray value of the pixels in the second expected gap region image and define it as the current gray value; Step 187: Determine the grayscale value difference based on the baseline grayscale value and the current grayscale value; Step 188: Execute the pipeline callback operation when the grayscale difference falls within the preset range of grayscale difference of the obstacle.
[0014] By adopting the above technical solution, in cases where the first and second expected gap locations do not coincide or there is no first gap location, the center point of the second gap and the regional image are located by the water flow trajectory, edge features are extracted to identify suspected obstacles, and then the occlusion is verified by the gray value difference; if the difference matches the range of the obstacle, the pipeline replacement is determined to be invalid, and a callback operation is performed to restore system stability.
[0015] Optionally, it also includes a method for performing a pipe replacement operation when the first and second anticipated gap locations coincide, the method comprising: Step 19: Obtain the number of the first expected gap locations; Step 20: When the number of first expected gap locations is 1, acquire the image of the first expected gap region; Step 21: Obtain the average pixel gray value of the first expected gap region image and define it as the gap gray value; Step 22: Determine the grayscale value of the area surrounding the first expected gap based on the first expected gap area image and the target area image; Step 23: Determine the difference in grayscale value of the gap based on the grayscale value of the gap and the grayscale value of the area surrounding the first expected gap; Step 24: Determine the optimized flow rate range when the difference in grayscale values of the notch falls within the preset range of grayscale value differences of the notch; Step 25: Perform the pipe replacement operation based on the optimized flow rate range and pipe number library.
[0016] By adopting the above technical solution, in the case where the first and second expected gap locations overlap, the number of gaps is first confirmed to be 1. The existence of the gap is verified by calculating the difference in gray values between the gap area and the surrounding area. Based on the gap characteristics, the optimized flow velocity range is determined. Then, based on this range, suitable pipelines are selected from the pipeline library for replacement, which solves the abnormal rate of change caused by the gap and ensures flow velocity adaptation.
[0017] Optionally, methods for determining the optimized flow velocity range when the difference in grayscale values of the gap does not fall within the range of the difference in grayscale values of the obstacle include: Step 240: Acquire multiple consecutive frames of the first expected gap region image in real time, extract the number of pixels in the water infiltration area in each frame image, and determine the water infiltration area; Step 241: Obtain the growth rate of the water flow wetting area based on the water flow wetting area; Step 242: Determine the expected gap overflow time based on the growth rate of the water infiltration area; Step 243: Determine the waiting time when the gap overflow time is greater than the preset maximum waiting time threshold; Step 244: Determine the change influence rate based on the growth rate and change rate of the water infiltration area, wherein the change influence rate is the degree of influence of the growth rate of the water infiltration area on the change rate; Step 245: Determine the optimal flow velocity range based on the change influence rate and change rate; Step 246: Perform pipe replacement operation based on the optimized flow rate range.
[0018] By employing the aforementioned technical solution, when the difference in grayscale values of the notch does not fall within the preset range, the system further analyzes the changing trend of the water flow wetting area using multi-frame images. Combining the correlation between the growth rate and change rate of the water flow wetting area, the change impact rate is calculated, thereby accurately assessing the actual impact of the notch on flow velocity control. Based on this, the optimized flow velocity range is determined, triggering a pipe replacement operation to achieve precise flow velocity adaptation. This method effectively avoids flow velocity deviation problems caused by inaccurate identification of notch characteristics, ensuring the stability and reliability of system operation. Simultaneously, by dynamically adjusting the waiting time, the system's response efficiency and adaptability are further improved.
[0019] Optionally, it also includes a method for updating the scene feature library, which includes: Step 30: Determine the unknown scene number when the current target area does not exist; Step 31: Determine scene similarity by traversing the scene feature library based on the target region features corresponding to the unknown scene number; Step 32: Sort the current similar scene numbers based on scene similarity; Step 33: Obtain the flow velocity range of the target area corresponding to the current similar scene number, and define it as the temporary target area flow velocity range; Step 34: Update the scene feature library based on the flow velocity range of the temporary target area and the unknown scene number.
[0020] By employing the above technical solution, in the absence of a current target region, the system determines the unknown scene number and, in conjunction with target region features, traverses the scene feature library to calculate scene similarity. Subsequently, based on the similarity ranking results, it identifies the current similar scene number and extracts its corresponding target region flow velocity range as a temporary flow velocity range. Finally, the system updates the scene feature library based on the temporary target region flow velocity range and the unknown scene number.
[0021] Optionally, it also includes a method for updating the target flow rate database, which includes: Step 140: After performing the pipeline replacement operation, when the rate of change falls within the global rate of change range, obtain the current scene number; Step 141: Accumulate the number of consecutive occurrences of the current scene number; Step 142: When the number of consecutive occurrences of the current scene number exceeds the preset reliable update threshold, update the target flow rate database based on the corrected target flow rate range.
[0022] By adopting the above technical solution, after performing a pipeline replacement operation, the system determines the stability of the current scenario based on whether the rate of change falls within the global rate of change range. When the rate of change meets the requirements, the system obtains the current scenario number and begins accumulating the number of consecutive occurrences of that number. Only when the number of consecutive occurrences exceeds the reliable update threshold will the system update the target flow rate database based on the corrected target flow rate range. This method effectively avoids erroneous updates caused by accidental fluctuations, ensuring the accuracy and reliability of the target flow rate database.
[0023] Secondly, the present invention provides a valve optimization control system based on scenario adaptation, which adopts the following technical solution: A scenario-adaptive valve optimization control system includes: The acquisition module is used to acquire the target region image and target region features; The memory is used to store the program of a scenario-adaptive valve optimization control method as described above; The processor loads and executes programs from memory.
[0024] By adopting the above technical solution, the system can efficiently process and extract features from images of the target area, providing data support for subsequent valve optimization control. The processor, by loading programs from memory, can not only execute each step of the above method but also dynamically adjust the control strategy based on real-time data, ensuring precise valve adaptation in different scenarios. Furthermore, the system's modular design enables efficient collaboration between functional modules, further improving overall operational efficiency and stability. The acquisition module is responsible for collecting images and feature information of the target area, providing basic data for subsequent analysis, while the memory ensures the secure storage and rapid retrieval of all critical programs and data. This hardware-software integrated design not only enhances the system's flexibility but also provides a solid foundation for future functional expansion.
[0025] In summary, the present invention has at least one of the following beneficial technical effects: 1. Achieve precise flow control adaptability across multiple scenarios. Through a closed-loop process of scenario feature recognition, target flow velocity matching, and collaborative optimization of valve and pipeline parameters, it dynamically adapts to the flow velocity requirements of different scenarios such as small potted plants and irrigation areas, solving the problem of flow velocity deviating from actual requirements in traditional control and significantly improving the accuracy of valve control. 2. Enhance system anti-interference and stability. Through mechanisms such as rate of change monitoring, gap and obstacle identification, pipeline callback, and pipeline replacement verification, accurately respond to abnormal scenarios, avoid ineffective control operations, ensure that the fluid flow rate is always stable within a reasonable range, and reduce system operation risks. 3. It has self-learning and expansion capabilities. It obtains temporary flow rate ranges by matching similar scenarios with unknown scenarios and updates the feature library. It dynamically updates the target flow rate database by combining reliable scenario data, continuously improving the scenario adaptation capability without frequent manual intervention, thus enhancing the system's adaptability to diverse scenarios. Attached Figure Description
[0026] Figure 1 This is a flowchart of a valve optimization control method based on scenario adaptation in an embodiment of this application; Figure 2 This is a flowchart of a method for performing a pipeline callback operation when the first expected gap position and the second expected gap position do not coincide or the first expected gap position does not exist, according to an embodiment of this application. Figure 3 This is a schematic diagram of a scenario where the positions of the first and second expected gaps do not coincide. Detailed Implementation
[0027] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0028] This invention discloses a valve optimization control method based on scenario adaptation. (Refer to...) Figure 1 A scenario-adaptive valve optimization control method includes: Step 1: Acquire images of the target area in real time.
[0029] The target area image refers to a real-time image of a specific area directly affected by the fluid output from the valve, which is acquired in real time by an image acquisition device.
[0030] Step 2: Determine the features of the target region based on the target region image.
[0031] Target region features refer to the set of core features extracted from the target region image that can uniquely represent the attributes of the region, mainly including two categories: geometric features and grayscale features.
[0032] Step 3: Determine the current target area based on the characteristics of the target area and the preset scene feature library.
[0033] A scene feature library is a standardized database that is pre-built and stored, containing feature templates corresponding to various known target regions, used for accurate matching with extracted target region features. Each feature template is associated with a unique target region identifier (such as a small potted plant, a large irrigation area, and the inner wall of a pipe being flushed).
[0034] The current target region refers to the specific target region that matches the extracted target region features, determined through comparison and analysis with various feature templates in the scene feature library. This region is the actual area where the system needs to precisely control the fluid flow rate. This process is achieved through a feature similarity algorithm, specifically by calculating the similarity score between the extracted target region features and each feature template in the scene feature library, and identifying the target region associated with the feature template with the highest score as the current target region.
[0035] Step 4: Determine the target flow rate range corresponding to the current target area through the preset target flow rate database.
[0036] A target velocity database is a pre-built and stored standardized database containing target velocity ranges corresponding to various known target areas. It is used to quickly query the required target velocity range based on the current target area identifier. A target velocity range refers to the interval defined by the minimum and maximum values of fluid velocity that the current target area must meet under a specific application scenario. This range directly reflects the precise fluid velocity requirements of the target area. Each target area identifier is associated with a unique target velocity range (e.g., a small potted plant corresponds to a low velocity range, a large irrigation area corresponds to a medium velocity range, and pipe scouring corresponds to a high velocity range).
[0037] Step 5: Obtain valve flow path parameters.
[0038] Valve flow path parameters are key geometric parameters that affect the flow characteristics of fluid within a valve. These parameters include the radius of curvature and the rate of change of cross-sectional area. The radius of curvature describes the degree of bending of the flow path's centerline, directly affecting the direction of fluid flow. The rate of change of cross-sectional area characterizes the expansion or contraction of the flow path's cross-sectional area along the flow direction, determining the increase or decrease trend of fluid velocity. These two parameters together constitute the core control elements of the valve flow path on fluid dynamics characteristics. These valve flow path parameters are pre-set inherent structural parameters of the valve and can be obtained directly through 3D modeling measurement or manufacturer technical documentation.
[0039] Step 6: Determine the optimal valve parameters based on the target flow rate range and valve flow path parameters.
[0040] Valve parameter optimization refers to the set of valve control parameters that, given a target flow velocity range and valve channel parameters, are calculated collaboratively using existing fluid flow models and existing PSO optimization algorithms to ensure precise matching of fluid flow velocity to the target range. This parameter set primarily includes key control variables such as valve opening and adjustment frequency. Valve opening directly controls the cross-sectional area of the fluid passing through the valve, thus affecting the fluid velocity. Adjustment frequency refers to the number of times the valve opening is adjusted per unit time; fine-tuning of the fluid velocity is achieved by controlling the adjustment frequency. This process establishes a mathematical mapping relationship between valve channel parameters, control parameters, and the target flow velocity range using existing fluid flow models. Specifically, an existing fluid flow model (built based on well-known fluid dynamics principles, representing current technology) is first used to describe the flow characteristics of fluid within the valve channel. The target flow velocity range is then introduced into the model as a constraint. The PSO algorithm iteratively searches for the valve control parameters, using valve opening and adjustment frequency as optimization variables and valve channel parameters as influencing factors, until the optimal parameter combination that meets the target flow velocity range requirements is found.
[0041] Step 7: Based on the target flow rate range and optimized valve parameters, traverse the target pipe parameters corresponding to the pipe numbers in the preset pipe number library.
[0042] A pipe number library is a pre-built and stored standardized database containing the numbers of all available pipes and their corresponding target pipe parameters. It is used to quickly associate pipe numbers with their core structural parameters. Each pipe number uniquely corresponds to a set of target pipe parameters. Target pipe parameters are the set of core structural parameters that uniquely correspond to each pipe number in the pipe number library and affect fluid flow characteristics and terminal velocity; specifically, they include pipe diameter, pipe length, and pipe material.
[0043] Step 8: Determine the expected flow rate range based on the target pipeline parameters and optimized valve parameters.
[0044] The expected velocity range refers to the range of actual flow velocity of fluid after passing through the valve and pipeline combination, calculated using existing fluid dynamics formulas under given target pipeline parameters and optimized valve parameters. This range is solved jointly using the fluid continuity equation and Bernoulli's equation, combining the target pipeline parameters and optimized valve parameters. Specifically, the flow resistance coefficient of the pipeline is first determined based on its diameter and length, and the flow resistance is corrected by incorporating the roughness of the pipeline material. Then, the optimized valve parameters are substituted into the valve flow equation to calculate the initial velocity at the valve outlet. Finally, the energy loss along the pipeline is considered using Bernoulli's equation to obtain the expected velocity range of the fluid at the pipeline outlet.
[0045] Step 9: Determine the target pipe number when the expected flow rate falls within the target flow rate range.
[0046] The target pipeline number refers to the unique identifier of the pipeline that best matches the current optimized valve parameters and target flow rate requirements when the expected flow rate range and the target flow rate range completely overlap or have a valid intersection.
[0047] Step 10: Perform valve control operations based on the target pipeline number.
[0048] Valve control operation refers to the regulatory action that ensures that the flow velocity of fluid passing through the valve and the end of the pipe corresponding to the target pipe number accurately falls within the target flow velocity range.
[0049] This also includes a method for correcting the target pipeline number, which includes: Step 11: Determine the rate of change in real time based on the target area image.
[0050] The rate of change is the number of pixels within the same target area whose grayscale value changes more than a preset grayscale change threshold per unit time. The grayscale change threshold is a basic critical value used to determine whether the grayscale value of pixels in the target area image has undergone a valid change. This value changes dynamically according to the actual situation and will be introduced later.
[0051] Step 12: Determine the rate of change deviation value when the rate of change does not fall within the preset global rate of change range.
[0052] The global rate of change range refers to a pre-defined, unified quantitative benchmark interval applicable to all target area types, used to determine whether the actual rate of change of the current target area exceeds the normal fluctuation range. This range is determined through comprehensive statistical analysis of historical data to ensure that it covers reasonable fluctuations under normal operating conditions while effectively identifying abnormal operating conditions.
[0053] The global rate of change here can range from 5 pixels per second to 60 pixels per second. Because the normal changes in the pre-set target scenes (such as small potted plants, large irrigation areas, and pipes scouring their inner walls) all have a pixel count exceeding the grayscale threshold of less than 60 pixels per unit time, a large number of samples show that in the small potted plant scene, the water flow slowly soaks the soil, with pixel changes of less than 25 pixels; while in the large irrigation area, the water flow spreads evenly, with pixel changes of approximately 40 pixels. Therefore, using 60 pixels per second as the upper limit can completely cover the normal dynamic changes in the above scenes. The lower limit of 5 pixels per second is to address misjudgments caused by slight flickering of light or minor reflections from fluids.
[0054] Step 13: Determine the target flow velocity range to be corrected based on the rate of change deviation value.
[0055] The corrected target velocity range refers to the new velocity range interval obtained by dynamically adjusting the target velocity range corresponding to the current target area based on the rate of change deviation value.
[0056] The specific adjustment logic is as follows: when the deviation value of the rate of change is positive, it indicates that the actual rate of change in the target area exceeds the global benchmark, and the target velocity range needs to be narrowed to reduce the fluid impact intensity and avoid excessive scouring of the target area (such as soil in a small potted plant) due to excessively high velocity; when the deviation value is negative, the target velocity range is expanded to compensate for insufficient fluid kinetic energy. The adjustment range is quantified through a preset target velocity correction coefficient table, which is generated based on fluid dynamics simulation and multi-scenario measured data fitting.
[0057] Step 14: Based on the corrected target flow rate range, redetermine the target pipe number and perform the pipe replacement operation.
[0058] Pipe replacement operation refers to selecting a pipe number from the pipe number library that matches the new flow rate range based on the newly determined target flow rate range, and then switching the current pipe to the target pipe through an automated control device to ensure that the fluid transport system continuously meets the dynamically adjusted flow rate requirements.
[0059] Among them, methods for determining the rate of change in real time based on the target region image include: Step 110: Obtain the brightness variance of the target region image.
[0060] The brightness variance of a target region image refers to the dispersion index of brightness value distribution obtained by statistically calculating the brightness values of each pixel in the target region image. Specifically, the brightness values of all pixels in the target region image are first extracted, and then the brightness fluctuation range is quantified by the variance calculation formula (i.e., the average of the squares of the differences between each pixel brightness value and the average brightness value).
[0061] Step 111: When the brightness variance of the target area image falls within the preset effective brightness variance threshold, obtain the average brightness of the target area image.
[0062] The effective brightness variance threshold is a threshold used to determine whether the brightness fluctuation of the target area image is within a stable and calculable range. Its core function is to filter images with drastic brightness fluctuations caused by strong light flicker, sudden occlusion, camera shake, etc., and retain only effective images with stable brightness for subsequent calculations.
[0063] Step 112: Determine the grayscale change threshold of the current pixel based on the average brightness of the target area image and the preset grayscale change threshold mapping table.
[0064] A grayscale change threshold mapping table is a pre-constructed and stored standardized correspondence table containing the average brightness of the target area image and the corresponding pixel grayscale change threshold. The current pixel grayscale change threshold is the critical value used to quantify the fluctuation range of pixel grayscale values under the current average brightness of the target area image; specifically, it is the dynamic value of the pixel grayscale change threshold mentioned above.
[0065] Step 113: Determine the rate of change based on the target region image and the current pixel grayscale change threshold.
[0066] This also includes a verification method after the pipeline replacement operation is completed, which includes: Step 15: Monitor the rate of change after the pipeline replacement operation is completed.
[0067] Because replacing pipes alters the flow state of the fluid within the pipes, it affects the actual rate of change in the target area. By monitoring this rate in real time, the impact of pipe replacement on the system can be detected promptly.
[0068] Step 16: When the rate of change falls within the preset abnormal rate of change range, determine the water flow trajectory and the location of the first expected gap based on the target area image.
[0069] The abnormal rate of change range refers to a pre-defined range of rates used to determine whether an abnormal rate of change occurs in the target area after pipe replacement. An abnormal rate of change refers to a situation where the rate of change does not change after pipe replacement, possibly due to gaps or openings in the target area that prevent the replacement from affecting the rate of change. The water flow trajectory refers to the path of water flow extracted from the target area image using image processing technology; it visually reflects the direction and distribution of water flow within the target area. The first predicted gap location is determined based on the geometric features of the target area, initially identifying all possible locations in the target area image that could lead to an abnormal rate of change; these locations may be gaps or openings present in the target area.
[0070] Step 17: Determine the location of the second predicted gap based on the water flow trajectory.
[0071] The second predicted gap location refers to the precise location determined by further combining detailed characteristics of the water flow trajectory, based on the preliminary determination of the first predicted gap location. Specifically, the location is obtained by analyzing the continuity of the water flow trajectory and abrupt changes in flow direction, using image processing algorithms.
[0072] Step 18: Execute the pipeline pullback operation when the first and second expected gap positions coincide.
[0073] When the first and second predicted gap locations coincide, it indicates the existence of a real and precise gap or crack in the target area. This gap is the reason why the rate of change still falls within the abnormal rate of change range after pipe replacement. In this case, the pipe replacement operation cannot resolve the flow anomaly caused by the gap, so a pipe callback operation is performed. The pipe callback operation refers to pausing the use of the newly replaced target pipe and restoring the pipe configuration and valve control parameters in the system to the valve state before the pipe replacement operation in step 14.
[0074] Reference Figure 2 It also includes a method for performing a pipeline callback operation when the first expected gap position and the second expected gap position do not coincide or there is no first expected gap position, the method comprising: If the location of the first expected gap does not exist, it means there is only one gap or no gap at all. However, the abnormal rate of change indicates a gap obscured by an obstacle, making it impossible to determine the location of the first expected gap. When the location of the first expected gap exists and does not coincide with the location of the second expected gap, refer to... Figure 3 This indicates that the location of the second expected gap is obscured by an obstacle, resulting in no two locations of the first and second expected gaps coinciding.
[0075] Step 180: Determine the center point of the second predicted gap based on the water flow trajectory; The second predicted gap center point refers to the core location point of the gap in the target area, calculated by performing in-depth analysis of the water flow trajectory, using a center point localization algorithm in image processing, and combining the diffusion characteristics and flow direction changes of the water flow near the gap.
[0076] Step 181: Determine the image of the second expected gap region based on the center point of the second expected gap.
[0077] The second predicted gap region image refers to a local area image within the target area image, defined with the center point of the second predicted gap as the core, containing the complete gap features. The scope of this local image region is pre-set. If an obstruction blocks the camera from acquiring the gap image of the second predicted gap, the water flow trajectory will be interrupted along the outline of the obstruction. This interruption point is the center point of the second predicted gap. By dividing the local image around the center point of the second predicted gap, half of the image is of the obstruction, and the other half is of the unobstructed object. This provides effective image evidence for subsequent obstruction identification.
[0078] Step 182: Determine the edge features of the second expected gap based on the image of the second expected gap region.
[0079] The second predicted gap edge feature refers to the edge contour features of the occluder extracted from the image of the second predicted gap region using an image processing algorithm. Here, the image processing algorithm can be an edge recognition algorithm.
[0080] Step 183: Determine the edge features around the second predicted gap based on the target region image and the second predicted gap region image.
[0081] The edge features around the second predicted gap refer to the edge features of non-occluded objects extracted from outside the second predicted gap region image defined in the target region image, based on the center point of the second predicted gap.
[0082] Step 184: Identify suspected obstacles based on the edge features of the second expected gap and the edge features surrounding the second expected gap.
[0083] Suspected obstacles refer to external obstructions that, when analyzed by the edge features of the second predicted gap and the edge features around the second predicted gap, show significant differences in contour shape, continuity, and gray-scale gradient, are determined to obstruct the real gap in the target area, preventing the camera from capturing a complete image of the gap and causing the water flow trajectory to be interrupted at its contour line. In essence, they are obstructions that interfere with the identification of the real gap (such as stones, debris, or barriers), and are not gaps in the target area itself.
[0084] Step 185: When a suspected obstacle exists, obtain the average gray value of the pixels in the target area image and define it as the baseline gray value.
[0085] The baseline grayscale value refers to a benchmark value used to measure the overall brightness level of a target area, determined by the average grayscale value of pixels in the target area image. Specifically, it is obtained by first traversing all pixels in the target area image, reading the grayscale value of each pixel, then summing these grayscale values and dividing by the total number of pixels to obtain the average pixel grayscale value, which is then used as the baseline grayscale value.
[0086] Step 186: Obtain the average gray value of the pixels in the second expected gap region image and define it as the current gray value.
[0087] The current grayscale value refers to a numerical value used to measure the overall brightness level of the second predicted notch region image, determined by the average grayscale value of pixels in the second predicted notch region image. The specific acquisition method is similar to that of the baseline grayscale value, and will not be elaborated here.
[0088] Step 187: Determine the grayscale difference based on the baseline grayscale value and the current grayscale value.
[0089] The grayscale difference is the value obtained by subtracting the reference grayscale value from the current grayscale value. This value reflects the degree of difference in brightness level between the image of the second predicted gap region and the overall image of the target region. If the grayscale difference is large, it indicates that the brightness difference between the image of the second predicted gap region and the overall image of the target region is significant, and there may be a suspected obstacle obstructing the gap region. If the grayscale difference is small, it indicates that the brightness difference between the two is not significant, further assisting in the judgment of the suspected obstacle.
[0090] Step 188: Execute the pipeline callback operation when the grayscale difference falls within the preset range of grayscale difference of the obstacle.
[0091] The obstacle grayscale difference range refers to a pre-defined range of grayscale differences used to determine whether the brightness difference between the image of the second expected gap region and the overall image of the target region is caused by suspected obstacle occlusion. This range was derived through statistical analysis of a large amount of experimental data, comprehensively considering the grayscale value changes under different occlusion materials and different target region characteristics. When the grayscale difference falls within this threshold range, it indicates that the brightness difference between the image of the second expected gap region and the overall image of the target region is significant, and there is a high probability that there is suspected obstacle occlusion. The gap exists but is simply obscured by the obstacle. In this case, no matter how the pipeline is selected, the problem of abnormal rate of change cannot be changed, so a pipeline callback operation is executed.
[0092] This also includes a method for performing a pipeline replacement operation when the first and second expected gap locations coincide, the method comprising: Step 19: Obtain the number of the first expected gap locations.
[0093] The first predicted number of gap locations refers to the total number of gap (or crack) locations in the target area image that are preliminarily determined based on the geometric features of the target area, which may lead to abnormal change rates.
[0094] Step 20: When the number of first expected gap locations is 1, obtain the image of the first expected gap region.
[0095] The first expected gap region image refers to a local region image defined in the target region image with the first expected gap location as the core, which can completely contain the features (such as outline, boundary, size, etc.) of the gap (or crevice).
[0096] Step 21: Obtain the average gray value of the pixels in the first expected gap region image and define it as the gap gray value.
[0097] The gap gray value refers to the average gray value of all pixels in the first expected gap region image, used to quantify the overall brightness level of the region. The specific calculation method is similar to the method of obtaining the baseline gray value and the current gray value mentioned earlier. By traversing all pixels in the first expected gap region image, reading their gray values and calculating the average value, the gap gray value is obtained.
[0098] Step 22: Determine the grayscale value of the area surrounding the first expected gap based on the first expected gap area image and the target area image.
[0099] The grayscale value of the area surrounding the first expected gap refers to the overall brightness level of the area surrounding the first expected gap. Specifically, this grayscale value is obtained by statistically calculating the pixel grayscale values of the portion of the target area image immediately adjacent to the first expected gap area. The calculation method is similar to the aforementioned method of obtaining the baseline grayscale value and the current grayscale value, that is, traversing all pixels in the area surrounding the first expected gap, reading their grayscale values, and calculating the average value.
[0100] Step 23: Determine the difference in gray values of the gap based on the gray value of the gap and the gray value of the area surrounding the first expected gap.
[0101] The grayscale difference of the gap refers to the numerical difference between the grayscale value of the gap and the grayscale value of the area surrounding the first expected gap. This difference reflects the degree of change in brightness level between the gap area and the surrounding area. If the grayscale difference of the gap is large, it indicates that the brightness difference between the gap area and the surrounding area is significant, and there may be an obvious gap or crack; if the difference is small, it indicates that the brightness difference between the gap area and the surrounding area is small, and there may be no obvious gap or crack.
[0102] Step 24: Determine the optimized flow rate range when the difference in grayscale values of the notch falls within the preset range of grayscale value differences of the notch.
[0103] The grayscale difference range of the notch refers to a preset threshold range used to determine whether the brightness difference between the first expected notch area and the surrounding area is significant. This range was derived through experimental data statistics and scene adaptation analysis, comprehensively considering the influence of different lighting conditions, target area material characteristics, and notch shape on the grayscale value. When the grayscale difference of the notch falls within this range, it indicates that the brightness difference between the first expected notch area and the surrounding area has reached a significant level, further verifying the existence of the notch and its impact on the fluid change rate.
[0104] Optimized flow velocity range refers to the redefined flow velocity range based on the dynamic characteristics of the target area and fluid transport requirements after confirming the existence of a gap and its impact on the fluid change rate. This optimization process comprehensively considers changes in the gap's location and size, as well as the fluid flow state, ensuring that energy consumption and system pressure fluctuations are minimized while meeting flow velocity requirements.
[0105] Since the number of the first expected gap locations has been determined to be 1 and its location coincides with the location of the second expected gap location, there is no need to worry about leakage caused by a large number of first expected gap locations, which would affect the determination of the optimized flow velocity range.
[0106] Step 25: Perform the pipe replacement operation based on the optimized flow rate range and pipe number library.
[0107] When an optimized flow rate range exists, it indicates that the system has identified the correlation between the current valve status and fluid flow characteristics, requiring further optimization of fluid delivery efficiency through adjustments to the piping configuration. In this case, based on the specific parameters of the optimized flow rate range and information from the piping number library, the most suitable piping is selected for replacement.
[0108] Among them, the methods for determining the optimized flow velocity range when the difference in grayscale values of the gap does not fall within the range of the difference in grayscale values of the obstacle include: Step 240: Acquire multiple consecutive images of the first expected gap region in real time, extract the number of pixels in the water infiltration area in each frame image, and determine the water infiltration area.
[0109] The water infiltration area refers to the area infiltrated by water in each frame of a multi-frame image of the first expected gap region, extracted using image processing techniques, and the total number of pixels in these areas is counted. The product of this number and the actual area represented by a single pixel in the image is the water infiltration area.
[0110] Step 241: Obtain the growth rate of the water flow wetting area based on the water flow wetting area.
[0111] The rate of increase of water infiltration area refers to the amount of increase of water infiltration area per unit time obtained by calculating the difference of water infiltration area in the first expected gap region image of two or more adjacent frames and then dividing it by the time interval.
[0112] Step 242: Determine the expected gap overflow time based on the growth rate of the water infiltration area.
[0113] The estimated overflow time refers to the time from the current moment, when the water flow continues to infiltrate the first estimated gap area at the current rate of increase in the infiltrated area, until the water flow completely covers the infiltrated area of the first estimated gap and is about to overflow from the edge of the gap. It is calculated as follows: First, based on the geometric boundaries of the first estimated gap area image, the total effective infiltrated area of the gap is extracted (by multiplying the maximum number of pixels that can be infiltrated within the gap area by the actual area corresponding to a single pixel in the image). Then, the difference between the currently infiltrated area and the total effective infiltrated area is calculated, resulting in the remaining area to be infiltrated, which is equal to the total effective infiltrated area minus the currently infiltrated area. Finally, the estimated overflow time is obtained using the formula: Estimated gap overflow time = Remaining area to be infiltrated ÷ Water flow infiltrated area growth rate.
[0114] Step 243: Determine the waiting time when the gap overflow time is greater than the preset maximum waiting time threshold.
[0115] The maximum waiting time threshold is a pre-set critical time value used to determine whether additional measures need to be initiated to accelerate the speed at which water overflows from the gap.
[0116] Step 244: Determine the rate of change influencing the area based on the rate of increase and change of the water flow infiltration area.
[0117] The change impact rate is the degree of influence of the growth rate of the water infiltration area on the change rate. Specifically, the change impact rate is obtained by correlation analysis between the growth rate of the water infiltration area and the change rate. Its calculation formula can be designed as follows: the change impact rate is equal to the ratio of the growth rate of the water infiltration area to the change rate multiplied by a correction factor (this correction factor is calibrated according to the actual fluid characteristics and the characteristics of the target area).
[0118] Step 245: Determine the optimal flow velocity range based on the change influence rate and change rate.
[0119] The optimized flow rate range at this point refers to the final flow rate range that adapts to the water flow wetting requirements and makes the rate of change fall back to the preset global rate of change range after the determined target flow rate range is precisely adjusted based on the change influence rate and change rate, combined with the expected gap overflow time.
[0120] Step 246: Perform pipe replacement operation based on the optimized flow rate range.
[0121] When an optimized flow rate range exists, it means that a final flow rate interval has been obtained that adapts to the current water flow wetting requirements and allows the rate of change to fall back into the global rate of change range; this is the optimized flow rate range. At this point, based on this optimized flow rate range, pipe numbers matching the new flow rate range will be selected again from the pipe number library to perform the pipe replacement operation.
[0122] This also includes a method for updating the scene feature library, which includes: Step 30: Determine the unknown scene number when the current target area does not exist.
[0123] An unknown scene ID is a unique identifier assigned to a target area when the system detects that it cannot match any known scene. This ID is used for subsequent expansion and updates of the scene feature library, ensuring that the system can gradually improve its adaptability to diverse scenes.
[0124] Step 31: Determine scene similarity by traversing the scene feature library based on the target region features corresponding to the unknown scene number.
[0125] Scene similarity refers to the numerical value obtained by calculating the similarity between the features of the target region corresponding to an unknown scene number and the features of existing scenes in the scene feature library. This value is used to measure the degree of feature similarity between the current unknown scene and known scenes, and the specific calculation method is determined using the cosine similarity algorithm.
[0126] Step 32: Sort the similar scenes based on scene similarity to determine the current similar scene number.
[0127] The current similar scene number refers to the known scene number in the scene feature library that has the highest similarity to the target area features corresponding to the unknown scene number of the unmatched target area flow velocity range.
[0128] Step 33: Obtain the flow velocity range of the target area corresponding to the current similar scene number, and define it as the temporary target area flow velocity range.
[0129] The temporary target area flow velocity range refers to the flow velocity interval of the target area extracted by the system based on the flow velocity characteristics of known scenarios under the current similar scenario number. This range is used to temporarily guide the flow velocity adjustment of the current target area to ensure the system's initial adaptability in unknown scenarios.
[0130] Step 34: Update the scene feature library based on the flow velocity range of the temporary target area and the unknown scene number.
[0131] When a temporary target area flow velocity range exists and a corresponding unknown scene number exists, it means that the system has found a suitable flow velocity range for the unknown scene, and can improve support for new scenes by updating the scene feature library.
[0132] This also includes a method for updating the target flow rate database, which includes: Step 140: After performing the pipeline replacement operation, when the rate of change falls within the global rate of change range, obtain the current scene number.
[0133] The current scene number is used to identify the specific scene matched by the current target area. After the system performs the pipeline replacement operation, if the change rate is detected to successfully fall into the global change rate range, it means that the current scene number has been successfully adapted. The current scene number and the target flow rate range after the pipeline replacement operation can be used as a reference for subsequent updates to the target flow rate data.
[0134] Step 141: Accumulate the number of consecutive occurrences of the current scene number.
[0135] The number of consecutive occurrences of the current scene number refers to the number of times that the rate of change does not fall within the global rate of change range when fluid is transported to the target scene area, obtained from the target flow rate database corresponding to the current scene number. This number indicates that the target flow rate range is no longer suitable for the current scene number.
[0136] Step 142: When the number of consecutive occurrences of the current scene number exceeds the preset reliable update threshold, update the target flow rate database based on the corrected target flow rate range.
[0137] The reliable update count threshold is a pre-set value used to determine whether the target flow rate database needs to be updated. If the number of consecutive updates for the current scenario number exceeds the reliable update count threshold, it means that the target flow rate range can no longer effectively adapt to the actual water flow control requirements of the current scenario. In this case, the corrected target flow rate range, which ensures that the rate of change falls into the global rate of change range after this pipeline replacement operation, should be used to replace the original target flow rate range corresponding to the current scenario number in the target flow rate database.
[0138] Based on the same inventive concept, embodiments of the present invention provide a valve optimization control system based on scenario adaptation.
[0139] A scenario-adaptive valve optimization control system includes: The acquisition module is used to acquire the target region image and target region features; The memory is used to store the program of a scenario-adaptive valve optimization control method; The processor loads and executes programs from memory.
[0140] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A valve optimization control method based on scenario adaptation, characterized in that, include: Step 1: Acquire images of the target area in real time; Step 2: Determine the features of the target region based on the target region image; Step 3: Determine the current target area based on the characteristics of the target area and the preset scene feature library; Step 4: Determine the target flow rate range corresponding to the current target area through a preset target flow rate database; Step 5: Obtain valve flow path parameters; Step 6: Determine the optimal valve parameters based on the target flow rate range and valve flow path parameters; Step 7: Based on the target flow rate range and optimized valve parameters, traverse the target pipe parameters corresponding to the pipe numbers in the preset pipe number library; Step 8: Determine the expected flow velocity range based on the target pipeline parameters and optimized valve parameters; Step 9: Determine the target pipe number when the expected flow rate falls within the target flow rate range; Step 10: Execute valve control operations based on the target pipeline number; Methods for correcting the target pipeline number include: Step 11: Determine the rate of change in real time based on the target area image. The rate of change is the number of pixels in the same target area whose pixel grayscale value changes more than a preset pixel grayscale change threshold per unit time. Step 12: Determine the rate of change deviation value when the rate of change does not fall within the preset global rate of change range; Step 13: Determine the target flow velocity range for correction based on the rate of change deviation value; Step 14: Based on the corrected target flow rate range, redetermine the target pipe number and perform the pipe replacement operation.
2. The valve optimization control method based on scenario adaptation according to claim 1, characterized in that, Methods for determining the rate of change in real time based on target region images include: Step 110: Obtain the brightness variance of the target region image; Step 111: When the brightness variance of the target area image falls within the preset effective brightness variance threshold, obtain the average brightness of the target area image; Step 112: Determine the grayscale change threshold of the current pixel based on the average brightness of the target region image and the preset grayscale change threshold mapping table; Step 113: Determine the rate of change based on the target region image and the current pixel grayscale change threshold.
3. The valve optimization control method based on scenario adaptation according to claim 1, characterized in that, It also includes a verification method after the pipeline replacement operation is completed, which includes: Step 15: Monitor the rate of change after the pipe replacement operation is completed; Step 16: When the rate of change falls within the preset abnormal rate of change range, determine the water flow trajectory and the location of the first expected gap based on the target area image; Step 17: Determine the location of the second predicted gap based on the water flow trajectory; Step 18: Execute the pipeline pullback operation when the first and second expected gap positions coincide.
4. The valve optimization control method based on scenario adaptation according to claim 3, characterized in that, It also includes a method for performing a pipeline callback operation when the first expected gap position and the second expected gap position do not coincide or there is no first expected gap position, the method comprising: Step 180: Determine the center point of the second predicted gap based on the water flow trajectory; Step 181: Determine the image of the second expected gap region based on the center point of the second expected gap; Step 182: Determine the edge features of the second predicted gap based on the image of the second predicted gap region; Step 183: Determine the edge features around the second predicted gap based on the target region image and the second predicted gap region image; Step 184: Identify suspected obstacles based on the edge features of the second predicted gap and the edge features surrounding the second predicted gap; Step 185: When a suspected obstacle exists, obtain the average gray value of the pixels in the target area image and define it as the baseline gray value; Step 186: Obtain the average gray value of the pixels in the second expected gap region image and define it as the current gray value; Step 187: Determine the grayscale value difference based on the baseline grayscale value and the current grayscale value; Step 188: Execute the pipeline callback operation when the grayscale difference falls within the preset range of grayscale difference of the obstacle.
5. The valve optimization control method based on scenario adaptation according to claim 3, characterized in that, It also includes a method for performing a pipeline replacement operation when the first and second expected gap locations coincide, the method comprising: Step 19: Obtain the number of the first expected gap locations; Step 20: When the number of first expected gap locations is 1, acquire the image of the first expected gap region; Step 21: Obtain the average pixel gray value of the first expected gap region image and define it as the gap gray value; Step 22: Determine the grayscale value of the area surrounding the first expected gap based on the first expected gap area image and the target area image; Step 23: Determine the difference in grayscale value of the gap based on the grayscale value of the gap and the grayscale value of the area surrounding the first expected gap; Step 24: Determine the optimized flow rate range when the difference in grayscale values of the notch falls within the preset range of grayscale value differences of the notch; Step 25: Perform the pipe replacement operation based on the optimized flow rate range and pipe number library.
6. The valve optimization control method based on scenario adaptation according to claim 5, characterized in that, Methods for determining the optimal flow velocity range when the difference in grayscale values of the gap does not fall within the range of the difference in grayscale values of the obstacle include: Step 240: Acquire multiple consecutive frames of the first expected gap region image in real time, extract the number of pixels in the water infiltration area in each frame image, and determine the water infiltration area; Step 241: Obtain the growth rate of the water flow wetting area based on the water flow wetting area; Step 242: Determine the expected gap overflow time based on the growth rate of the water infiltration area; Step 243: Determine the waiting time when the gap overflow time is greater than the preset maximum waiting time threshold; Step 244: Determine the change influence rate based on the growth rate and change rate of the water infiltration area, wherein the change influence rate is the degree of influence of the growth rate of the water infiltration area on the change rate; Step 245: Determine the optimal flow velocity range based on the change influence rate and change rate; Step 246: Perform pipe replacement operation based on the optimized flow rate range.
7. The valve optimization control method based on scenario adaptation according to claim 1, characterized in that, It also includes a method for updating the scene feature library, which includes: Step 30: Determine the unknown scene number when the current target area does not exist; Step 31: Determine scene similarity by traversing the scene feature library based on the target region features corresponding to the unknown scene number; Step 32: Sort the current similar scene numbers based on scene similarity; Step 33: Obtain the flow velocity range of the target area corresponding to the current similar scene number, and define it as the temporary target area flow velocity range; Step 34: Update the scene feature library based on the flow velocity range of the temporary target area and the unknown scene number.
8. The valve optimization control method based on scenario adaptation according to claim 1, characterized in that, It also includes a method for updating the target flow rate database, which includes: Step 140: After performing the pipeline replacement operation, when the rate of change falls within the global rate of change range, obtain the current scene number; Step 141: Accumulate the number of consecutive occurrences of the current scene number; Step 142: When the number of consecutive occurrences of the current scene number exceeds the preset reliable update threshold, update the target flow rate database based on the corrected target flow rate range.
9. A valve optimization control system based on scenario adaptation, characterized in that, include: The acquisition module is used to acquire the target region image and target region features; A memory for storing a program of a scenario-adaptive valve optimization control method as described in any one of claims 1 to 8; The processor loads and executes programs from memory.
Citation Information
Patent Citations
Operation scheme intelligent fitting system and method based on electric control valve
CN117927716A
Design method and device for quick response steam extraction check valve under high-parameter working condition
CN119476064A