Liquid qualification detection system and method

By constructing a liquid qualification detection method based on multimodal feature fusion and deep neural networks, the complexity and inaccuracy of liquid detection in existing technologies are solved, achieving high-precision, real-time intelligent identification of liquid sample status and improving the reliability and interpretability of the detection system.

CN121114334AInactive Publication Date: 2025-12-12ZHENGFAN TECH (HUZHOU) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511173813.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-12-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing liquid quality testing technologies are complex to operate, have long testing cycles, are prone to sample contamination, and are highly dependent on the on-site environment. They are difficult to meet the requirements for rapid, accurate, and non-destructive online testing. Furthermore, they have low detection sensitivity and a high false judgment rate in the context of complex and variable liquid composition. They also lack multi-dimensional data fusion and real-time feedback mechanisms, making it difficult to achieve comprehensive and intelligent identification of the liquid's qualified status.

Method used

By acquiring multidimensional response signals of the liquid under test under different frequency excitations, including time-series data collected by optical, acoustic, electrical and thermal sensors, a multimodal feature fusion calculation module is constructed to extract liquid component behavior feature spectra. Combined with clustering-enhanced convolutional neural networks and multi-scale attention mechanisms, the liquid qualification discrimination model is adaptively calibrated, and an alarm mechanism is triggered when the detection result is unqualified or the risk level is higher than the threshold.

Benefits of technology

It achieves high-precision, real-time, and intelligent identification of liquid sample states, improves the system's ability to identify complex samples, enhances its ability to handle boundary samples and abnormal states, and has excellent interpretability and closed-loop control capabilities, significantly improving the practicality, safety, and reliability of the detection system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121114334A_ABST
    Figure CN121114334A_ABST
Patent Text Reader

Abstract

The invention discloses a liquid qualification detection system and method, and belongs to the technical field of intelligent detection and data analysis, multi-dimensional response signals of to-be-detected liquid under excitation of different frequencies are obtained, and a multi-dimensional response data set containing optical, acoustic, electrical and thermal physical channels is constructed; extracting a liquid component behavior characteristic spectrogram through a multi-modal characteristic fusion module; a liquid qualification judgment model is constructed based on a clustering enhanced convolutional neural network and a multi-scale attention mechanism, and classification prediction of the liquid qualification state is realized; further combining confidence coefficient calculation with historical sample database comparison, performing adaptive calibration on a prediction result, and outputting a detection result and a risk level; if the detection result is unqualified or the risk level exceeds the threshold value, an alarm mechanism is automatically triggered, and abnormal feature parameters are marked; the method has the advantages of high detection precision, high response speed, high anomaly recognition capability, excellent traceability and the like, and is suitable for scenes of liquid quality control, environment detection, biological sample analysis and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent detection and data analysis technology, specifically to a liquid qualification detection system and method. Background Technology

[0002] Most existing liquid quality testing technologies rely on offline laboratory analysis methods, such as chromatography, spectroscopic absorption, and conductivity testing. These methods typically suffer from complex operating procedures, long testing cycles, susceptibility to sample contamination, and strong dependence on the on-site environment, making it difficult to meet the needs for rapid, accurate, and non-destructive online liquid quality testing. While some online testing systems can achieve continuous sampling and monitoring of certain indicators, they still face technical bottlenecks such as low detection sensitivity, high false positive rates, and a lack of multi-dimensional data fusion and real-time feedback mechanisms in the context of complex and variable liquid compositions, making it difficult to achieve comprehensive and intelligent identification of liquid qualification status.

[0003] In addition, traditional detection methods mostly rely on a single physical quantity or chemical parameter threshold to judge the compliance of liquids, lacking in-depth modeling of the microscopic correlation characteristics between liquid components and prediction of behavioral patterns. This makes it difficult to make accurate judgments when the boundaries of liquid components are blurred or in critical states, affecting the stability and robustness of the detection system. Summary of the Invention

[0004] The purpose of this invention is to provide a liquid quality testing system and method to address the shortcomings of the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a liquid qualification detection method, comprising: The multidimensional response signal of the liquid under test under different frequency excitations is obtained, and the multidimensional response signal includes time-series data collected by optical, acoustic, electrical and thermal sensors; The multidimensional response signal is input to the multimodal feature fusion calculation module to extract the liquid component behavior feature spectrum; A liquid qualification discrimination model is constructed based on the liquid component behavior feature spectrum. The liquid qualification discrimination model combines clustering-enhanced convolutional neural network and multi-scale attention mechanism to classify and predict the qualification status of liquid samples. The confidence level of the classification prediction results is calculated, and adaptive calibration is performed based on the historical sample database to output the detection result of whether the liquid is qualified and the predicted risk level. When the test result is unqualified or the predicted risk level is higher than the preset threshold, an alarm mechanism is triggered and the abnormal characteristic parameters of the liquid sample are marked.

