Liquid type recognition method based on convolutional neural network model

CN119719976BActive Publication Date: 2026-10-27BEIJING TELESOUND ELECTRONICS
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411706070.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2026-10-27
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

[0005]本发明提供一种基于卷积神经网络模型的液体类型识别方法,用以解决现有技术中进行液体检测时液体类型识别准确率较低,导致误报率高的缺陷,实现提高液体类型识别的准确率,降低误报率的目的

Benefits of technology

[0020]本发明提供的基于卷积神经网络模型的液体类型识别方法,通过获取盛有待测液体的目标容器的目标微波信号,并获取未盛有液体的目标容器的目标空测微波信号,通过确定目标微波信号和目标空测微波信号的差值,并将该差值输入卷积神经网络模型,得到卷积神经网络模型输出的待测液体的目标信息,该目标信息中包括有待测液体的液体类型。由于确定出的目标微波信号和目标空测微波信号的差值,可以表征待测液体对应的微波信号,也即可以排除目标容器的影响,这样,将差值输入卷积神经网络模型后,得到的待测液体的液体类型较为准确,提高了液体类型识别结果的准确性,降低了安检过程中的误报率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719976B_ABST
    Figure CN119719976B_ABST
Patent Text Reader

Abstract

The application provides a liquid type recognition method based on a convolutional neural network model, which comprises the following steps: obtaining a target microwave signal of a target container containing a to-be-tested liquid; obtaining a target empty-measurement microwave signal of the target container without containing liquid; inputting a difference value between the target microwave signal and the target empty-measurement microwave signal into a convolutional neural network model to obtain target information of the to-be-tested liquid output by the convolutional neural network model, wherein the target information comprises a liquid type of the to-be-tested liquid; and the convolutional neural network model is trained based on sample liquid corresponding sample difference values and liquid type labels of the sample liquid, wherein the sample difference value is a difference value between a sample microwave signal of a sample container containing the sample liquid and a sample target empty-measurement microwave signal of the sample container without containing liquid. The application can improve the accuracy of liquid type recognition and reduce the false positive rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of safety detection technology, and in particular to a liquid type identification method based on a convolutional neural network model. Background Technology

[0002] In the field of modern security inspection, liquid detection is a crucial task, especially in public places such as airports and train stations, where the rapid and accurate identification of hazardous liquids is paramount. Traditional methods for detecting hazardous liquids primarily rely on manual inspection or detection equipment based on specific physical properties, such as measuring the dielectric constant and density of the liquid. These methods have certain limitations in practical applications, such as slow detection speed and inability to adapt to diverse liquid types.

[0003] With the development of technology, microwave signal detection technology has been widely used in the field of liquid detection due to its non-invasiveness and rapid response. This technology determines the type of liquid by analyzing the absorption and reflection characteristics of microwave signals by the liquid.

[0004] However, existing technologies using microwave signals for liquid detection still suffer from low accuracy in liquid type identification, leading to a high false alarm rate. Summary of the Invention

[0005] This invention provides a liquid type recognition method based on a convolutional neural network model to address the shortcomings of existing liquid detection technologies, which suffer from low accuracy in liquid type recognition and high false alarm rates. The aim is to improve the accuracy of liquid type recognition and reduce the false alarm rate.

[0006] This invention provides a liquid type recognition method based on a convolutional neural network model, comprising: Acquire the target microwave signal from the target container containing the liquid to be tested; Acquire the target empty microwave signal of the target container that is not filled with liquid; The difference between the target microwave signal and the target air-test microwave signal is input into a convolutional neural network model to obtain the target information of the liquid to be tested output by the convolutional neural network model. The target information includes the liquid type of the liquid to be tested. The convolutional neural network model is trained based on the sample difference corresponding to the sample liquid and the liquid type label of the sample liquid. The sample difference is the difference between the sample microwave signal of the sample container containing the sample liquid and the sample target microwave signal of the sample container without liquid.

[0007] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, wherein acquiring the target empty microwave signal of the target container that is not filled with liquid includes: Obtain the target image of the target container; Determine the target attribute information of the target container based on the target image; Based on the correspondence between attribute information and airborne microwave signals, the target airborne microwave signal corresponding to the target attribute information is determined.

[0008] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, wherein the target information further includes the volume of the liquid to be tested and the properties of the target container, wherein the properties of the target container include shape and / or material.

[0009] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, wherein the convolutional neural network model is trained in the following manner: For each sample liquid, acquire sample microwave signals from different sample containers containing the sample liquid; Obtain sample empty microwave signals from each of the aforementioned sample containers that are not filled with liquid; The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model. Based on the predicted liquid type of the sample liquid and the liquid type label of the sample liquid, the loss information is determined; The model parameters of the initial convolutional neural network model are adjusted based on the loss information to obtain the convolutional neural network model.

[0010] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, wherein the sample difference between the sample microwave signal and the sample airborne microwave signal corresponding to each sample container is input into an initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model, comprising: The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type and predicted volume of the sample liquid output by the initial convolutional neural network model. The process of determining loss information based on the predicted liquid type and the liquid type label of the sample liquid includes: Based on the predicted liquid type of the sample liquid and the liquid type label of the sample liquid, the first loss information is determined; Based on the predicted volume of the sample liquid and the volume label of the sample liquid, the second loss information is determined; The loss information is determined based on the first loss information and the second loss information.

