A liquid level detection method, system, device and storage medium

By combining natural light and infrared light to obtain the light intensity difference and gradient difference, the problem of infrared light refraction liquid level detection being easily interfered with by ambient light noise is solved, and high accuracy and reliability of liquid level detection are achieved.

CN122306190APending Publication Date: 2026-06-30SHENZHEN RUILIAN SENSING TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN RUILIAN SENSING TECHNOLOGY CO LTD
Filing Date
2026-04-22
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Infrared refraction liquid level detection is easily affected by ambient light and noise in outdoor or non-enclosed conditions, leading to inaccurate detection results.

Method used

By acquiring the standard illumination intensity of the tested pipeline under natural light and the refracted illumination intensity under natural light plus infrared light, the difference in illumination intensity and gradient difference are calculated to construct a decision index to determine whether there is liquid in the pipeline.

Benefits of technology

It effectively eliminates background noise interference caused by ambient light, improves the accuracy and reliability of liquid level detection, and can accurately determine whether there is liquid in the pipeline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122306190A_ABST
    Figure CN122306190A_ABST
Patent Text Reader

Abstract

This application discloses a liquid level detection method, system, device, and storage medium. It acquires the standard illumination intensity at the focal point of the tested pipe under natural light only, and the refracted illumination intensity at the same point under both natural light and a preset number of infrared rays. The detection result is then obtained based on the standard illumination intensity and the refracted illumination intensity. The detection result in this invention is based on the illumination intensity under natural light only, compared with the refracted illumination intensity after superimposing infrared rays. This effectively eliminates background noise interference from ambient light, accurately distinguishes the illumination intensity changes caused by the refraction of preset infrared rays through the pipe, and thus precisely determines whether there is liquid in the tested pipe, improving the accuracy and reliability of the detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of liquid level sensing technology, and in particular to a liquid level detection method, system, device and storage medium. Background Technology

[0002] Infrared refraction level detection, as a non-contact measurement technology, has advantages such as fast response speed and no influence from the conductivity or dielectric constant of the medium. However, infrared refraction level detection requires detecting changes in the intensity of refracted light within a specific wavelength range. However, sunlight, industrial lighting, and various heat sources in the natural environment contain rich infrared band components. In outdoor or non-enclosed working conditions, irregular fluctuations in ambient light will be directly superimposed on the infrared light detection signal, forming background noise. This makes the infrared light detection signal easily submerged by environmental noise, resulting in inaccurate detection results. Summary of the Invention

[0003] In view of this, the present invention provides a liquid level detection method, system, device and storage medium.

[0004] The specific technical solution of the first embodiment of the present invention is as follows: a liquid level detection method, the method comprising: acquiring the standard illumination intensity at the measured refraction focal point of the tested pipe under illumination in a first environment; the first environment comprising only natural light; the measured refraction focal point being the refraction focal point after light is refracted through the tested pipe filled with liquid; acquiring the refracted illumination intensity at the measured refraction focal point of the tested pipe under illumination in a second environment; the second environment comprising natural light and a preset number of infrared rays; acquiring the detection result of the tested pipe based on the standard illumination intensity and the refracted illumination intensity, the detection result including whether there is liquid or no liquid in the tested pipe.

[0005] Preferably, obtaining the test result of the pipe under test based on the standard light intensity and the refracted light intensity includes: obtaining an intensity threshold based on the standard light intensity, the refracted light intensity and a preset coefficient; obtaining the light intensity difference between the standard light intensity and the refracted light intensity; and obtaining the test result of the pipe under test based on the light intensity difference and the intensity threshold.

[0006] Preferably, the step of obtaining the detection result of the tested pipe based on the light intensity difference and the intensity threshold includes: dividing the light intensity difference by the intensity threshold to obtain a first decision index; the decision index is used to characterize the probability that the tested pipe contains liquid; obtaining the detection result of the tested pipe based on the first decision index and a first preset judgment rule; the first preset judgment rule includes: if the first decision index is less than a first threshold constant, then there is no liquid in the tested pipe; if the first decision index is greater than or equal to the first threshold constant and less than a second threshold constant, then the first decision index is invalid, and the process returns to the step of obtaining the standard light intensity at the tested refraction focal point of the tested pipe under the illumination of the first environment to re-obtain the first decision index; the first threshold constant is less than the second threshold constant; if the first decision index is greater than or equal to the second threshold constant, then there is liquid in the tested pipe.