[0006] Preferably, acquiring the multidimensional response signal of the liquid under test under different frequency excitations includes: A multi-frequency excitation signal within a preset frequency range is applied to the liquid to be tested. The multi-frequency excitation signal includes a sine wave, a pulse wave, and a sweep frequency signal. The changes in optical transmittance, electrical conductivity, acoustic reflection signal, and pyroelectric infrared image data of the liquid under excitation were collected respectively to construct the corresponding time-series response channels. By using multi-channel synchronous sampling and time-frequency transformation processing, the main frequency characteristics, transient response amplitude and harmonic structure parameters of each type of response signal are extracted to form a multi-dimensional physical response feature vector group. The multidimensional physical response feature vector group is input into the preprocessing module for normalization to obtain a multidimensional response signal dataset.

[0007] Preferably, the extracted liquid component behavioral characteristic spectrum includes: Based on the multidimensional response signal dataset, a feature channel matrix is ​​constructed, and various physical response data such as optical, acoustic, electrical and thermal are classified and modeled according to type, and joint reconstruction of spatial domain and frequency domain is performed. A multi-scale convolutional coding module is used to extract response features from each physical channel. The multi-scale convolutional coding module is used to extract local and global response structures and capture the dynamic changes in liquid composition. A channel attention mechanism and a feature cross-fusion strategy are introduced, and the fused multidimensional feature map is mapped to the feature map generation module to construct the behavior feature map of the liquid under set excitation conditions.

[0008] Preferably, constructing a liquid qualification discrimination model based on the liquid component behavior feature spectrum includes: The liquid component behavior feature spectrum is encoded using high-dimensional feature vectorization, and an image embedding module is used to convert the two-dimensional spectrum into a one-dimensional sequence embedding representation. A liquid qualification discrimination model based on clustering-enhanced convolutional neural network is constructed, wherein the liquid qualification discrimination model introduces a label-guided adaptive clustering center learning mechanism; The liquid qualification discrimination model is used to predict the state of the input spectrum and output the liquid qualification state label and the corresponding confidence score.

[0009] Preferably, the liquid qualification discrimination model combines clustering-enhanced convolutional neural networks and multi-scale attention mechanisms for classifying and predicting the qualification status of liquid samples, including: The liquid component behavior feature spectrum is preprocessed as input. The local texture features and global structural features in the spectrum are extracted by the spatial-channel separation module to construct a multi-scale initial feature map. The multi-scale feature maps are input into the clustering enhancement convolutional neural network module, and the category feature representation is dynamically updated through the label-driven class center optimization algorithm. Weights are assigned to feature maps of different scales and channels through a multi-scale attention mechanism, which includes a joint structure of channel attention and spatial attention. The fused feature map is fed into the classification layer, and the Softmax function is used to output the qualified or unqualified prediction label of the liquid sample.

[0010] Preferably, the confidence level of the classification prediction results is calculated, and adaptive calibration is performed based on a historical sample database to output the detection result of whether the liquid is qualified and the predicted risk level, including: Based on the output probability distribution of the classification model, a confidence scoring function is used to perform preliminary confidence calculation on each prediction result. The confidence scoring function comprehensively considers the category prediction probability, prediction entropy value, and similarity index between feature vector and class center. The behavioral feature spectrum of the current predicted sample is compared with high-confidence samples in the historical sample database. Based on the distance metric of feature vectors and cluster similarity results, the similarity level between the current sample and historical qualified or unqualified samples is determined. Based on historical comparison results and sample distribution density, the confidence score of the current prediction result is dynamically adjusted, and the prediction label is adaptively calibrated. The output includes the final test result of whether the liquid is qualified and the corresponding predicted risk level, which is set based on the adjusted confidence score grading.

[0011] Preferably, when the test result is unqualified or the predicted risk level is higher than a preset threshold, an alarm mechanism is triggered, including: The status label and corresponding risk level of the classification prediction output are monitored in real time. When the judgment result is unqualified or the risk level corresponding to the confidence score is higher than the set safety threshold, the abnormal response process is initiated and an alarm signal is issued. The alarm signal includes the sample number, detection timestamp, risk level information and preliminary judgment result. Source analysis is performed on the key response channels that cause non-compliance judgments or high-risk scores, and the spectral regions or abnormal feature parameters with the highest weight contribution in the classification model are extracted by the reverse feature weight mapping method. The extracted abnormal feature parameters are labeled and recorded in the abnormal sample database.

[0012] The present invention also provides a liquid quality detection system, comprising: Signal acquisition module: acquires multidimensional response signals of the liquid under test under different frequency excitations, the multidimensional response signals including time-series data collected by optical, acoustic, electrical and thermal sensors; Feature map construction module: Inputs the multidimensional response signal into the multimodal feature fusion calculation module to extract liquid component behavior feature maps; Model building module: Based on the liquid component behavior feature spectrum, a liquid qualification discrimination model is built. The liquid qualification discrimination model combines clustering-enhanced convolutional neural network and multi-scale attention mechanism to classify and predict the qualification status of liquid samples. Risk prediction module: Calculates the confidence level of the classification prediction results, performs adaptive calibration based on the historical sample database, and outputs the detection results of whether the liquid is qualified and the predicted risk level; Alarm module: When the test result is unqualified or the predicted risk level is higher than the preset threshold, the alarm mechanism is triggered and the abnormal characteristic parameters of the liquid sample are marked.