[0011] According to the present invention, a liquid type identification method based on a convolutional neural network model includes inputting the sample difference between the sample microwave signal and the sample airborne microwave signal corresponding to each sample container into an initial convolutional neural network model to obtain the predicted liquid type and predicted volume of the sample liquid output by the initial convolutional neural network model, comprising: The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type, predicted volume and predicted attributes of the sample liquid and the sample container output by the initial convolutional neural network model. The step of determining the loss information based on the first loss information and the second loss information includes: Based on the predicted attributes of the sample container and the attribute labels of the sample container, the third loss information is determined; The loss information is determined based on the first loss information, the second loss information, and the third loss information.

[0012] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, wherein determining the loss information based on the first loss information, the second loss information, and the third loss information includes: Obtain the first weight corresponding to the liquid type, the second weight corresponding to the liquid capacity, and the third weight corresponding to the container attribute, respectively. The loss information is determined based on the first loss information, the second loss information, the third loss information, the first weight, the second weight, and the third weight.

[0013] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, wherein acquiring the target microwave signal of a target container containing the liquid to be tested includes: Acquire the initial microwave signal of the target container containing the liquid to be tested; The target microwave signal is determined based on the signal between the first trough and the preset number of peaks in the initial microwave signal.

[0014] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, wherein determining the target microwave signal based on the signal between the first trough and a predetermined number of peaks in the initial microwave signal includes: Perform a preset number of cubic spline interpolations on the signal between the first trough and the preset number of peaks in the initial microwave signal to obtain the difference data of each spline. The target microwave signal is determined based on the average value of the corresponding data in each spline difference data.

[0015] According to the present invention, a liquid type identification method based on a convolutional neural network model is provided, the method further includes: When the probability values ​​of the two liquid types of the test liquids output by the convolutional neural network model are both greater than a preset value, and the difference between the probability values ​​of the two liquid types of the test liquids is less than a preset difference, for each probability value, based on the liquid type represented by the probability value, the capacity of the test liquid, and the properties of the target container, a preset microwave signal of the liquid type represented by the probability value is obtained. The similarity between the target microwave signal and each of the preset microwave signals is determined respectively; The liquid type of the preset microwave signal corresponding to the maximum similarity is determined as the liquid type of the liquid to be tested.

[0016] The present invention also provides a liquid type recognition device based on a convolutional neural network model, comprising: The acquisition module is used to acquire the target microwave signal of the target container containing the liquid to be tested; The acquisition module is also used to acquire the target empty microwave signal of the target container that is not filled with liquid; The input module is used to input the difference between the target microwave signal and the target airborne microwave signal into the convolutional neural network model to obtain the target information of the liquid to be tested output by the convolutional neural network model, wherein the target information includes the liquid type of the liquid to be tested; The convolutional neural network model is trained based on the sample difference corresponding to the sample liquid and the liquid type label of the sample liquid. The sample difference is the difference between the sample microwave signal of the sample container containing the sample liquid and the sample target microwave signal of the sample container without liquid.

[0017] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the liquid type recognition method based on the convolutional neural network model as described above.

[0018] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the liquid type identification method based on the convolutional neural network model as described above.

[0019] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the liquid type recognition method based on the convolutional neural network model as described above.

[0020] The liquid type identification method based on a convolutional neural network model provided by this invention acquires the target microwave signal of a target container containing the liquid to be tested, and acquires the target empty microwave signal of a target container without liquid. The difference between the target microwave signal and the target empty microwave signal is determined and input into the convolutional neural network model to obtain the target information of the liquid to be tested, which includes the liquid type. Since the determined difference between the target microwave signal and the target empty microwave signal can characterize the microwave signal corresponding to the liquid to be tested, the influence of the target container can be eliminated. Therefore, after inputting the difference into the convolutional neural network model, the obtained liquid type of the liquid to be tested is more accurate, improving the accuracy of the liquid type identification results and reducing the false alarm rate in the security inspection process. Attached Figure Description

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

[0022] Figure 1 This is a flowchart illustrating the liquid type identification method based on a convolutional neural network model provided in an embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of the initial microwave signal provided in an embodiment of the present invention.

[0024] Figure 3 This is a schematic diagram of the target microwave signal after cubic spline interpolation, provided in an embodiment of the present invention.

[0025] Figure 4 This is a schematic diagram of the initial sample air-test microwave signal provided in an embodiment of the present invention.

[0026] Figure 5 This is a schematic diagram of the sampled microwave signal after cubic spline interpolation, provided in an embodiment of the present invention.

[0027] Figure 6 This is a schematic diagram of the liquid type recognition device based on a convolutional neural network model provided in an embodiment of the present invention.

[0028] Figure 7This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0030] In the field of liquid detection, microwave signal analysis technology relies on the absorption and reflection characteristics of liquids to microwaves, analyzing these characteristics to identify the liquid type. Current technology typically involves emitting a microwave signal to a target container holding the liquid to be tested, and then receiving the reflected microwave signal. The liquid type is then identified based on the emitted and received reflected microwave signals. However, the size, material, and shape of the target container holding the liquid can all affect the microwave signal. Therefore, directly identifying the liquid type based on the reflected microwave signal can lead to incorrect liquid type identification, reducing the accuracy of liquid type identification and potentially causing false alarms.

[0031] In this invention, considering the aforementioned problems, a liquid type identification method based on a convolutional neural network model is proposed. In this method, because each liquid type has a different dielectric constant, the returned microwave signals will differ when monitored using multi-frequency microwave technology. Therefore, liquid type detection can be performed based on the microwave signals. During the detection process, after acquiring the target microwave signal of the target container containing the liquid to be tested, it is also necessary to acquire the target empty microwave signal of the target container without liquid. By determining the difference between the target microwave signal and the target empty microwave signal, the microwave signal corresponding to the liquid to be tested can be obtained, thus eliminating the influence of the target container. By inputting the difference into the convolutional neural network model, the obtained liquid type is more accurate, improving the accuracy of liquid type identification results and reducing the false alarm rate during security checks.

