A Liquid Recognition Method and System Based on Visual Nerves

Through the visual nerve-based liquid recognition method, the visual nerve mixing model and semi-supervised learning optimized liquid recognition is solved, and the problem of insufficient recognition accuracy and adaptability in the prior art is achieved, and efficient and accurate liquid recognition and intelligent analysis are achieved.

CN119762944BActive Publication Date: 2025-06-27HANGZHOU AOLANG INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510266057.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-27
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

When faced with complex and changing liquid types and environments, existing liquid recognition technologies have low recognition accuracy and generalization capabilities, insufficient adaptability and flexibility, and lack real-time feedback and intelligent analysis functions.

Method used

The liquid recognition method based on visual nerves is adopted to adaptively preprocess the liquid image and environmental perception images by collecting liquid images and environmentally perceived images to construct a hybrid model of visual nerves, and optimize the model using semi-supervised learning and incremental learning methods to achieve real-time liquid recognition and intelligent analysis.

Benefits of technology

Improve the accuracy and efficiency of liquid recognition, enhance the adaptability and flexibility of the model, and provide real-time feedback and intelligent analysis functions to continuously adapt to new liquid types and identification needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762944B_ABST
    Figure CN119762944B_ABST
Patent Text Reader

Abstract

The present invention discloses a liquid recognition method and system based on visual nerves, belonging to the technical field of liquid recognition, which specifically includes: collecting liquid images and environmental perception images and performing adaptive preprocessing to generate liquid perception images; constructing a visual nerve hybrid model based on feature extraction; using feature data and corresponding liquid labels for semi-supervised learning training, and optimizing the model by using an incremental learning method; inputting real-time liquid perception images into the optimized model to recognize liquids, initially judging the consistency between the recognition result and the preset result, and introducing a correction algorithm when they do not match; finally, performing intelligent analysis on the correction result and introducing a real-time feedback mechanism to fine-tune the model; the present invention improves the accuracy and efficiency of liquid recognition and is applicable to various liquid recognition scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of liquid recognition, and specifically relates to a liquid recognition method and system based on visual nerves. Background Art

[0002] The liquid recognition method refers to a method of identifying and classifying unknown or specific types of liquids through specific technical means. In the technical field of liquid recognition, traditional methods mainly include radar-based, optical, image-based, and sensor-based technologies. Although the radar liquid level gauge has a long service life and low maintenance, it has a high cost and poor measurement effect on the oil-water interface; the optical liquid level measurement uses the change of light wave intensity, which has the advantages of simple structure and low cost. However, its long-term stability is poor, the accuracy is low, and it is easily affected by the fluctuation of light source intensity; the image-based liquid level measurement uses a high-resolution CCD camera to collect the liquid level image, and identifies the water level line through computer processing, with high detection accuracy and wide application range. However, in a dark environment or at an occlusion angle, the liquid surface is difficult to be captured by the image, which limits its application range; the sensor-based technology, such as a capacitance sensor, senses the water level by the change of the capacitance value affected by the liquid, but the device needs to be directly in contact with the liquid, and the physical constraint limits its scalability.

[0003] For example, the patent application with the publication number CN110646347A discloses a liquid recognition system and a liquid recognition method with a warning notification, including: a liquid sensing device, a database, and a judgment module. The liquid sensing device is used to sense a liquid provided according to a preset liquid demand information to obtain a liquid waveform information. The database contains at least one preset liquid waveform information corresponding to a preset liquid. The judgment module receives and judges whether the liquid waveform information from the liquid sensing device is different from the preset liquid waveform information in the information database. Among them, when the liquid waveform information is different from the preset liquid waveform information, a warning notification is issued. In addition, this technical solution further provides a liquid recognition method with a warning notification.

[0004] For example, the Chinese patent application with the authorization publication number CN109470720B discloses a liquid recognition method, a vector extraction method, a liquid recognition device, and a storage medium, including: collecting the microwave reflection signal of the measured liquid; obtaining the microwave data of the measured liquid according to the microwave reflection signal; calculating the characteristic vector of the measured liquid according to the microwave data; inputting the characteristic vector into a preset classifier for recognition, and obtaining the recognition result. Through this liquid recognition method, the measured liquid can be quickly recognized and the accuracy can be improved.

[0005] The above existing technologies all have the following problems: In CN110646347A, relying on the matching of liquid waveform information and preset waveform information, the recognition accuracy and generalization ability may be relatively low when facing complex and changeable liquid types and environments, and the adaptability and flexibility are poor; In CN109470720B, relying on microwave reflection signals for recognition, the recognition effect for certain specific types of liquids or complex environments is limited, and it is relatively weak in terms of intelligence, lacking real-time feedback and intelligent analysis functions, resulting in the inability to adjust and optimize in time when recognition errors occur. Summary of the Invention