[0013] The technical effects and advantages provided by the present invention in the above technical solution are as follows: 1. This invention constructs a liquid quality detection method that integrates multi-physical channel response, deep neural network discrimination, and adaptive calibration mechanisms, achieving high-precision, real-time, and intelligent identification of liquid sample states. By extracting the behavioral feature spectrum of liquid components and introducing clustering-enhanced convolutional neural networks, multi-scale attention mechanisms, confidence regression, and anomaly tracing mechanisms, it not only improves the model's ability to identify complex samples but also enhances the system's ability to handle boundary samples and abnormal states.

[0014] 2. This invention achieves automated detection while possessing excellent interpretability and closed-loop control capabilities. Through anomaly feature parameter labeling and historical sample comparison mechanisms, the system can continuously optimize its identification model and support subsequent source tracing analysis and risk warning, significantly improving the practicality, safety, and reliability of liquid detection systems in applications such as industrial quality control, drinking water monitoring, and biochemical analysis. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0016] Figure 1 This is a flowchart of the method of the present invention.

[0017] Figure 2 This is a flowchart of the system modules of the present invention. Detailed Implementation

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

[0019] Example 1, please refer to Figure 1 As shown, the liquid qualification detection method described in this embodiment includes: The multidimensional response signal of the liquid under test under different frequency excitations is obtained, and the multidimensional response signal includes time-series data collected by optical, acoustic, electrical and thermal sensors; The multidimensional response signal is input to the multimodal feature fusion calculation module to extract the liquid component behavior feature spectrum; A liquid qualification discrimination model is constructed based on the liquid component behavior feature spectrum. The liquid qualification discrimination model combines clustering-enhanced convolutional neural network and multi-scale attention mechanism to classify and predict the qualification status of liquid samples. The confidence level of the classification prediction results is calculated, and adaptive calibration is performed based on the historical sample database to output the detection result of whether the liquid is qualified and the predicted risk level. When the test result is unqualified or the predicted risk level is higher than the preset threshold, an alarm mechanism is triggered and the abnormal characteristic parameters of the liquid sample are marked.

[0020] In this invention, the liquid under test is first subjected to multi-frequency excitation to obtain multi-dimensional response signal data under different physical mechanisms. The multi-dimensional response signals include, but are not limited to, time-series response data closely related to the liquid state collected by optical sensors, acoustic sensors, electrical sensors, and thermal sensors, which are used to comprehensively reflect the dynamic behavior characteristics of the liquid under different external stimuli.

[0021] In the specific implementation process, a multi-frequency excitation signal within a preset frequency range is first applied to the liquid sample. The excitation signal includes various signal types, mainly covering the following three categories: A sinusoidal excitation signal, whose frequency is scanned sequentially from low frequency to high frequency, is used to induce continuous response changes in the liquid at different energy levels. Pulse wave excitation signals have high instantaneous energy characteristics, which can effectively excite the short-time response characteristics inside the liquid and capture the highly sensitive response of microstructural changes to external stimuli. Sweep signals (i.e., excitation waveforms whose frequency changes linearly or nonlinearly with time) can cover a wider frequency band of dynamic response and are suitable for excitation analysis of different components and molecular scale structures in liquids.

[0022] Through the combined effect of the aforementioned multi-frequency excitation signals, liquid samples can generate measurable response signals in multiple physical dimensions, providing sufficient raw data support for subsequent multi-source feature analysis.

[0023] While applying excitation, the system simultaneously acquires the time-series response signals generated by the liquid under excitation through various types of sensors. The acquisition process of the response signals includes the following channels: Optical response channel: A transmittance measurement device is used to collect the changes in the light transmittance of the liquid under different frequency excitations. By comparing the intensity of incident light and transmitted light, the absorption characteristics of different components in the liquid for light wave propagation are obtained. Acoustic response channel: Using an ultrasonic sensor to record the reflection signal and attenuation characteristics of the excitation signal after it propagates in the liquid, thereby obtaining the acoustic characteristic response caused by changes in the density, viscosity and bubble content of the liquid medium; Electrical response channel: Based on a high-precision conductivity sensor, it measures the change in the conductivity of the liquid during the excitation process, reflecting the microscopic changes in the ion concentration and motion state in the liquid; Thermal response channel: Through an infrared thermal imaging device, the changes in heat distribution on the surface and inside of the liquid are recorded in real time, and its heat diffusion efficiency and temperature response delay characteristics are analyzed.

[0024] To ensure the time consistency and data alignment of the response signals from each channel, the system employs a multi-channel synchronous sampling mechanism. This mechanism drives various acquisition units with a unified clock source, simultaneously acquiring signals from each physical dimension with millisecond-level time accuracy, thus avoiding data misalignment or distortion due to time delay differences.