[0007] Preferably, obtaining the test result of the pipe under test based on the standard illumination intensity and the refracted illumination intensity includes: obtaining an intensity threshold based on the standard illumination intensity, the refracted illumination intensity, and a preset coefficient; constructing a square coordinate system with side length L, using the refracted focal point as the coordinate center; the shortest connecting line between the coordinate center and the central axis of the pipe under test is perpendicular to the plane coordinate system; obtaining the first illumination intensity at different coordinate points in the square coordinate system under a first environment, and obtaining the second illumination intensity at different coordinate points in the square coordinate system under a second environment; performing gradient difference summation on the first illumination intensity and the second illumination intensity to obtain a second decision index; and obtaining the test result of the pipe under test based on the second decision index and the intensity threshold.

[0008] Preferably, obtaining the detection result of the tested pipe based on the second decision index and the intensity threshold includes: if the second decision index is less than the intensity threshold, then there is no liquid in the tested pipe; if the second decision index is greater than or equal to the intensity threshold, then there is liquid in the tested pipe.

[0009] Preferably, the second decision index is obtained using the following formula:

[0010] in, The second judgment indicator, Let be the side length of the square coordinate system. Let be the second illumination intensity at coordinate point (i,j). Let be the first illumination intensity at coordinate point (i,j). for The approximate gradient value in the row direction of the coordinate system. for The gradient approximation in the coordinate series directions, It is a constant.

[0011] Preferably, the intensity threshold is obtained using the following formula:

[0012] in, The intensity threshold, The standard illumination intensity is... The intensity of the refracted light. and These are preset coefficients.

[0013] The specific technical solution of the second embodiment of the present invention is as follows: a liquid level detection system, the system comprising: a first light intensity acquisition module, a second light intensity acquisition module, and a detection module; the first light intensity acquisition module is used to acquire the standard light intensity at the test refraction focal point of the pipe under test under the illumination of a first environment; the first environment includes only natural light; the test refraction focal point is the refraction focal point after the light is refracted through the pipe under test filled with liquid; the second light intensity acquisition module is used to acquire the refracted light intensity at the test refraction focal point of the pipe under test under the illumination of a second environment; the second environment includes natural light and a preset number of infrared rays; the detection module acquires the detection result of the pipe under test according to the standard light intensity and the refracted light intensity, the detection result including whether there is liquid or no liquid in the pipe under test.

[0014] The specific technical solution of the third embodiment of the present invention is as follows: a liquid level detection device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the steps of the method as described in any one of the first embodiments of this application.

[0015] The specific technical solution of the fourth embodiment of the present invention is as follows: a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the steps of the method as described in any one of the first embodiments of this application.

[0016] Implementing the embodiments of the present invention will have the following beneficial effects: This invention obtains the standard illumination intensity at the focal point of the tested pipe under natural light alone, and the refracted illumination intensity at the same point under both natural light and a preset number of infrared rays. The detection result is then obtained based on both the standard and refracted illumination intensities. The detection result in this invention is based on the illumination intensity under natural light alone, compared with the refracted illumination intensity after superimposing infrared rays. This effectively eliminates background noise interference from ambient light, accurately distinguishes the illumination intensity changes caused by the refraction of preset infrared rays through the pipe, and thus precisely determines whether there is liquid inside the tested pipe, improving the accuracy and reliability of the detection results. Attached Figure Description

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

[0018] Figure 1 This is a flowchart of the steps involved in a liquid level detection method. Figure 2 This is a schematic diagram of the structure of a liquid level detection system; Figure 3 This is a diagram of the internal structure of a computer device. Among them, 201 is the first light intensity acquisition module; 202 is the second light intensity acquisition module; and 203 is the detection module. Detailed Implementation

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

