Liquid level measurement method, device, equipment and storage medium

By judging the changes and differences in magnetic field signals, the problem of false signal transmission of magnetic level sensors when the liquid level fluctuates is solved, and the accuracy and reliability of liquid level measurement are improved.

CN116295710BActive Publication Date: 2025-09-19重庆清电新能源开发有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310294766.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2025-09-19
Estimated Expiration
2043-03-23

AI Technical Summary

Technical Problem

Magnetic liquid level sensors are prone to false signal transmission when the liquid level fluctuates, resulting in extremely low reliability of liquid level measurement.

Method used

By judging whether the magnetic field direction signal continues to change within the set sampling period, if there is no change, the magnetic field signal is obtained to determine the liquid level; if there is a change, the difference between the maximum value, minimum value and switching threshold of the magnetic field signal is obtained, and it is judged whether the difference is greater than the measurement dead zone value, thereby determining the liquid level.

Benefits of technology

The accuracy of liquid level measurement is improved, measurement deviation during liquid level fluctuation is avoided, and the effectiveness of the liquid level measurement control process is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116295710B_ABST
    Figure CN116295710B_ABST
Patent Text Reader

Abstract

The present invention discloses a liquid level measurement method, device, equipment and storage medium. The method includes: collecting a magnetic field direction signal, judging whether the magnetic field direction signal changes continuously within a set sampling period; if the magnetic field direction signal does not change continuously within the set sampling period, obtaining the magnetic field signal within the sampling period, and determining the liquid level according to the magnetic field signal; if the magnetic field signal changes continuously within the set sampling period, obtaining the maximum value and the minimum value of the magnetic field signal within the sampling period, obtaining the switching threshold and the measurement dead zone value; determining a first difference between the maximum value and the switching threshold of the magnetic field signal, and a second difference between the minimum value and the switching threshold of the magnetic field signal; if the first difference and / or the second difference are greater than the measurement dead zone value, determining the liquid level according to the maximum value and / or the minimum value of the magnetic field signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to measurement technology, and in particular to a liquid level measurement method, device, equipment and storage medium. Background Art

[0002] With the continuous development of electronic technology and automation, the functions of liquid level sensors are becoming more and more perfect, and the liquid level measurement and control technology has also been greatly improved.

[0003] Magnetic level sensors are a common type of liquid level measurement sensor. Typically, they consist of a stainless steel housing, a reed switch, a resistor, and a transmitter. They determine the liquid level by detecting changes in resistance corresponding to the position of a magnetic float. Fluctuations in the liquid level can easily lead to false signal transmissions, making this type of sensor extremely unreliable. Summary of the Invention

[0004] The present invention provides a liquid level measurement method, device, equipment and storage medium, so as to achieve the purpose of improving the accuracy of liquid level measurement when the liquid level fluctuates.

[0005] In a first aspect, an embodiment of the present invention provides a liquid level measurement method, comprising:

[0006] Collect the magnetic field direction signal and determine whether the magnetic field direction signal continues to change within the set sampling period;

[0007] If there is no continuous change within the set sampling period, obtaining the magnetic field signal within the sampling period, and determining the liquid level according to the magnetic field signal;

[0008] If the change continues within the set sampling period, the maximum value and the minimum value of the magnetic field signal within the sampling period are obtained, and the switching threshold and the measurement dead zone value are obtained;

[0009] Determine a first difference between a maximum value of the magnetic field signal and the switching threshold, and a second difference between a minimum value of the magnetic field signal and the switching threshold;

[0010] If the first difference and / or the second difference is greater than the measurement dead zone value, the liquid level is determined according to the maximum value of the magnetic field signal and / or the minimum value of the magnetic field signal.

[0011] Optionally, determining the liquid level according to the magnetic field signal includes:

[0012] An average value of the magnetic field signal within the sampling period is determined, and the liquid level is determined according to the average value of the magnetic field signal.

[0013] Optionally, if the first difference and / or the second difference is greater than the measurement dead zone value;