[0025] The acquired raw time-series signals cannot be directly used for subsequent modeling and recognition; therefore, further time-frequency transformation processing is required. The time-frequency transformation methods employed in this invention include continuous wavelet transform and short-time Fourier transform, which can transform non-stationary time-domain signals into identifiable structures in the time-frequency joint domain. Based on this, the system extracts the following main feature parameters from each type of response signal: Dominant frequency characteristic: the frequency point with the highest energy density in the frequency domain, reflecting the dominant behavior frequency of the liquid response in this physical channel; Transient response amplitude: corresponds to the degree of rapid change in the liquid state when the excitation signal is just applied, reflecting its short-term impact characteristics; Harmonic structure parameters: By analyzing the higher-order frequency components in the response signal and their relative amplitude relationships, the synergistic effect and coupling characteristics among various physical processes inside the liquid can be determined.

[0026] The aforementioned feature parameters, after multi-channel fusion, form a complete set of physical response feature vectors with multiple dimensions. To improve data consistency and the efficiency of subsequent algorithm training, this invention further inputs this feature vector set into a preprocessing module for normalization. The normalization strategy combines the maximum-minimum scaling method with the Z-score standardization method. On the one hand, it compresses each feature value to a uniform numerical range; on the other hand, it preserves its relative distribution and statistical characteristics, thereby eliminating data bias caused by different physical dimensions.

[0027] After the above steps, a high-quality multidimensional response signal dataset is finally generated, which can be used by subsequent recognition models. This dataset contains feature information in multiple dimensions such as time domain, frequency domain, and spatial distribution, which can effectively support the modeling, judgment, and prediction of liquid qualification status, providing a solid data foundation for the entire liquid qualification detection system.

[0028] In this invention, in order to fully explore the multi-source response behavior characteristics of the liquid under different excitation conditions and further improve the detection system's ability to perceive changes in the microscopic state of liquid components, a spectrum extraction mechanism based on multimodal feature fusion is designed to construct a behavioral feature spectrum of the liquid that truly reflects its physical state in a specific excitation environment.

[0029] Specifically, the system first inputs the pre-processed multidimensional response signal dataset into the multimodal feature fusion calculation module. The multidimensional response signal dataset includes time-series response data from multiple sensing channels such as optical, acoustic, electrical, and thermal sensors. After unified normalization and time alignment processing, it is input into the fusion module in a unified data structure format.

[0030] Within the fusion computing module, structural modeling of different types of physical response signals is first performed. To this end, the system constructs a feature channel matrix, which is divided according to signal category, treating optical response, acoustic response, electrical response, and thermal response as four main channels. Each channel contains corresponding time-series information and spectral features obtained after frequency domain transformation. This approach enables multi-angle, multi-level data abstraction of liquid response behavior.

[0031] To further improve the efficiency and accuracy of feature extraction, the system adopts a joint spatial and frequency domain reconstruction strategy. This involves simultaneously expanding the signal of each channel in both the time series dimension (spatial domain) and the spectral feature dimension (frequency domain) after constructing the feature channel matrix, forming a joint feature plane with a two-dimensional structure. This joint structure not only enhances the contextual correlation between features but also provides richer information dimensions for subsequent deep learning modules.

[0032] Based on the reconstructed feature matrix, the system introduces a multi-scale convolutional coding module to perform in-depth analysis of the data in each channel. This module employs multiple sets of convolutional kernels with different receptive fields to extract local variation features (such as abrupt changes and transient fluctuations) and global trend features (such as slow decay and periodic changes) in the response signal. This multi-scale modeling approach ensures that the model has strong sensitivity and discriminative ability to changes in liquid behavior at different time scales and energy levels.

[0033] After completing single-channel feature encoding, the system further introduces a channel attention mechanism and a feature cross-fusion strategy to achieve information coupling and weight enhancement between various physical channels. The channel attention mechanism dynamically adjusts the importance coefficients of different channels in the current sample by constructing a weighted distribution map of response intensity among channels. For example, when the electrical conductivity response of a liquid is weak but the thermal response is significant, the attention mechanism will automatically reduce the influence weight of electrical channel features and strengthen the representational ability of thermal channels. The feature cross-fusion strategy achieves complementary enhancement of feature dimensions between channels through methods such as dot product, concatenation, and nonlinear mapping, effectively extracting potential joint feature representations across modalities.

[0034] After completing the above fusion operations, the system sends the generated high-dimensional feature map to the feature spectrum generation module. This module, based on a specific mapping function, transforms the fused multimodal response feature structure into a two-dimensional behavioral spectrum with spatial distribution patterns. This spectrum not only maintains the spatial distribution structure of the original physical channel information but also preserves the typical behavioral patterns exhibited by the liquid under external excitation in the frequency domain and response intensity dimension. This behavioral feature spectrum can be regarded as a "digital signature" of the liquid under specific test conditions, possessing strong uniqueness and discriminability.

[0035] The resulting liquid component behavior characteristic spectrum, as an intermediate representation, will be input into the subsequent liquid state discrimination model for intelligent identification and risk assessment of whether a liquid is qualified or not. In practical applications, this spectrum can not only reveal the response law of the liquid component's microstructure to external stimuli, but also be used to track the dynamic evolution path of liquid properties with environmental changes, demonstrating high practicality and expansion value.