[0020] The terms "first," "second," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to such processes, methods, products, or apparatus.

[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0022] Please see Figure 1 This is a flowchart of a liquid level detection method according to the first embodiment of this application, which accurately determines whether there is liquid in the pipe being tested. The method includes: Step 101: Obtain the standard illumination intensity at the test refraction focal point of the pipe under test under the illumination of the first environment; the first environment includes only natural light; the test refraction focal point is the refraction focal point after the light is refracted through the pipe under test filled with liquid; Step 102: Obtain the refracted light intensity at the test refraction focal point of the pipe under test under the illumination of the second environment; the second environment includes natural light and a preset number of infrared rays; Step 103: Obtain the test result of the tested pipe based on the standard light intensity and the refracted light intensity. The test result includes whether there is liquid or not in the tested pipe.

[0023] Specifically, before testing, ensure the pipe to be tested is placed horizontally and its surface is clean. In the first environment with only natural light, use a light intensity sensor, precisely positioned at the focal point of refraction on the pipe being tested. This focal point is formed after light is refracted through the liquid-filled pipe. Record the light intensity collected by the sensor at this point as the standard light intensity. Activate a preset number of infrared light emitters to create a second environment containing both natural and infrared light. Again, use the light intensity sensor to collect the light intensity at the same focal point of refraction and record it as the refracted light intensity. Compare the standard light intensity and the refracted light intensity. If the difference is within a preset threshold range, it is determined that there is no liquid in the pipe; if the difference exceeds the preset threshold, it is determined that there is liquid in the pipe, thus completing the liquid level detection and outputting the detection result.

[0024] Specifically, in the first environment, an intact pipe is filled with liquid and positioned in its installation position. Using a high-resolution optical sensor array, the light intensity distribution is scanned and measured on one side of the central axis of the pipe's cross-section. The point of maximum local light intensity, or the point with the largest rate of change relative to the surrounding background light intensity, is the focal point of refraction being measured. In this first environment, only natural light, such as sunlight or a standard simulated sunlight source, is used to exclude interference from other artificial light sources, ensuring that the obtained focal point is based on the refraction effect of natural light on the pipe and liquid.

[0025] The spatial coordinates of the refraction focus relative to the pipe being measured (such as a cylindrical coordinate system with the center of the pipe cross-section as the origin and the major axis of the pipe being measured as the Z-axis), as well as the pipe specifications, installation posture, and the position of the refraction focus being measured, are bound to a database or configuration file.

[0026] When replacing pipes with different materials, diameters, or wall thicknesses, the refraction focus needs to be recalibrated. Recalibration is also necessary when changes in the pipe's tilt angle or rotation direction alter its spatial relationship relative to the principal direction of natural light. Normal variations in light intensity throughout the day do not require recalibration of the refraction focus, as long as they do not affect the stability of light intensity measurement and judgment. If the type of liquid inside the pipe changes, but the refractive index of the new liquid is similar to that of the original calibration liquid, the refraction focus position usually shifts only slightly, and the original refraction focus can be used. However, if the refractive index difference is significant, recalibration of the refraction focus is required.

[0027] The liquid inside the pipe can be a conventional liquid such as tap water or purified water, or an oily liquid such as gasoline or crude oil, or a chemical solvent such as alcohol.

[0028] The first environment is designed to eliminate interference from specific artificial light sources, especially infrared interference. The first environment can be created in an open outdoor area, an indoor space with large windows for natural light, or by using sunlight to simulate light sources. The second environment is created by superimposing an infrared light field onto the first environment. This involves maintaining the natural light illumination of the first environment while activating a pre-arranged array of infrared supplementary lights. The wavelength of the infrared light can be 850nm or 940nm.