[0014] The liquid level is determined according to the average value of the maximum value of the magnetic field signal and the minimum value of the magnetic field signal.

[0015] Optionally, if the magnetic field direction signal does not continuously change within the set sampling period;

[0016] The changing direction of the liquid level is determined according to the magnetic field signal.

[0017] Optionally, at least seven magnetic field direction signals are acquired within the sampling period;

[0018] If there are at least three pairs of magnetic field direction signals with opposite directions, it is determined that the magnetic field direction signal continues to change within the set sampling period.

[0019] Optionally, determining the liquid level according to the magnetic field signal includes:

[0020] The magnetic field signal is converted into a voltage signal, and the liquid level is determined according to the voltage signal.

[0021] Optionally, the switching threshold is used to generate a switching control signal when the liquid level exceeds or falls below the switching threshold.

[0022] In a second aspect, an embodiment of the present invention further provides a liquid level measuring device, including a liquid level measuring unit, wherein the liquid level measuring unit is configured to:

[0023] Collect the magnetic field direction signal and determine whether the magnetic field direction signal continues to change within the set sampling period;

[0024] If there is no continuous change within the set sampling period, obtaining the magnetic field signal within the sampling period, and determining the liquid level according to the magnetic field signal;

[0025] If the change continues within the set sampling period, the maximum value and minimum value of the magnetic field signal within the sampling period are obtained, and the switching threshold and the measurement dead zone value are obtained;

[0026] Determine a first difference between the maximum value of the magnetic field signal and the switching threshold, and a second difference between the minimum value of the magnetic field signal and the switching threshold;

[0027] If the first difference and / or the second difference is greater than the measurement dead zone value, the liquid level is determined according to an average value of the maximum value and the minimum value of the magnetic field signal.

[0028] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising at least one processor, and a memory communicatively connected to the at least one processor;

[0029] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute any liquid level measurement method described in the embodiment of the present invention.

[0030] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any liquid level measurement method described in the embodiment of the present invention when executed.

[0031] Compared with the prior art, the beneficial effect of the present invention is that: the present invention proposes a liquid level measurement method, which is suitable for scenarios where liquid level measurement is performed using a magnetic liquid level sensor. In this method, it is determined whether the magnetic field direction signal continues to change within a set sampling period, and then whether the liquid level fluctuates up and down in a short period of time. When the liquid level does not fluctuate, the specific value of the liquid level is determined by the magnetic field signal (directly output by the magnetic liquid level sensor). When the liquid level fluctuates, it is further determined whether the first difference between the maximum value of the magnetic field signal and the switching threshold, and the second difference between the minimum value of the magnetic field signal and the switching threshold are greater than the measurement dead zone value. If greater than, the liquid level is determined according to the maximum value of the magnetic field signal and / or the minimum value of the magnetic field signal. Based on this, it can be avoided that when the liquid level fluctuates, the liquid level measurement result deviates, thereby causing the problem of failure of the control-related process of the liquid level measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a flow chart of the liquid level measurement method in the embodiment;

[0033] Figure 2 is another flow chart of the liquid level measurement method in the embodiment;

[0034] Figure 3 Schematic diagram of the electronic device structure in the embodiment. DETAILED DESCRIPTION

[0035] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0036] Example 1

[0037] Figure 1This is a flow chart of the liquid level measurement method in the embodiment, refer to Figure 1 , liquid level measurement methods include:

[0038] S101. Collect the magnetic field direction signal and determine whether the magnetic field direction signal continues to change within a set sampling period.

[0039] For example, in this embodiment, the magnetic field direction signal can be determined in the following manner:

[0040] A magnetic level sensor (including a float and multiple reed switches) is set in the medium and at the corresponding position of the liquid level to be measured. If two reed switch output signals are obtained at two adjacent sampling moments, the magnetic field direction signal is determined according to the relative position of the two reed switches;