[0036] To achieve high-precision automated identification of liquid quality status, this invention proposes a liquid qualification discrimination model construction method based on liquid component behavior feature spectrum. It integrates clustering-enhanced convolutional neural network and multi-scale attention mechanism to improve the discrimination accuracy, robustness and interpretability of the model in complex sample environments.

[0037] Before constructing the discrimination model, the input liquid component behavior feature spectrum needs to be vectorized. The feature spectrum is usually in the form of a two-dimensional image, containing information on the liquid's response distribution under multi-dimensional physical channels, including spatial features, frequency response, texture structure, and contrast differences. To adapt to the input structure of the neural network model, this invention designs an image embedding module to perform embedded encoding processing on the two-dimensional spectrum.

[0038] This embedding module maps the spectral image to a high-dimensional sequence space through sliding window scanning, local feature extraction, and convolutional encoding. Each extracted embedding unit contains the texture distribution, color gradient, and location-related information of a local region in the spectral image, while maintaining the relative integrity of the spatial relationships within the spectral image. The final output one-dimensional embedding sequence can be used as an input feature vector for subsequent discriminative models.

[0039] To further improve the accuracy of liquid state classification and the model's boundary discrimination capability, this invention constructs a cluster-enhanced convolutional neural network structure. This network not only possesses the hierarchical feature extraction capabilities of traditional convolutional neural networks, but also achieves enhanced clustering of features for different liquid categories by introducing a label-guided class center optimization mechanism.

[0040] Specifically, during the model training phase, label information is used to perform cluster analysis on embedded features of the same category, and the vector representation of the class centers is dynamically updated. By calculating and optimizing the distance between the feature vectors and the class centers, samples of the same category are brought closer together in the feature space, while samples of different categories are moved further apart. This approach effectively solves the problem of confusion that traditional neural networks easily generate when dealing with boundary samples or samples of ambiguous categories, thereby enhancing the model's ability to identify liquids in critical states.

[0041] Furthermore, the convolutional network employs a multi-layered stacked structure, including standard convolutional layers, normalization layers, and activation function layers, enabling the extraction of complex patterns and feature combinations from the spectral map layer by layer. After each convolutional layer, max pooling and downsampling operations are used to reduce the feature dimensionality, retaining key response features and reducing computational redundancy.

[0042] To further enhance the model's ability to recognize features at different scales and channels, this invention introduces a multi-scale attention mechanism into the convolutional network structure. This mechanism is composed of a channel attention module and a spatial attention module, which can automatically learn the importance distribution of input features in different dimensions.

[0043] In the channel attention module, the system analyzes the intensity variation trends of different physical response channels (such as optical and electrical) in the feature spectrum, calculates the weighting coefficients of the channel responses, and thus dynamically adjusts the influence weights of each channel feature. The channel attention mechanism can effectively amplify the information of key physical channels, suppress redundant or noisy features, and improve the targeting of model attention.

[0044] In the spatial attention module, the system identifies the spatial distribution characteristics between high-response and low-response regions by scanning the differences in response intensity across two-dimensional regions in the spectral image. By constructing a position-sensitive mapping function, higher attention weights are assigned to regions in the spectral image that have discriminative significance, enabling the model to focus more on locations where liquid composition changes significantly.

[0045] The multi-scale structure considers feature fusion of small receptive fields (local texture) and large receptive fields (global structure) during the design process, and applies them separately in the attention mechanism, so that the final feature fusion map has rich hierarchy, stable response and clear structure.

[0046] The feature map after incorporating the attention mechanism is fed into the classification layer at the end of the model for state prediction. This classification layer uses the Softmax activation function to output multi-class probabilities, which in this embodiment is usually binary classification, i.e., two labels: "qualified" and "unqualified".

[0047] The model training phase employs a supervised learning approach, combining cross-entropy loss and intra-class compactness constraint loss for joint optimization to ensure high accuracy and robustness. Trained with a large number of known labeled samples, the model achieves stable classification performance in scenarios involving complex liquid mixtures, concentration variations, and ambiguous physical responses.

[0048] In this invention, to further improve the reliability of liquid state classification results and the controllability of system decisions, an adaptive calibration mechanism based on prediction confidence calculation and historical sample comparison is designed. This mechanism is used to perform secondary evaluation and risk level judgment on the qualified prediction results output by the classification model. This mechanism comprehensively considers the uncertainty indicators within the model and external historical sample knowledge, constructing a confidence-risk collaborative feedback system to ensure intelligent identification and correction control of boundary samples, ambiguous samples, and low-confidence samples in actual operation.

[0049] After classifying and predicting the behavioral feature spectrum of liquid components, the initial confidence level is calculated based on the output probability distribution of the classification model. The classification model typically outputs the predicted probability for each class using a Softmax activation function, with the class corresponding to the highest probability being the predicted label for the current model.