[0006] In view of the deficiencies of the existing technologies, the present invention proposes a liquid recognition method and system based on visual nerves, which collect liquid images and environmental perception images and perform adaptive preprocessing to generate liquid perception images; construct a visual nerve hybrid model based on feature extraction; use feature data and corresponding liquid labels for semi-supervised learning training, and adopt an incremental learning method to optimize the model; input the real-time liquid perception image into the optimized model to identify the liquid, initially judge the consistency between the recognition result and the preset result, and introduce a correction algorithm when they do not match; finally, perform intelligent analysis on the corrected result, and introduce a real-time feedback mechanism to fine-tune the model; the present invention improves the accuracy and efficiency of liquid recognition.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] A liquid recognition method based on visual nerves, comprising:

[0009] Step S1: Collect liquid images and environmental perception images, and perform adaptive preprocessing to generate liquid perception images;

[0010] Step S2: Extract features from the liquid perception images, and construct a visual nerve hybrid model based on the extracted features;

[0011] Step S3: Use the extracted feature data and corresponding liquid labels to perform semi-supervised learning training on the visual nerve hybrid model, and use an incremental learning method to optimize the trained visual nerve hybrid model to obtain an optimized visual nerve hybrid model;

[0012] Step S4: Input the real-time liquid perception image into the optimized visual nerve hybrid model for liquid recognition, output the recognition result of the liquid, and perform a preliminary judgment on the recognition result to determine whether it matches the preset result. If it does not match, introduce a correction algorithm to correct the recognition result;

[0013] Step S5: Perform intelligent analysis on the corrected recognition result. At the same time, introduce a real-time feedback mechanism, and fine-tune the optimized visual nerve hybrid model according to the intelligent analysis result and the difference between the recognition result and the preset result.

[0014] Specifically, the specific steps of step S3 include:

[0015] S3.1: Obtain the feature data of the liquid perception image, collect the liquid labels corresponding to the feature data, and divide the training set and the validation set;

[0016] S3.2: Initialize the visual neural hybrid model, and use the labeled data and unlabeled data combined in a ratio of 2:8 to train the visual neural hybrid model. At the same time, construct a generative model to learn the generative distribution of the feature data. If there is new labeled data or unlabeled data, use the generative model to evaluate the new data and generate pseudo-labels. The pseudo-label generation formula is:

[0017] ;

[0018] Where, represents the generated pseudo-label, Y represents the set of labeled data, x represents the new labeled data or unlabeled data, represents the data reconstructed by the generative model under the given label y , represents the label y 's uncertainty function, represents the feature importance function, represents the regularization term, represents the L2 norm, , , , represent weight coefficients, represents the independent variable value corresponding to obtaining the minimum value within the domain .

[0019] Specifically, the specific steps of step S3 further include:

[0020] S3.3: Combine the new data with pseudo-labels with the training set of the original feature data to form a new training set;

[0021] S3.4: Use the incremental learning algorithm to train the new training set, and update the parameters of the visual neural hybrid model trained in S3.2 according to the training results;

[0022] S3.5: Use the validation set to evaluate the visual neural hybrid model after incremental learning. If the performance of the adjusted visual neural hybrid model is improved, update the parameters of the visual neural hybrid model. Otherwise, return to S3.2 to continue training the visual neural hybrid model.

[0023] Specifically, the parameter update formula of the visual neural hybrid model in S3.4 is as follows:

[0024] ;

[0025] Among them, represents the parameters of the visual neural hybrid model after incremental learning, represents the parameters of the visual neural hybrid model before incremental learning, represents the learning rate, represents the coefficient of the regularization term, represents the coefficient of the momentum term, represents the difference in the previous parameter update, represents the loss function on the new data gradient, represents the coefficient of the influence terms of multiple datasets, represents the i weight of the th data in the new training set, i represents the th new data in the new training set, N represents the number of data in the new training set,

[0026] Specifically, the specific steps in step S4 include:

[0027] S4.1: Obtain the optimized visual neural hybrid model, set the liquid type judgment rules according to the extracted feature data in combination with the physical and chemical properties of the liquid, and construct a liquid type judgment logic library based on the liquid type judgment rules;

[0028] S4.2: Input the real-time liquid perception image into the optimized visual neural hybrid model to obtain the preliminary recognition result of the liquid;

[0029] S4.3: According to the preliminary recognition result, automatically trigger the liquid type judgment rules in the liquid type judgment logic library for intelligent verification;

[0030] S4.4: Output the liquid type after intelligent verification and correction as the final recognition result.

[0031] Specifically, the specific steps of S4.3 include:

[0032] S4.31: Obtain the preliminary recognition result of the liquid from the optimized visual neural hybrid model;

[0033] S4.32: According to the preliminary recognition result, automatically trigger the corresponding judgment rules in the liquid type judgment logic library for intelligent verification and evaluate the confidence of the preliminary recognition result , where represents the category with the highest probability in the preliminary recognition result, represents the category with the second highest probability in the preliminary recognition result, g represents the normalization factor;

[0034] S4.33: Compare the preliminary recognition result with the expected result in the liquid type judgment logic library;