[0032] The following is combined with Figures 1 to 5This invention describes a liquid type identification method based on a convolutional neural network model. The execution subject of this method can be an electronic device such as a security inspection machine, computer, or server, or a specially designed intelligent device. Alternatively, it can be a liquid type identification device based on a convolutional neural network model installed within the electronic or intelligent device. This device can be implemented through software, hardware, or a combination of both. This method can be applied to various scenarios requiring security checks, such as bus stations, train stations, subway stations, or high-speed rail stations.

[0033] Figure 1 A flowchart illustrating the liquid type recognition method based on a convolutional neural network model provided in this embodiment of the invention is shown below. Figure 1 As shown, the method includes: Step 101: Acquire the target microwave signal of the target container containing the liquid to be tested.

[0034] In this step, during security checks, passengers often carry liquids. Therefore, it's necessary to identify the type of liquid to prevent passengers from carrying hazardous liquids. To identify the type of liquid to be tested, it's first necessary to acquire the target microwave signal from the container holding the liquid. For example, this target microwave signal can be acquired through a microwave sensing module in an electronic device. This module emits microwave signals towards the container, which are then absorbed and reflected by the liquid, producing a specific waveform. It should be understood that the obtained target microwave signal includes physical properties of the liquid, such as its dielectric constant. Different types of liquids have different dielectric constants, resulting in variations in the frequency of the reflected microwave signal. Furthermore, the size, material, and shape of the target container also affect the reflected microwave signal.

[0035] Step 102: Acquire the target empty microwave signal of the target container that is not filled with liquid.

[0036] In this step, during the liquid type identification process, the material, size, and shape of the target container itself affect the propagation and reflection of microwave signals. To accurately identify the liquid type, it is necessary to first obtain the effect of the target container on the microwave signal when it is empty, i.e., the target empty microwave signal.

[0037] One approach is to pre-establish an empty microwave signal library, which stores empty microwave signals corresponding to containers of different materials, shapes, and sizes. These empty microwave signals are obtained by placing an empty container within the detection range of the microwave sensing module, transmitting microwave signals to the container, and then reflecting these signals back after passing through the empty container.

[0038] During security checks, images of target containers containing the liquid to be tested can be captured simultaneously. Analyzing these images can reveal the material, size, and shape of the target container. This information can then be used to search a pre-established database of airborne microwave signals to obtain the target airborne microwave signal corresponding to a target container that does not contain liquid.

[0039] Step 103: Input the difference between the target microwave signal and the target air-test microwave signal into the convolutional neural network model to obtain the target information of the liquid to be tested output by the convolutional neural network model. The target information includes the liquid type of the liquid to be tested.

[0040] The convolutional neural network model is trained based on the sample difference corresponding to the sample liquid and the liquid type label of the sample liquid. The sample difference is the difference between the sample microwave signal of the sample container containing the sample liquid and the sample target microwave signal of the sample container without liquid.

[0041] Specifically, after obtaining the target microwave signal and the target airborne microwave signal, the difference between these two signals can be determined. This difference can be used to calibrate the target microwave signal. This difference reflects the influence of the liquid under test on the microwave signal, while eliminating interference from the target container itself.

[0042] To make the obtained difference applicable to the convolutional neural network model, further preprocessing can be performed, such as data normalization and standardization. The preprocessed difference is then input into the convolutional neural network model to obtain the target information of the test liquid output by the model. This target information includes the liquid type of the test liquid. The liquid type can include alcohol, gasoline, acetone, rosin, potassium hydroxide, sulfuric acid, or water, etc.

[0043] The Convolutional Neural Network (CNN) model described above is a deep learning model that may contain multiple convolutional layers, pooling layers, fully connected layers, and activation functions. The first convolutional layer has 32 filters, each with a size of 3, and uses the ReLU (Rectified Linear Unit) activation function. The first max-pooling layer has a pooling size of 2. The pooling layer's purpose is to reduce the dimensionality of the data and extract features; this layer receives the output of the first convolutional layer. The second convolutional layer has 64 filters, each with a size of 3, and also uses the ReLU activation function. This layer receives input from the previous pooling layer. The second max-pooling layer has a pooling size of 2, and this layer receives the output of the second convolutional layer. The third convolutional layer has 128 filters, each with a size of 3, and also uses the ReLU activation function. This layer receives the output of the previous pooling layer. The third max-pooling layer has a pooling size of 2. This layer receives the output of the third convolutional layer. This convolutional neural network model is obtained by training an initial convolutional neural network model with the sample difference values ​​corresponding to different sample liquids and the pre-labeled liquid type labels of each sample liquid. The sample difference value is the difference between the sample microwave signal of a sample container containing sample liquid and the sample target microwave signal of a sample container without liquid.

[0044] The liquid type identification method based on a convolutional neural network model provided in this invention acquires the target microwave signal of a target container containing the liquid to be tested and the target empty microwave signal of a target container without liquid. The difference between the target microwave signal and the target empty microwave signal is determined and input into the convolutional neural network model to obtain the target information of the liquid to be tested, which includes the liquid type. Since the determined difference between the target microwave signal and the target empty microwave signal can characterize the microwave signal corresponding to the liquid to be tested, the influence of the target container can be eliminated. Therefore, after inputting the difference into the convolutional neural network model, the obtained liquid type of the liquid to be tested is more accurate, improving the accuracy of the liquid type identification result and reducing the false alarm rate during security checks.