[0050] To further quantify the model's "confidence" in the current prediction results, this invention introduces a confidence score function to comprehensively evaluate the credibility of the current prediction results. This score function primarily considers the following three dimensions: Category prediction probability: This is the maximum probability value output by Softmax, reflecting the strength of the model's intuitive judgment on the category to which the current sample belongs; Prediction entropy: The information entropy is calculated based on the prediction probability distribution of all categories. The lower the entropy value, the more explicit the model decision and the higher the confidence level. Feature vector and class center similarity index: Using the class center vector generated in the clustering enhancement mechanism, the similarity between the current sample features and the class center is calculated. The similarity is measured by vector distance (such as Euclidean distance or cosine similarity). The higher the similarity, the closer the prediction result is to the historical typical sample.

[0051] The three factors mentioned above are fused through a weighted linear combination to obtain a normalized confidence score, typically ranging from zero to one. This confidence score will serve as the initial reference metric for the next adaptive calibration step.

[0052] To improve the system's responsiveness to unknown or low-confidence samples, this invention establishes a historical sample database, which stores a large number of liquid feature spectra with known labels and their high-confidence feature vector representations. This database can be continuously accumulated during the model training phase and its representativeness and stability are maintained through periodic sample cleaning.

[0053] After receiving a new liquid sample classification result, the system compares its corresponding feature spectral representation with samples in the historical database. The comparison process employs the following strategy: Feature distance metric: Calculates the feature vector distance between the current sample and each historical sample, usually using Euclidean distance, Manhattan distance or cosine distance, etc. Cluster similarity judgment: Based on the probability of the current sample’s feature expression in the historical sample cluster distribution, determine whether its position in the overall sample space is close to a “qualified” or “unqualified” cluster. Similarity level determination: Based on the combined distance and clustering results, a similarity level is set for the current sample, such as "high similarity (>90%)", "medium similarity (60%-90%)", "low similarity (<60%)", etc., to guide the direction of confidence adjustment.

[0054] Based on the historical comparison results mentioned above, this invention further adaptively calibrates the initial confidence score. The calibration process considers two core variables: the current predicted initial confidence score and its similarity level in the historical sample distribution. By constructing a rule engine or a learning-based adjustment function, the system processes the prediction results as follows: If the current sample has a high initial confidence level and is highly similar to similar samples in the historical database, then the original prediction remains unchanged. If the current confidence level is moderate, but the sample is highly similar to the "outlier" sample cluster, the confidence score should be appropriately reduced and the predicted label should be marked with a warning. If the current sample has low confidence and the similarity level is ambiguous or located in the sample boundary area, a label calibration mechanism is executed, that is, the current predicted label is adjusted according to the category corresponding to the maximum similarity, so as to avoid misjudgment.

[0055] Through the above adjustment process, the credibility of the classification results is corrected and the categories are re-evaluated, making the model output more stable and reliable. It is particularly suitable for scenarios with complex liquid composition, slow component changes, or samples that deviate from the training distribution.

[0056] After adaptive calibration is completed, the system's final output consists of two parts: The result of determining whether the liquid is qualified is: the label with the highest confidence level is used as the final test label, i.e., "qualified" or "unqualified"; Predicted Risk Level: Based on the final confidence level value, the system sets a risk level classification standard. For example: High confidence level (above 0.85): Low risk; Medium confidence level (0.60~0.85): Medium risk; Low confidence level (below 0.60): High risk.

[0057] To improve the responsiveness, risk control capabilities, and traceability of abnormal states in the actual operation of the liquid qualification testing system, this invention introduces a multi-level abnormal response mechanism into the testing process. When the classification model determines that the liquid test result is unqualified, or the corresponding risk level score exceeds the safety threshold set by the system, the system automatically initiates an alarm process and performs feature-level source tracing analysis and abnormal data management.

[0058] After completing the classification prediction and confidence score of the liquid sample, the system monitors two key elements in the output results in real time: the classification status label (i.e., "qualified" or "unqualified") and the corresponding predicted risk level. The risk level is obtained by mapping the model confidence score through a preset grading rule, and can usually be divided into three levels: "low risk", "medium risk" and "high risk".

[0059] The system sets a safety risk threshold to trigger alarm judgment. For example, when the prediction result is labeled "unqualified", or although the label is "qualified" but the corresponding risk level is "high risk", the system determines that the sample is in a potentially abnormal state and immediately enters the abnormal response process.

[0060] When the above-mentioned anomaly detection conditions are met, the system automatically triggers the alarm mechanism and generates a structured alarm signal. This signal not only contains the alarm command itself, but also integrates rich information fields, facilitating the upper-level system or manual review unit to quickly locate the source of the anomaly and analyze its background.

[0061] Alarm signals should include at least the following fields: Sample Number: A unique identification code generated by the system for each liquid sample, used for traceability and data archiving; Detection timestamp: Marks the time when the sample was detected and an anomaly was triggered, accurate to the second; Risk level information: The current predicted risk level, such as "high risk"; Preliminary assessment results: The liquid state label output by the classification model is either "qualified" or "unqualified"; Trigger source type: Record whether the alarm was triggered due to low confidence or label abnormality, in order to determine model stability or data drift issues.

[0062] The alarm information can be sent synchronously to the upper-level monitoring platform through the system interface, or it can be triggered on-site by sound and light alarm devices for manual intervention, with good linkage and scalability.