[0035] If the confidence level of the preliminary recognition result is higher than the preset matching threshold and is consistent with the expected result in the liquid type judgment logic library, directly confirm the recognition result without further correction;

[0036] If the preliminary recognition result is not consistent with the expected result in the liquid type judgment logic library, or the confidence level is lower than the preset matching threshold, trigger the advanced judgment strategy in the logic library and use the advanced judgment strategy based on the multi-feature fusion method Perform in-depth analysis on the preliminary recognition result, and judge whether the preliminary recognition result is incorrect according to the analysis result of the advanced judgment strategy, where F represents the final classification result, represents the rule engine function, represents the n th feature data, s represents the liquid physical state information, represents the actual measurement value changing with time;

[0037] If it is determined according to the advanced judgment strategy that the preliminary recognition result is incorrect, perform error recognition and correct the preliminary recognition result according to the liquid type judgment rule.

[0038] Specifically, the liquid type judgment rule in S4.1 includes feature data matching, physical property analysis, chemical property comparison, and multi-property comprehensive judgment.

[0039] A liquid recognition system based on visual nerves includes: an image processing module, a model construction module, a model optimization module, a liquid recognition module, and a fine-tuning module;

[0040] The image processing module is used to collect liquid images and environmental perception images, and perform adaptive preprocessing to generate liquid perception images;

[0041] The model construction module constructs a visual nerve hybrid model according to the features of the extracted liquid perception images;

[0042] The model optimization module is used to perform semi-supervised learning training on the constructed visual nerve hybrid model and optimize the visual nerve hybrid model using the incremental learning method;

[0043] The liquid recognition module is used to input the real-time liquid perception image into the optimized visual neural hybrid model for liquid recognition, and make a preliminary judgment and correction on the recognition result;

[0044] The fine-tuning module is used to perform intelligent analysis on the corrected recognition result, and fine-tune the visual neural hybrid model according to the intelligent analysis result and the difference between the recognition result and the preset result.

[0045] Specifically, the liquid recognition module includes: an identification unit, a judgment unit, and a correction unit;

[0046] The identification unit is used to input the real-time liquid perception image into the visual neural hybrid model for identification and output the recognition result;

[0047] The judgment unit is used to make a preliminary judgment on the recognition result and compare it with the preset result;

[0048] The correction unit uses a correction algorithm to correct the recognition result that does not match the preset result.

[0049] Compared with the prior art, the beneficial effects of the present invention are:

[0050] 1. The present invention proposes a liquid recognition system based on vision nerves, and has optimized improvements in architecture, operation steps and processes. The system has the advantages of simple process, low investment and operation costs, and low production work costs.

[0051] 2. The present invention proposes a liquid recognition method based on vision nerves. By collecting liquid images and environmental perception images, and performing adaptive preprocessing and feature extraction, a high-precision visual neural hybrid model is constructed. This model can be continuously optimized using semi-supervised learning and incremental learning methods to achieve fast and accurate recognition of liquids; at the same time, a real-time feedback mechanism and intelligent analysis function are introduced, which can fine-tune the model according to the difference between the recognition result and the preset result, further improving the accuracy and reliability of recognition. This dynamic adjustment and optimization mechanism enables the method to continuously adapt to new liquid types and recognition requirements, providing a more efficient and stable solution for liquid recognition. Description of the Drawings

[0052] Figure 1 It is a schematic diagram of a liquid recognition method based on vision nerves of the present invention;

[0053] Figure 2 It is a principle flow chart of a liquid recognition method based on vision nerves of the present invention;

[0054] Figure 3 It is a recognition result judgment flow chart of a liquid recognition method based on vision nerves of the present invention;

[0055] Figure 4 This is the architecture diagram of a liquid recognition system based on visual nerves according to the present invention. Specific implementation manners

[0056] Example 1

[0057] Please refer to Figures 1 - 3 , an example provided by the present invention: A liquid recognition method based on visual nerves, comprising the following steps:

[0058] Step S1: Collect liquid images and environmental perception images, and perform adaptive preprocessing to generate liquid perception images;

[0059] Further, the specific steps of step S1 include:

[0060] (1) Use a high-resolution camera or sensor to collect liquid images and environmental perception images, ensuring that the collected images are clear and accurate, and can reflect the true state of the liquid and environmental characteristics;

[0061] (2) Perform adaptive preprocessing on the collected images to improve the image quality and the accuracy of subsequent processing. Among them, the preprocessing steps may include operations such as denoising, image enhancement, and grayscale conversion. In the present invention, the mean filter method is used for denoising to remove noise interference in the image, and the visual effect of the image is improved by methods such as histogram equalization and specification. At the same time, the color image is converted into a grayscale image to simplify the image information and improve the processing speed. The grayscale conversion formula is: Gray = 0.29900 * R + 0.58700 * G + 0.11400 * B, where Gray is the grayscale value, and R, G, and B are the brightness values of the red, green, and blue primary colors respectively;

[0062] (3) Generate liquid perception images according to the processed information.

