Water level detection method, device and system
By performing initial voltage detection and voltage pulse detection on the target electrode in the water level detection method, and using voltage logic judgment algorithm to calculate the water level status, the existing water level detection method is solved, and the problem of insufficient accuracy and easy misjudgment in complex environments is achieved, achieving higher accuracy and lower power consumption.
Patent Information
- Application Number
- CN202411622996.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-21
AI Technical Summary
Existing water level detection methods are difficult to provide stable and accurate monitoring results under high temperature, corrosive environments or complex water quality conditions, and are susceptible to misjudgment caused by fluctuations in electrode materials, pollution and environmental interference.
The initial voltage is determined by performing voltage detection on the target electrode when starting the water level detection; voltage pulse detection is performed on the target electrode based on the preset detection pulse interval to determine the predicted voltage; and the two are calculated through the voltage logic judgment algorithm to determine the current water level state.
It improves the accuracy of water level detection, reduces power consumption, reduces the corrosion of electrodes in water, enhances the self-test function of water level detection, and avoids misjudgment caused by environmental factors or deviations in the material of electrodes.
Smart Images

Figure CN119666107A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent detection, and in particular to a water level detection method, device, system, electronic equipment and storage medium thereof. Background Art
[0002] With the diversified development of industrial and household water equipment, water level detection technology plays an important role in electric water heaters. Traditional water level detection methods for electric water heaters mostly use capacitive sensor technology, which often has certain limitations during use, such as slow response, insufficient accuracy, and susceptibility to environmental interference. Especially in high temperature, corrosive environment or complex water quality conditions, existing water level detection technology often cannot provide stable and accurate monitoring results.
[0003] Since the existing water level detection method directly detects the electrode voltage and compares it with a preset threshold to determine the water level status, this method can work in simple applications, but it is prone to misjudgment when the electrode material composition fluctuates, the electrode surface is contaminated or corroded, or when used in water with low or high conductivity. At the same time, it is not convenient to self-check the electrode status.
[0004] In addition, the existing technology generally does not take into account the historical state of the electrode and its changing trend, which makes the detection and comparison of a single voltage unable to provide sufficient stability and accuracy. Especially in my country, a vast country with large differences in water quality in different regions, the fluctuation of electrode voltage may lead to frequent misjudgments and system instability. Summary of the invention
[0005] An embodiment of the present invention provides a water level detection method to solve the problems that the existing water level detection method directly detects the electrode voltage and compares it with a preset threshold to determine the water level state, and does not take into account the water quality, the changes in the material of the electrode that affect the natural potential change of the electrode, the electrode oxidation and the electrode self-detection during the detection process.
[0006] In a first aspect, an embodiment of the present invention provides a water level detection method, the method comprising the following steps: When starting water level detection, voltage detection is performed on the target electrode to determine a first target voltage; Based on a preset detection pulse interval, performing voltage pulse detection on the current target electrode to determine a second target voltage; The first target voltage and the second target voltage are calculated through a voltage logic judgment algorithm to determine the current water level state.
[0007] Optionally, when starting the water level detection, voltage detection is performed on the target electrode to determine the first target voltage, and the method further includes: When water level detection is started, the memory voltage of the current target electrode before power failure is obtained, where the memory voltage is the voltage detected by the target electrode before the last power failure; The memory voltage is used as the first target voltage.
[0008] Optionally, before performing voltage pulse detection on the current target electrode based on a preset detection pulse interval and determining the second target voltage, the method further includes: Before pulse detection, determining the conductivity of the target electrode; Based on the conductive properties, determining the health status of the electrode; Based on the health status, the preset detection pulse interval is determined.
[0009] Optionally, the performing voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine the second target voltage includes: After obtaining the first target voltage, synchronously performing voltage pulse detection on the target electrode through a preset detection pulse interval to obtain a corresponding predicted voltage; The predicted voltage is compared with the voltage threshold of the target electrode to determine a second target voltage.
[0010] Optionally, calculating the first target voltage and the second target voltage by a voltage logic judgment algorithm to determine the current water level state includes: Based on the first target voltage, the memory voltage of the first target voltage and the second target voltage is calculated by a voltage logic judgment algorithm to determine the current working state, where the working state includes a water shortage state, a short circuit state, and a water state to be confirmed; In the state of waiting to confirm the presence of water, the first target voltage and the second target voltage are calculated through a voltage logic judgment algorithm to determine the current water level state.
[0011] Optionally, in the state to be confirmed that there is water, calculating the first target voltage and the second target voltage by a voltage logic judgment algorithm to determine the current water level state includes: Calculating the first target voltage and the second target voltage to obtain a voltage result; If the voltage result is within the preset interval threshold, it is determined that the current water level state is water; If the voltage result is 0, the current water level state is determined to be short circuit; If the voltage result is greater than the preset interval threshold, it is determined that the current water level state is water shortage.
[0012] In a second aspect, an embodiment of the present invention further provides a water level detection device, the water level detection device comprising: A first determination module is used to perform voltage detection on the target electrode to determine a first target voltage when starting water level detection; A second determination module is used to perform voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine a second target voltage; The third determination module is used to calculate the first target voltage and the second target voltage through a voltage logic judgment algorithm to determine the current water level state.
[0013] In a third aspect, an embodiment of the present invention further provides a water level detection system, which includes: a water level detection device, a server, and an intelligent device.
[0014] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the water level detection method provided in the embodiment of the present invention when executing the computer program.
[0015] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the water level detection method provided in the embodiment of the invention are implemented.
[0016] In the embodiment of the present invention, when water level detection is started, voltage detection is performed on the target electrode to determine the first target voltage; based on the preset detection pulse interval, voltage pulse detection is performed on the current target electrode to determine the second target voltage; the first target voltage and the second target voltage are calculated by a voltage logic judgment algorithm to determine the current water level state. By respectively detecting the initial voltage (the voltage when the electrode has no pulse) and the voltage when the electrode has a pulse, and calculating these two voltages through a logic algorithm, and judging the results calculated by the algorithm, the state of the water level is determined, and the problem of the natural potential change of the electrode caused by the change in electrode material affecting the water level detection result is solved, the accuracy of water level detection is improved, power consumption is reduced, and corrosion of the electrode in water is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1is an architecture diagram of a water level detection system provided by an embodiment of the present invention; Figure 2 is a flow chart of a water level detection method provided by an embodiment of the present invention; Figure 3 is a structural schematic diagram of a water level detection device provided in an embodiment of the present invention; Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] like Figure 1 As shown, Figure 1 1 is an architecture diagram of a water level detection system 100 provided by an embodiment of the present invention, and the water level detection system includes: a water level detection device 300, a server 101, and an intelligent device 102. The water level detection device 300 also includes a first determination module, which can be used to perform voltage detection on the target electrode to determine the first target voltage when starting the water level detection; a second determination module, which can be used to perform voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine the second target voltage; and a third determination module, which can be used to determine the current water level state by calculating the first target voltage and the second target voltage.
[0021] Specifically, the initial power-on can be the state when the smart device is first powered on and starts to operate. Generally speaking, in this state, the smart device can perform a series of self-tests, initializations, parameter configurations, and other behaviors. In this embodiment, the smart device can be any smart electric water heater. It can be understood that the self-tests, initializations, parameter configurations, and other behaviors can refer to the smart electric water heater adjusting its own heating parameters and configuring corresponding heating strategies according to the current state of the target electrode. For example, when the state of the target electrode is detected to be good during self-test, the heating temperature is adjusted, and the corresponding heating time and heating detection are configured.
[0022] The above-mentioned target electrode can be used to measure the current voltage. Generally speaking, the corresponding voltage data can be measured according to the electrochemical effect generated by the contact between the target electrode and the medium. More specifically, the above-mentioned target electrode can be determined according to the parameters of the above-mentioned smart device, and can include but is not limited to electrodes in the form of induction electrodes, contact electrodes, and capacitive electrodes. In this embodiment, different electrodes can be selected as the above-mentioned target electrode according to different heating environments and heating requirements. For example, the smart electric water heater in this embodiment needs to measure the voltage according to the electrochemical effect generated by the contact between the electrode and the water in the inner tank of the electric water heater, so a contact electrode can be selected.
[0023] The above-mentioned first target voltage can be obtained by detecting the voltage of the target electrode when starting water level detection. This voltage can be used as the reference voltage of the above-mentioned smart device when it is initially powered on, and is used to perform logical algorithm calculations with the second target voltage to determine the final water level state, that is, to determine the initial electrical state of the above-mentioned smart device.
[0024] The above-mentioned preset detection pulse interval can be a parameter used to define the time interval between two consecutive voltage pulse detections, such as periodically sending and detecting the voltage value of the above-mentioned target electrode. Specifically, the above-mentioned preset detection pulse interval can also be adjusted according to the water level state. For example, when there is water, since general smart devices such as smart electric water heaters cannot change from a water state to a water shortage state in a short time, but require a period of time, such as tens of seconds or even minutes, the above-mentioned preset detection pulse interval can be delayed, thereby reducing the electrode power-on time, so as to reduce the electrode from being corroded by becoming an anode due to long-term positive charge, ensure the life of the electrode and reduce the power consumption of the system. In this embodiment, an optimal detection pulse interval can be calculated according to specific application requirements (such as the heating conditions and detection conditions of the above-mentioned smart device) and environmental conditions to ensure that the system achieves the best balance between efficiency, cost and performance.
[0025] The voltage pulse detection may refer to an operation of sending a short pulse signal to the target electrode to detect a change in the electrical state of the target electrode in the medium.
[0026] The above-mentioned second target voltage may refer to the voltage value obtained by performing voltage pulse detection on the target electrode after the preset detection pulse interval. This voltage value reflects the electrical response of the electrode in the water after the first initial voltage detection, and is used to compare with the "first target voltage" to analyze and judge the change in water level. For example, the electrode voltage is detected once before outputting a detection pulse to the electrode, and this voltage is recorded as the first target voltage. Subsequently, a detection pulse is output to the electrode, and the voltage of the electrode is detected synchronously, and this voltage is recorded as the second target voltage.
[0027] The voltage logic judgment algorithm can be used to calculate and analyze the first target voltage and the second target voltage, so as to judge the current water level state in the above-mentioned smart device. The algorithm can be performed through steps such as input data, data analysis, configuration strategy and error feedback. Specifically, according to the heating conditions and parameters of the above-mentioned smart device, the voltage threshold of the water level state is set, and compared with the result obtained by calculating and analyzing the first target voltage and the second target voltage through the voltage logic judgment algorithm, the water level state is judged.
[0028] The water level status may include but is not limited to information such as the height, rate of change, and stability of the water level. In this embodiment, the water level status is judged based on whether there is water and whether heating conditions are supported when there is water.
[0029] In a possible embodiment, the water level detection system detects the voltage of the target electrode of the smart device when it is initially powered on to obtain a first target voltage, then detects the second target voltage of the target electrode at a preset detection pulse interval, and finally calculates and analyzes through a voltage logic judgment algorithm, and determines the water level status in the current smart device according to the analysis result, thereby improving the accuracy of water level detection, reducing the corrosion of the electrode caused by power-on, reducing power consumption, and enhancing the self-detection function of water level detection.
[0030] like Figure 2 As shown, Figure 2 : is a flow chart of a water level detection method provided by an embodiment of the present invention, the water level detection method comprising the steps of: 201. When starting water level detection, perform voltage detection on the target electrode to determine a first target voltage.
[0031] In an embodiment of the present invention, the above-mentioned water level detection method can be applied to the above-mentioned water level detection system, which has functions such as water level data processing, water level data transmission and reception, and water level data memory storage, and can be constructed based on a server or a server cluster. The above-mentioned server or server cluster can be an electronic device with water level data processing capabilities.
[0032] The above-mentioned starting water level detection may be the state when the above-mentioned smart device is powered on for the first time and starts to operate. Generally speaking, in this state, the above-mentioned smart device can perform a series of self-checks, initializations, parameter configurations and other behaviors. In this embodiment, the above-mentioned smart device may be any kind of smart electric water heater. It can be understood that the above-mentioned self-checks, initializations, parameter configurations and other behaviors may refer to the smart electric water heater adjusting its own heating parameters and configuring corresponding heating strategies according to the current state of the target electrode. For example, when the state of the target electrode is detected to be good during self-check, the heating temperature is adjusted, and the corresponding heating time and heating detection are configured.
[0033] The above-mentioned target electrode can be used to measure the current voltage. Generally speaking, the corresponding voltage data can be measured according to the electrochemical effect generated by the contact between the target electrode and the medium. More specifically, the above-mentioned target electrode can be determined according to the parameters of the above-mentioned smart device, and can include but is not limited to electrodes in the form of induction electrodes, contact electrodes, and capacitive electrodes. In this embodiment, different electrodes can be selected as the above-mentioned target electrode according to different heating environments and heating requirements. For example, the smart water heater in this embodiment needs to measure the voltage based on the electrical effect generated by the contact between the electrode and the water in the water heater, so a contact electrode can be selected.
[0034] The above-mentioned first target voltage can be obtained by detecting the voltage of the target electrode when starting water level detection. This voltage can be used as the reference voltage of the above-mentioned smart device when it is initially powered on, and is used to perform logical algorithm calculations with the second target voltage to determine the final water level state, that is, to determine the initial electrical state of the above-mentioned smart device.
[0035] In a possible embodiment, when the smart device is powered on for the first time, the water level detection system detects the voltage of the target electrode to obtain a corresponding first target voltage. Through this method, the water level detection system and the detected smart device can both perform self-checks to ensure the stability of the subsequent detection process.
[0036] 202. Perform voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine a second target voltage.
[0037] In an embodiment of the present invention, the preset detection pulse interval can be a parameter used to define the time interval between two consecutive voltage pulse detections, such as periodically sending and detecting the voltage value of the target electrode. Specifically, the preset detection pulse interval can also be adjusted according to the water level state. For example, when there is water, since it is impossible for general equipment to change from a water state to a water shortage state in a short time, the preset detection pulse interval can be delayed, thereby reducing the electrode power-on time, so as to reduce electrode corrosion and reduce the power consumption of the system. In this embodiment, an optimal detection pulse interval can be calculated according to specific application requirements (such as the heating conditions and detection conditions of the above-mentioned smart device) and environmental conditions to ensure that the system achieves the best balance between efficiency, cost and performance.
[0038] The voltage pulse detection may refer to an operation of sending a short pulse signal to the target electrode to detect a change in the electrical state of the target electrode in the medium.
[0039] The above-mentioned second target voltage may refer to the voltage value obtained by performing voltage pulse detection on the target electrode after the preset detection pulse interval. This voltage value reflects the electrical response of the electrode in the water after the first initial voltage detection, and is used to compare with the "first target voltage" to analyze and judge the change in water level. For example, the electrode voltage is detected once before outputting a detection pulse to the electrode, and this voltage is recorded as the first target voltage. Subsequently, a detection pulse is output to the electrode, and the voltage of the electrode is detected synchronously, and this voltage is recorded as the second target voltage.
[0040] In a possible embodiment, after acquiring the first target voltage, the water level detection system transmits a pulse signal to the target electrode according to a preset detection pulse interval, and detects the second target voltage of the current target electrode.
[0041] The above method can dynamically monitor the real-time changes of the water level, improve the accuracy and response speed of water level detection, and compare the first target voltage with the continuously measured second target voltage, so that the above water level detection system can promptly detect slight changes in the water level and ensure the stable operation of water level detection.
[0042] 203. Calculate the first target voltage and the second target voltage through a voltage logic judgment algorithm to determine the current water level state.
[0043] The voltage logic judgment algorithm can be used to calculate and analyze the first target voltage and the second target voltage, so as to judge the current water level state in the above-mentioned smart device. The algorithm can be performed through steps such as input data, data analysis, configuration strategy and error feedback. Specifically, according to the heating conditions and parameters of the above-mentioned smart device, the voltage threshold of the water level state is set, and compared with the result obtained by calculating and analyzing the first target voltage and the second target voltage through the voltage logic judgment algorithm, the water level state is judged.
[0044] The water level status may include but is not limited to information such as the height, rate of change, and stability of the water level. In this embodiment, the water level status is judged based on whether there is water and whether heating conditions are supported when there is water.
[0045] In a possible embodiment, the water level detection system detects the voltage of the target electrode of the smart device when it is initially powered on to obtain a first target voltage, then detects the second target voltage of the target electrode at a preset detection pulse interval, and finally calculates and analyzes the voltage logic judgment algorithm, and determines the water level state in the current smart device according to the analysis result, thereby improving the accuracy of water level detection, reducing electrode corrosion, reducing power consumption, and enhancing the self-checking function of water level detection. In the embodiment of the present invention, when water level detection is started, voltage detection is performed on the target electrode to determine the first target voltage; based on the preset detection pulse interval, voltage pulse detection is performed on the current target electrode to determine the second target voltage; the first target voltage and the second target voltage are calculated by a voltage logic judgment algorithm to determine the current water level state. By respectively detecting the initial voltage (the voltage when the electrode has no pulse) and the voltage when the electrode has a pulse, and calculating these two voltages by a logic algorithm, and judging the result calculated by the algorithm, the state of the water level is determined, the accuracy of water level detection is improved, the corrosion of the electrode is reduced, the power consumption is reduced, and the self-checking function of the water level detection is enhanced.
[0046] Optionally, when starting water level detection, the step of performing voltage detection on the target electrode to determine the first target voltage also includes, when starting water level detection, obtaining the memory voltage of the current target electrode before power failure, the memory voltage being the voltage detected by the target electrode before the last power failure; and using the memory voltage as the first target voltage.
[0047] In an embodiment of the present invention, the above-mentioned memory voltage may refer to the last voltage value recorded by the target electrode before the device is powered off. This voltage value serves as a historical benchmark for the system and can be used to calibrate the above-mentioned water level detection system with the smart device when starting water level detection. By obtaining this memory voltage and using it as the initial value of the "first target voltage" when power is restored, it can be compared with subsequently measured voltage values (such as the "second target voltage"), which helps to more accurately identify water level changes.
[0048] In a possible embodiment, by referring to the state before power failure as a reference, misjudgment caused by environmental fluctuations or changes in device state when power is restored is avoided, thereby improving the accuracy and reliability of water level detection.
[0049] Optionally, the step before performing voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine the second target voltage also includes determining the conductivity of the current target electrode before performing the pulse detection; judging the health status of the electrode based on the conductivity; and determining the preset detection pulse interval based on the health status.
[0050] In the embodiment of the present invention, the above refers to the ability of a material or device to conduct current. The conductive performance is mainly determined by the conductivity or resistivity of the material. In this embodiment, the conductive performance of the target electrode can be determined to determine the current health state of the target electrode. Generally speaking, since the target electrode may produce an oxidation reaction in the environment, resulting in damage to the performance of the conductive sheet on the electrode, the health state of the electrode, that is, the conductive efficiency of the target electrode, can be judged based on the conductive performance.
[0051] More specifically, when the conductivity efficiency is higher, the voltage detection response is faster, and the water level detection process is more affected by environmental changes. Therefore, the corresponding preset detection pulse interval can be adjusted appropriately. For example, an optimal detection pulse interval can be calculated based on specific application requirements (such as the heating conditions and detection conditions of the above-mentioned smart devices) and environmental conditions to ensure that the system achieves the best balance between efficiency, cost and performance.
[0052] Optionally, in the step of performing voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine the second target voltage, it also includes, after obtaining the first target voltage, synchronously performing voltage pulse detection on the target electrode at a preset detection pulse interval to obtain a corresponding predicted voltage; and comparing the predicted voltage with the voltage threshold of the target electrode to determine the second target voltage.
[0053] In an embodiment of the present invention, the above-mentioned predicted voltage may refer to the voltage detected on the current target electrode after voltage pulse detection. Since the environmental factors of the target electrode may interfere with the measured value of the voltage during pulse detection, it is also necessary to compare with the voltage threshold to determine the second target voltage to reduce errors in subsequent logical calculations.
[0054] In a possible embodiment, the water level detection system compares the predicted voltage with the voltage threshold corresponding to the target electrode. When the error is less than the error threshold, it means that the environmental factors have not affected the conductivity of the target electrode in the current state. Therefore, the comparison can be used to determine whether the predicted voltage meets the threshold standard, thereby confirming whether the state meets the conditions to serve as the new second target voltage.
[0055] This process ensures that the water level detection system can respond to small changes in water level in real time and accurately, using dynamic monitoring methods to improve water level detection accuracy and response speed.
[0056] Optionally, in the step of calculating the first target voltage and the second target voltage through a voltage logic judgment algorithm to determine the current water level state, it also includes calculating the memory voltage of the first target voltage and the second target voltage through a voltage logic judgment algorithm based on the first target voltage to determine the current working state; in the state of waiting to be confirmed that there is water, calculating the first target voltage and the second target voltage through a voltage logic judgment algorithm to determine the current water level state.
[0057] In an embodiment of the present invention, the working state may include but is not limited to a water shortage state, a short circuit state, and a water state to be confirmed. In a possible embodiment, the working state of the smart device is determined by comparing the first target voltage with a preset voltage threshold. For example, the acquired first target voltage is detected. When the first target voltage is 0, the smart device may be in a short circuit state, a water shortage state, or a water state. When the first target voltage is a negative value, it may be in a water state to be confirmed.
[0058] For example, when the voltage is zero, there are three possibilities: a. There is no water, the electrode is suspended, and the voltage is zero; b. The electrode is short-circuited (fault); c. There is water, the electrode and the electric heating tube are made of the same material, have the same natural potential, and the voltage is zero.
[0059] In a possible embodiment, when the water level detection system detects that the first target voltage is 0, it is also necessary to use a voltage logic algorithm to calculate the first target voltage according to the memory voltage of the second target voltage to determine the final working state. If the calculation result is still 0, it means that the working state is short circuit; if the calculation result is between the preset threshold range, it means that the working state is a water state to be confirmed; if the calculation result is greater than the preset threshold range, it means that the working state is lack of water.
[0060] When the first target voltage is negative, it generally means there is water. However, it is not directly judged as water at this time. It is also necessary to calculate the first target voltage and the second target voltage through the voltage logic judgment algorithm to determine the current water level state.
[0061] In another possible embodiment, the water level detection system obtains the first target voltage of the target electrode when starting water level detection, and obtains the second target voltage through pulse detection, and calculates the first target voltage and the second target voltage through a voltage logic algorithm to determine the corresponding working state.
[0062] Specifically, if it is determined that there is water in a state to be confirmed, the water level detection system performs voltage pulse detection on the target electrode according to a preset detection pulse interval, obtains the second target voltage, and uses a voltage logic judgment algorithm to calculate and analyze the first target voltage and the second target voltage to determine the current water level state.
[0063] By dynamically comparing the first target voltage and the second target voltage and combining the voltage logic judgment algorithm, the sensitivity and accuracy of water level monitoring are improved, avoiding misjudgment caused by environmental factors or deviations in electrode materials, and ensuring the stability of the water level detection system under different water quality conditions.
[0064] Optionally, in the water state to be confirmed, the first target voltage and the second target voltage are calculated by a voltage logic judgment algorithm to determine the current water level state, which also includes calculating the first target voltage and the second target voltage to obtain a voltage result; if the voltage result is within the preset interval threshold, the current water level state is judged to be the presence of water; if the voltage result is 0, the current water level state is judged to be a short circuit; if the voltage result is greater than the preset interval threshold, the current water level state is judged to be lack of water.
[0065] In an embodiment of the present invention, the above-mentioned preset interval threshold can also be set according to the electrochemical properties and circuit structure (such as the pulse output resistance size) of the above-mentioned target electrode. Generally speaking, the smaller the pulse output resistance, the larger the preset interval threshold can be set.
[0066] In a possible embodiment, after determining the water state to be confirmed and the first target voltage, the water level detection system outputs a square wave pulse with positive polarity to the electrode, and the pulse width of the square wave pulse is within 2 seconds, and synchronously detects the voltage of the electrode. The detected voltage is recorded as the second target voltage, and a subtraction operation is performed on the first target electrode and the second target electrode. When the operation result is greater than the maximum value of the preset interval threshold, the above-mentioned smart device is judged to be in a water shortage state. When the operation result is equal to 0, it is judged to be an electrode short circuit. When the operation result is within the preset interval threshold, it is judged that the current water level state of the above-mentioned smart device is water.
[0067] More specifically, the above-mentioned embodiment process as a whole is a detection cycle. In order to improve the accuracy and reliability of detection, when the water level detection is started, the chip repeats this detection process cycle 2 to 5 times, and the cycle interval is set to within 5 seconds. When the detection results are the same, the judgment result is output.
[0068] In another possible embodiment, the water level detection system can appropriately shorten or extend the detection period according to the corresponding working state of the target electrode (such as lack of water, short circuit, water), so as to reduce the power consumption of the water level detection system in the abnormal state of the above-mentioned smart device and protect the electrode.
[0069] like Figure 3 As shown, the embodiment of the present invention further provides a water level detection device 300, which includes: A first determination module 301 is used to perform voltage detection on a target electrode to determine a first target voltage when starting water level detection; A second determination module 302 is used to perform voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine a second target voltage; The third determination module 303 is used to calculate the first target voltage and the second target voltage through a voltage logic judgment algorithm to determine the current water level state.
[0070] Optionally, the above device further includes: A first acquisition module is used to acquire the memory voltage of the current target electrode before power failure when water level detection is started, wherein the memory voltage is the voltage detected by the target electrode before the last power failure; The second acquisition module is used to use the memory voltage as the first target voltage.
[0071] Optionally, the above device further includes: A fourth determination module, used for determining the conductivity of the current target electrode before performing pulse detection; A judgment module, used for judging the health status of the electrode based on the conductive performance; A fifth determination module is used to determine the preset detection pulse interval based on the health status.
[0072] Optionally, the second determining module 302 includes: A first acquisition submodule is used to, after acquiring the first target voltage, synchronously perform voltage pulse detection on the target electrode through a preset detection pulse interval to obtain a corresponding predicted voltage; The first determination submodule is used to compare the predicted voltage with the voltage threshold of the target electrode to determine the second target voltage.
[0073] Optionally, the third determining module 303 includes: A second determination submodule is used to calculate the memory voltage of the first target voltage and the second target voltage based on the first target voltage through a voltage logic judgment algorithm to determine the current working state, where the working state includes a water shortage state, a short circuit state, and a water state to be confirmed; The third determination submodule is used to calculate the first target voltage and the second target voltage through a voltage logic judgment algorithm to determine the current water level state when the water is in a state to be confirmed.
[0074] Optionally, the third determining submodule includes: an acquisition unit, configured to calculate the first target voltage and the second target voltage to obtain a voltage result; A first judgment unit, configured to judge that the current water level state is water if the voltage result is within a preset interval threshold; A second judgment unit, configured to judge that the current water level state is a short circuit if the voltage result is 0; The third judgment unit is used to judge that the current water level state is water shortage if the voltage result is greater than a preset interval threshold.
[0075] like Figure 4 As shown, an embodiment of the present invention further provides an electronic device 400, including a processor, and the processor can execute any one of the above-mentioned water level detection methods.
[0076] Specifically, it includes a processor 401 and a memory 402, and a computer program for executing the water level detection method which is stored in the memory 402 and can be run on the processor 401, wherein: The processor 401 runs the computer program of the water level detection method stored in the memory 402 and performs the following steps: When starting water level detection, voltage detection is performed on the target electrode to determine a first target voltage; Based on a preset detection pulse interval, performing voltage pulse detection on the current target electrode to determine a second target voltage; The first target voltage and the second target voltage are calculated through a voltage logic judgment algorithm to determine the current water level state.
[0077] Optionally, the processor 401 performs voltage detection on the target electrode to determine the first target voltage when starting the water level detection, including: When water level detection is started, the memory voltage of the current target electrode before power failure is obtained, where the memory voltage is the voltage detected by the target electrode before the last power failure; The memory voltage is used as the first target voltage.
[0078] Optionally, the processor 401 executes the steps before performing voltage pulse detection on the current target electrode based on a preset detection pulse interval and determining the second target voltage, including: Before pulse detection, determining the conductivity of the target electrode; Based on the conductive properties, determining the health status of the electrode; Based on the health status, the preset detection pulse interval is determined.
[0079] Optionally, the processor 401 performs the voltage pulse detection on the current target electrode based on the preset detection pulse interval to determine the second target voltage, including: After obtaining the first target voltage, synchronously performing voltage pulse detection on the target electrode through a preset detection pulse interval to obtain a corresponding predicted voltage; The predicted voltage is compared with the voltage threshold of the target electrode to determine a second target voltage.
[0080] Optionally, the processor 401 executes the voltage logic judgment algorithm to calculate the first target voltage and the second target voltage to determine the current water level state, including: Based on the first target voltage, the memory voltage of the first target voltage and the second target voltage is calculated by a voltage logic judgment algorithm to determine the current working state, where the working state includes a water shortage state, a short circuit state, and a water state to be confirmed; In the state of waiting to confirm the presence of water, the first target voltage and the second target voltage are calculated through a voltage logic judgment algorithm to determine the current water level state.
[0081] Optionally, the processor 401 further executes the step of calculating the first target voltage and the second target voltage by a voltage logic judgment algorithm in the state to be confirmed that there is water, so as to determine the current water level state, including: Calculating the first target voltage and the second target voltage to obtain a voltage result; If the voltage result is within the preset interval threshold, it is determined that the current water level state is water; If the voltage result is 0, the current water level state is determined to be short circuit; If the voltage result is greater than the preset interval threshold, it is determined that the current water level state is water shortage.
[0082] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the water level detection method or the application-end water level detection method provided in the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0083] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0084] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A water level detection method, characterized in that: include: When starting water level detection, voltage detection is performed on the target electrode to determine a first target voltage; Based on a preset detection pulse interval, performing voltage pulse detection on the current target electrode to determine a second target voltage; The first target voltage and the second target voltage are calculated through a voltage logic judgment algorithm to determine the current water level state.
2. The water level detection method according to claim 1, characterized in that: When the water level detection is started, voltage detection is performed on the target electrode to determine a first target voltage, and the method further includes: When water level detection is started, the memory voltage of the current target electrode before power failure is obtained, where the memory voltage is the voltage detected by the target electrode before the last power failure; The memory voltage is used as the first target voltage.
3. The water level detection method according to claim 1, characterized in that: Before performing voltage pulse detection on the current target electrode based on the preset detection pulse interval and determining the second target voltage, the method further includes: Before pulse detection, determining the conductivity of the target electrode; Based on the conductive properties, determining the health status of the electrode; Based on the health status, the preset detection pulse interval is determined.
4. The water level detection method according to claim 1, characterized in that: The step of performing voltage pulse detection on the current target electrode based on the preset detection pulse interval to determine the second target voltage includes: After obtaining the first target voltage, synchronously performing voltage pulse detection on the target electrode through a preset detection pulse interval to obtain a corresponding predicted voltage; The predicted voltage is compared with the voltage threshold of the target electrode to determine a second target voltage.
5. The water level detection method according to claim 1, characterized in that: The first target voltage and the second target voltage are calculated by a voltage logic judgment algorithm to determine the current water level state, including: Based on the first target voltage, the memory voltage of the first target voltage and the second target voltage is calculated by a voltage logic judgment algorithm to determine the current working state, where the working state includes a water shortage state, a short circuit state, and a water state to be confirmed; In the state of waiting to confirm the presence of water, the first target voltage and the second target voltage are calculated through a voltage logic judgment algorithm to determine the current water level state.
6. The water level detection method according to claim 5, characterized in that: The method of calculating the first target voltage and the second target voltage by a voltage logic judgment algorithm to determine the current water level state in the water-presence state to be confirmed includes: Calculating the first target voltage and the second target voltage to obtain a voltage result; If the voltage result is within the preset interval threshold, it is determined that the current water level state is water; If the voltage result is 0, the current water level state is determined to be short circuit; If the voltage result is greater than the preset interval threshold, it is determined that the current water level state is water shortage.
7. A water level detection device, characterized in that: include: A first determination module is used to perform voltage detection on the target electrode to determine a first target voltage when starting water level detection; A second determination module is used to perform voltage pulse detection on the current target electrode based on a preset detection pulse interval to determine a second target voltage; The third determination module is used to calculate the first target voltage and the second target voltage through a voltage logic judgment algorithm to determine the current water level state.
8. A water level detection system, characterized in that: The water level detection system comprises: a water level detection device; The water level detection device is determined by a water level detection method shown in claims 1-6.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the water level detection method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the water level detection method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Intelligent water level detection method, system and equipment for water conservancy project and medium
CN120927094A