[0045] For example, based on the above embodiments, the target information also includes the volume of the liquid to be tested and the properties of the target container, including the shape and / or material of the target container.

[0046] Specifically, in security inspection scenarios, when the liquid to be tested is a hazardous liquid, it is crucial to further determine its volume. Therefore, when training the convolutional neural network model, the volume label of the sample liquid and the attribute label of the sample container can be added. Thus, after inputting the difference between the target microwave signal and the target airborne microwave signal into the trained convolutional neural network model, the model can perform multi-task processing, thereby obtaining the volume of the liquid to be tested and the attributes of the target container output by the convolutional neural network model. The attributes of the target container include its shape and / or material.

[0047] The above methods can identify the liquid to be tested from multiple dimensions, improving the comprehensiveness and accuracy of the liquid identification.

[0048] For example, based on the above embodiments, when acquiring the target air-test microwave signal of a target container that is not filled with liquid, the target image of the target container can be acquired, and the target attribute information of the target container can be determined based on the target image. Based on the correspondence between the attribute information and the air-test microwave signal, the target air-test microwave signal corresponding to the target attribute information can be determined.

[0049] Specifically, the correspondence between attribute information and air-test microwave signals can be established in advance. For example, the corresponding air-test microwave signals of containers with different shapes, sizes and materials can be obtained in advance, and the correspondence between the attribute information of different containers and the corresponding air-test microwave signals can be stored.

[0050] During security checks, target images of containers can be acquired using image acquisition equipment. Computer vision algorithms can then be used to determine the container's attribute information from these images. This attribute information can include factors such as the container's size, material, and shape, which can affect microwave signals. For example, the target image can be used to determine that the container is a threaded plastic bottle.

[0051] After obtaining the target attribute information of the target container, the target air-test microwave signal corresponding to the target attribute information can be obtained based on the pre-established correspondence between the attribute information and the air-test microwave signal.

[0052] In this embodiment, by pre-establishing the correspondence between attribute information and the airborne microwave signal, and obtaining the target attribute information of the target container through image recognition, the target airborne microwave signal can be accurately determined based on this correspondence. Furthermore, this method eliminates the need to pour out the liquid to be tested from the target container to obtain the target airborne microwave signal, improving the efficiency and convenience of target airborne microwave signal determination.

[0053] For example, based on the above embodiments, the convolutional neural network model is trained in the following manner: For each sample liquid, sample microwave signals from different sample containers containing the sample liquid are acquired, and sample empty microwave signals from each sample container without liquid are acquired. The sample difference between the sample microwave signals and the sample empty microwave signals corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model. Based on the predicted liquid type and the liquid type label of the sample liquid, the loss information is determined, and the model parameters of the initial convolutional neural network model are adjusted based on the loss information to obtain the convolutional neural network model.

[0054] Specifically, the sample liquid may include, for example, water, alcohol, acetone, rosin, acetonitrile, various fuels, and inorganic substances with strong ionization properties. For each sample liquid, different sample containers can be used to hold it, and the sample microwave signals of different sample containers containing that sample liquid can be acquired. In addition, for each sample container, it is also necessary to acquire the sample empty microwave signal of that sample container when it is empty.

[0055] For each sample liquid, it is necessary to calculate the difference between the sample microwave signal corresponding to the sample liquid and the sample microwave signal corresponding to each sample container. By calculating this difference, the interference of the sample container on the microwave signal can be eliminated. The obtained difference is then input into the initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model.

[0056] The predicted liquid type of the sample liquid is compared with the pre-labeled liquid type of the sample liquid to obtain loss information. Based on this loss information, the model parameters of the initial convolutional neural network model are adjusted. The above process is repeated until the model converges or the number of iterations exceeds the preset number. The final model is then determined as the convolutional neural network model.

[0057] In this embodiment, by determining the sample microwave signal and sample air microwave signal corresponding to each sample container, the interference of the sample container itself on the microwave signal can be eliminated. Therefore, when training the model based on the sample difference, the final convolutional neural network model predicts the liquid type more accurately.

[0058] For example, based on the above embodiments, when inputting the sample difference between the sample microwave signal and the sample airborne microwave signal corresponding to each sample container into the initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model, the sample difference between the sample microwave signal and the sample airborne microwave signal corresponding to each sample container can be input into the initial convolutional neural network model to obtain the predicted liquid type and predicted capacity of the sample liquid output by the initial convolutional neural network model. Correspondingly, based on the predicted liquid type and liquid type label of the sample liquid, loss information can be determined by determining first loss information based on the predicted liquid type and liquid type label of the sample liquid, and second loss information based on the predicted capacity and capacity label of the sample liquid, thereby determining loss information based on the first loss information and the second loss information.

[0059] Specifically, the initial convolutional neural network model can be a multi-task model. After inputting the sample difference into the multi-task initial convolutional neural network model, the initial convolutional neural network model can simultaneously output the predicted liquid type and predicted volume of the sample liquid. During model training in this scenario, the loss information involved in the training process can include two parts: a first loss information obtained by comparing the predicted liquid type with the pre-labeled liquid type of the sample liquid, and a second loss information obtained by comparing the predicted volume with the pre-labeled volume of the sample liquid. The first loss information can be used to measure the accuracy of the model in liquid type prediction; it is the loss information determined when considering liquid type prediction alone. The second loss information can be used to measure the accuracy of the model in volume prediction; it is the loss information determined when considering volume prediction alone.