[0063] Step S2: Extract features from the liquid perception images, and construct a visual nerve hybrid model based on the extracted features;

[0064] Further, the specific steps of step S2 include:

[0065] (1) Extract features from the liquid perception images, and these features should be able to accurately reflect the state, attributes, or environmental information of the liquid. Among them, the method of feature extraction uses deep learning algorithms to automatically learn features. The deep learning algorithms are the prior art content in this field and are not the creative solutions of this application, so they will not be elaborated here;

[0066] (2) Match the extracted features with corresponding labels, such as the type, concentration, and temperature of the liquid, to form a training dataset, and preprocess the data, such as normalization, standardization, etc., to improve the training effect of the model;

[0067] (3) Select a visual neural hybrid model architecture that combines a convolutional neural network and a Transformer. According to the selected architecture, construct a visual neural hybrid model, including an input layer, a convolutional layer, a pooling layer, a Transformer layer, and a fully connected layer;

[0068] The specific steps for constructing the visual neural hybrid model include:

[0069] 1) Visual neural hybrid model: Select a convolutional neural network and a Transformer, and fuse the convolutional neural network and the Transformer through a splicing method to form a visual neural hybrid model to improve the performance of the model. Among them, it is achieved by embedding the Transformer component into the convolutional neural network;

[0070] 2) Initialize parameters: Randomly initialize the parameters of the visual neural hybrid model;

[0071] 3) Training strategy: Adopt optimization algorithms such as the backpropagation algorithm, and minimize the prediction error by continuously adjusting the network parameters. At the same time, to improve the generalization ability of the model, techniques such as data augmentation and regularization can be used to prevent overfitting;

[0072] 4) Optimizer and loss function: Select an optimizer and a loss function to accelerate convergence and improve the performance of the model;

[0073] 5) Evaluation metrics: Use the accuracy metric to evaluate the performance of the model, and adjust the hyperparameters of the model through the grid search method to further improve the performance;

[0074] 6) Model interpretability: Consider the interpretability of the model to ensure that the model can provide meaningful results and explanations for users;

[0075] 7) Model compression and acceleration: To reduce the computational complexity and memory requirements of the model, use quantization techniques to compress and accelerate the model, and deploy the trained hybrid model to the target environment, such as a cloud server.

[0076] (4) Use the training dataset to train the visual neural hybrid model, and optimize the model parameters through the backpropagation algorithm. During the training process, monitor the loss function and accuracy metric of the model to evaluate the performance of the model. Among them, the backpropagation algorithm, the loss function, and the accuracy metric are the existing technical contents in this field and are not the creative solutions of this application, so they will not be elaborated here;

[0077] (5) Use the validation dataset to evaluate the trained visual neural hybrid model, check the generalization ability of the visual neural hybrid model, and adjust and optimize the visual neural hybrid model according to the evaluation results to improve its performance.

[0078] Step S3: Use the extracted feature data and the corresponding liquid labels to perform semi-supervised learning training on the visual neural hybrid model, and use the incremental learning method to optimize the trained visual neural hybrid model to obtain an optimized visual neural hybrid model;

[0079] Step S4: Input the real-time liquid perception image into the optimized visual neural hybrid model for liquid recognition, output the recognition result of the liquid, and make a preliminary judgment on the recognition result to determine whether it conforms to the preset result. If not, introduce a correction algorithm to correct the recognition result;

[0080] Step S5: Perform intelligent analysis on the corrected recognition result. At the same time, introduce a real-time feedback mechanism to fine-tune the optimized visual neural hybrid model according to the intelligent analysis result and the difference between the recognition result and the preset result.

[0081] The specific steps of Step S3 include:

[0082] S3.1: Obtain the feature data of the liquid perception image, collect the liquid labels corresponding to the feature data, and divide them into a training set and a validation set;

[0083] Further, the specific steps of S3.1 include:

[0084] (1) Obtain the feature dataset of the liquid perception image in Step S2, and assign one or more labels to each feature data according to the information of the liquid. These labels can be discrete, such as the liquid type, or continuous, such as the concentration value;

[0085] (2) Divide the feature dataset into a training set and a validation set. Usually, the training set is used for model training, and the validation set is used to evaluate the performance of the model. The division ratio can be determined according to the specific task and the size of the dataset. In the present invention, the division ratio of the training set and the validation set is set to 7:3.

[0086] S3.2: Initialize the visual neural hybrid model, and use the labeled data and unlabeled data combined in a ratio of 2:8 to train the visual neural hybrid model. At the same time, construct a generative model to learn the generative distribution of the feature data. If there is new labeled data or unlabeled data, use the generative model to evaluate the new data and generate pseudo-labels. The pseudo-label generation formula is:

[0087] ;

[0088] Among them, represents the generated pseudo-label, Y represents the label data set, x represents the new label data or unlabeled data, represents the data reconstructed by the generation model under the given label y below, represents the label y uncertainty function of, represents the feature importance function, represents the regularization term, represents the L2 norm, , , , represents the weight coefficient, represents the independent variable value corresponding to obtaining the minimum value within the domain inside.

