A liquid detection method, device and liquid detection equipment
By acquiring the original detection data of the liquid detection equipment and the size information of the container, and using the predetermined correspondence relationship for compensation, the problem of inaccurate liquid detection results is solved and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202210751660.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-06-29
AI Technical Summary
Because the microwave reflects differently in containers with different sizes of information, the detection data measured by the same liquid in different containers is inconsistent, resulting in inaccurate liquid detection results.
By acquiring the original detection data of the liquid detection equipment and the size information of the container, the compensation information is determined using the predetermined correspondence relationship, the original detection data is compensated, and the target detection data is obtained, thereby improving the accuracy of the detection results.
Different compensation information is used to compensate for the liquid in containers with different size information, which improves the accuracy of the detection results of liquid detection.
Smart Images

Figure CN115096914B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a liquid detection method, apparatus, and liquid detection device. Background Art
[0002] Liquid detection refers to detecting the type of a liquid to be detected. Exemplarily, the liquid type may be a natural attribute type, such as distilled water, ethanol, soda water, etc.; or, the liquid type may also be a danger level type, such as no danger, presence of danger, etc.
[0003] Generally, the microwave reflection method is used to implement liquid detection. Specifically, by means of the liquid detection device emitting microwaves to the liquid to be detected, detection data of the liquid to be detected is obtained, and then based on the detection data, the detection result of the liquid to be detected is determined.
[0004] However, due to the different reflection situations of microwaves in containers with different size information (such as width information), the detection data measured for the same liquid in containers with different size information often varies, resulting in inaccurate final detection results. Summary of the Invention
[0005] The purpose of the embodiments of the present invention is to provide a liquid detection method, apparatus, and liquid detection device to improve the accuracy of the detection result of liquid detection. The specific technical solutions are as follows:
[0006] In a first aspect, the embodiments of the present invention provide a liquid detection method, which is applied to a liquid detection device for detecting liquid in a container based on the microwave reflection principle. The liquid detection device includes a size detection sensor, and the method includes:
[0007] Obtain the original detection data detected by the liquid detection device for the liquid, and determine the first feature information corresponding to the original detection data;
[0008] According to the size detection data detected by the size detection sensor for the container during the liquid detection process, determine the size information of the container;
[0009] Using a pre-determined first correspondence relationship, determine the compensation information corresponding to the first feature information and the determined size information, where the first correspondence relationship is used to represent the correspondence relationship between the feature information of the detection data, the size information of the container, and the compensation information of the detection data;
[0010] Compensate the original detection data using the determined compensation information to obtain target detection data;
[0011] Based on the target detection data or the second feature information of the target detection data, determine the type of the liquid.
[0012] In a second aspect, an embodiment of the present invention provides a liquid detection device, which is applied to a liquid detection device for detecting liquid in a container based on the microwave reflection principle. The liquid detection device includes a size detection sensor, and the device includes:
[0013] A data acquisition module, configured to acquire the original detection data detected by the liquid detection device for the liquid, and determine the first feature information corresponding to the original detection data;
[0014] A size information determination module, configured to determine the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process;
[0015] A supplementary information determination module, configured to use a pre-determined first correspondence to determine the compensation information corresponding to the first feature information and the determined size information, where the first correspondence is used to represent the correspondence between the feature information of the detection data, the size information of the container, and the compensation information of the detection data;
[0016] A data supplementation module, configured to supplement the original detection data with the determined compensation information to obtain target detection data;
[0017] A type determination module, configured to determine the type of the liquid according to the target detection data or the second feature information of the target detection data.
[0018] In a third aspect, an embodiment of the present invention provides a liquid detection device, including a liquid detection position, a size detection sensor, a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;
[0019] The liquid detection position is configured to carry a container containing the liquid to be detected and detect the liquid to be detected;
[0020] The size detection sensor is configured to detect the size information of the container containing the liquid to be detected;
[0021] The memory is configured to store a computer program;
[0022] When the processor is configured to execute the program stored on the memory, it implements the method steps of any one of the first aspects.
[0023] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it implements the method steps of any one of the first aspects.
[0024] Advantageous effects of the embodiments of the present invention:
[0025] A liquid detection method, device and liquid detection equipment provided by the embodiments of the present invention can obtain the original detection data detected by the liquid detection equipment for the liquid and determine the first characteristic information corresponding to the original detection data; determine the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process; use the pre-determined first correspondence relationship to determine the compensation information corresponding to the first characteristic information and the determined size information, where the first correspondence relationship is used to represent the correspondence relationship between the characteristic information of the detection data, the size information of the container and the compensation information of the detection data; use the determined compensation information to compensate the original detection data to obtain the target detection data; determine the type of the liquid based on the target detection data or the second characteristic information of the target detection data. Since the compensation information corresponding to the first characteristic information and the determined size information can be determined based on the first characteristic information corresponding to the original detection data and the size information of the container, different compensation information can be used to compensate the liquids in containers with different size information, thereby improving the accuracy of the detection results of liquid detection.
[0026] Of course, it is not necessary for any product or method implementing the present invention to achieve all the above advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.
[0028] Figure 1 It is a schematic structural diagram of a liquid detection equipment provided by an embodiment of the present invention.
[0029] Figure 2 It is a flowchart of the liquid detection method provided by an embodiment of the present invention;
[0030] Figure 3 It is a schematic structural diagram of another liquid detection equipment provided by an embodiment of the present invention;
[0031] Figure 4 It is a flowchart of another liquid detection method provided by an embodiment of the present invention
[0032] Figure 5 It is a schematic structural diagram of the liquid detection device provided by an embodiment of the present invention;
[0033] Figure 6Schematic structural diagram of the liquid detection device provided by the embodiment of the present invention. Detailed implementation manners
[0034] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art based on this application belong to the protection scope of the present invention.
[0035] In order to improve the accuracy of the detection result of liquid detection, the embodiments of the present invention provide a liquid detection method, device and liquid detection device.
[0036] It should be noted that the embodiments of the present invention can be applied to a liquid detection device for detecting liquid in a container based on the microwave reflection principle. The liquid detection device includes a size detection sensor. At this time, after the liquid detection device detects the detection data of the liquid in the container, it can directly determine the detection result based on the detection data. Moreover, the liquid detection method provided by the embodiments of the present invention can be implemented in a software, hardware or a combination of software and hardware manner.
[0037] In one embodiment, as Figure 1 shown, it is a schematic structural diagram of a liquid detection device provided by the embodiment of the present invention, including a microwave antenna, a size detection sensor, a data processing device and a display. Among them, the microwave antenna is used to emit a microwave signal for detecting the liquid to be measured, the size detection sensor is used to measure the size information of the container containing the liquid to be measured, the data processing device is used to execute the liquid detection logic, and the display is used to display the detection result.
[0038] Among them, the liquid detection method provided by the embodiments of the present invention may include:
[0039] Obtain the original detection data detected by the liquid detection device for the liquid, and determine the first characteristic information corresponding to the original detection data;
[0040] Determine the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process;
[0041] Use the pre-determined first correspondence relationship to determine the compensation information corresponding to the first characteristic information and the determined size information, where the first correspondence relationship is used to represent the correspondence relationship between the characteristic information of the detection data, the size information of the container and the compensation information of the detection data;
[0042] Compensate the original detection data with the determined compensation information to obtain the target detection data;
[0043] Determine the type of liquid based on the target detection data or the second feature information of the target detection data.
[0044] In the solution provided in this embodiment, since the compensation information corresponding to the first feature information and the determined size information can be determined based on the first feature information corresponding to the original detection data and the size information of the container, different compensation information can be used to compensate for the liquids in containers with different size information, thereby improving the accuracy of the detection results of liquid detection.
[0045] Next, the liquid detection method provided by the embodiments of the present invention will be elaborated in detail with reference to the accompanying drawings of the specification.
[0046] As Figure 2 shown, an embodiment of the present invention provides a liquid detection method, which is applied to a liquid detection device for detecting liquid in a container based on the microwave reflection principle. The liquid detection device includes a size detection sensor, and includes steps S201 - S205, where:
[0047] S201, obtain the original detection data detected by the liquid detection device for the liquid, and determine the first feature information corresponding to the original detection data;
[0048] Among them, the original detection data is the detection data obtained by the liquid detection device for measuring the liquid in the container.
[0049] Among them, the above detection data can be the detection data obtained by the liquid detection device using a microwave signal of a single frequency to measure the liquid in the container. For example, the liquid detection device uses a microwave signal of 10HZ to measure the liquid in the container, and the obtained reflection signal is f. Then, the liquid detection device can use the amplitude value and / or phase value of the reflection signal f as the detection data. Briefly speaking, after the liquid detection device receives the reflection signal f, it can determine the amplitude value and / or phase value of the reflection signal f. If the determined value is the amplitude value or the phase value, the determined amplitude value and phase value can be used as the detection data. Or, if the determined values are the amplitude value and the phase value, the amplitude value and the phase value can be combined into a vector or a complex number. For example, the detection data is a vector (a, b), where a is the amplitude value and b is the vector value, or the detection data is a complex number z = c + di, where the amplitude value of the reflection signal f is The phase value of the reflection signal f is arctan(d / c). If the frequency of the reflection signal f is not fixed, the reflection signal f can be first decomposed into a combination of multiple frequency signals. Then, for each frequency signal, the calculation method of the single-frequency microwave signal described above can be used to determine the detection data corresponding to each frequency.
[0050] For a liquid detection device, the liquid detection device can also use microwave signals of multiple frequencies to detect the liquid in the container. At this time, the detection data measured by the liquid detection device for the liquid in the container can include the detection data corresponding to each frequency. Exemplarily, the liquid detection device can use microwave signals of 10HZ, 20HZ, and 30HZ respectively to detect the liquid in the container, and obtain detection data 1, detection data 2, and detection data 3 respectively. Then the above original detection data can include detection data 1, detection data 2, and detection data 3.
[0051] Optionally, when the liquid detection device uses microwave signals of multiple frequencies to detect the liquid in the container and the detection data includes amplitude values and phase values, the detection data obtained by the above liquid detection device can be expressed in the following form:
[0052]
[0053] Where S is the detection data detected by the liquid detection device for the liquid in the container, A i =[A i1 , A i2 ,..., A in , P i =[P i1 , P i2 ,..., P in , m is the type of liquid detected by the liquid detection device, n is the number of microwave signals of multiple frequencies, A ij is the amplitude value of the reflected signal obtained by the liquid detection device when measuring the i-th type of liquid with the j-th frequency microwave signal, and P ij is the phase value of the reflected signal obtained by the liquid detection device when measuring the i-th type of liquid with the j-th frequency microwave signal.
[0054] After obtaining the original detection data detected by the liquid detection device for the liquid, the first characteristic information corresponding to the original detection data can be determined.
[0055] In one implementation, after obtaining the original detection data detected by the liquid detection device for the liquid, the original detection data can be subjected to feature information extraction, and the extracted feature information can be used as the first characteristic information corresponding to the original detection data.
[0056] If the original detection data is a single detection data obtained by a liquid detection device measuring a liquid to be measured using a microwave signal of a single frequency, then the single detection data can be processed according to a specified data processing method to obtain first feature information. For example, if the original detection data is the amplitude value of a single reflection signal, then the amplitude value can be normalized to obtain a normalized value as the first feature information. If the original detection data is the amplitude value and phase value of a single reflection signal, then the modulus of the vector composed of the amplitude value and phase value can be calculated as the first feature information.
[0057] If the original detection data is multiple detection data obtained by a liquid detection device measuring a liquid to be measured using microwave signals of multiple frequencies, then the statistical features of the original detection data can be calculated as the first feature information; and / or, the waveform features of the original detection data changing with the frequency of the microwave signal can be determined as the first feature information.
[0058] At this time, the above first feature information includes the statistical features of the original detection data, and / or, the waveform features of the original detection data changing with the frequency of the microwave signal;
[0059] Among them, the above statistical features may include at least one of mean, variance, skewness, kurtosis, energy, root mean square, root amplitude value, and peak-to-peak value.
[0060] As shown in Table 1, the calculation formulas for each statistical feature are as follows:
[0061] Table 1
[0062]
[0063] In each formula in the above table, x i represents the i-th detection data in the detection data, n represents the number of multiple detection data, x max is the detection data with the largest value among the multiple detection data, and x min is the detection data with the smallest value among the multiple detection data.
[0064] The above waveform features of the original detection data changing with the frequency of the microwave signal are the waveform features of the multiple detection data changing with the frequency of the microwave signal. Briefly speaking, in a coordinate system with the frequency of the microwave signal as the abscissa and the value of the detection data as the ordinate, the features of the above multiple detection data changing with the frequency of the microwave signal.
[0065] Wherein, when the original detection data includes the amplitude value and / or phase value of the reflected signal received by the liquid detection device during the detection of the liquid to be detected, if the original detection data only includes the amplitude value or the phase value, the value of the detection data is the amplitude value or the phase value; if the original detection data includes the amplitude value and the phase value, the value of the detection data can be any one of the amplitude value and the phase value, or the value of the detection data can also be the modulus value of the vector composed of the amplitude value and the phase value.
[0066] In another implementation, in order to further improve the accuracy of the detection result of liquid detection, after obtaining the original detection data, device consistency compensation can be performed on the original detection data first, and then feature extraction can be performed on the supplemented detection data to obtain the first feature information of the original detection data, where the device consistency compensation is the compensation for the difference in the detected data between the liquid detection device and the reference device, and the reference device is the device that measures the detection data of the first corresponding relationship used in the subsequent steps. Optionally, feature information extraction is performed on the original detection data, and then based on the third corresponding relationship between the preset feature information of the liquid and the device compensation information, the device compensation information corresponding to the extracted feature information is determined, and the original detection data is compensated using the determined device compensation information, and feature information extraction is performed on the compensated original detection data, and the extracted feature information is used as the first feature information corresponding to the original detection data. Among them, the device compensation information corresponding to the feature information of each liquid is: the difference information between the detected data measured by the reference device and the liquid detection device for the liquid.
[0067] In this case, the first feature information includes the statistical features of the compensated original detection data, and / or the waveform features of the compensated original detection data varying with the frequency of the microwave signal.
[0068] S202, determine the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process;
[0069] Among them, the size information of the above container can be the width information of the container, the radius, perimeter, area, etc. of the horizontal cross-section of the container. The above width information can be the opening width information, bottom width information or width information of any part of the container, etc. The above size detection sensor can be any sensor capable of measuring the size information of the container. For example, the above size detection sensor can include at least one of a pressure sensor, an ultrasonic sensor, and a displacement sensor. When the liquid detection device includes multiple size sensors, the above size information can be determined by synthesizing the size detection data measured by each size sensor. For example, the mean value of the size detection data measured by each size sensor is calculated to obtain the size information of the container. When the liquid detection device includes only a single size sensor, the size information of the container can be determined only by using the size detection data measured by the single size sensor. It should be noted that during the liquid detection process, to improve the detection accuracy, the container needs to be placed at the center of the container carrying platform. For example, the vertical central axis of the container should be located at the center of the container carrying platform.
[0070] In one implementation, the above size detection sensor includes: a plurality of pressure sensors deployed at different positions on the container carrying platform of the liquid detection device, where the deployment positions of each pressure sensor are different from the center of the container carrying platform.
[0071] As Figure 3 shown, an embodiment of the present invention provides a structural schematic diagram of a liquid detection device. In the figure, the outer rectangular area represents the liquid detection device, the concentric circle area represents the container carrying platform of the liquid detection device, the inner rectangle on the left is the transmitting antenna of the microwave signal, the inner rectangle on the right is the receiving antenna of the microwave signal, and the multiple circular icons on the container carrying platform represent a plurality of pressure sensors deployed at different positions on the container carrying platform. The deployment positions of each pressure sensor are different from the center of the container carrying platform.
[0072] At this time, at least one effective pressure sensor can be determined from each pressure sensor according to the pressure data detected by each pressure sensor for the container during the liquid detection process. Among them, each effective pressure sensor is a pressure sensor whose detected pressure data is greater than the first pressure threshold. Then, from at least one effective pressure sensor, the pressure sensor with the farthest distance from the center of the container carrying platform in the deployment position is determined as the container edge pressure sensor, and based on the distance between the deployment position of the container edge pressure sensor and the center of the container carrying platform, the size information of the container is determined. For example, the distance between the deployment position of the container edge pressure sensor and the center of the container carrying platform can be directly used as the size information of the container; or in combination with the mapping relationship between the preset distance between the deployment position of the container edge pressure sensor and the center of the container carrying platform and the size information of the container, the size information of the current container is determined.
[0073] The above first pressure threshold can be set according to requirements or actual scenarios, or determined based on the pressure value that can be detected by the pressure sensor when the container is empty. For example, the above first pressure threshold can be the pressure value that can be detected by the pressure sensor when the container is empty, or the sum of the pressure value that can be detected by the pressure sensor when the container is empty and a specified difference can be used as the first pressure threshold, where the above specified difference can be set according to requirements and scenarios, such as 10% of the pressure value that can be detected by the pressure sensor when the container is empty.
[0074] Exemplarily, for any pressure sensor, when the pressure data of the pressure sensor is greater than the first pressure threshold, it indicates that when the container is placed on the container bearing platform, the pressure sensor can bear the container, thereby indicating that the container radius of the container is not less than the distance between the pressure sensor and the center of the container bearing platform; when the pressure data of the pressure sensor is not greater than the first pressure threshold, it indicates that when the container is placed on the container bearing platform, the pressure sensor does not bear the container, thereby indicating that the container radius of the container is less than the distance between the pressure sensor and the center of the container bearing platform. Based on this, the present application can determine, from at least one effective pressure sensor, the pressure sensor with the farthest deployment position from the center of the container bearing platform as the container edge pressure sensor, and then determine the size information of the container based on the distance between the deployment position of the container edge pressure sensor and the center of the container bearing platform.
[0075] In one implementation, the above size detection sensor includes: an ultrasonic sensor, which is deployed at the edge of the container bearing platform of the liquid detection device and emits ultrasonic waves towards the center of the container bearing platform;
[0076] At this time, the difference between the deployment distance of the ultrasonic sensor and the container edge distance detected by the ultrasonic sensor for the container during the liquid detection process can be calculated as the size information of the container;
[0077] Among them, the deployment distance of the ultrasonic sensor is: the distance between the deployment position of the ultrasonic sensor and the center of the container bearing platform, and the container edge distance is the distance between the deployment position of the ultrasonic sensor and the edge of the container.
[0078] Since the ultrasonic sensor is deployed at the edge of the container bearing platform of the liquid detection device and emits ultrasonic waves towards the center of the container bearing platform, during the liquid detection process, the container edge distance detected by the ultrasonic sensor for the container is the distance between the ultrasonic wave and the edge of the container. Furthermore, the difference between the deployment distance of the ultrasonic sensor and the container edge distance detected by the ultrasonic sensor for the container during the liquid detection process is used as the size information of the container.
[0079] In one implementation, the above-mentioned size detection sensor includes: a displacement sensor. The displacement sensor includes a first clamping plate and a second clamping plate. During the liquid detection process, the first clamping plate and the second clamping plate are used to clamp the container.
[0080] At this time, during the liquid detection process, determine the distance between the first clamping plate and the second clamping plate detected by the displacement sensor for the container as the size information of the container.
[0081] Among them, the distance between the first clamping plate and the second clamping plate detected by the displacement sensor for the container can be understood as the diameter or the transverse width of the cross-section of the container, and can be used as the size information of the container.
[0082] S203. Using the pre-determined first correspondence relationship, determine the compensation information corresponding to the first characteristic information and the determined size information, where the first correspondence relationship is used to represent the correspondence relationship among the characteristic information of the detection data, the size information of the container, and the compensation information of the detection data.
[0083] Among them, the above-mentioned first correspondence relationship can be a relationship determined based on the specified difference information. The specified difference information is: for each liquid, the difference information between the detection data measured for the liquid in each container and the detection data measured for the liquid in a container with a specified size can be obtained.
[0084] In one implementation, the above-mentioned first correspondence relationship can include: the correspondence relationship between the third characteristic information of each reference liquid and the second correspondence relationship. Among them, the third characteristic information of each reference liquid is: the characteristic information of the detection data obtained by the liquid detection device measuring the reference liquid.
[0085] The second correspondence relationship corresponding to each third characteristic information includes: the correspondence relationship between the size information of each container and the compensation information; exemplarily, the detection data measured by the liquid detection device for the reference liquid can be:
[0086]
[0087] Among them, N is the number of containers with different size information, w j represents the size information of the j-th container, is the detection data obtained by the liquid detection device for the reference liquid in the j-th container.
[0088] In practical applications, it is often necessary to determine the second correspondence relationships corresponding to the third characteristic information of multiple reference liquids. At this time, for each reference liquid, the detection data measured by the liquid detection device for each reference liquid can be expressed as:
[0089]
[0090] Among them, S w is the detection data measured by the liquid detection device for each reference liquid, M is the number of reference liquids, and S ci is the set of detection data measured by the liquid detection device for the i-th type of liquid in containers with different size information; Among them, is the detection data measured by the liquid detection device for the i-th type of liquid in the j-th container.
[0091] It should be noted that in this method, the above-mentioned reference container can be any one of the above N containers, or can be an independent container other than those in the above detection data set, which is all acceptable.
[0092] In one example, the reference container is the b-th container among the above N containers; at this time, for M reference liquids, the detection data in the b-th container can be determined for each, and the set
[0093]
[0094] Among them, represents the detection data measured for the i-th type of liquid in the b-th container.
[0095] Thus, the difference ΔS between the detection data measured for each reference liquid in each container and the detection data measured for the reference liquid in the reference container can be calculated:
[0096]
[0097] Thus, the second object relationship of this third feature information pair can be determined:
[0098]
[0099] Among them, the second object relationship corresponding to the third feature information of the i-th type of reference liquid includes: ΔS i1 , ΔS i2 ,..., ΔS iN , represents the compensation information corresponding to the size information of the j-th container corresponding to the third feature information of the i-th type of reference liquid.
[0100] Optionally, for the third characteristic information of each reference liquid, in the second corresponding relationship corresponding to the third characteristic information, the compensation information corresponding to the size information of each container includes: the compensation values corresponding to each first frequency; wherein, each first frequency is the signal frequency of each microwave signal used for liquid detection of the reference liquid; the compensation value corresponding to each first frequency is: the difference between the detection data measured by the reference liquid in the container using the microwave signal of the first frequency and the detection data measured by the reference liquid in the reference container using the microwave signal of the first frequency.
[0101] Exemplarily, when the liquid detection device measures the microwave signal using microwave signals of multiple first frequencies, the above wherein, t kjb represents the difference between the detection data measured by the liquid detection device using the microwave signal of the k-th first frequency for the i-th type of reference liquid in the j-th container and the detection data measured for the i-th type of reference liquid in the b-th container (reference container).
[0102] After determining the first characteristic information, the first corresponding relationship can be used to determine the compensation information belonging to the first characteristic information, that is, the compensation information corresponding to the first characteristic information and the determined size information. The compensation information belonging to each characteristic information is the compensation information determined by using the compensation information corresponding to the first characteristic information or the compensation information corresponding to the characteristic information matching the first characteristic information.
[0103] That is to say, after determining the first characteristic information, the first corresponding relationship can be used to determine the compensation information corresponding to the first characteristic information, and then the determined compensation information can be used to determine the compensation information belonging to the first characteristic information. For example, directly use the determined compensation information as the compensation information belonging to the first characteristic information, or adjust the determined compensation information based on a preset adjustment coefficient to obtain the compensation information belonging to the first characteristic information.
[0104] Alternatively, after determining the first characteristic information, the compensation information corresponding to the characteristic information matching the first characteristic information can also be determined by using the first corresponding relationship, and then the determined compensation information can be used to determine the compensation information belonging to the first characteristic information. The specific details will be introduced in detail in the subsequent embodiments and will not be elaborated here.
[0105] S204. Compensate the original detection data with the determined compensation information to obtain target detection data;
[0106] After determining the compensation information corresponding to the first characteristic information and the determined size information, in order to make the detection result more accurate, the determined compensation information can be used to compensate the original detection data to obtain target detection data.
[0107] Optionally, after compensating the information, the sum of the original detection data and the determined compensation information can be directly calculated as the target detection data.
[0108] During the process of the liquid detection device detecting the liquid to be detected, if the microwave signal used by the liquid detection device for the liquid to be detected is only a part of the multiple microwave signals used by the reference device when measuring the base station liquid, then after determining the compensation information belonging to the first characteristic information, it is necessary to determine part of the compensation information from the compensation information, and use the determined part of the compensation information to compensate the original detection data to obtain the target detection data.
[0109] In one implementation manner, when the compensation information corresponding to the size information of each container includes: the compensation value corresponding to each first frequency, the above-mentioned original detection data may include the detection data corresponding to the second frequency.
[0110] Wherein, the second frequency is the signal frequency of the microwave signal used by the liquid detection device when detecting the liquid to be detected; the second frequency is one of the frequencies of each first frequency;
[0111] Exemplarily, the first frequencies include frequency 1, frequency 2, frequency 3, and frequency 4. The above-mentioned second frequency may be at least one of frequency 1, frequency 2, frequency 3, and frequency 4, such as frequency 1. Of course, the second frequency may also be exactly the same as the first frequency, such as also being frequency 1, frequency 2, frequency 3, and frequency 4.
[0112] At this time, the compensation value belonging to the second frequency can be determined from the determined compensation values corresponding to each first frequency, and then the sum of the detection data corresponding to the second frequency and the determined compensation value can be calculated as the compensated detection data corresponding to the second frequency to obtain the target detection data.
[0113] It should be emphasized that in the case where the original detection data has been compensated for device consistency when obtaining the first characteristic information corresponding to the original detection data, at this time, after the determined compensation information, the original detection data that has been supplemented for device consistency can be compensated, so as to ensure more accurate results.
[0114] S205, determine the type of the liquid based on the target detection data or the second characteristic information of the target detection data.
[0115] After obtaining the target detection data, the liquid type of the liquid to be measured is determined by using the target detection data, that is, based on the target detection data or the second feature information of the target detection data, the type of the liquid is determined. Optionally, the target detection data or the second feature information of the target detection data may be classified according to a preset liquid type classification standard to obtain the liquid type of the liquid to be measured.
[0116] The above liquid type classification standard may include the correspondence between the liquid type and the detection data or the feature information of the detection data. For example, when the detection data or the feature information of the detection data is in classification interval 1, the liquid type is type 1, and when the detection data or the feature information of the detection data is in classification interval 2, the liquid type is type 2. Therefore, after obtaining the target detection data, the above correspondence can be used to determine the classification interval in which the target detection data or the second feature information corresponding to the target detection data is located, and then the liquid type corresponding to the classification area is used as the liquid type of the liquid to be measured.
[0117] Alternatively, in order to more accurately detect the liquid type of the liquid, the above liquid type classification standard may be the standard for the detection model to classify the liquid; wherein, the detection model is a classification model trained based on the respective reference detection data obtained by the reference device for liquid detection of different types of liquids; or, the detection model is a classification model trained based on the feature information of the respective reference detection data obtained by the reference device for liquid detection of different types of liquids. At this time, after obtaining the target detection data, the target detection data or the second feature information of the target detection data may be input into the detection model to obtain the liquid type of the liquid to be measured output by the detection model. The implementation process of determining the second feature information from the above target detection data is the same as or similar to the process of determining the first feature information in the original detection data described above, and will not be elaborated here.
[0118] In the solution provided in this embodiment, since the compensation information corresponding to the first feature information and the size information of the container can be determined based on the first feature information corresponding to the original detection data, different compensation information can be used for compensation for the liquids in containers with different size information, thereby improving the accuracy of the detection result of the liquid detection.
[0119] As Figure 4 shown, the embodiment of the present invention provides another liquid detection method. In the case where the above first correspondence includes the correspondence between the third feature information of each reference liquid and the second correspondence, the above step S203 may include steps S2031-S2033:
[0120] S2031. Based on the feature distance between the first feature information and the third feature information of each reference liquid, determine at least one matching feature information that matches the first feature information from each third feature information.
[0121] Among them, in the embodiments of the present invention, after obtaining the first feature information corresponding to the original detection data, based on the feature distance between the first feature information and the third feature information of each reference liquid, at least one matching feature information that matches the first feature information can be determined from each third feature information.
[0122] Optionally, after obtaining the first feature information of the original detection data, the feature distance between the first feature information and each third feature information can be calculated respectively, and then based on the calculated feature distances, at least one matching feature information that matches the first feature information can be determined from each third feature information. For example, each third feature information includes feature information 1, feature information 2, feature information 3, and feature information 4. Then, the feature distance between the first feature information and feature information 1 can be calculated as distance 1, the feature distance between the first feature information and feature information 2 can be calculated as distance 2, the feature distance between the first feature information and feature information 3 can be calculated as distance 3, and the feature distance between the first feature information and feature information 4 can be calculated as distance 4. Thus, based on distance 1, distance 2, distance 3, and distance 4, at least one matching feature information that matches the first feature information can be determined from feature information 1, feature information 2, feature information 3, and feature information 4.
[0123] Specifically, there are many ways to determine at least one matching feature information that matches the first feature information. For example, it includes at least one of the following two ways:
[0124] In the first way to determine the matching feature information, the feature information with the shortest feature distance from the first feature information can be determined from each third feature information as the matching feature information.
[0125] In this way, the third feature information with the shortest feature distance from the first feature information can be selected as the matching feature information.
[0126] In the second way to determine the matching feature information, the feature information with a feature distance less than the specified distance threshold from the first feature information can be determined from each third feature information as the matching feature information.
[0127] In this method, the third feature information with a feature distance less than the specified distance threshold between the first feature information is used as the matching feature information. The above-specified distance threshold can be determined based on actual experience and requirements, and the embodiments of the present invention do not make specific limitations thereto. In this method, at least one matching feature information that is most similar to the first feature information can be determined from each piece of the third feature information.
[0128] S2032. Determine the second correspondence corresponding to at least one matching feature information as the second correspondence corresponding to the first feature information according to the correspondence between the third feature information of each reference liquid and the second correspondence.
[0129] After determining at least one matching feature information that matches the first feature information, the second correspondence corresponding to at least one matching feature information can be determined according to the correspondence between the third feature information of each reference liquid and the second correspondence.
[0130] If there are multiple pieces of at least one matching feature information, it is necessary to determine the compensation information corresponding to each piece of matching feature information according to the correspondence between the third feature information of each reference liquid and the second correspondence.
[0131] S2033. For each piece of matching feature information, determine the compensation value corresponding to each first frequency corresponding to the determined size information according to the second correspondence corresponding to the matching feature information as the compensation value corresponding to each first frequency that belongs to the matching feature information.
[0132] Among them, since the second correspondence corresponding to each piece of feature information includes the correspondence between the size information of each container and the compensation information, and the compensation information corresponding to the size information of each container includes: the compensation value corresponding to each first frequency. Therefore, after determining the second correspondence corresponding to each piece of matching feature information, the compensation value corresponding to each first frequency corresponding to the size information can be determined from the size information and the compensation information of each container included in the second object relationship as the compensation value corresponding to each first frequency that belongs to the matching feature information.
[0133] In this case, since the original detection data includes the detection data corresponding to the second frequency, the above step S204 may include steps S2041-S2044:
[0134] S2041. For each piece of matching feature information, select the compensation value corresponding to the second frequency from the compensation values corresponding to each first frequency corresponding to the matching feature information as the compensation value corresponding to the matching feature information.
[0135] During the detection of the liquid in the container of the liquid detection device, when the microwave signal utilized by the liquid detection device in the actual application process may be only a part of the multiple microwave signals utilized by the liquid detection device when measuring the reference liquid, therefore, after determining each matching feature information, the compensation value corresponding to the second frequency can be selected from the compensation values corresponding to the respective first frequencies of this matching feature information as the compensation value corresponding to this matching feature information.
[0136] Exemplarily, for the matching feature information 1, the respective first frequencies corresponding to the matching feature information 1 are frequency 1, frequency 2, frequency 3, and frequency 4, where the compensation value corresponding to frequency 1 is compensation value 1, the compensation value corresponding to frequency 2 is compensation value 2, the compensation value corresponding to frequency 3 is compensation value 3, and the compensation value corresponding to frequency 4 is compensation value 4. If the second frequency is frequency 1, the selected compensation is compensation value 1; if the second frequency is multiple, such as frequency 1 and frequency 2, the selected compensation values include the compensation value 1 corresponding to frequency 1 and the compensation value 2 corresponding to frequency 2.
[0137] S2042, determine the weight of the compensation value corresponding to each matching feature information based on the total number of each matching feature information or the feature distance between each matching feature information and the first feature information;
[0138] Specifically, there are many ways to determine the weight of the compensation information corresponding to each matching feature information, for example, at least including one of the following two ways:
[0139] In the first weight determination method, the reciprocal of the total number of each matching feature information can be calculated as the weight of the compensation information corresponding to each matching feature information;
[0140] Simply put, if the total number of each matching feature information is 4, the reciprocal of the total number of each matching feature information is 1 / 4, so the weight of the compensation information corresponding to each matching feature information is 1 / 4 = 0.25.
[0141] In the second weight determination method, for each matching feature information, the ratio of the feature distance between this matching feature information and the first feature information to the total feature distance can be calculated, and based on the calculated ratio, the weight of the compensation information corresponding to this matching feature information can be determined.
[0142] There are multiple ways to determine the weight of the compensation information corresponding to this matching feature information based on the calculated ratio. For example, the ratio can be used as the weight of the compensation information corresponding to this matching feature information, or the square, square root, cube, etc. of the calculated ratio can be used as the weight of the compensation information corresponding to this matching feature information, which are all acceptable.
[0143] S2043. Weighted sum the compensation values corresponding to each matching feature information according to the weights of the compensation values corresponding to each matching feature information, and use the result as the compensation value belonging to the second frequency.
[0144] After determining the weights of the compensation values corresponding to each matching feature information, the compensation values corresponding to each matching feature information can be weighted and summed according to the weights of the compensation values corresponding to each matching feature information, and the result is used as the compensation value belonging to the second frequency.
[0145] For example, if the second frequency includes frequency 1, frequency 2, and frequency 3, the compensation values corresponding to matching feature information 1 include the compensation values corresponding to frequency 1, frequency 2, and frequency 3, which are compensation value 11, compensation value 12, and compensation value 13 respectively. The compensation values corresponding to matching feature information 2 include the compensation values corresponding to frequency 1, frequency 2, and frequency 3, which are compensation value 21, compensation value 22, and compensation value 23 respectively. The weight of the compensation value corresponding to matching feature information 1 is weight 1, and the weight of the compensation value corresponding to matching feature information 2 is weight 2. Then the supplementary value belonging to frequency 1 = weight 1 × compensation value 11 + weight 2 × compensation value 21, the compensation value belonging to frequency 2 = weight 1 × compensation value 12 + weight 2 × compensation value 22; the compensation value belonging to frequency 3 = weight 1 × compensation value 13 + weight 2 × compensation value 23.
[0146] S2044. Calculate the sum of the detection data corresponding to the second frequency and the determined compensation value, and use the result as the compensated detection data corresponding to the second frequency to obtain the target detection data.
[0147] After obtaining the compensation values belonging to the second frequency, the sum of the detection data corresponding to the second frequency and the determined compensation value can be calculated, and the result is used as the compensated detection data corresponding to the second frequency to obtain the target detection data.
[0148] For example, the second frequency includes frequency 1, frequency 2, and frequency 3. The detection data corresponding to frequency 1 is detection data 1, the detection data corresponding to frequency 2 is detection data 2, the detection data corresponding to frequency 3 is detection data 3, the compensation value belonging to frequency 1 is compensation value 1, the compensation value belonging to frequency 2 is compensation value 2, and the compensation value belonging to frequency 3 is compensation value 3. Then for frequency 1, its target detection data = data 1 + compensation value 1; for frequency 2, its target detection data = data 2 + compensation value 2; for frequency 3, its target detection data = data 3 + compensation value 3.
[0149] In the solution provided in this embodiment, the accuracy of the detection result of liquid detection can be improved, and at the same time, a specific method for determining the compensation value and performing compensation is provided, which provides an implementation basis for improving the accuracy of the detection result of liquid detection.
[0150] In another liquid detection method provided by an embodiment of the present invention, in order to avoid performing invalid detections and save device resources, before obtaining the original detection data detected by the liquid detection device for the liquid, it is also possible to determine whether there is a liquid to be detected in the container. If there is, liquid detection is performed on the liquid in the container.
[0151] Among them, there are many ways to determine whether there is a liquid to be detected in the container. For example, it at least includes at least one of the following two implementation methods:
[0152] The first determination method is that when there are multiple pressure sensors deployed on the container carrying platform of the liquid detection device, if there is pressure data greater than the second pressure threshold among the pressure data detected by the multiple pressure sensors, it is determined that there is a liquid to be detected in the container;
[0153] Among them, the above-mentioned second pressure threshold can be set according to requirements or the actual scenario. For example, it can be 0, or it can be determined based on the pressure value that the pressure sensor can detect when the container is empty. For example, the above-mentioned second pressure threshold can be the pressure value that the pressure sensor can detect when the container is empty, or the sum of the pressure value that the pressure sensor can detect when the container is empty and a specified difference can be used as the first pressure threshold, where the above-mentioned specified difference can be set according to requirements and the scenario. For example, it is 5% of the pressure value that the pressure sensor can detect when the container is empty
[0154] For any pressure sensor, when the pressure data of the pressure sensor is greater than the pressure data of the second pressure threshold, it means that the weight of the container is greater than its empty weight, so it can be determined that there is liquid in the container. At this time, liquid detection can be performed on the liquid in the container. If the pressure data detected by the multiple pressure sensors are all not less than the pressure data of the second pressure threshold, it is determined that there is no liquid to be detected in the container. At this time, the liquid detection device can enter the sleep state until it is determined that there is liquid to be detected in the container.
[0155] It should be noted that when there are multiple pressure sensors deployed on the container carrying platform of the liquid detection device, these multiple pressure sensors can also be responsible for determining the size information of the container. At this time, the multiple pressure sensors deployed by the liquid detection device are used to detect the size information of the container and also to determine whether there is liquid in the container, realizing the maximum application of the pressure sensors and avoiding waste.
[0156] Of course, when there are multiple pressure sensors deployed on the container carrying platform of the liquid detection device, the liquid detection device can also use other size sensors to measure the size information of the container. At this time, the multiple pressure sensors deployed on the container carrying platform of the liquid detection device can be only used to determine whether there is liquid in the container.
[0157] In the second determination method, when the liquid detection device includes an image acquisition device, an image of the container acquired by the image acquisition device for the container is obtained; the container image is subjected to liquid recognition, and if liquid is recognized, it is determined that there is liquid to be detected in the container.
[0158] The above-mentioned image acquisition device can be a camera. Optionally, the field of view of the camera can cover the container carrying platform, so that after the container is placed on the container carrying platform, the container image can be obtained by using the camera.
[0159] After the container image is obtained, a preset liquid recognition algorithm can be used to recognize whether there is liquid in the container. The liquid recognition algorithm can be any algorithm capable of recognizing liquid, such as a liquid recognition model. The embodiments of the present invention do not make specific limitations on this.
[0160] If liquid is recognized from the container image, it means that there is liquid to be detected in the container. At this time, the liquid in the container can be subjected to liquid detection. If no liquid is recognized from the container image, it means that there is no liquid in the container. At this time, the liquid detection device can enter the sleep state until it is determined that there is liquid to be detected in the container.
[0161] In the solution provided in this embodiment, the accuracy of the detection result of liquid detection can be improved. At the same time, before obtaining the original detection data detected by the liquid detection device for the liquid, it can also be determined whether there is liquid to be detected in the container, so as to avoid performing invalid detections.
[0162] Corresponding to the liquid detection method provided in the above embodiments of the present invention, as Figure 5 shown, an embodiment of the present invention further provides a liquid detection device, which is applied to a liquid detection device for detecting liquid in a container based on the microwave reflection principle. The liquid detection device includes a size detection sensor, and the device includes:
[0163] A data acquisition module 501, configured to acquire the original detection data detected by the liquid detection device for the liquid, and determine first feature information corresponding to the original detection data;
[0164] A size information determination module 502, configured to determine the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process;
[0165] A supplementary information determination module 503, configured to use a pre-determined first correspondence to determine compensation information corresponding to the first feature information and the determined size information, where the first correspondence is used to represent the correspondence between the feature information of the detection data, the size information of the container, and the compensation information of the detection data;
[0166] A data supplement module 504, configured to compensate the original detection data by using the determined compensation information to obtain target detection data;
[0167] A type determination module 505, configured to determine the type of the liquid according to the target detection data or second feature information of the target detection data.
[0168] Optionally, the size detection sensor includes at least one of a pressure sensor, an ultrasonic sensor, and a displacement sensor.
[0169] Optionally, the size detection sensor includes: a plurality of pressure sensors deployed at different positions on the container bearing platform of the liquid detection device, wherein the deployment positions of the pressure sensors are different from the center distance of the container bearing platform;
[0170] The size information determination module is specifically configured to determine at least one effective pressure sensor from the pressure sensors according to the pressure data detected by each pressure sensor for the container during the liquid detection process, wherein each effective pressure sensor is a pressure sensor whose detected pressure data is greater than a first pressure threshold; determine the pressure sensor with the deployment position farthest from the center of the container bearing platform from at least one effective pressure sensor as the container edge pressure sensor; and determine the size information of the container based on the distance between the deployment position of the container edge pressure sensor and the center of the container bearing platform.
[0171] Optionally, the size detection sensor includes: an ultrasonic sensor, which is deployed at the edge of the container bearing platform of the liquid detection device and emits ultrasonic waves towards the center of the container bearing platform;
[0172] The size information determination module is specifically configured to calculate the difference between the deployment distance of the ultrasonic sensor and the container edge distance detected by the ultrasonic sensor for the container during the liquid detection process as the size information of the container; wherein the deployment distance of the ultrasonic sensor is: the distance between the deployment position of the ultrasonic sensor and the center of the container bearing platform, and the container edge distance is the distance between the deployment position of the ultrasonic sensor and the edge of the container.
[0173] Optionally, the size detection sensor includes: a displacement sensor; the displacement sensor includes a first clamping plate and a second clamping plate, and during the liquid detection process, the first clamping plate and the second clamping plate are used to clamp the container;
[0174] The dimension information determining module is specifically configured to determine, during the liquid detection process, the distance between the first clamping plate and the second clamping plate detected by the displacement sensor for the container as the dimension information of the container.
[0175] Optionally, the first correspondence includes: the correspondence between the third characteristic information of each reference liquid and the second correspondence; the third characteristic information of each reference liquid is: the characteristic information of the detection data obtained by the liquid detection device measuring the reference liquid.
[0176] The second correspondence corresponding to each third characteristic information includes: the correspondence between the dimension information of each container and the compensation information; for each third characteristic information of each reference liquid, in the second correspondence corresponding to the third characteristic information, the compensation information corresponding to the dimension information of each container includes: the compensation values corresponding to each first frequency.
[0177] Wherein, the first frequencies are the signal frequencies of the microwave signals used for liquid detection of the reference liquid; the compensation value corresponding to each first frequency is: the difference between the detection data measured by the reference liquid in the container using the microwave signal of the first frequency and the detection data measured by the reference liquid in the reference container using the microwave signal of the first frequency.
[0178] Optionally, the original detection data includes the detection data corresponding to the second frequency; the second frequency is the signal frequency of the microwave signal used by the liquid detection device for liquid detection of the liquid to be detected; the second frequency is one of the first frequencies.
[0179] The data supplement module includes:
[0180] The supplementary value calculation sub-module is configured to determine, from the determined compensation values corresponding to each first frequency, the compensation value belonging to the second frequency.
[0181] The data supplement sub-module is configured to calculate the sum of the detection data corresponding to the second frequency and the determined compensation value as the compensated detection data corresponding to the second frequency to obtain the target detection data.
[0182] Optionally, the supplementary information determination module is specifically configured to determine, from each third feature information, at least one matching feature information that matches the first feature information based on the feature distance between the first feature information and the third feature information of each reference liquid; determine the second correspondence corresponding to the at least one matching feature information as the second correspondence corresponding to the first feature information according to the correspondence between the third feature information of each reference liquid and the second correspondence; for each matching feature information, determine the compensation value corresponding to each first frequency corresponding to the determined dimension information according to the second correspondence corresponding to the matching feature information as the compensation value belonging to each first frequency corresponding to the matching feature information;
[0183] The supplementary value calculation sub-module is specifically configured to, for each matching feature information, select the compensation value corresponding to the second frequency from the compensation values corresponding to each first frequency corresponding to the matching feature information as the compensation value corresponding to the matching feature information; determine the weight of the compensation value corresponding to each matching feature information based on the total number of each matching feature information or the feature distance between each matching feature information and the first feature information; perform weighted summation on the compensation values corresponding to each matching feature information according to the weight of the compensation value corresponding to each matching feature information as the compensation value belonging to the second frequency.
[0184] Optionally, the data acquisition module includes:
[0185] The feature information determination sub-module is configured to extract feature information from the original detection data and use the extracted feature information as the first feature information corresponding to the original detection data; or, extract feature information from the original detection data; determine the device compensation information corresponding to the extracted feature information based on the third correspondence between the feature information of the preset liquid and the device compensation information; compensate the original detection data with the determined device compensation information; extract feature information from the compensated original detection data and use the extracted feature information as the first feature information corresponding to the original detection data; wherein, the device compensation information corresponding to the feature information of each liquid is: the difference information between the reference device and the liquid detection device for the detection data measured for the liquid.
[0186] Optionally, the first feature information includes the statistical features of the original detection data, and / or, the waveform features of the original detection data changing with the frequency of the microwave signal;
[0187] Or, the first feature information includes the statistical features of the compensated original detection data, and / or, the waveform features of the compensated original detection data changing with the frequency of the microwave signal.
[0188] Optionally, before obtaining the original detection data detected by the liquid detection device for the liquid, the data acquisition module is further configured to determine whether there is a liquid to be detected in the container; if so, perform liquid detection on the liquid in the container.
[0189] Optionally, specifically, when a plurality of pressure sensors are deployed on the container bearing platform of the liquid detection device, if there is pressure data greater than a second pressure threshold among the pressure data detected by the plurality of pressure sensors, it is determined that there is a liquid to be detected in the container; or, when the liquid detection device includes an image acquisition device, acquire a container image of the container acquired by the image acquisition device; perform liquid recognition on the container image, and if a liquid is recognized, it is determined that there is a liquid to be detected in the container.
[0190] In the solution provided in this embodiment, since the compensation information corresponding to the first feature information and the determined dimension information of the container can be determined based on the first feature information corresponding to the original detection data and the dimension information of the container, different compensation information can be used to compensate for the liquids in containers with different dimension information, thereby improving the accuracy of the detection result of liquid detection.
[0191] An embodiment of the present invention further provides a liquid detection device, as Figure 6 shown, including a liquid detection position 601, a dimension detection sensor 602, a processor 603, a communication interface 604, a memory 605, and a communication bus 606. Among them, the liquid detection position 601, the dimension detection sensor 602, the processor 603, the communication interface 604, and the memory 605 complete mutual communication through the communication bus 606.
[0192] The liquid detection position 601 is configured to carry a container containing a liquid to be detected and detect the liquid to be detected.
[0193] The dimension detection sensor 602 is configured to detect the dimension information of the container containing the liquid to be detected.
[0194] The memory 605 is configured to store a computer program.
[0195] When the processor 603 executes the program stored on the memory 605, the following steps are implemented:
[0196] Obtain the original detection data detected by the liquid detection device for the liquid, and determine the first feature information corresponding to the original detection data.
[0197] Determine the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process;
[0198] Using a pre-determined first correspondence, determine compensation information corresponding to the first characteristic information and the determined size information, where the first correspondence is used to characterize the correspondence between the characteristic information of the detection data, the size information of the container, and the compensation information of the detection data;
[0199] Compensate the original detection data with the determined compensation information to obtain target detection data;
[0200] Based on the target detection data or the second characteristic information of the target detection data, determine the type of the liquid.
[0201] In the solution provided in this embodiment, since the compensation information corresponding to the first characteristic information and the size information of the container can be determined based on the first characteristic information corresponding to the original detection data, different compensation information can be used to compensate for the liquids in containers with different size information, thereby improving the accuracy of the detection result of the liquid detection.
[0202] The communication bus mentioned in the above liquid detection device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0203] The communication interface is used for communication between the above liquid detection device and other devices.
[0204] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0205] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0206] In another embodiment provided by the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above liquid detection methods are implemented.
[0207] In another embodiment provided by the present invention, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute any of the liquid detection methods in the above embodiments.
[0208] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more integrated available media. The available media may be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media (such as Solid State Disk (SSD)).
[0209] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.
[0210] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device, liquid detection device, computer-readable storage medium, and computer program embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiments.
[0211] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A liquid detection method, characterized in that, A liquid detection device applied to detect liquid in a container based on the principle of microwave reflection. The liquid detection device includes a size detection sensor. The method includes: Obtaining the original detection data detected by the liquid detection device for the liquid, and determining first feature information corresponding to the original detection data; Determining the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process; Using a pre-determined first correspondence to determine compensation information corresponding to the first feature information and the determined size information, where the first correspondence is used to represent the correspondence between the feature information of the detection data, the size information of the container, and the compensation information of the detection data; Compensating the original detection data with the determined compensation information to obtain target detection data; Determining the type of the liquid based on the target detection data or second feature information of the target detection data, where the second feature information is information obtained by performing feature extraction on the target detection data; The size detection sensor includes at least one of a pressure sensor, an ultrasonic sensor, and a displacement sensor; If the size detection sensor includes: a plurality of pressure sensors deployed at different positions on the container bearing platform of the liquid detection device, where the deployment positions of each pressure sensor are different from the center distance of the container bearing platform; the determining the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process includes: according to the pressure data detected by each pressure sensor for the container during the liquid detection process, determining at least one effective pressure sensor from each pressure sensor, where each effective pressure sensor is a pressure sensor whose detected pressure data is greater than the first pressure threshold; determining, from at least one effective pressure sensor, the pressure sensor with the deployment position farthest from the center of the container bearing platform as the container edge pressure sensor; and determining the size information of the container based on the distance between the deployment position of the container edge pressure sensor and the center of the container bearing platform; If the size detection sensor includes: an ultrasonic sensor, the ultrasonic sensor is deployed at the edge of the container bearing platform of the liquid detection device and emits ultrasonic waves towards the center of the container bearing platform; the determining the size information of the container according to the size detection data detected by the size detection sensor for the container during the liquid detection process includes: calculating the difference between the deployment distance of the ultrasonic sensor and the container edge distance detected by the ultrasonic sensor for the container during the liquid detection process as the size information of the container; where the deployment distance of the ultrasonic sensor is: the distance between the deployment position of the ultrasonic sensor and the center of the container bearing platform, and the container edge distance is the distance between the deployment position of the ultrasonic sensor and the edge of the container; If the dimension detection sensor includes: a displacement sensor; the displacement sensor includes a first clamping plate and a second clamping plate, and during the liquid detection process, the first clamping plate and the second clamping plate are used to clamp the container; determining the dimension information of the container according to the dimension detection data detected by the dimension detection sensor for the container during the liquid detection process includes: during the liquid detection process, determining the distance between the first clamping plate and the second clamping plate detected by the displacement sensor for the container as the dimension information of the container.
2. The method according to claim 1, characterized in that, The first corresponding relationship includes: the corresponding relationship between the third characteristic information of each reference liquid and the second corresponding relationship; the third characteristic information of each reference liquid is: the characteristic information of the detection data obtained by the liquid detection device measuring the reference liquid. The second corresponding relationship corresponding to each third characteristic information includes: the corresponding relationship between the dimension information of each container and the compensation information; for each third characteristic information of each reference liquid, in the second corresponding relationship corresponding to the third characteristic information, the compensation information corresponding to the dimension information of each container includes: the compensation values corresponding to each first frequency. Wherein, the first frequencies are the signal frequencies of the microwave signals used for liquid detection of the reference liquid; the compensation value corresponding to each first frequency is: the difference between the detection data measured by the reference liquid in the container using the microwave signal of the first frequency and the detection data measured by the reference liquid in the reference container using the microwave signal of the first frequency.
3. The method according to claim 2, characterized in that, The original detection data includes the detection data corresponding to the second frequency; the second frequency is the signal frequency of the microwave signal used by the liquid detection device for liquid detection of the liquid. The second frequency is the frequency among the first frequencies. Compensating the original detection data with the determined compensation information to obtain the target detection data includes: Determining the compensation value belonging to the second frequency from the determined compensation values corresponding to the first frequencies. Calculating the sum of the detection data corresponding to the second frequency and the determined compensation value as the compensated detection data corresponding to the second frequency to obtain the target detection data.
4. The method according to claim 3, wherein Determining the compensation information corresponding to the first characteristic information and the determined dimension information by using the pre-determined first corresponding relationship includes: Based on the characteristic distance between the first characteristic information and the third characteristic information of each reference liquid, determining at least one matching characteristic information that matches the first characteristic information from the third characteristic information. According to the corresponding relationship between the third characteristic information of each reference liquid and the second corresponding relationship, determining the second corresponding relationship corresponding to the at least one matching characteristic information as the second corresponding relationship corresponding to the first characteristic information. For each matching characteristic information, according to the second corresponding relationship corresponding to the matching characteristic information, determining the compensation values corresponding to the first frequencies corresponding to the determined dimension information as the compensation values belonging to the first frequencies corresponding to the matching characteristic information. Determining the compensation value belonging to the second frequency from the compensation values corresponding to the determined first frequencies includes: For each piece of matching feature information, selecting the compensation value corresponding to the second frequency from the compensation values corresponding to the first frequencies corresponding to this piece of matching feature information as the compensation value corresponding to this piece of matching feature information; Based on the total number of pieces of matching feature information or the feature distance between the pieces of matching feature information and the first feature information, determining the weight of the compensation value corresponding to each piece of matching feature information; Performing weighted summation on the compensation values corresponding to the pieces of matching feature information according to the weights of the compensation values corresponding to the pieces of matching feature information as the compensation value belonging to the second frequency.
5. The method according to claim 1, wherein Determining the first feature information corresponding to the original detection data includes: Performing feature information extraction on the original detection data and using the extracted feature information as the first feature information corresponding to the original detection data; or, Performing feature information extraction on the original detection data; based on a third correspondence relationship between the feature information of a preset liquid and device compensation information, determining the device compensation information corresponding to the extracted feature information; compensating the original detection data using the determined device compensation information; performing feature information extraction on the compensated original detection data and using the extracted feature information as the first feature information corresponding to the original detection data; wherein, the device compensation information corresponding to the feature information of each liquid is: the difference information between the reference device and the liquid detection device for the detection data measured for this liquid.
6. The method according to claim 5, characterized in that, The first feature information includes the statistical features of the original detection data and / or the waveform features of the original detection data varying with the frequency of the microwave signal; Or, the first feature information includes the statistical features of the compensated original detection data and / or the waveform features of the compensated original detection data varying with the frequency of the microwave signal.
7. The method according to claim 1, characterized in that Before obtaining the original detection data detected by the liquid detection device for the liquid, the method further includes: Determining whether there is a liquid to be measured in the container; If so, performing liquid detection on the liquid in the container.
8. The method according to claim 7, characterized in that, Determining whether there is a liquid to be measured in the container includes: When a plurality of pressure sensors are deployed on the container carrying platform of the liquid detection device, if there is pressure data greater than a second pressure threshold among the pressure data detected by the plurality of pressure sensors, determining that there is a liquid to be measured in the container; Or, when the liquid detection device includes an image acquisition device, acquiring a container image acquired by the image acquisition device for the container; performing liquid recognition on the container image, and if a liquid is recognized, determining that there is a liquid to be measured in the container.
9. A liquid detection device, characterized in that, Applied to a liquid detection device for detecting liquid in a container based on the microwave reflection principle, the liquid detection device includes a dimension detection sensor, and the device includes: A data acquisition module, configured to acquire the original detection data detected by the liquid detection device for the liquid, and determine first feature information corresponding to the original detection data; A dimension information determination module, configured to determine the dimension information of the container according to the dimension detection data detected by the dimension detection sensor for the container during the liquid detection process; A supplementary information determination module, configured to determine, by using a pre-determined first correspondence relationship, compensation information corresponding to the first feature information and the determined dimension information, where the first correspondence relationship is used to represent the correspondence relationship among the feature information of the detection data, the dimension information of the container, and the compensation information of the detection data; A data supplementation module, configured to supplement the original detection data by using the determined compensation information to obtain target detection data; A type determination module, configured to determine the type of the liquid according to the target detection data or second feature information of the target detection data, where the second feature information is information obtained by performing feature extraction on the target detection data; The dimension detection sensor includes at least one of a pressure sensor, an ultrasonic sensor, and a displacement sensor; If the dimension detection sensor includes: a plurality of pressure sensors deployed at different positions on the container bearing platform of the liquid detection device, where the deployment positions of the respective pressure sensors are different from the center distance of the container bearing platform; The dimension information determination module is specifically configured to, according to the pressure data detected by the respective pressure sensors for the container during the liquid detection process, determine at least one effective pressure sensor from the respective pressure sensors, where each effective pressure sensor is a pressure sensor whose detected pressure data is greater than a first pressure threshold; determine, from the at least one effective pressure sensor, the pressure sensor whose deployment position is the farthest from the center of the container bearing platform as the container edge pressure sensor; and determine the dimension information of the container based on the distance between the deployment position of the container edge pressure sensor and the center of the container bearing platform; If the dimension detection sensor includes: an ultrasonic sensor, the ultrasonic sensor is deployed at the edge of the container bearing platform of the liquid detection device and emits ultrasonic waves towards the center of the container bearing platform; The dimension information determination module is specifically configured to calculate the difference between the deployment distance of the ultrasonic sensor and the container edge distance detected by the ultrasonic sensor for the container during the liquid detection process as the dimension information of the container; where the deployment distance of the ultrasonic sensor is: the distance between the deployment position of the ultrasonic sensor and the center of the container bearing platform, and the container edge distance is the distance between the deployment position of the ultrasonic sensor and the edge of the container; If the dimension detection sensor includes: a displacement sensor; the displacement sensor includes a first clamping plate and a second clamping plate, and during the liquid detection process, the first clamping plate and the second clamping plate are used to clamp the container; The dimension information determining module is specifically configured to determine, during the liquid detection process, the distance between the first clamping plate and the second clamping plate detected by the displacement sensor for the container as the dimension information of the container.
10. A liquid detection device, characterized in that, It includes a liquid detection position, a dimension detection sensor, a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus; The liquid detection position is used to carry and hold a container containing a liquid to be detected and detect the liquid to be detected; The dimension detection sensor is used to detect the dimension information of a container containing a liquid to be detected; The memory is used to store computer programs; The processor is configured to implement the method steps described in any one of claims 1-8 when executing the programs stored on the memory.
11. 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 the processor, the method steps described in any one of claims 1-8 are implemented.
Citation Information
Patent Citations
Systems and method for classifying a substance
US20090167322A1