[0060] The first and second loss information are combined to form the loss information, which is the target to be minimized during model training. It can comprehensively consider the performance of the convolutional neural network model in both liquid type prediction and capacity prediction.

[0061] In this embodiment, the initial convolutional neural network model can output not only the predicted liquid type but also the predicted capacity. The total loss information is determined by the first loss information based on the predicted liquid type and liquid type label and the second loss information based on the predicted capacity and capacity label. This enables the trained convolutional neural network model to predict both liquid type and capacity simultaneously, improving the applicability and flexibility of the convolutional neural network model.

[0062] For example, based on the above embodiments, when inputting the sample microwave signal and sample spatial measurement microwave signal corresponding to each sample container into the initial convolutional neural network model to obtain the predicted liquid type and predicted volume of the sample liquid output by the initial convolutional neural network model, it is also possible to input the sample microwave signal and sample spatial measurement microwave signal corresponding to each sample container into the initial convolutional neural network model to obtain the predicted liquid type, predicted volume of the sample liquid and predicted attributes of the sample container output by the initial convolutional neural network model; correspondingly, when determining the loss information based on the first loss information and the second loss information, the third loss information is determined based on the predicted attributes and attribute labels of the sample container, and the loss information is determined based on the first loss information, the second loss information and the third loss information.

[0063] Specifically, after inputting the sample difference into the initial convolutional neural network model for multiple tasks, the initial convolutional neural network model can simultaneously output the predicted liquid type, predicted volume, and predicted attributes of the sample liquid. During model training in this scenario, the loss information involved can include three parts: a first loss information obtained by comparing the predicted liquid type with the pre-labeled liquid type of the sample liquid; a second loss information obtained by comparing the predicted volume with the pre-labeled volume of the sample liquid; and a third loss information obtained by comparing the predicted attributes of the sample container with the pre-labeled attribute labels of the sample container. The first loss information measures the accuracy of the model in predicting liquid type; it is the loss information determined when considering liquid type prediction alone. The second loss information measures the accuracy of the model in predicting volume; it is the loss information determined when considering volume prediction alone. The third loss information measures the accuracy of the model in predicting container attributes; it is the loss information determined when considering container attribute prediction alone.

[0064] The first, second, and third loss information are combined to form the final loss information, which is the target to be minimized during model training. It can comprehensively consider the performance of the convolutional neural network model in three aspects: liquid type prediction, capacity prediction, and container property prediction.

[0065] In this embodiment, the initial convolutional neural network model can output not only the predicted liquid type and predicted capacity, but also the predicted attributes of the target container. The total loss information is determined based on the first loss information, the second loss information, and the third loss information, thereby enabling the trained convolutional neural network model to simultaneously predict the liquid type, capacity, and container attributes, thus improving the applicability and flexibility of the convolutional neural network model.

[0066] For example, based on the above embodiments, when determining loss information based on the first loss information, the second loss information, and the third loss information, the first weight corresponding to the liquid type, the second weight corresponding to the liquid capacity, and the third weight corresponding to the container attribute can be obtained respectively, and the loss information can be determined based on the first loss information, the second loss information, the third loss information, the first weight, the second weight, and the third weight.

[0067] Specifically, the first, second, and third weights reflect the relative importance of different prediction tasks in the overall model training process, and can be set based on actual conditions or experience. For example, when the importance of liquid type recognition is higher than the importance of target container attribute recognition, the first weight will be increased.

[0068] The first loss information, the second loss information, and the third loss information are multiplied by their respective weights to obtain each weighted loss information, and the sum of each weighted loss information is determined as the final loss information.

[0069] In this embodiment, by setting weights corresponding to different loss information, the training process of the convolutional neural network model can be more flexibly adapted to the importance of different tasks, thereby improving the overall performance of the convolutional neural network model.

[0070] For example, based on the above embodiments, when acquiring the target microwave signal of the target container containing the liquid to be tested, the target microwave signal can be determined by acquiring the initial microwave signal of the target container containing the liquid to be tested and by determining the signal between the first trough and the preset number of peaks in the initial microwave signal.

[0071] Specifically, Figure 2 A schematic diagram of the initial microwave signal provided in an embodiment of the present invention, as shown below. Figure 2 As shown, a target container filled with the liquid to be tested is placed within the detection range of the microwave sensing module. The module receives microwave signals after they have passed through the liquid and the container, converting them into electrical signals to form the initial microwave signal. This initial microwave signal is then processed to generate a detection data plot image. Due to the nature of the microwave sensing module, the plot image only contains a subset of distinct peaks. Therefore, the signal between the first trough and a predetermined number of peaks is extracted and used as the target microwave signal. This predetermined number can be set according to specific conditions, for example, to 6. Experiments have shown that 6 distinct peaks are sufficient to represent the characteristic information of the liquid being tested.

[0072] In this embodiment, after acquiring the initial microwave signal of the target container containing the liquid to be tested, the signal between the first trough and the preset number of peaks in the initial microwave signal is determined as the target microwave signal. Since the signal between the first trough and the preset number of peaks can already characterize the feature information of the liquid to be tested, using only the signal between the first trough and the preset number of peaks as the target microwave signal for subsequent processing can greatly reduce the amount of computation and improve the efficiency of liquid type identification.