[0089] It should be noted that the formula in the present invention enhances the logic and flexibility of the formula and improves its accuracy and robustness in processing complex data and classification tasks by introducing multiple parameters and variables, including weight coefficients, class uncertainty, feature importance, and regularization terms.

[0090] Furthermore, the specific steps of S3.2 include:

[0091] (1) Collect feature data to ensure that the data covers the required feature space and has sufficient diversity and representativeness;

[0092] (2) Select a generation model according to the characteristics of the data and the task requirements. In the present invention, a generative adversarial network is selected, and according to the selected generation model, the number of network layers, the number of neurons, and the activation function parameters are designed. Among them, the generative adversarial network is the prior art content in the field and is not the creative solution of this application, so it will not be elaborated here;

[0093] (3) Set the adversarial loss function according to the goal of the generation model. Among them, the adversarial loss function should be able to reflect the difference between the generated data and the real data and guide the model to optimize in the correct direction. Among them, the adversarial loss function is the prior art content in the field and is not the creative solution of this application, so it will not be elaborated here;

[0094] (4) Select the stochastic gradient descent optimization algorithm to optimize the parameters of the generation model. Among them, the stochastic gradient descent optimization algorithm is the prior art content in the field and is not the creative solution of this application, so it will not be elaborated here;

[0095] (5) Train the generative model using the training data, and update the parameters of the generative model by iteratively optimizing the loss function. During the training process, use the validation set to monitor the performance of the generative model, such as the quality, diversity, and stability of the generated data;

[0096] (6) Evaluate the trained model using the test set, check the quality, diversity, and accuracy of the generated data, and optimize the generative model according to the evaluation results, such as adjusting the network structure, adding data augmentation methods, and improving the loss function;

[0097] (7) Use the trained generative model to generate new data with similar characteristics to the training data. The new data can be used for tasks such as data augmentation, data simulation, and anomaly detection;

[0098] (8) For unlabeled data, the generative model can be used to generate pseudo-labels for it to improve the generalization ability of the model.

[0099] S3.3: Merge the new data with pseudo-labels with the training set of the original feature data to form a new training set;

[0100] S3.4: Use the incremental learning algorithm to train the new training set, and update the parameters of the trained visual neural hybrid model in S3.2 according to the training results. The formula is:

[0101] ;

[0102] where, represents the parameters of the visual neural hybrid model after incremental learning, represents the parameters of the visual neural hybrid model before incremental learning, represents the learning rate, represents the coefficient of the regularization term, represents the coefficient of the momentum term, represents the difference of the previous parameter update, represents the loss function on the new data gradient, represents the coefficient of the influence terms of multiple data sets, represents the i th data weight in the new training set, represents the i th new data in the new training set, N represents the number of data in the new training set, represents the parameters of the visual neural hybrid model;

[0103] S3.5: Evaluate the visually neural hybrid model after incremental learning using the validation set. If the performance of the adjusted visually neural hybrid model is improved, update the parameters of the visually neural hybrid model; otherwise, return to S3.2 to continue training the visually neural hybrid model.

[0104] Further, the specific steps of S3.5 include:

[0105] (1) Ensure that the validation set is an independent dataset that has not participated in the training of the visually neural hybrid model;

[0106] (2) Load the visually neural hybrid model after incremental learning into the evaluation environment, and input the data in the validation set into the visually neural hybrid model after incremental learning for prediction;

[0107] (3) Record the prediction results of the visually neural hybrid model after incremental learning for each sample in the validation set, including the predicted category and probability;

[0108] (4) Calculate the accuracy evaluation metric based on the prediction results of the model and the true labels of the validation set to quantify the performance of the visually neural hybrid model after incremental learning;

[0109] (5) Compare the calculated evaluation metric with the performance of the previous visually neural hybrid model to determine whether the incremental learning is effective. If the evaluation metric has improved, it indicates that the performance of the model after incremental learning is better. If the evaluation metric has not improved or has decreased instead, the reasons need to be further analyzed, and consider whether to return to S3.2 to continue training the visually neural hybrid model.

[0110] The specific steps in step S4 include:

[0111] S4.1: Obtain the optimized visually neural hybrid model. According to the extracted feature data, combine the physical and chemical properties of the liquid, set the liquid type judgment rules, and build a liquid type judgment logic library based on the liquid type judgment rules;

[0112] Among them, the liquid type judgment rules include feature data matching, physical property analysis, chemical property comparison, and multi-property comprehensive judgment to meet the liquid recognition requirements in different scenarios.

[0113] Further, the specific steps of S4.1 include:

[0114] (1) Obtain the result of feature data extraction;

[0115] (2) Conduct physical and chemical property analysis of the liquid:

[0116] Physical property analysis: Consider the physical properties of the liquid, such as density, refractive index, surface tension, and fluidity. These properties can be obtained through experimental measurements or theoretical calculations and are used to assist in determining the type of liquid;