[0041] For example, based on the installation position of the magnetic liquid level sensor, the first reed switch, the second reed switch, and the Nth reed switch are set in order from top to bottom;

[0042] If the first reed switch outputs a signal at the first sampling moment and the second reed switch outputs a signal at the second sampling moment, it is determined that the magnetic field direction signal is a negative signal;

[0043] If the fourth reed switch outputs a signal at the first sampling moment and the second reed switch outputs a signal at the second sampling moment, it is determined that the magnetic field direction signal is a positive signal;

[0044] If the fourth reed switch outputs a signal at the first sampling moment and the fourth reed switch outputs a signal at the second sampling moment, it is determined that the magnetic field direction signal is a zero direction signal;

[0045] Alternatively, if the sixth reed switch outputs a signal at the first sampling moment (the reed switch outputs a signal when the liquid level is higher than the position of the reed switch, and does not output a signal when the liquid level is lower than the position of the reed switch), and the sixth reed switch does not output a signal at the second sampling moment, then it is determined that the magnetic field direction is a negative signal;

[0046] If the eighth reed switch does not output a signal at the first sampling moment, but outputs a signal at the second sampling moment, it is determined that the magnetic field direction is a positive signal;

[0047] Alternatively, the magnetic field direction signal can be determined as follows:

[0048] A flat plate capacitance sensor is set in the medium and at the corresponding position of the liquid level to be measured, and the magnetic field direction signal is determined according to the change in the output signal of the flat plate capacitance sensor at two adjacent sampling moments;

[0049] For example, the output signal of the flat-plate capacitance sensor at the first sampling moment is set as the first signal, and the output signal of the flat-plate capacitance sensor at the second sampling moment is set as the second signal;

[0050] If the (analog) value corresponding to the first signal is greater than the (analog) value corresponding to the second signal, the magnetic field direction signal is determined to be a negative signal; otherwise, the magnetic field direction signal is determined to be a positive signal;

[0051] Alternatively, the magnetic field direction signal can be determined as follows:

[0052] The position of the magnetic float of the magnetic liquid level sensor is determined by machine vision, and the magnetic field direction signal is determined according to the change in the positions of two adjacent magnetic floats;

[0053] For example, the position of the magnetic float at the first sampling moment is set as the first position, and the position of the magnetic float at the second sampling moment is set as the second position;

[0054] When the first position is above the second position along the installation position of the magnetic sensor (vertical direction), the magnetic field direction signal is determined to be a negative signal; otherwise, the magnetic field direction signal is determined to be a positive signal.

[0055] In this embodiment, the sampling period is a set value, which is used to represent a time period. The specific duration of the time period can be set based on experience.

[0056] In this embodiment, whether the magnetic field direction signal continues to change within the set sampling period can be determined by the following method:

[0057] The number of magnetic field direction signals determined within the sampling period is set to n. If there are at least INT(n / 2-1) negative signals or positive signals, and there are at least four magnetic field direction signals with continuously changing directions (for example, the four consecutive magnetic field direction signals are respectively a positive signal, a negative signal, a positive signal, and a positive signal, or a negative signal, a zero signal, a positive signal, and a negative signal), it is determined that a continuous change occurs, wherein INT is set as the rounding function.

[0058] S102. If there is no continuous change within the set sampling period, the magnetic field signal within the sampling period is obtained, and the liquid level is determined based on the magnetic field signal.

[0059] For example, in this embodiment, the magnetic field signal is set to be the output signal of the reed switch configured in the magnetic liquid level sensor, and determining the liquid level according to the magnetic field signal specifically includes:

[0060] During the sampling period, the most recent magnetic field signal is determined, the setting position of the reed switch corresponding to the magnetic field signal is determined, and the liquid level is determined according to the setting position of the reed switch;

[0061] For example, the most recent magnetic field signal corresponds to the second reed switch among reed switches 1 to N, and the preset liquid level value corresponding to the second reed switch is 1 m (meter), so the liquid level is determined to be 1 m.