[0063] To further clarify the reasons for the non-compliance or high-risk prediction of liquid samples, this invention introduces a model feature tracing analysis mechanism. This mechanism extracts the key response channels and their corresponding spectral feature regions that contribute most to the final prediction result by tracing the internal structure and output results of the classification model in reverse, thereby identifying the core parameters that lead to the anomaly determination.

[0064] This invention employs a reverse feature weight mapping method to achieve the above analysis. This method borrows from the class activation mapping mechanism in visual models, fusing the intermediate feature maps in the classification model with the class weights of the output layer to inversely deduce which regions in the feature spectral map have a high response contribution during the model classification process.

[0065] In practice, the system performs the following operations: The input liquid behavior feature spectrum is propagated forward in the classification model, and the activation feature maps of each intermediate convolutional layer are recorded. Extract the weight vectors corresponding to the output categories, and perform a weighted summation of the convolutional feature maps; Generate a heatmap that reflects the "importance" of each pixel region; this heatmap is the key area that the model focuses on during the recognition process. By combining regions with high response values ​​in the heatmap, the corresponding physical response channels (such as optical and electrical) and feature parameter dimensions (such as dominant frequency value, transient response amplitude, spectral texture structure, etc.) are located and extracted as anomalous feature parameters.

[0066] This method can not only identify which response channels are abnormal, but also pinpoint which specific frequency bands, timing windows, or texture structure changes have a key impact on the model's judgment, thus possessing good interpretability and operability.

[0067] After identifying the anomaly features, the system uniformly marks the key parameters and their corresponding labels in the analysis results and writes them into the anomaly sample database, forming structured anomaly sample entries. This database, as part of the system, will be used for the following core tasks: Historical anomaly tracking and reproduction: Historical anomaly cases and their causes can be quickly queried by sample number; Model retraining data supplementation: Abnormal samples can be used as "boundary samples" in the training set to participate in subsequent model fine-tuning; Source tracing analysis report generation: Supports exporting the characteristic changes of single or batch abnormal samples in the form of structured reports; Early warning strategy optimization: Analyze the matching degree between the distribution of abnormal samples and the system's early warning response, and continuously optimize the risk level classification criteria.

[0068] The fields stored by the system for abnormal sample entries include, but are not limited to: sample number, detection time, judgment label, confidence score, risk level, name of the channel that caused the anomaly, key feature parameter value, corresponding spectral position coordinates, and original spectral archive path.

[0069] Example 2, please refer to Figure 2 As shown, the liquid qualification detection system described in this embodiment includes: Signal acquisition module: acquires multidimensional response signals of the liquid under test under different frequency excitations, the multidimensional response signals including time-series data collected by optical, acoustic, electrical and thermal sensors; Feature map construction module: Inputs the multidimensional response signal into the multimodal feature fusion calculation module to extract liquid component behavior feature maps; Model building module: Based on the liquid component behavior feature spectrum, a liquid qualification discrimination model is built. The liquid qualification discrimination model combines clustering-enhanced convolutional neural network and multi-scale attention mechanism to classify and predict the qualification status of liquid samples. Risk prediction module: Calculates the confidence level of the classification prediction results, performs adaptive calibration based on the historical sample database, and outputs the detection results of whether the liquid is qualified and the predicted risk level; Alarm module: When the test result is unqualified or the predicted risk level is higher than the preset threshold, the alarm mechanism is triggered and the abnormal characteristic parameters of the liquid sample are marked.

[0070] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for testing the quality of liquids, characterized in that: include: The multidimensional response signal of the liquid under test under different frequency excitations is obtained, and the multidimensional response signal includes time-series data collected by optical, acoustic, electrical and thermal sensors; The multidimensional response signal is input to the multimodal feature fusion calculation module to extract the liquid component behavior feature spectrum; A liquid qualification discrimination model is constructed based on the liquid component behavior feature spectrum. The liquid qualification discrimination model combines clustering-enhanced convolutional neural network and multi-scale attention mechanism to classify and predict the qualification status of liquid samples. The confidence level of the classification prediction results is calculated, and adaptive calibration is performed based on the historical sample database to output the detection result of whether the liquid is qualified and the predicted risk level. When the test result is unqualified or the predicted risk level is higher than the preset threshold, an alarm mechanism is triggered and the abnormal characteristic parameters of the liquid sample are marked.

2. The liquid quality testing method according to claim 1, characterized in that: The acquisition of the multidimensional response signal of the liquid under test under different frequency excitations includes: A multi-frequency excitation signal within a preset frequency range is applied to the liquid to be tested. The multi-frequency excitation signal includes a sine wave, a pulse wave, and a sweep frequency signal. The changes in optical transmittance, electrical conductivity, acoustic reflection signal, and pyroelectric infrared image data of the liquid under excitation were collected respectively to construct the corresponding time-series response channels. By using multi-channel synchronous sampling and time-frequency transformation processing, the main frequency characteristics, transient response amplitude and harmonic structure parameters of each type of response signal are extracted to form a multi-dimensional physical response feature vector group. The multidimensional physical response feature vector group is input into the preprocessing module for normalization to obtain a multidimensional response signal dataset.