[0073] For example, based on the above embodiments, when determining the target microwave signal based on the signal between the first trough and the preset number of peaks in the initial microwave signal, cubic spline interpolation can be performed on the signal between the first trough and the preset number of peaks in the initial microwave signal a preset number of times to obtain the difference data of each spline, and the target microwave signal can be determined based on the average value of the corresponding data in each spline difference data.

[0074] Specifically, after selecting the signal between the first trough and the preset number of peaks from the initial microwave signal, since the convolutional neural network model requires a consistent number of input feature points for liquid type prediction, and the number of signals between the first trough and the preset number of peaks in the initial microwave signal is not entirely the same (approximately 100-160 points), interpolation is required for the signal between the first trough and the preset number of peaks. To preserve the original waveform as much as possible, cubic spline interpolation can be chosen.

[0075] Figure 3 This is a schematic diagram of the target microwave signal after cubic spline interpolation, provided in an embodiment of the present invention. Figure 3 As shown, the signal between the first trough and the preset number of peaks is interpolated to 200 points using cubic spline interpolation for a preset number of times. Assuming the preset number of times is 3, the data obtained after the preset number of cubic spline interpolations are: b1=[c1, c2, ..., c200], b2=[d1, d2, ..., d200], b3=[e1, e2, ..., e200]. Since the waveform will fluctuate, to minimize this fluctuation, the average value of the interpolated data can be calculated, ultimately obtaining the target microwave signal a1: a1=[fn], fn=(cn+dn+e2) / 3.

[0076] In this embodiment, the target microwave signal is determined by performing a preset number of cubic spline interpolations on the signal between the first trough and the preset number of peaks in the initial microwave signal, and by using the average value of the corresponding data in each spline interpolation data. This ensures that the amount of data in the target microwave signal is consistent, which can adapt to the input of the convolutional neural network model and avoid the situation where the prediction result of the convolutional neural network model is incorrect due to inconsistent data.

[0077] It should be noted that the same method is used when acquiring sample microwave signals from different sample containers filled with sample liquid and sample empty microwave signals from each sample container without liquid during the training of the convolutional neural network model.

[0078] Specifically, Figure 4 This is a schematic diagram of the initial sample air-measured microwave signal provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the signal between the first trough and the sixth peak in the initial sample spatial microwave signal is useful information. Therefore, the sample spatial microwave signal can be determined based on the signal between the first trough and the sixth peak extracted from the initial sample spatial microwave signal.

[0079] Figure 5 This is a schematic diagram of the sampled microwave signal after cubic spline interpolation, provided in an embodiment of the present invention. Figure 5 As shown, the sampled microwave signal can be determined by performing a preset number of cubic spline interpolations on the signal between the first trough and the preset number of peaks in the initial sampled microwave signal, and by using the average value of the corresponding data in each spline interpolation data.

[0080] Similarly, after obtaining the initial sample microwave signal, the signal between the first trough and the sixth peak is extracted from the initial sample microwave signal, and cubic spline interpolation is performed for a preset number of times to obtain the sample microwave signal.

[0081] For example, based on the above embodiments, when the probability values ​​of the two liquid types of the test liquids output by the convolutional neural network model are both greater than preset values ​​and the difference between the probability values ​​of the two liquid types of the test liquids is less than a preset difference, for each probability value, based on the liquid type represented by the probability value, the capacity of the test liquid, and the attributes of the target container, a preset microwave signal representing the liquid type of the probability value is obtained, and the similarity between the target microwave signal and each preset microwave signal is determined respectively. The liquid type to which the preset microwave signal with the highest similarity belongs is determined as the liquid type of the test liquid.

[0082] Specifically, preset microwave signals for different liquid types, capacities, and containers can be stored in advance in the database. These preset microwave signals are accurate signals that can be used to characterize the properties exhibited by different types and capacities of liquids when contained in different containers.

[0083] In practical applications, there may be situations where two liquids have similar properties. In this case, the probability values ​​of the two liquid types output by the convolutional neural network model may both be greater than the preset value, and the difference between the probability values ​​of the two liquid types may be less than the preset difference. In other words, when the probability values ​​are not significantly different, it will be impossible to further determine the liquid type of the liquid being tested based on the probability values.

[0084] For these two liquid types, the preset microwave signals corresponding to the predicted liquid volume and target container properties for each liquid type can be obtained from the aforementioned database.

[0085] Furthermore, the collected target microwave signal and preset microwave signals can be compared to determine the similarity between the target microwave signal and each preset microwave signal. The liquid type to which the preset microwave signal with the highest similarity belongs is determined as the final liquid type of the liquid to be tested.

[0086] In this embodiment, when the probability values ​​of the two liquid types output by the convolutional neural network model are both greater than a preset value, and the difference between the probability values ​​of the two liquid types is less than a preset value, preset microwave signals corresponding to the two liquid types will be acquired respectively. By determining the similarity between the target microwave signal and each preset microwave signal, the liquid type to which the preset microwave signal with the highest similarity belongs is determined as the liquid type of the liquid to be tested. By comparing the target microwave signal and each preset microwave signal, the liquid type of the liquid to be tested can be accurately determined by using the preset microwave signals when the liquid type cannot be accurately distinguished, thereby improving the accuracy of liquid type determination.

[0087] The liquid type recognition device based on the convolutional neural network model provided by the present invention will be described below. The liquid type recognition device based on the convolutional neural network model described below can be referred to in correspondence with the liquid type recognition method based on the convolutional neural network model described above.