[0062] S103. If the change continues within the set sampling period, the maximum value and minimum value of the magnetic field signal within the sampling period are obtained, and the switch threshold and the measurement dead zone value are obtained.

[0063] Based on the content recorded in step S102, the maximum value of the magnetic field signal is specifically the maximum liquid level value corresponding to the magnetic field signal, and the minimum value of the magnetic field signal is specifically the minimum liquid level value corresponding to the magnetic field signal;

[0064] The switch threshold is specifically: a preset liquid level value corresponding to executing a specified action instruction;

[0065] The measurement dead zone value is specifically: the absolute value of the difference between the liquid level values ​​corresponding to two adjacent reed switches.

[0066] S104. Determine a first difference between a maximum value of the magnetic field signal and a switching threshold, and a second difference between a minimum value of the magnetic field signal and the switching threshold.

[0067] S105. If the first difference and / or the second difference is greater than the measurement dead zone value, determine the liquid level according to the maximum value and / or the minimum value of the magnetic field signal.

[0068] In conjunction with steps S102 to S105 , for ease of description, in this embodiment, the switch threshold is set to 100 mm (millimeter) and the measurement dead zone is set to 2 mm.

[0069] For example, the maximum value of the magnetic field signal is set to 103 mm, and the minimum value of the magnetic field signal is set to 95 mm. Then, the first difference is 3 mm, and the second difference is 5 mm. Wherein, the first difference and the second difference are both greater than the measurement dead zone (2 mm). In this case, it can be determined that the liquid level is 95 mm.

[0070] Assuming the maximum value of the magnetic field signal to be 103 mm and the minimum value of the magnetic field signal to be 100 mm, the first difference is 3 mm and the second difference is 0 mm. The first difference is greater than the measurement dead zone, and the liquid level can be determined to be 103 mm.

[0071] This embodiment proposes a liquid level measurement method, which is suitable for scenarios where liquid level measurement is performed using a magnetic liquid level sensor. In this method, it is determined whether the magnetic field direction signal continues to change within a set sampling period, and then whether the liquid level fluctuates up and down in a short period of time. When the liquid level does not fluctuate, the specific value of the liquid level is determined by the magnetic field signal (directly output by the magnetic liquid level sensor). When the liquid level fluctuates, it is further determined whether the first difference between the maximum value of the magnetic field signal and the switching threshold, and the second difference between the minimum value of the magnetic field signal and the switching threshold are greater than the measurement dead zone value. If greater than, the liquid level is determined according to the maximum value of the magnetic field signal and / or the minimum value of the magnetic field signal. Based on this, it can be avoided that when the liquid level fluctuates, the liquid level measurement result deviates, thereby causing the control-related processes of the liquid level measurement to fail.

[0072] exist Figure 1 Based on the illustrated solution, in one possible implementation, if there is no continuous change within a set sampling period, determining the liquid level based on the magnetic field signal includes:

[0073] An average value of the magnetic field signal within a sampling period is determined, and the liquid level is determined based on the average value of the magnetic field signal.

[0074] For example, in this solution, it is assumed that six magnetic field signals are obtained in a sampling period, and the liquid levels corresponding to the magnetic field signals are 95 mm, 98 mm, 98 mm, 98 mm, 98 mm, and 97 mm, respectively. Then, the final liquid level determined is 97 mm.

[0075] If the liquid levels corresponding to the magnetic field signals are 98 mm, 98 mm, 98 mm, 98 mm, 98 mm, and 98 mm respectively, the final liquid level determined is 98 mm.

[0076] exist Figure 1 Based on the shown solution, in one possible implementation scheme, if the first difference and / or the second difference is greater than the measurement dead zone value, the liquid level is determined according to the average value of the maximum value and the minimum value of the magnetic field signal.

[0077] For example, in this solution, the switch threshold is set to 100 mm (millimeter), the measurement dead zone is 2 mm, the maximum value of the magnetic field signal is set to 103 mm, and the minimum value of the magnetic field signal is set to 95 mm;