[0029] The method in this embodiment obtains the standard illumination intensity at the focal point of the pipe under test under natural light only, and the refracted illumination intensity at the same point under both natural light and a preset number of infrared rays. The detection result is then obtained based on the standard illumination intensity and the refracted illumination intensity. The detection result in this invention is based on the illumination intensity under natural light only, compared with the refracted illumination intensity after superimposing infrared rays. This effectively eliminates background noise interference from ambient light, accurately distinguishes the illumination intensity changes caused by the refraction of preset infrared rays through the pipe, and thus precisely determines whether there is liquid inside the pipe under test, improving the accuracy and reliability of the detection result.

[0030] In one feasible implementation, obtaining the test result of the pipe under test based on the standard light intensity and the refracted light intensity can also be achieved by: obtaining an intensity threshold based on the standard light intensity, the refracted light intensity, and a preset coefficient; obtaining the light intensity difference between the standard light intensity and the refracted light intensity; and obtaining the test result of the pipe under test based on the light intensity difference and the intensity threshold.

[0031] In one feasible implementation, the intensity threshold can be achieved using the following formula:

[0032] in, The intensity threshold, The standard illumination intensity is... The intensity of the refracted light. and This is a preset coefficient. Specifically, by comprehensively considering both standard light intensity and refracted light intensity, and introducing a preset coefficient to calculate the intensity threshold, the boundary value for determining the presence or absence of liquid level can be determined more accurately. Compared to a fixed threshold setting, this method can better adapt to different environmental conditions and pipeline characteristics, improving the accuracy and adaptability of the threshold.

[0033] Specifically, in a first environment with only natural light, the light intensity sensor is precisely placed at the focal point of refraction (the focal point after light is refracted through the liquid-filled pipe) of the tested pipe, and the standard light intensity is recorded. A preset number of infrared light emitters are then activated, creating a second environment containing both natural and infrared light. The same light intensity sensor is used again to measure the refracted light intensity at the same focal point. An intensity threshold is calculated based on the standard light intensity, the refracted light intensity, and a preset coefficient. The difference between the standard light intensity and the refracted light intensity is then calculated. This difference is compared to the intensity threshold. If the difference is greater than the threshold, liquid is detected in the tested pipe; if the difference is less than or equal to the threshold, no liquid is detected in the pipe, and the final detection result is output.

[0034] In one feasible implementation, obtaining the detection result of the tested pipe based on the light intensity difference and the intensity threshold can also be achieved by: dividing the light intensity difference by the intensity threshold to obtain a first decision index; the decision index is used to characterize the probability that the tested pipe contains liquid; obtaining the detection result of the tested pipe based on the first decision index and a first preset judgment rule; the first preset judgment rule includes: if the first decision index is less than a first threshold constant, then there is no liquid in the tested pipe; if the first decision index is greater than or equal to the first threshold constant and less than a second threshold constant, then the first decision index is invalid, and the process returns to the step of obtaining the standard light intensity at the tested refraction focal point of the tested pipe under the illumination of the first environment to re-obtain the first decision index; the first threshold constant is less than the second threshold constant; if the first decision index is greater than or equal to the second threshold constant, then there is liquid in the tested pipe.

[0035] Specifically, the difference in light intensity is divided by an intensity threshold to obtain the first decision index. If the first decision index is less than a first threshold constant, it is determined that there is no liquid in the tested pipe. If the first decision index is greater than or equal to the first threshold constant and less than a second threshold constant, the first decision index is determined to be invalid (there may be liquid in the pipe, or there may be no liquid; the detection result is inaccurate in this case), and the process returns to the step of obtaining the standard light intensity to obtain the first decision index again. If the first decision index is greater than or equal to the second threshold constant, it is determined that there is liquid in the tested pipe, and the final detection result is output. By dividing the difference in light intensity by an intensity threshold to obtain the first decision index, the probability of liquid in the tested pipe is quantitatively represented. Compared with simple difference comparison, this method can reflect the liquid level status more meticulously, making the detection results more accurate and reliable. A first preset judgment rule is set, and when the first decision index is within a specific range, it is determined to be invalid and re-detected, avoiding misjudgments caused by accidental factors or measurement errors, thus improving the accuracy and stability of the detection. The mechanism for re-acquiring the first judgment indicator can self-correct when abnormal data occurs, enhancing the fault tolerance and robustness of the entire liquid level detection process and ensuring accurate liquid level detection even in complex environments.