[0117] Chemical property analysis: Analyze the chemical properties of the liquid, such as pH value, solubility, and chemical reactivity. These properties can be determined through chemical analysis or chemical reaction experiments and are used to construct more refined liquid type judgment rules;

[0118] (3)Set judgment rules:

[0119] Threshold judgment: Set thresholds for features, such as color brightness and transparency level. When the extracted feature data exceeds or is lower than the set threshold, the type of liquid can be preliminarily judged;

[0120] Pattern matching: Match the extracted feature data with the feature database of known liquid types to find the most similar pattern. If the matching degree is high, it can be considered that the liquid belongs to the known liquid type;

[0121] Machine learning algorithm: Use machine learning algorithms, such as support vector machines, to train and learn the feature data to build a classification model that can automatically judge the type of liquid according to the input feature data;

[0122] (4)Build a logic library:

[0123] Integrate judgment rules: Integrate the judgment rules set above to form a complete liquid type judgment logic library. This logic library should include various advanced judgment strategies to meet the liquid recognition needs in different scenarios;

[0124] Priority setting: Set priorities for different judgment rules so that judgments can be made in a predetermined order when conflicts occur;

[0125] Update and maintenance: As new liquid types and feature data appear, regularly update and maintain the logic library to ensure its accuracy and applicability.

[0126] S4.2: Input the real-time liquid perception image into the optimized visual neural hybrid model to obtain the preliminary recognition result of the liquid;

[0127] Furthermore, the specific steps of S4.2 include:

[0128] (1)Image acquisition: Real-time collect the perception image of the liquid through a camera or sensor;

[0129] (2)Preprocessing: Preprocess the collected image to improve the image quality;

[0130] (3)Model Input: Input the preprocessed image into the optimized visual neural hybrid model;

[0131] (4)Feature Extraction: The model extracts features from the image to obtain key information;

[0132] (5)Classification and Recognition: The model conducts classification and recognition based on the feature data and outputs the preliminary recognition result of the liquid;

[0133] (6)Result Output: Output the preliminary recognition result to the user or integrate it into an automated system for subsequent processing.

[0134] S4.3: According to the preliminary recognition result, automatically trigger the liquid type judgment rules in the liquid type judgment logic library for intelligent verification;

[0135] S4.4: Output the liquid type after intelligent verification and correction as the final recognition result.

[0136] The specific steps of S4.3 include:

[0137] S4.31: Obtain the preliminary recognition result of the liquid from the optimized visual neural hybrid model;

[0138] S4.32: According to the preliminary recognition result, automatically trigger the corresponding judgment rules in the liquid type judgment logic library for intelligent verification and evaluate the confidence level of the preliminary recognition result , where, represents the category with the highest probability in the preliminary recognition result, represents the category with the second highest probability in the preliminary recognition result, g represents the normalization factor;

[0139] S4.33: Compare the preliminary recognition result with the expected result in the liquid type judgment logic library, where the expected result in the liquid type judgment logic library refers to the expected output of liquid type recognition set according to the physical and chemical properties of known liquids, as well as expert knowledge and experience;

[0140] Among them, the specific process of comparison includes:

[0141] (1)Data Preprocessing: Ensure that both the preliminary recognition result and the expected result in the logic library undergo appropriate preprocessing for accurate comparison. The preprocessing may include steps such as data cleaning, format conversion, and standardization;

[0142] (2)Feature Matching: Match the feature data in the preliminary recognition result with the expected result features in the logic library. Among them, the features may include physical and chemical properties such as the color, transparency, smell, density, and viscosity of the liquid;

[0143] (3) Logical operation: Perform logical operations on the preliminary recognition results according to the judgment rules and strategies in the logic library;

[0144] (4) Compare the result of the logical operation with the expected result in the logic library;

[0145] (5) Decision-making: Make a final decision based on the comparison result.

[0146] If the confidence level of the preliminary recognition result is higher than the preset matching threshold and is consistent with the expected result in the liquid type judgment logic library, directly confirm the recognition result without further correction;

[0147] Specifically, the confidence level comparison process of the preliminary recognition result includes:

[0148] (1) Obtain the confidence level of the preliminary recognition result;

[0149] (2) Set the matching threshold, which is used to determine whether the confidence level of the preliminary recognition result is high enough to decide whether further correction is needed;

[0150] (3) Compare the preliminary recognition result with the expected result in the logic library:

[0151] Compare the preliminary recognition result with the expected result in the liquid type judgment logic library, including the matching of feature data and the comparison of classification labels;

[0152] (4) Judge the relationship between the confidence level and the threshold:

[0153] Check whether the confidence level of the preliminary recognition result is higher than the preset matching threshold. If the confidence level is higher than the threshold, proceed to the next step to judge the consistency between the preliminary recognition result and the expected result. If the preliminary recognition result is consistent with the expected result in the logic library, directly confirm the recognition result.