[0078] The first difference is 3 mm, and the second difference is 5 mm. Both the first difference and the second difference are larger than the measurement dead zone (2 mm). At this time, it can be determined that the liquid level is 99 mm.

[0079] Illustratively, in this solution, when the magnetic core direction signal continuously changes, the liquid level is determined based on the average value of the maximum value of the magnetic field signal and the minimum value of the magnetic field signal, which can improve the accuracy of measuring the liquid level.

[0080] exist Figure 1 Based on the scheme shown, as an implementable solution, the liquid level measurement method also includes:

[0081] If the magnetic field direction signal does not change continuously within the set sampling period, the direction of change of the liquid level is determined based on the magnetic field signal.

[0082] In this solution, specifically, if the magnetic field direction signal changes continuously in two adjacent sampling periods, the direction of change of the liquid level is determined based on the magnetic field signal;

[0083] For example, if the liquid level is determined to be 100 mm for the first sampling period and 95 mm for the second sampling period, the direction of change of the liquid level is determined to be a decrease in the liquid level;

[0084] If the liquid level is determined to be 98 mm for the first sampling period and 103 mm for the second sampling period, the direction of change of the liquid level is determined to be an increase in the liquid level.

[0085] In this solution, while determining the liquid level, the direction of liquid level change is also determined, expanding the function of interface measurement to facilitate on-site display, control and alarm of liquid level changes.

[0086] exist Figure 1 On the basis of the scheme shown, as an implementable scheme, it is set to obtain at least seven magnetic field direction signals within a sampling period;

[0087] If there are at least three pairs of magnetic field direction signals with opposite (or different) directions, it is determined that the magnetic field direction signal continues to change within the set sampling period.

[0088] For example, in this embodiment, the solutions corresponding to any of the above-mentioned liquid level measurement methods can be freely combined. Figure 2 This is another flow chart of the liquid level measurement method in the embodiment, refer to Figure 2 For example, as an implementable embodiment, the liquid level measurement method includes:

[0089] S201. Collect the magnetic field direction signal and determine whether the magnetic field direction signal continues to change within a set sampling period.

[0090] In this solution, the direction of the magnetic field direction signal is determined in the following way:

[0091] Obtaining output signals of two reed switches at two adjacent sampling moments, and determining a magnetic field direction signal according to the relative positions of the two reed switches;

[0092] Based on the installation position of the magnetic liquid level sensor, set the first reed switch, the second reed switch...the Nth reed switch in order from top to bottom;

[0093] If the i-th reed switch outputs a signal at the first sampling moment and the i+k-th reed switch outputs a signal at the second sampling moment, then the magnetic field direction signal is determined to be a negative signal;

[0094] If the i+kth reed switch outputs a signal at the first sampling moment and the ith reed switch outputs a signal at the second sampling moment, then the magnetic field direction signal is determined to be a positive signal;

[0095] If the i-th reed switch outputs a signal at the first sampling moment and the i-th reed switch outputs a signal at the second sampling moment, then the magnetic field direction signal is determined to be a zero direction signal;

[0096] If the i-th reed switch outputs a signal at the first sampling moment and does not output a signal at the second sampling moment, the direction of the magnetic field is determined to be a negative signal;

[0097] If the i-th reed switch does not output a signal at the first sampling moment and the i-th reed switch outputs a signal at the second sampling moment, it is determined that the direction of the magnetic field is a positive signal.

[0098] In this solution, the following methods are used to determine whether the magnetic field direction signal continues to change within the set sampling period:

[0099] It is set to obtain at least seven magnetic field direction signals within a sampling period;

[0100] If there are at least three pairs of magnetic field direction signals with opposite directions, it is determined that the magnetic field direction signal continues to change within the set sampling period.

[0101] S202. If there is no continuous change within the set sampling period, determine the average value of the magnetic field signal within the sampling period, and determine the liquid level based on the average value of the magnetic field signal.