[0036] In another feasible implementation, the detection result of the tested pipe based on the standard illumination intensity and the refracted illumination intensity can also be achieved by the following method: obtaining an intensity threshold based on the standard illumination intensity, the refracted illumination intensity, and a preset coefficient; constructing a square coordinate system with side length L, using the tested refraction focus as the coordinate center; the shortest connecting line between the coordinate center and the central axis of the tested pipe is perpendicular to the plane coordinate system; obtaining the first illumination intensity at different coordinate points in the square coordinate system under a first environment, and obtaining the second illumination intensity at different coordinate points in the square coordinate system under a second environment; summing the gradient difference between the first illumination intensity and the second illumination intensity to obtain a second decision index; and obtaining the detection result of the tested pipe based on the second decision index and the intensity threshold.

[0037] Specifically, in the first environment with only natural light, a light intensity sensor is used to construct a square coordinate system with side length L, centered on the focal point of the refraction being measured. The shortest line connecting the coordinate center to the central axis of the pipe being measured is perpendicular to this coordinate system. Multiple different coordinate points are selected within the square coordinate system, and the light intensity sensor sequentially measures and records the first light intensity at each point. A preset number of infrared light emitting devices are then activated, creating a second environment containing both natural and infrared light. The second light intensity at each coordinate point within the same square coordinate system is measured and recorded again. The gradient difference between the first and second light intensities is summed to calculate the second decision index. Simultaneously, an intensity threshold is calculated based on the standard light intensity, the refracted light intensity, and a preset coefficient. The second decision index is compared to the intensity threshold. If the second decision index is greater than or equal to the intensity threshold, it is determined that there is liquid in the pipe being measured; if the second decision index is less than the intensity threshold, it is determined that there is no liquid in the pipe being measured, and the detection result is output. By constructing a square coordinate system and measuring the illumination intensity at multiple coordinate points, a second decision index is obtained through gradient difference summation. This provides a more comprehensive and detailed reflection of the illumination intensity changes around the measured pipeline, effectively improving the accuracy of liquid level detection compared to single-focus measurement. Considering the illumination information from multiple coordinate points effectively reduces the impact of local environmental interference and pipeline surface inhomogeneity on the detection results, making the results more stable and reliable. Utilizing gradient difference summation allows for the capture of subtle spatial changes in illumination intensity, enabling a more accurate determination of the presence or absence of liquid within the pipeline.

[0038] In another feasible implementation, the second decision index is obtained using the following formula:

[0039] in, The second judgment indicator, Let be the side length of the square coordinate system. Let be the second illumination intensity at coordinate point (i,j). Let be the first illumination intensity at coordinate point (i,j). for The approximate gradient value in the row direction of the coordinate system. for The gradient approximation in the coordinate series directions, It is a constant.

[0040] Specifically, This reflects the change in light intensity at a given coordinate point after the introduction of infrared light. If there is liquid inside the pipe, the refraction of light changes, resulting in different light intensity variations at each coordinate point compared to when there is no liquid. This difference is crucial information for determining the liquid level. Calculating the sum of squares of the gradient comprehensively considers the drastic changes in light intensity in both the horizontal and vertical directions. When there is liquid inside the pipe, light refraction alters the spatial distribution of light intensity, and the gradient changes accordingly. Therefore, this term provides a basis for liquid level judgment from the perspective of spatial variation. The constant is introduced primarily to avoid calculation results that are too small or even close to zero when the gradient value is too small, ensuring the stability and numerical rationality of the formula calculation and preventing large fluctuations in results due to minor calculation errors. Utilizing gradient approximations and complex formulas to calculate the second decision index fully considers the spatial variation characteristics of light intensity, enabling more accurate capture of light intensity differences caused by the presence of liquid inside the pipe, thereby improving the accuracy of liquid level detection.