[0088] Figure 6 This is a schematic diagram of the liquid type recognition device based on a convolutional neural network model provided in an embodiment of the present invention, with reference to... Figure 6 As shown, the liquid type recognition device 600 based on a convolutional neural network model includes: Acquisition module 11 is used to acquire the target microwave signal of the target container containing the liquid to be tested; The acquisition module 11 is also used to acquire the target empty microwave signal of the target container that is not filled with liquid; Input module 12 is used to input the difference between the target microwave signal and the target air-test microwave signal into a convolutional neural network model to obtain the target information of the liquid to be tested output by the convolutional neural network model, wherein the target information includes the liquid type of the liquid to be tested; The convolutional neural network model is trained based on the sample difference corresponding to the sample liquid and the liquid type label of the sample liquid. The sample difference is the difference between the sample microwave signal of the sample container containing the sample liquid and the sample target microwave signal of the sample container without liquid.

[0089] In one example embodiment, the acquisition module 11 is specifically used for: Obtain the target image of the target container; Determine the target attribute information of the target container based on the target image; Based on the correspondence between attribute information and airborne microwave signals, the target airborne microwave signal corresponding to the target attribute information is determined.

[0090] In one example embodiment, the target information further includes the volume of the liquid to be tested and the properties of the target container, the properties of the target container including shape and / or material.

[0091] In one example embodiment, the convolutional neural network model is trained in the following manner: For each sample liquid, acquire sample microwave signals from different sample containers containing the sample liquid; Obtain sample empty microwave signals from each of the aforementioned sample containers that are not filled with liquid; The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model. Based on the predicted liquid type of the sample liquid and the liquid type label of the sample liquid, the loss information is determined; The model parameters of the initial convolutional neural network model are adjusted based on the loss information to obtain the convolutional neural network model.

[0092] In one example embodiment, the input module 12 is further configured to: The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type and predicted volume of the sample liquid output by the initial convolutional neural network model. The device further includes: a determining module, wherein: The determination module is used to determine first loss information based on the predicted liquid type and the liquid type label of the sample liquid; determine second loss information based on the predicted volume and the volume label of the sample liquid; and determine the loss information based on the first loss information and the second loss information.

[0093] In one example embodiment, the input module 12 is further configured to: The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type, predicted volume and predicted attributes of the sample liquid and the sample container output by the initial convolutional neural network model. The determination module is used to determine third loss information based on the predicted attributes of the sample container and the attribute labels of the sample container; and to determine the loss information based on the first loss information, the second loss information and the third loss information.

[0094] In one example embodiment, the determining module is specifically used for: Obtain the first weight corresponding to the liquid type, the second weight corresponding to the liquid capacity, and the third weight corresponding to the container attribute, respectively. The loss information is determined based on the first loss information, the second loss information, the third loss information, the first weight, the second weight, and the third weight.

[0095] In one example embodiment, the acquisition module 11 is specifically used for: Acquire the initial microwave signal of the target container containing the liquid to be tested; The target microwave signal is determined based on the signal between the first trough and the preset number of peaks in the initial microwave signal.

[0096] In one example embodiment, the acquisition module 11 is specifically used for: Perform a preset number of cubic spline interpolations on the signal between the first trough and the preset number of peaks in the initial microwave signal to obtain the difference data of each spline. The target microwave signal is determined based on the average value of the corresponding data in each spline difference data.

[0097] In one example embodiment, the acquisition module 11 is further configured to, when the probability values ​​of the two liquid types of the liquid to be tested output by the convolutional neural network model are both greater than a preset value and the difference between the probability values ​​of the two liquid types of the liquid to be tested is less than a preset difference, acquire a preset microwave signal of the liquid type represented by the probability value based on the liquid type represented by the probability value, the capacity of the liquid to be tested and the properties of the target container for each probability value. A determination module is used to determine the similarity between the target microwave signal and each of the preset microwave signals respectively; The determination module is used to determine the liquid type of the preset microwave signal corresponding to the maximum similarity as the liquid type of the liquid to be tested.

[0098] The liquid type recognition device based on the convolutional neural network model in this embodiment can be used to execute the method of any embodiment in the liquid type recognition method based on the convolutional neural network model. Its specific implementation process and technical effects are similar to those in the liquid type recognition method based on the convolutional neural network model. For details, please refer to the detailed description in the liquid type recognition method based on the convolutional neural network model, which will not be repeated here.

[0099] Figure 7 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as... Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a liquid type identification method based on a convolutional neural network model. This method includes: acquiring a target microwave signal from a target container containing the liquid to be tested; acquiring a target empty microwave signal from the target container without liquid; inputting the difference between the target microwave signal and the target empty microwave signal into a convolutional neural network model to obtain target information of the liquid to be tested output by the convolutional neural network model, wherein the target information includes the liquid type of the liquid to be tested; wherein the convolutional neural network model is trained based on the sample difference corresponding to the sample liquid and the liquid type label of the sample liquid, and the sample difference is the difference between the sample microwave signal of the sample container containing the sample liquid and the sample target empty microwave signal of the sample container without liquid.

[0100] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0101] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the liquid type identification method based on a convolutional neural network model provided by the above methods. The method includes: acquiring a target microwave signal of a target container containing a liquid to be tested; acquiring a target empty microwave signal of the target container without liquid; inputting the difference between the target microwave signal and the target empty microwave signal into a convolutional neural network model to obtain target information of the liquid to be tested output by the convolutional neural network model, wherein the target information includes the liquid type of the liquid to be tested; wherein the convolutional neural network model is trained based on the sample difference corresponding to the sample liquid and the liquid type label of the sample liquid, and the sample difference is the difference between the sample microwave signal of the sample container containing the sample liquid and the sample target empty microwave signal of the sample container without liquid.