[0102] In this solution, the magnetic field signal is set as the resistance (change) signal corresponding to the reed switch when the liquid level changes. After obtaining the magnetic field signal, the magnetic field signal is converted into a voltage signal, and the liquid level is determined based on the voltage signal (such as an ADC signal).

[0103] For example, in this solution, the voltage signal corresponds to the liquid level value. If six voltage signals are obtained in a sampling period, and the liquid levels corresponding to the voltage signals are 95 mm, 98 mm, 98 mm, 98 mm, 98 mm, and 97 mm, respectively, the final liquid level determined is 97 mm.

[0104] If the liquid levels corresponding to the voltage signals are 98mm, 98mm, 98mm, 98mm, 98mm, and 98mm respectively, the determined voltage signal is 98mm.

[0105] S203. If the change continues within the set sampling period, the maximum value and minimum value of the magnetic field signal within the sampling period are obtained, and the switch threshold and the measurement dead zone value are obtained.

[0106] The maximum value of the magnetic field signal is specifically the maximum liquid level value corresponding to the magnetic field signal (voltage signal), and the minimum value of the magnetic field signal is specifically the minimum liquid level value corresponding to the magnetic field signal (voltage signal);

[0107] The switch threshold is specifically used as a basis for whether to generate a switch control signal. Specifically, when the liquid level exceeds or falls below the switch threshold, a switch control signal is generated, wherein the switch control signal is used to control the specified valve group to open or close, thereby implementing the specified control logic;

[0108] The measurement dead zone value is specifically: the absolute value of the difference between the liquid level values ​​corresponding to two adjacent voltage signals.

[0109] S204. Determine a first difference between the maximum value of the magnetic field signal and the switching threshold, and a second difference between the minimum value of the magnetic field signal and the switching threshold.

[0110] S205. If the first difference and / or the second difference is greater than the measurement dead zone value, determine the liquid level according to the average value of the maximum value of the magnetic field signal and the minimum value of the magnetic field signal.

[0111] S206. If the magnetic field direction signal does not continuously change within the set sampling period, the direction of change of the liquid level is determined based on the magnetic field signal.

[0112] Example 2

[0113] This embodiment provides a liquid level measurement device, including a liquid level measurement unit, which is used to:

[0114] Collect the magnetic field direction signal and determine whether the magnetic field direction signal continues to change within the set sampling period;

[0115] If there is no continuous change within the set sampling period, the magnetic field signal within the sampling period is obtained and the liquid level is determined based on the magnetic field signal;

[0116] If the value continues to change within the set sampling period, the maximum value and minimum value of the magnetic field signal within the sampling period are obtained, and the switch threshold and measurement dead zone value are obtained;

[0117] Determine a first difference between a maximum value of the magnetic field signal and a switching threshold, and a second difference between a minimum value of the magnetic field signal and the switching threshold;

[0118] If the first difference and / or the second difference is greater than the measurement dead zone value, the liquid level is determined according to the average value of the maximum value and the minimum value of the magnetic field signal.

[0119] Illustratively, in this embodiment, the liquid level measurement unit can be specifically configured to implement any one of the liquid level measurement methods described in Example 1. The implementation process and beneficial effects thereof are the same as the corresponding contents described in Example 1 and will not be repeated here.

[0120] Example 3

[0121] Figure 3 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0122] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0123] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0124] The processor 11 can be various general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the liquid level measurement method.

[0125] In some embodiments, the liquid level measurement method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the liquid level measurement method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the liquid level measurement method in any other appropriate manner (e.g., by means of firmware).