[0041] In another feasible implementation, to further improve the accuracy and stability of liquid level detection, in addition to obtaining standard light intensity and refracted light intensity according to established methods and performing relevant calculations, the refracted light intensity can be measured multiple times. In a second environment containing natural light and a preset number of infrared rays, multiple independent measurements are performed at the focal point of the refraction in the measured pipe using a high-precision light intensity sensor, obtaining a series of refracted light intensity data. These data are then statistically analyzed to calculate the average value of the refracted light intensity. This average value more comprehensively and objectively reflects the characteristics of refracted light intensity caused by the pipe and its internal liquid state under specific conditions. In subsequent calculations of intensity thresholds and determination of the presence or absence of liquid level using relevant formulas, this average value is used to effectively reduce the impact of single measurement errors, making the detection results more accurately reflect the liquid level in the pipe and improving the reliability and accuracy of the entire liquid level detection system.

[0042] In a specific embodiment, please refer to Figure 2This is a schematic diagram of a liquid level detection system provided in the second embodiment of this application. The system includes: a first light intensity acquisition module 201, a second light intensity acquisition module 202, and a detection module 203. The first light intensity acquisition module 201 is used to acquire the standard light intensity at the test refraction focal point of the pipe under test under the illumination of a first environment; the first environment includes only natural light; the test refraction focal point is the refraction focal point after the light is refracted through the pipe under test filled with liquid. The second light intensity acquisition module 202 is used to acquire the refracted light intensity at the test refraction focal point of the pipe under test under the illumination of a second environment; the second environment includes natural light and a preset number of infrared rays. The detection module 203 acquires the detection result of the pipe under test based on the standard light intensity and the refracted light intensity, and the detection result includes whether there is liquid or not in the pipe under test.

[0043] Specifically, before testing, ensure the pipe to be tested is placed horizontally and its surface is clean. In the first environment with only natural light, use a light intensity sensor, precisely aligned with the focal point of refraction on the pipe being tested. This focal point is formed after light is refracted through the liquid-filled pipe, and record the standard light intensity at this point. Then, activate a preset number of infrared light emitters to create a second environment containing both natural and infrared light. Again, use the light intensity sensor to measure the refracted light intensity at the same focal point. By comparing the standard light intensity and the refracted light intensity, if the difference is within a preset threshold range, it is determined that there is no liquid in the pipe; if the difference exceeds the preset threshold, it is determined that there is liquid in the pipe, thus completing the liquid level detection and outputting the detection result.

[0044] The system in this embodiment acquires the standard illumination intensity at the focal point of the pipe under test under natural light only, and the refracted illumination intensity at the same point under both natural light and a preset number of infrared rays. The detection result is then obtained based on the standard illumination intensity and the refracted illumination intensity. The detection result in this invention is based on the illumination intensity under natural light only, compared with the refracted illumination intensity after superimposing infrared rays. This effectively eliminates background noise interference from ambient light, accurately distinguishes the illumination intensity changes caused by the refraction of preset infrared rays through the pipe, and thus precisely determines whether there is liquid inside the pipe under test, improving the accuracy and reliability of the detection result.

[0045] In a specific embodiment, the third embodiment of this application provides a liquid level detection device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method as described in any one of the first embodiments of this application.

[0046] In a specific embodiment, the fourth embodiment of this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method as described in any one of the first embodiments of this application.

[0047] Figure 3 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. See also... Figure 3 The computer device includes a processor, memory, etc., connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program causes the processor to implement the method described in this embodiment. The internal memory may also store a computer program, which, when executed by the processor, causes the processor to perform the method described in this embodiment. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0048] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

[0049] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A liquid level detection method, characterized by, The method includes: The standard illumination intensity at the test refraction focal point of the pipe under test is obtained under the illumination of a first environment; the first environment includes only natural light; the test refraction focal point is the refraction focal point after the light is refracted through the pipe under test filled with liquid; The intensity of refracted light at the focal point of the tested pipe is obtained under illumination in a second environment; the second environment includes natural light and a preset number of infrared rays. The test results of the tested pipe are obtained based on the standard light intensity and the refracted light intensity, and the test results include whether there is liquid or not in the tested pipe.