3. The liquid quality testing method according to claim 1, characterized in that: The extracted liquid component behavior characteristic spectrum includes: Based on the multidimensional response signal dataset, a feature channel matrix is ​​constructed, and various physical response data such as optical, acoustic, electrical and thermal are classified and modeled according to type, and joint reconstruction of spatial domain and frequency domain is performed. A multi-scale convolutional coding module is used to extract response features from each physical channel. The multi-scale convolutional coding module is used to extract local and global response structures and capture the dynamic changes in liquid composition. A channel attention mechanism and a feature cross-fusion strategy are introduced, and the fused multidimensional feature map is mapped to the feature map generation module to construct the behavior feature map of the liquid under set excitation conditions.

4. The liquid quality testing method according to claim 3, characterized in that: The liquid qualification discrimination model constructed based on the liquid component behavior feature spectrum includes: The liquid component behavior feature spectrum is encoded using high-dimensional feature vectorization, and an image embedding module is used to convert the two-dimensional spectrum into a one-dimensional sequence embedding representation. A liquid qualification discrimination model based on clustering-enhanced convolutional neural network is constructed, wherein the liquid qualification discrimination model introduces a label-guided adaptive clustering center learning mechanism; The liquid qualification discrimination model is used to predict the state of the input spectrum and output the liquid qualification state label and the corresponding confidence score.

5. The liquid quality testing method according to claim 4, characterized in that: The liquid qualification discrimination model combines clustering-enhanced convolutional neural networks and multi-scale attention mechanisms to classify and predict the qualification status of liquid samples, including: The liquid component behavior feature spectrum is preprocessed as input. The local texture features and global structural features in the spectrum are extracted by the spatial-channel separation module to construct a multi-scale initial feature map. The multi-scale feature maps are input into the clustering enhancement convolutional neural network module, and the category feature representation is dynamically updated through the label-driven class center optimization algorithm. Weights are assigned to feature maps of different scales and channels through a multi-scale attention mechanism, which includes a joint structure of channel attention and spatial attention. The fused feature map is fed into the classification layer, and the Softmax function is used to output the qualified or unqualified prediction label of the liquid sample.

6. The liquid quality testing method according to claim 5, characterized in that: The confidence level of the classification prediction results is calculated, and adaptive calibration is performed based on the historical sample database. The output results, including whether the liquid is qualified and the predicted risk level, are then provided. Based on the output probability distribution of the classification model, a confidence scoring function is used to perform preliminary confidence calculation on each prediction result. The confidence scoring function comprehensively considers the category prediction probability, prediction entropy value, and similarity index between feature vector and class center. The behavioral feature spectrum of the current predicted sample is compared with high-confidence samples in the historical sample database. Based on the distance metric of feature vectors and cluster similarity results, the similarity level between the current sample and historical qualified or unqualified samples is determined. Based on historical comparison results and sample distribution density, the confidence score of the current prediction result is dynamically adjusted, and the prediction label is adaptively calibrated. The output includes the final test result of whether the liquid is qualified and the corresponding predicted risk level, which is set based on the adjusted confidence score grading.

7. The liquid quality testing method according to claim 6, characterized in that: When the test result is unqualified or the predicted risk level is higher than the preset threshold, an alarm mechanism is triggered, including: The status label and corresponding risk level of the classification prediction output are monitored in real time. When the judgment result is unqualified or the risk level corresponding to the confidence score is higher than the set safety threshold, the abnormal response process is initiated and an alarm signal is issued. The alarm signal includes the sample number, detection timestamp, risk level information and preliminary judgment result. Source analysis is performed on the key response channels that cause non-compliance judgments or high-risk scores, and the spectral regions or abnormal feature parameters with the highest weight contribution in the classification model are extracted by the reverse feature weight mapping method. The extracted abnormal feature parameters are labeled and recorded in the abnormal sample database.

8. A liquid quality inspection system for implementing the liquid quality inspection method according to any one of claims 1-7, characterized in that: include: Signal acquisition module: acquires multidimensional response signals of the liquid under test under different frequency excitations, the multidimensional response signals including time-series data collected by optical, acoustic, electrical and thermal sensors; Feature map construction module: Inputs the multidimensional response signal into the multimodal feature fusion calculation module to extract liquid component behavior feature maps; Model building module: Based on the liquid component behavior feature spectrum, a liquid qualification discrimination model is built. The liquid qualification discrimination model combines clustering-enhanced convolutional neural network and multi-scale attention mechanism to classify and predict the qualification status of liquid samples. Risk prediction module: Calculates the confidence level of the classification prediction results, performs adaptive calibration based on the historical sample database, and outputs the detection results of whether the liquid is qualified and the predicted risk level; Alarm module: When the test result is unqualified or the predicted risk level is higher than the preset threshold, the alarm mechanism is triggered and the abnormal characteristic parameters of the liquid sample are marked.

Citation Information

Cited By

  • Wall hollowing detection method and system based on multi-excitation response and space fusion

    CN122193410A

  • A method and system for detecting hollow walls based on multi-excitation response and spatial fusion

    CN122193410B