[0126] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0127] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0128] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0129] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0130] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0131] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0132] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A liquid level measurement method, characterized in that: include: Collect the magnetic field direction signal and determine whether the magnetic field direction signal continues to change within the set sampling period; Assume that the number of magnetic field direction signals determined within the sampling period is n. If there are at least INT(n / 2-1) negative or positive signals, and at least four magnetic field direction signals with continuously changing directions, it is determined that there is a continuous change, where INT is a rounding function. If there is no continuous change within the set sampling period, obtaining the magnetic field signal within the sampling period, and determining the liquid level according to the magnetic field signal; If the change continues within the set sampling period, the maximum value and the minimum value of the magnetic field signal within the sampling period are obtained, and the switching threshold and the measurement dead zone value are obtained; Determine a first difference between a maximum value of the magnetic field signal and the switching threshold, and a second difference between a minimum value of the magnetic field signal and the switching threshold; If the first difference and / or the second difference is greater than the measurement dead zone value, determining the liquid level according to the maximum value of the magnetic field signal and / or the minimum value of the magnetic field signal includes: If the first difference and the second difference are greater than the measurement dead zone value; Then determining the liquid level according to the average value of the maximum value of the magnetic field signal and the minimum value of the magnetic field signal; If the first difference or the second difference is greater than the measurement dead zone value, the liquid level is determined according to the magnetic field signal corresponding to the first difference or the second difference that is greater than the measurement dead zone value.

2. The liquid level measurement method according to claim 1, wherein: Determining the liquid level according to the magnetic field signal includes: An average value of the magnetic field signal within the sampling period is determined, and the liquid level is determined according to the average value of the magnetic field signal.

3. The liquid level measurement method according to claim 1, wherein: If the magnetic field direction signal does not continue to change within the set sampling period; The changing direction of the liquid level is determined according to the magnetic field signal.

4. The liquid level measurement method according to claim 1, wherein: Acquiring at least seven magnetic field direction signals within the sampling period; If there are at least three pairs of magnetic field direction signals with opposite directions, it is determined that the magnetic field direction signal continues to change within the set sampling period.

5. The liquid level measurement method according to claim 1, wherein: Determining the liquid level according to the magnetic field signal includes: The magnetic field signal is converted into a voltage signal, and the liquid level is determined according to the voltage signal.

6. The liquid level measurement method according to claim 1, wherein: The switching threshold is used to generate a switching control signal when the liquid level exceeds or falls below the switching threshold.

7. A liquid level measuring device, characterized in that: The device comprises a liquid level measuring unit, wherein the liquid level measuring unit is used to: Collect the magnetic field direction signal and determine whether the magnetic field direction signal continues to change within the set sampling period; Assume that the number of magnetic field direction signals determined within the sampling period is n. If there are at least INT(n / 2-1) negative or positive signals, and at least four magnetic field direction signals with continuously changing directions, it is determined that there is a continuous change, where INT is a rounding function. If there is no continuous change within the set sampling period, obtaining the magnetic field signal within the sampling period, and determining the liquid level according to the magnetic field signal; If the change continues within the set sampling period, the maximum value and minimum value of the magnetic field signal within the sampling period are obtained, and the switching threshold and the measurement dead zone value are obtained; Determine a first difference between the maximum value of the magnetic field signal and the switching threshold, and a second difference between the minimum value of the magnetic field signal and the switching threshold; If the first difference and / or the second difference is greater than the measurement dead zone value, determining the liquid level according to an average value of the maximum value and the minimum value of the magnetic field signal includes: If the first difference and the second difference are greater than the measurement dead zone value; Then determining the liquid level according to the average value of the maximum value of the magnetic field signal and the minimum value of the magnetic field signal; If the first difference or the second difference is greater than the measurement dead zone value, the liquid level is determined according to the magnetic field signal corresponding to the first difference or the second difference that is greater than the measurement dead zone value.

8. An electronic device, characterized in that: comprising at least one processor, and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the liquid level measurement method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the liquid level measurement method according to any one of claims 1 to 6 when executed.

Citation Information

Patent Citations

  • Liquid level detecting device and method and water tank

    CN107421606A

  • Liquid level detection method and equipment as well as computer readable storage medium

    CN110806243A

  • Liquid level recorder apparatus and method for storing level differences in memory

    US4313114A