[0102] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the liquid type identification method based on a convolutional neural network model provided by the above methods. The method includes: acquiring a target microwave signal of a target container containing a liquid to be tested; acquiring a target empty microwave signal of the target container not containing liquid; inputting the difference between the target microwave signal and the target empty microwave signal into a convolutional neural network model to obtain target information of the liquid to be tested output by the convolutional neural network model, wherein the target information includes the liquid type of the liquid to be tested; wherein the convolutional neural network model is trained based on the sample difference corresponding to the sample liquid and the liquid type label of the sample liquid, and the sample difference is the difference between the sample microwave signal of the sample container containing the sample liquid and the sample target empty microwave signal of the sample container not containing liquid.

[0103] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0104] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A liquid type recognition method based on a convolutional neural network model, characterized in that, include: Acquire the target microwave signal from the target container containing the liquid to be tested; Obtain the target image of the target container; Determine the target attribute information of the target container based on the target image; Based on the correspondence between attribute information and airborne microwave signal, the target airborne microwave signal corresponding to the target attribute information is determined; The difference between the target microwave signal and the target air-test microwave signal is input into a convolutional neural network model to obtain the target information of the liquid to be tested output by the convolutional neural network model. The target information includes the liquid type of the liquid to be tested. The convolutional neural network model is trained in the following manner: For each sample liquid, microwave signals from different sample containers containing the sample liquid are acquired; microwave signals from empty sample containers are acquired; the sample difference between the microwave signals and the empty sample microwave signals corresponding to each sample container is input into an initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model; based on the predicted liquid type and the liquid type label of the sample liquid, loss information is determined; based on the loss information, the model parameters of the initial convolutional neural network model are adjusted to obtain the convolutional neural network model. The step of inputting the sample microwave signal and the sample airborne microwave signal corresponding to each of the sample containers into an initial convolutional neural network model to obtain the predicted liquid type of the sample liquid output by the initial convolutional neural network model includes: The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type and predicted volume of the sample liquid output by the initial convolutional neural network model. The process of determining loss information based on the predicted liquid type and the liquid type label of the sample liquid includes: Based on the predicted liquid type of the sample liquid and the liquid type label of the sample liquid, the first loss information is determined; Based on the predicted volume of the sample liquid and the volume label of the sample liquid, the second loss information is determined; The loss information is determined based on the first loss information and the second loss information.

2. The liquid type recognition method based on a convolutional neural network model according to claim 1, characterized in that, The target information also includes the volume of the liquid to be tested and the properties of the target container, the properties of which include shape and / or material.

3. The liquid type recognition method based on a convolutional neural network model according to claim 1, characterized in that, The step of inputting the sample microwave signal and sample airborne microwave signal corresponding to each of the sample containers into an initial convolutional neural network model to obtain the predicted liquid type and predicted volume of the sample liquid output by the initial convolutional neural network model includes: The sample difference between the sample microwave signal and the sample air microwave signal corresponding to each sample container is input into the initial convolutional neural network model to obtain the predicted liquid type, predicted volume and predicted attributes of the sample liquid and the sample container output by the initial convolutional neural network model. The step of determining the loss information based on the first loss information and the second loss information includes: Based on the predicted attributes of the sample container and the attribute labels of the sample container, the third loss information is determined; The loss information is determined based on the first loss information, the second loss information, and the third loss information.

4. The liquid type recognition method based on a convolutional neural network model according to claim 3, characterized in that, The step of determining the loss information based on the first loss information, the second loss information, and the third loss information includes: Obtain the first weight corresponding to the liquid type, the second weight corresponding to the liquid capacity, and the third weight corresponding to the container attribute, respectively. The loss information is determined based on the first loss information, the second loss information, the third loss information, the first weight, the second weight, and the third weight.

5. The liquid type recognition method based on a convolutional neural network model according to claim 1, characterized in that, The acquisition of the target microwave signal of the target container containing the liquid to be tested includes: Acquire the initial microwave signal of the target container containing the liquid to be tested; The target microwave signal is determined based on the signal between the first trough and the preset number of peaks in the initial microwave signal.

6. The liquid type recognition method based on a convolutional neural network model according to claim 5, characterized in that, Determining the target microwave signal based on the signal between the first trough and a predetermined number of peaks in the initial microwave signal includes: Perform a preset number of cubic spline interpolations on the signal between the first trough and the preset number of peaks in the initial microwave signal to obtain the difference data of each spline. The target microwave signal is determined based on the average value of the corresponding data in each spline difference data.

7. The liquid type recognition method based on a convolutional neural network model according to claim 2, characterized in that, The method further includes: When the probability values ​​of the two liquid types of the liquid to be tested output by the convolutional neural network model are both greater than a preset value, and the difference between the probability values ​​of the two liquid types of the liquid to be tested is less than a preset difference, for each probability value, based on the liquid type represented by the probability value, the capacity of the liquid to be tested, and the properties of the target container, a preset microwave signal of the liquid type represented by the probability value is obtained. The similarity between the target microwave signal and each of the preset microwave signals is determined respectively; The liquid type of the preset microwave signal corresponding to the maximum similarity is determined as the liquid type of the liquid to be tested.

Citation Information

Patent Citations

  • Sample container recognition

    CN111512162A

  • Sealing liquid identification system based on RFID

    CN113919402A

  • Method for determining type of liquid in non-metal container based on microwave detection

    CN117054449A