[0154] If the preliminary recognition result is not consistent with the expected result in the liquid type judgment logic library, or the confidence level is lower than the preset matching threshold, trigger the advanced judgment strategy in the logic library and use the advanced judgment strategy based on the multi-feature fusion method Perform in-depth analysis on the preliminary recognition result, and judge whether the preliminary recognition result is incorrect according to the analysis result of the advanced judgment strategy, where F represents the final classification result, represents the rule engine function, represents the n th feature data, s represents the liquid physical state information, represents the actual measured value changing with time;

[0155] If it is determined that the preliminary recognition result is incorrect according to the advanced judgment strategy, error recognition is performed, and the preliminary recognition result is corrected according to the liquid type judgment rule.

[0156] Embodiment 2

[0157] Please refer to Figure 4 , another embodiment provided by the present invention: A liquid recognition system based on visual nerves, including:

[0158] An image processing module, a model construction module, a model optimization module, a liquid recognition module, and a fine-tuning module;

[0159] The image processing module is used to collect liquid images and environmental perception images, and perform adaptive preprocessing to generate liquid perception images;

[0160] The model construction module constructs a visual nerve hybrid model according to the features of the extracted liquid perception images;

[0161] The model optimization module is used to perform semi-supervised learning training on the constructed visual nerve hybrid model, and optimize the visual nerve hybrid model using the incremental learning method;

[0162] The liquid recognition module is used to input the real-time liquid perception image into the optimized visual nerve hybrid model for liquid recognition, and perform preliminary judgment and correction on the recognition result;

[0163] The fine-tuning module is used to perform intelligent analysis on the corrected recognition result, and fine-tune the visual nerve hybrid model according to the intelligent analysis result and the difference between the recognition result and the preset result.

[0164] The liquid recognition module includes: a recognition unit, a judgment unit, and a correction unit;

[0165] The recognition unit is used to input the real-time liquid perception image into the visual nerve hybrid model for recognition, and output the recognition result;

[0166] The judgment unit is used to perform preliminary judgment on the recognition result and compare it with the preset result;

[0167] The correction unit uses a correction algorithm to correct the recognition result that does not match the preset result.

[0168] The fine-tuning module includes: an analysis unit, a feedback unit, and a fine-tuning unit;

[0169] The analysis unit is used to perform intelligent analysis on the corrected recognition result;

[0170] The feedback unit introduces a real-time feedback mechanism, and provides feedback to the fine-tuning unit according to the analysis result and the difference between the recognition result and the preset result;

[0171] Fine-tuning unit, which fine-tunes the optimized visual neural hybrid model according to the feedback to improve the accuracy and stability of the model.

[0172] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative rather than restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make changes, modifications, substitutions, and variations to the above embodiments without departing from the purpose and scope of the present invention. All of these fall within the protection scope of the present invention.

Claims

1. A liquid identification method based on visual nerves, characterized in that: include: Step S1: collecting liquid images and environment perception images, and performing adaptive preprocessing to generate liquid perception images; Step S2: extracting features from the liquid perception image, and constructing a visual neural hybrid model based on the extracted features; Step S3: using the extracted feature data and the corresponding liquid labels to perform semi-supervised learning training on the visual neural hybrid model, and using an incremental learning method to optimize the trained visual neural hybrid model to obtain an optimized visual neural hybrid model; Step S4: input the real-time liquid perception image into the optimized visual neural hybrid model for liquid recognition, output the liquid recognition result, and make a preliminary judgment on the recognition result to determine whether it is consistent with the preset result. If it is not consistent, a correction algorithm is introduced to correct the recognition result; Step S5: intelligently analyze the corrected recognition results, and introduce a real-time feedback mechanism to fine-tune the optimized visual neural hybrid model according to the intelligent analysis results and the difference between the recognition results and the preset results; The specific steps of step S3 include: S3.1: Obtain feature data of the liquid sensing image, collect liquid labels corresponding to the feature data, and divide them into training set and validation set; S3.2: Initialize the visual neural hybrid model and train it using labeled data and unlabeled data in a ratio of 2:

8. At the same time, build a generative model to learn the generative distribution of feature data. If there is new labeled data or unlabeled data, use the generative model to evaluate the new data and generate pseudo labels. The pseudo label generation formula is: ; in, represents the generated pseudo-label, Y represents the label data set, x represents the new label data or unlabeled data, represents the data reconstructed by the generative model given the label y, represents the uncertainty function of the label y, represents the feature importance function, represents the regularization term, represents the L2 norm, , , , represents the weight coefficient, Indicates that in the domain The corresponding independent variable value when the minimum value is obtained; The specific steps of step S3 also include: S3.3: Merge the new data with pseudo labels with the training set of the original feature data to form a new training set; S3.4: Use the incremental learning algorithm to train the new training set, and update the parameters of the visual neural hybrid model trained in S3.2 according to the training results; S3.5: Use the validation set to evaluate the visual neural hybrid model after incremental learning. If the performance of the adjusted visual neural hybrid model is improved, update the parameters of the visual neural hybrid model. Otherwise, return to S3.2 to continue training the visual neural hybrid model.