2. The liquid level detection method according to claim 1, wherein The step of obtaining the test result of the pipe under test based on the standard light intensity and the refracted light intensity includes: The intensity threshold is obtained based on the standard light intensity, the refracted light intensity, and the preset coefficient; Obtain the light intensity difference between the standard light intensity and the refracted light intensity; The detection result of the tested pipeline is obtained based on the difference in light intensity and the intensity threshold.

3. The liquid level detecting method according to claim 2, wherein The step of obtaining the detection result of the tested pipeline based on the light intensity difference and intensity threshold includes: The first decision index is obtained by dividing the light intensity difference by the intensity threshold; the decision index is used to characterize the probability that the tested pipe contains liquid. The test results of the tested pipeline are obtained according to the first judgment index and the first preset judgment rule; The first preset determination rule includes: If the first judgment index is less than the first threshold constant, then there is no liquid in the tested pipe; If the first decision index is greater than or equal to the first threshold constant and less than the second threshold constant, then the first decision index is invalid, and the process returns to the step of obtaining the standard illumination intensity at the test refraction focal point of the tested pipe under the illumination of the first environment to re-obtain the first decision index; the first threshold constant is less than the second threshold constant. If the first decision index is greater than or equal to the second threshold constant, then the tested pipe contains liquid.

4. The liquid level detecting method according to claim 1, wherein The step of obtaining the test result of the pipe under test based on the standard light intensity and the refracted light intensity includes: The intensity threshold is obtained based on the standard light intensity, the refracted light intensity, and the preset coefficient; A square coordinate system with side length L is constructed using the measured refraction focus as the coordinate center; the shortest line connecting the coordinate center and the central axis of the measured pipe is perpendicular to the plane coordinate system. The first illumination intensity at different coordinate points within the square coordinate system in the first environment is obtained, and the second illumination intensity at different coordinate points within the square coordinate system in the second environment is obtained. The first light intensity and the second light intensity are summed by gradient difference to obtain the second decision index; The test results of the tested pipeline are obtained based on the second judgment index and the strength threshold.

5. The liquid level detection method according to claim 4, characterized in that, The step of obtaining the detection result of the tested pipeline based on the second judgment index and the strength threshold includes: If the second judgment index is less than the intensity threshold, then there is no liquid in the tested pipe; If the second judgment index is greater than or equal to the intensity threshold, then there is liquid in the tested pipe.

6. The liquid level detecting method according to claim 4, wherein The second judgment index is obtained using the following formula: wherein is the second decision criterion, is the side length of the square coordinate system, is the second light intensity at coordinate point (i,j), is the first light intensity at coordinate point (i,j), is the first decision criterion, is the gradient approximation in the coordinate system row direction, is the second decision criterion, is the gradient approximation in the coordinate system column direction, is a constant.

7. The liquid level detection method as described in claim 2 or claim 4, characterized in that, The intensity threshold is obtained using the following formula: in, The intensity threshold, The standard light intensity is... The intensity of the refracted light. and These are preset coefficients.

8. A liquid level detection system, characterized in that, The system includes: a first light intensity acquisition module, a second light intensity acquisition module, and a detection module; The first light intensity acquisition module is used to acquire the standard light intensity at the test refraction focal point of the pipe under test under the illumination of a first environment; the first environment includes only natural light; the test refraction focal point is the refraction focal point after the light is refracted through the pipe under test filled with liquid; The second light intensity acquisition module is used to acquire the refracted light intensity at the test refraction focal point of the pipe under test under the illumination of a second environment; the second environment includes natural light and a preset number of infrared rays; The detection module obtains the detection result of the tested pipe based on the standard light intensity and the refracted light intensity. The detection result includes whether there is liquid or not in the tested pipe.

9. A liquid level detection device, comprising a memory and a processor, characterized in that, The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 7.