2. A liquid identification method based on visual nerves as claimed in claim 1, characterized in that: The visual neural hybrid model parameter update formula in S3.4 is: ; in, represents the parameters of the visual neural hybrid model after incremental learning, represents the parameters of the visual neural hybrid model before incremental learning, represents the learning rate, represents the coefficient of the regularization term, represents the coefficient of the momentum term, represents the difference of the previous parameter update, Represents the loss function Adding new data The gradient on Represents the coefficients of the influencing terms of multiple data sets, represents the weight of the i-th data in the new training set, represents the i-th newly added data in the new training set, N represents the number of data in the new training set, Represents the parameters of the visual neural mixture model.

3. A liquid identification method based on visual nerves as claimed in claim 2, characterized in that: The specific steps in step S4 include: S4.1: Obtain the optimized visual neural hybrid model, set liquid type judgment rules according to the extracted feature data and combined with the physical and chemical properties of the liquid, and build a liquid type judgment logic library based on the liquid type judgment rules; S4.2: Input the real-time liquid perception image into the optimized visual neural hybrid model to obtain the preliminary recognition result of the liquid; S4.3: According to the preliminary recognition result, the liquid type judgment rule in the liquid type judgment logic library is automatically triggered to perform intelligent verification; S4.4: Output the liquid type after intelligent verification and correction as the final recognition result.

4. A liquid identification method based on visual nerves as claimed in claim 3, characterized in that: The specific steps of S4.3 include: S4.31: Obtain preliminary liquid recognition results from the optimized visual neural hybrid model; S4.32: Based on the preliminary recognition results, automatically trigger the corresponding judgment rules in the liquid type judgment logic library for intelligent verification to evaluate the confidence of the preliminary recognition results ,in, Indicates the category with the highest probability in the preliminary recognition results, represents the category with the second highest probability in the preliminary recognition result, and g represents the normalization factor; S4.33: Compare the preliminary identification result with the expected result in the liquid type judgment logic library; If the confidence of the preliminary recognition result is higher than the preset matching threshold and is consistent with the expected result in the liquid type judgment logic library, the recognition result is directly confirmed without further correction; If the preliminary recognition result does not match the expected result in the liquid type judgment logic library, or the confidence level is lower than the preset matching threshold, the advanced judgment strategy in the logic library is triggered, using the advanced judgment strategy based on the multi-feature fusion method. Perform in-depth analysis on the preliminary recognition results, and judge whether the preliminary recognition results are wrong based on the analysis results of the advanced judgment strategy, where F represents the final classification result. Represents the rule engine function, represents the nth characteristic data, s represents the liquid physical state information, Represents actual measurements over time; If the preliminary recognition result is judged to be wrong according to the advanced judgment strategy, the error recognition is performed, and the preliminary recognition result is corrected according to the liquid type judgment rule.

5. A liquid identification method based on visual nerves as claimed in claim 4, characterized in that: The liquid type judgment rules in S4.1 include feature data matching, physical property analysis, chemical property comparison, and multi-property comprehensive judgment.

6. A liquid identification system based on visual nerves, used to implement a liquid identification method based on visual nerves as claimed in any one of claims 1 to 5, characterized in that: include: Image processing module, model building module, model optimization module, liquid recognition module, fine-tuning module; The image processing module is used to collect liquid images and environment perception images, and perform adaptive preprocessing to generate liquid perception images; The model building module builds a visual neural hybrid model based on the features of the extracted liquid perception image; The model optimization module is used to perform semi-supervised learning training on the constructed visual neural hybrid model and optimize the visual neural hybrid model using an incremental learning method; The liquid recognition module is used to input the real-time liquid perception image into the optimized visual neural hybrid model to perform liquid recognition, and to make a preliminary judgment and correction on the recognition result; The fine-tuning module is used to perform intelligent analysis on the corrected recognition result, and to fine-tune the visual neural hybrid model according to the intelligent analysis result and the difference between the recognition result and the preset result.

7. A liquid identification system based on visual nerves as claimed in claim 6, characterized in that: The liquid identification module includes: an identification unit, a judgment unit, and a correction unit; The recognition unit is used to input the real-time liquid perception image into the visual neural hybrid model for recognition and output the recognition result; The judgment unit is used to make a preliminary judgment on the recognition result and compare it with the preset result; The correction unit uses a correction algorithm to correct the recognition result that does not match the preset result.

Citation Information

Patent Citations

  • Liquid recognition methods, vector extraction methods, liquid recognition devices and storage media

    CN109470720B

  • Liquid identification system with warning notice and liquid identification method

    CN110646347A

  • Face image recognition method and system based on computer vision

    CN117690178A

  • Image recognition system based on machine vision

    CN119399534A

Cited By

  • Automatic liquid level height calculation method and system based on spectral characteristics, medium and equipment

    CN121430771A

  • Method, system, medium and device for automatic calculation of liquid level height based on spectral characteristics

    CN121430771B