Layered analysis method and system for dynamically sensing liquid level based on dynamic environment

By synchronously acquiring multi-source data and dynamically compensating for refractive index, combined with transfer learning model adaptation and automatic calibration, the accuracy and stability issues of liquid level measurement in dynamic environments are solved, achieving highly adaptable and real-time response liquid level analysis, and improving the system's automation level and long-term reliability.

CN121720545APending Publication Date: 2026-03-24NINGBO XINGBOYUAN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing liquid level measurement technologies suffer from large accuracy errors and insufficient generalization ability when faced with dynamic changes in the composition and concentration of chemical media and environmental temperature and humidity. They also cannot respond to environmental and material disturbances in real time, making it difficult to meet the real-time, accuracy, and long-term stability requirements of modern laboratories and automated production lines.

Method used

By employing a method of multi-source data synchronous acquisition, dynamic refractive index compensation, transfer learning model adaptation, and automatic calibration and error compensation, the refractive index is corrected in real time and an adaptive liquid level analytical model is constructed through the synchronous acquisition of multispectral optical signals, environmental parameters, and ultrasonic echo signals, combined with reinforcement learning and transfer learning, thereby achieving in-situ closed-loop self-calibration and multi-dimensional error compensation.

Benefits of technology

It significantly improves measurement accuracy and stability in complex dynamic environments, reduces the sample size and time requirements for modeling new substances, achieves continuous autonomous accuracy maintenance, and enhances the system's automation level and environmental adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121720545A_ABST
    Figure CN121720545A_ABST
Patent Text Reader

Abstract

The invention discloses a liquid level layering analysis method based on dynamic environment perception. The method comprises the steps that a multispectral optical signal, an environment parameter, a laser ranging signal and an ultrasonic echo signal of target liquid are synchronously collected; calculating a real-time refractive index and correcting an optical path difference through a dynamic refractive index compensation algorithm based on the acquired data; constructing a fine-tuning data set of the target substance based on a transfer learning fine-tuning data set generation method, and performing fine-tuning on the basic model by adopting a low-rank adaptation technology to obtain an adaptive liquid level analysis model; and starting in-situ closed-loop self-calibration according to a preset triggering condition, correcting errors in real time in combination with a multi-dimensional error compensation technology, and outputting an analysis result. According to the method, through multi-source sensing and dynamic compensation, measurement deviation caused by environment and medium changes is effectively inhibited, and the measurement precision and stability are improved; and by means of transfer learning and a predictive self-calibration mechanism, the new substance adaptation cost is reduced, long-term autonomous precision maintenance is realized, and the automation level and environmental adaptability of the system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation measurement technology, and more specifically, to a method and system for analyzing liquid level stratification based on dynamic environmental sensing. Background Technology

[0002] In chemical experiments, pharmaceuticals, and process industries, accurately measuring the liquid level and interface position of layered liquids is crucial for ensuring reaction control, quality analysis, and production safety. Traditional liquid level measurement techniques mainly rely on sensors with fixed parameters for single-point detection, but this faces significant challenges in practical applications.

[0003] First, the refractive index of a chemical medium is not constant; it dynamically changes with the composition and concentration of the medium, as well as the ambient temperature and humidity. This leads to significant optical path difference errors in measurements based on optical or ultrasonic principles, making it difficult to maintain accuracy in variable environments. Second, existing measurement models lack generalization ability when dealing with a wide variety of chemical substances. Extensive recalibration is required for new substances, resulting in low efficiency and high costs.

[0004] Furthermore, existing systems mostly employ periodic offline calibration methods, which cannot respond in real time to dynamic disturbances in the environment and materials themselves during experiments. Measurement errors tend to accumulate over time, making it difficult to meet the stringent requirements of modern laboratories and automated production lines for real-time performance, accuracy, and long-term stability. Therefore, there is an urgent need for a highly adaptable liquid level analysis solution that can intelligently sense changes in the environment and media and achieve autonomous calibration. Summary of the Invention

[0005] To address the aforementioned technical problems in related technologies, this invention proposes a method and system for analyzing liquid level stratification based on dynamic environment sensing, which can overcome the above-mentioned shortcomings of existing technologies.

[0006] To achieve the above-mentioned technical objectives, the technical solution of the present invention is implemented as follows: A method for analyzing liquid level stratification based on dynamic environment sensing; The method for analyzing liquid level stratification based on dynamic environment sensing includes the following steps: The multi-source data synchronous acquisition step involves simultaneously acquiring multispectral optical signals, environmental parameters, laser ranging signals, and ultrasonic echo signals of the target liquid. The dynamic refractive index compensation step calculates the real-time refractive index of the target liquid based on the collected multispectral optical signals and environmental parameters, and corrects the optical path difference. The transfer learning model adaptation steps are as follows: based on the source domain basic model, a fine-tuned dataset of the target chemical substance is constructed through the transfer learning fine-tuning dataset generation method, and the basic model is fine-tuned using low-rank adaptation technology to obtain a liquid level analysis model adapted to the target chemical substance. The automatic calibration and error compensation steps initiate an in-situ closed-loop self-calibration process based on preset trigger conditions, calibrate the system based on standard liquid level values, and compensate for measurement errors in real time based on multi-dimensional error compensation technology, outputting liquid level stratification analysis results.

[0007] Furthermore, the dynamic refractive index compensation step includes: decomposing the real-time refractive index into static intrinsic refractive index, environmental dynamic perturbation refractive index, and concentration-coupled perturbation refractive index; dynamically adjusting the coupling coefficient between environmental parameters and refractive index based on reinforcement learning; simulating the propagation path of light in the liquid using the finite-difference time-domain method to calculate the optical path difference offset caused by the refractive index change; and substituting the corrected refractive index into the liquid level measurement formulas for laser and ultrasonic waves to calculate the liquid level height and the position of the layer interface.

[0008] Furthermore, the refractive index of the environmental dynamic disturbance is calculated using the following model: Δn_env=a(t)×ΔT+b(t)×ΔH+c(t)×ΔP, Where a(t), b(t), and c(t) are adaptive coupling coefficients that are dynamically updated through reinforcement learning algorithms, and ΔT, ΔH, and ΔP are the changes in temperature, humidity, and air pressure, respectively.

[0009] Furthermore, the method for generating the fine-tuned dataset for transfer learning includes: collecting a small amount of measured data of the target chemical substance as a base sample; generating simulated samples that conform to the physical properties of the substance through a computational fluid dynamics and optical transport co-simulation platform based on the base sample; screening substances with similar chemical structures from the source dataset, extracting their environmental-refractive index correlation features and transferring them to the simulated samples to form a fine-tuned dataset.

[0010] Furthermore, in the automatic calibration and error compensation step, the preset triggering conditions include: periodic triggering; event triggering, the events including changes in ambient temperature exceeding a threshold, changes in humidity exceeding a threshold, changes in concentration exceeding a threshold, or measurement errors exceeding a threshold; and predictive triggering, which predicts future error trends based on historical error sequences using an LSTM error prediction model, and triggers calibration if the predicted error exceeds a threshold.

[0011] Furthermore, the multi-dimensional error compensation includes sensor-level compensation, algorithm-level compensation, and system-level compensation; The sensor-level compensation performs temperature correction on the ultrasonic propagation velocity and performs dual-reference optical path subtraction on the laser sensor drift; the algorithm-level compensation collects vibration signals through a vibration sensor and uses adaptive Kalman filtering to subtract vibration errors and corrects the refractive index model by back-calculating multispectral concentration values; the system-level compensation is used to trigger redundant calibration when the confidence interval width exceeds a threshold. It constructs an error prediction model based on historical calibration data and outputs the confidence interval of the predicted value.

[0012] According to another aspect of the present invention, a liquid level stratification analysis system based on dynamic environment sensing is provided; This dynamic environment-based liquid level stratification and analysis system includes: The multi-source data synchronous acquisition module is used to simultaneously acquire multispectral optical signals, environmental parameters, laser ranging signals, and ultrasonic echo signals of the target liquid. The dynamic refractive index compensation module is used to calculate the real-time refractive index and perform optical path difference correction based on the acquired data using a dynamic refractive index compensation algorithm. The transfer learning model adaptation module is used to obtain a liquid level analysis model adapted to the target chemical substance based on the source domain basic model and the generated fine-tuned dataset through low-rank adaptation technology. The automatic calibration and error compensation module is used to initiate in-situ closed-loop self-calibration based on trigger conditions and perform multi-dimensional error compensation. The hardware system includes a multispectral optical sensor, an environmental sensor group, a dual-channel liquid level sensor, a synchronous data acquisition card, an embedded processor, an embedded controller, a human-machine interface, and a data storage unit.

[0013] Furthermore, in the hardware system: the wavelength range of the multispectral optical sensor is 200nm-3THz; the dual-channel liquid level sensor includes a laser rangefinder and an ultrasonic liquid level gauge; the synchronous data acquisition card adopts a master clock + slave device cascade synchronization method to achieve high-precision synchronous acquisition of multi-source data.

[0014] Furthermore, it also includes a standard level generator integrated next to the experimental container for generating standard stratified liquid levels during the calibration process; and a vibration sensor for acquiring mechanical vibration signals for vibration error compensation.

[0015] Furthermore, the embedded processor runs a dynamic refractive index compensation algorithm, a transfer learning fine-tuning dataset generation program, an LSTM error prediction model, and an adaptive Kalman filter algorithm; the human-computer interaction interface is used to display measurement results, model status, calibration logs, and confidence interval information, and supports remote monitoring and data export.

[0016] The beneficial effects of this invention are as follows: By integrating multi-source synchronous sensing, dynamic refractive index compensation, and adaptive machine learning models, it can perceive and compensate for measurement deviations caused by changes in environmental and medium properties in real time, thereby significantly improving measurement accuracy and stability in complex dynamic scenarios. Furthermore, by leveraging an efficient transfer learning adaptation mechanism and a predictive closed-loop self-calibration system, it significantly reduces the sample size and time required for modeling new materials and achieves continuous autonomous accuracy maintenance, ultimately improving the overall automation level, environmental adaptability, and long-term reliability of the system. Attached Figure Description

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

[0018] Figure 1 This is an overall architecture diagram of the dynamic environment-based dynamic sensing liquid level stratification analysis system according to an embodiment of the present invention; Figure 2 This is a flowchart of the dynamic refractive index compensation algorithm of the dynamic environment dynamic sensing liquid level stratification analysis method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the transfer learning model adaptation of the dynamic environment dynamic sensing liquid level stratification analysis method according to an embodiment of the present invention. Detailed Implementation

[0019] 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, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.

[0020] It should be understood that in the description of the embodiments of the present invention, the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are used only for the convenience of describing the embodiments of the present invention and for simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of the present invention, "several" means two or more, unless otherwise explicitly specified.

[0021] like Figure 2 and Figure 3 As shown in the embodiment of the present invention, the liquid level stratification analysis method based on dynamic environment sensing includes the following steps: The multi-source data synchronous acquisition step involves simultaneously acquiring multispectral optical signals, environmental parameters, laser ranging signals, and ultrasonic echo signals of the target liquid. The dynamic refractive index compensation step calculates the real-time refractive index of the target liquid based on the collected multispectral optical signals and environmental parameters, and corrects the optical path difference. The transfer learning model adaptation steps are as follows: based on the source domain basic model, a fine-tuned dataset of the target chemical substance is constructed through the transfer learning fine-tuning dataset generation method, and the basic model is fine-tuned using low-rank adaptation technology to obtain a liquid level analysis model adapted to the target chemical substance. The automatic calibration and error compensation steps initiate an in-situ closed-loop self-calibration process based on preset trigger conditions, calibrate the system based on standard liquid level values, and compensate for measurement errors in real time based on multi-dimensional error compensation technology, outputting liquid level stratification analysis results.

[0022] According to an embodiment of the present invention, the dynamic refractive index compensation step of the liquid level stratification analysis method based on dynamic environment sensing includes, in a specific embodiment, the real-time refractive index being decomposed into static intrinsic refractive index, environmental dynamic disturbance refractive index, and concentration-coupled disturbance refractive index; dynamically adjusting the coupling coefficient between environmental parameters and refractive index based on reinforcement learning; simulating the propagation path of light in the liquid using the finite-difference time-domain method to calculate the optical path difference offset caused by the refractive index change; and substituting the corrected refractive index into the liquid level measurement formulas for laser and ultrasonic waves to calculate the liquid level height and the stratification interface position.

[0023] According to the liquid level stratification analysis method based on dynamic environmental sensing according to an embodiment of the present invention, in a specific embodiment, the refractive index of the dynamic environmental disturbance is calculated by the following model: Δn_env=a(t)×ΔT+b(t)×ΔH+c(t)×ΔP, Where a(t), b(t), and c(t) are adaptive coupling coefficients that are dynamically updated through reinforcement learning algorithms, and ΔT, ΔH, and ΔP are the changes in temperature, humidity, and air pressure, respectively.

[0024] According to an embodiment of the present invention, the method for analyzing liquid level stratification based on dynamic environment sensing, in a specific embodiment, includes the following steps for generating a fine-tuned dataset through transfer learning: collecting a small amount of measured data of the target chemical substance as a base sample; generating a simulated sample that conforms to the physical properties of the substance using a computational fluid dynamics and optical transmission co-simulation platform based on the base sample; selecting substances with similar chemical structures from the source dataset, extracting their environment-refractive index correlation features, and transferring them to the simulated sample to form a fine-tuned dataset.

[0025] According to the embodiment of the present invention, in a specific embodiment of the automatic calibration and error compensation step, the preset triggering conditions include: periodic triggering; event triggering, wherein the event includes changes in ambient temperature exceeding a threshold, changes in humidity exceeding a threshold, changes in concentration exceeding a threshold, or measurement error exceeding a threshold; and predictive triggering, wherein future error trends are predicted based on historical error sequences using an LSTM error prediction model, and calibration is triggered if the predicted error exceeds a threshold.

[0026] According to the embodiment of the present invention, the liquid level stratification analysis method based on dynamic environment sensing is described in a specific embodiment, wherein the multi-dimensional error compensation includes sensor-level compensation, algorithm-level compensation and system-level compensation; The sensor-level compensation performs temperature correction on the ultrasonic propagation velocity and performs dual-reference optical path subtraction on the laser sensor drift; the algorithm-level compensation collects vibration signals through a vibration sensor and uses adaptive Kalman filtering to subtract vibration errors and corrects the refractive index model by back-calculating multispectral concentration values; the system-level compensation is used to trigger redundant calibration when the confidence interval width exceeds a threshold. It constructs an error prediction model based on historical calibration data and outputs the confidence interval of the predicted value.

[0027] Secondly, such as Figure 1 As shown, the liquid level stratification and analysis system based on dynamic environment sensing according to an embodiment of the present invention includes: The multi-source data synchronous acquisition module is used to simultaneously acquire multispectral optical signals, environmental parameters, laser ranging signals, and ultrasonic echo signals of the target liquid. The dynamic refractive index compensation module is used to calculate the real-time refractive index and perform optical path difference correction based on the acquired data using a dynamic refractive index compensation algorithm. The transfer learning model adaptation module is used to obtain a liquid level analysis model adapted to the target chemical substance based on the source domain basic model and the generated fine-tuned dataset through low-rank adaptation technology. The automatic calibration and error compensation module is used to initiate in-situ closed-loop self-calibration based on trigger conditions and perform multi-dimensional error compensation. The hardware system includes a multispectral optical sensor, an environmental sensor group, a dual-channel liquid level sensor, a synchronous data acquisition card, an embedded processor, an embedded controller, a human-machine interface, and a data storage unit.

[0028] According to an embodiment of the present invention, in a specific embodiment of the dynamic environment-based dynamic sensing liquid level stratification analysis system, the hardware system includes: a multispectral optical sensor with a wavelength range of 200nm-3THz; a dual-channel liquid level sensor including a laser rangefinder and an ultrasonic level gauge; and a synchronous data acquisition card using a master clock + slave device cascade synchronization method to achieve high-precision synchronous acquisition of multi-source data.

[0029] According to an embodiment of the present invention, the dynamic environment-based dynamic sensing liquid level stratification analysis system further includes, in a specific embodiment, a standard liquid level generating device integrated next to the experimental container and used to generate standard stratified liquid levels during the calibration process; and a vibration sensor for acquiring mechanical vibration signals for vibration error compensation.

[0030] According to an embodiment of the present invention, the dynamic environment-based dynamic sensing liquid level stratification analysis system, in a specific embodiment, includes an embedded processor running a dynamic refractive index compensation algorithm, a transfer learning fine-tuning dataset generation program, an LSTM error prediction model, and an adaptive Kalman filter algorithm; the human-machine interface is used to display measurement results, model status, calibration logs, and confidence interval information, and supports remote monitoring and data export.

[0031] To facilitate understanding of the above technical solutions of the present invention, the following detailed description of the above technical solutions of the present invention will be provided through specific usage methods.

[0032] In practical applications, the technical solution of the present invention will be described in detail, combining the hardware system architecture and software algorithm flow, based on the dynamic environment dynamic sensing liquid level stratification analysis method and system described in the present invention.

[0033] I. System Hardware Implementation The hardware system adopts a three-layer architecture, specifically composed of: Hardware Acquisition Layer: The core components of this layer include a multispectral optical sensor, an environmental sensor array, a dual-channel liquid level sensor, and a synchronous data acquisition card. The multispectral optical sensor operates in the wavelength range of 200nm-3THz to capture spectral signals and inversely calculate the refractive index. The environmental sensor array monitors temperature, humidity, and air pressure, with accuracies of ±0.01℃, ±1%RH, and ±0.1kPa, respectively. The dual-channel liquid level sensor consists of a laser rangefinder with a range of 0-5m and an accuracy of ±0.1mm, and an ultrasonic level gauge with a range of 0-3m and an accuracy of ±0.2mm, used to measure the distance to the liquid surface and the liquid level interface, respectively. The synchronous data acquisition card employs a "master clock + cascaded slave device" architecture, using a 10MHz crystal oscillator as the master clock. It sends synchronous trigger signals to each sensor via the PCIe bus, ensuring a sampling start time deviation of less than 10ns, a sampling rate of 1kHz, and a USB 3.0 interface.

[0034] Algorithm Processing Layer: The core of this layer is an embedded processor responsible for running core algorithms such as dynamic refractive index compensation and transfer learning adaptation. This layer also includes a model storage unit for storing model parameters and an error calculation module.

[0035] System control layer: This layer includes an embedded controller, a human-machine interface, and a data storage unit. In addition, the system integrates a standard liquid level generator and a vibration sensor.

[0036] The components are connected as follows: The optical sensor, environmental sensor group, and laser / ultrasonic level gauge are mounted on top of the experimental container and connected to the embedded processor via a synchronous data acquisition card. The embedded controller connects to the standard level generator and actuator. The human-machine interface communicates with the processor via a USB interface.

[0037] II. Implementation of Methods and Procedures 1. Synchronous acquisition and preprocessing of multi-source data After system startup, the following multi-dimensional data are collected simultaneously: optical data, environmental data, liquid level data, and substance concentration inferred from spectral data. Preprocessing is performed after data collection. (1) Data cleaning: Use the 3σ criterion to remove outliers, such as jump values ​​in laser ranging data.

[0038] (2) Time synchronization: Based on the 1ns resolution timestamp of the data acquisition card, the "sliding window matching" algorithm is used in the embedded processor to align data with different sampling rates to the same time axis, and the synchronization error is controlled within 1ms.

[0039] (3) Feature extraction: Extract the characteristic wavelengths of absorption peaks of specific substances from multispectral signals as input for subsequent refractive index deduction.

[0040] 2. Dynamic refractive index compensation First, dynamic modeling of the refractive index is performed using multiple coupled factors. The real-time refractive index n is decomposed into the static intrinsic refractive index n0, the environmental dynamic perturbation refractive index Δn_env, and the concentration-coupled perturbation refractive index Δn_con, i.e., n = n0 + Δn_env + Δn_con.

[0041] n0 is obtained by querying a pre-built chemical substance-refractive index database, which contains the 25°C standard refractive index of more than 500 common chemical substances.

[0042] Δn_env is calculated using the model: Δn_env = a(t) × ΔT + b(t) × ΔH + c(t) × ΔP. The coupling coefficients a(t), b(t), and c(t) are dynamically optimized using a Q-learning algorithm, with "minimizing calibration error" as the reward function. The algorithm updates every 100ms, and this can be improved to 10ms in extreme environments. The adaptive value range for a(t) is 0.0002-0.0005 / ℃, for b(t) it is 0.00001-0.00003 / %RH, and for c(t) it is 0.000005-0.00001 / kPa.

[0043] Δn_con is derived from multispectral features by extracting the spectral intensity I of the concentration-sensitive band (e.g., the characteristic absorption peak of ethanol at 1.3 μm) and calculating it according to the model Δn_con=k×(I0-I) / I0, where k is the substance-specific coefficient and I0 is the reference light intensity.

[0044] Secondly, optical path difference correction is performed. The finite-difference time-domain method is used to simulate the propagation of light in media with different refractive indices. Combined with the incident angle and optical path length L of the laser rangefinder, the optical path difference offset ΔL=(n-n_ref)×L is calculated, where n_ref is the reference refractive index.

[0045] Finally, liquid level data fusion is performed. The corrected refractive index is substituted into the measurement formulas for laser and ultrasound, and the liquid level height h_laser and the layer interface position h_ultrasonic are recalculated and fused according to the following formula: h_fused=α×h_laser+(1-α)×h_ultrasonic, where the weighting coefficient α is determined through experimental calibration and has a value range of 0.6-0.8.

[0046] 3. Transfer learning model adaptation (1) Construction of basic model in source domain: Using 20 common chemical substances such as water, ethanol, acetone, and sulfuric acid as source datasets, each set contains more than 1,000 samples. The sample dimensions include: refractive index, temperature, humidity, air pressure, concentration, true liquid level, spectral features, etc. A basic convolutional neural network model is trained, and its measurement error on the source dataset is less than 0.3%.

[0047] (2) Fine-tuning dataset generation: targeting specific chemical substances: Basic sample anchoring: Manually collect 10-50 sets of measured data for the target substance.

[0048] Enhanced physical constraints: Input the basic samples into a coupled simulation platform based on the Navier-Stokes equations and Maxwell equations to simulate liquid dynamics and light propagation, generating 1000-2000 simulated samples that conform to physical properties.

[0049] Cross-material feature transfer: Select substances with similar chemical structures from the source dataset, extract their environment-refractive index correlation features, and transfer them to the simulated data of the target substance to form the final fine-tuned dataset.

[0050] (3) LoRA fine-tuning optimization: The basic model is fine-tuned using low-rank adaptation technology, adjusting only the low-rank matrix parameters of the top fully connected layer. The Adam optimizer is used with a learning rate of 1e-4, and the model is trained for 50-100 rounds to bring the error of the model on the target material to within 0.2%.

[0051] 4. Automatic calibration and error compensation The system integrates a predictive in-situ closed-loop self-calibration mechanism.

[0052] Triggering conditions: (1) Periodic triggering.

[0053] (2) Event triggering: ambient temperature change > 2℃, humidity change > 10%RH, concentration change > 5%, or measurement error exceeds the threshold.

[0054] (3) Predictive triggering: Based on the historical error sequence, the error trend of the next hour is predicted by the Long Short-Term Memory Network error prediction model. If the prediction error exceeds the threshold, it will be triggered in advance.

[0055] Closed-loop execution: Upon triggering, the embedded controller instructs the standard liquid level generator to generate three standard liquid levels: low, medium, and high. The system collects and compares the measured values ​​with the standard values, calculates the calibration coefficient k = standard value / measured value, and updates it to the error compensation module in real time. After calibration, a retest is performed immediately; if the error is ≤0.1%, the calibration is complete.

[0056] Multi-dimensional error compensation: (1) Sensor-level compensation: The ultrasonic velocity is corrected according to the temperature (v=331.4×√(1+T / 273.15)); the laser sensor drift is deducted from the influence of air refractive index through dual reference optical paths.

[0057] (2) Algorithm-level compensation: Vibration error is collected by vibration sensor and subtracted by adaptive Kalman filter; concentration fluctuation error is corrected in real time by multispectral concentration back-inference value to correct the refractive index model.

[0058] (3) System-level compensation: An LSTM error prediction model is constructed based on historical calibration data, and a Monte Carlo Dropout layer is embedded to output the 95% confidence interval of the predicted value. When the confidence interval width exceeds the threshold, redundant calibration is automatically triggered.

[0059] In summary, by utilizing the technical solutions described above in this invention, and by integrating multi-source synchronous sensing, dynamic refractive index compensation, and adaptive machine learning models, measurement deviations caused by changes in environmental and medium properties can be perceived and compensated in real time, thereby significantly improving measurement accuracy and stability in complex dynamic scenarios. Furthermore, by leveraging an efficient transfer learning adaptation mechanism and a predictive closed-loop self-calibration system, the sample size and time required for modeling new materials are greatly reduced, and continuous autonomous accuracy maintenance is achieved, ultimately enhancing the overall automation level, environmental adaptability, and long-term reliability of the system.

[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for analyzing liquid level stratification based on dynamic environment sensing, characterized in that, Includes the following steps: The multi-source data synchronous acquisition step involves simultaneously acquiring multispectral optical signals, environmental parameters, laser ranging signals, and ultrasonic echo signals of the target liquid. The dynamic refractive index compensation step calculates the real-time refractive index of the target liquid based on the collected multispectral optical signals and environmental parameters, and corrects the optical path difference. The transfer learning model adaptation steps are as follows: based on the source domain basic model, a fine-tuned dataset of the target chemical substance is constructed through the transfer learning fine-tuning dataset generation method, and the basic model is fine-tuned using low-rank adaptation technology to obtain a liquid level analysis model adapted to the target chemical substance. The automatic calibration and error compensation steps initiate an in-situ closed-loop self-calibration process based on preset trigger conditions, calibrate the system based on standard liquid level values, and compensate for measurement errors in real time based on multi-dimensional error compensation technology, outputting liquid level stratification analysis results.

2. The method for analyzing liquid level stratification based on dynamic environment sensing according to claim 1, characterized in that, The dynamic refractive index compensation step includes: decomposing the real-time refractive index into static intrinsic refractive index, environmental dynamic perturbation refractive index, and concentration-coupled perturbation refractive index; dynamically adjusting the coupling coefficient between environmental parameters and refractive index based on reinforcement learning; simulating the propagation path of light in the liquid using the finite-difference time-domain method to calculate the optical path difference offset caused by the refractive index change; and substituting the corrected refractive index into the liquid level measurement formulas for laser and ultrasonic waves to calculate the liquid level height and the position of the layer interface.

3. The method for analyzing liquid level stratification based on dynamic environment sensing according to claim 2, characterized in that, The refractive index of the dynamic environmental disturbance is calculated using the following model: Δn_env=a(t)×ΔT+b(t)×ΔH+c(t)×ΔP, Where a(t), b(t), and c(t) are adaptive coupling coefficients that are dynamically updated through reinforcement learning algorithms, and ΔT, ΔH, and ΔP are the changes in temperature, humidity, and air pressure, respectively.

4. The method for analyzing liquid level stratification based on dynamic environment sensing according to claim 1, characterized in that, The method for generating the fine-tuned dataset for transfer learning includes: collecting a small amount of measured data of the target chemical substance as a base sample; generating simulated samples that conform to the physical properties of the substance through a computational fluid dynamics and optical transmission co-simulation platform based on the base sample; screening substances with similar chemical structures from the source dataset, extracting their environmental-refractive index correlation features and transferring them to the simulated samples to form a fine-tuned dataset.

5. The method for analyzing liquid level stratification based on dynamic environment sensing according to claim 1, characterized in that, In the automatic calibration and error compensation steps, the preset triggering conditions include: periodic triggering; event triggering, where the event includes changes in ambient temperature exceeding a threshold, changes in humidity exceeding a threshold, changes in concentration exceeding a threshold, or measurement error exceeding a threshold; and predictive triggering, where future error trends are predicted based on historical error sequences using an LSTM error prediction model, and calibration is triggered if the predicted error exceeds a threshold.

6. The method for analyzing liquid level stratification based on dynamic environment sensing according to claim 1, characterized in that, The multi-dimensional error compensation includes sensor-level compensation, algorithm-level compensation, and system-level compensation. The sensor-level compensation performs temperature correction on the ultrasonic propagation velocity and performs dual-reference optical path subtraction on the laser sensor drift; the algorithm-level compensation collects vibration signals through a vibration sensor and uses adaptive Kalman filtering to subtract vibration errors and corrects the refractive index model by back-calculating multispectral concentration values; the system-level compensation is used to trigger redundant calibration when the confidence interval width exceeds a threshold. It constructs an error prediction model based on historical calibration data and outputs the confidence interval of the predicted value.

7. A liquid level stratification analysis system based on dynamic sensing, characterized in that, include: The multi-source data synchronous acquisition module is used to simultaneously acquire multispectral optical signals, environmental parameters, laser ranging signals, and ultrasonic echo signals of the target liquid. The dynamic refractive index compensation module is used to calculate the real-time refractive index and perform optical path difference correction based on the acquired data using a dynamic refractive index compensation algorithm. The transfer learning model adaptation module is used to obtain a liquid level analysis model adapted to the target chemical substance based on the source domain basic model and the generated fine-tuned dataset through low-rank adaptation technology. The automatic calibration and error compensation module is used to initiate in-situ closed-loop self-calibration based on trigger conditions and perform multi-dimensional error compensation. The hardware system includes a multispectral optical sensor, an environmental sensor group, a dual-channel liquid level sensor, a synchronous data acquisition card, an embedded processor, an embedded controller, a human-machine interface, and a data storage unit.

8. The liquid level stratification analysis system based on dynamic sensing according to claim 7, characterized in that, In the hardware system: the wavelength range of the multispectral optical sensor is 200nm-3THz; the dual-channel liquid level sensor includes a laser rangefinder and an ultrasonic liquid level gauge; the synchronous data acquisition card adopts a master clock + slave device cascade synchronization method to achieve high-precision synchronous acquisition of multi-source data.

9. The liquid level stratification analysis system based on dynamic sensing according to claim 7, characterized in that, It also includes a standard level generator integrated next to the experimental container for generating standard stratified liquid levels during the calibration process; and a vibration sensor for acquiring mechanical vibration signals for vibration error compensation.

10. The liquid level stratification analysis system based on dynamic sensing according to claim 7, characterized in that, The embedded processor runs a dynamic refractive index compensation algorithm, a transfer learning fine-tuning dataset generation program, an LSTM error prediction model, and an adaptive Kalman filter algorithm; the human-computer interaction interface is used to display measurement results, model status, calibration logs, and confidence interval information, and supports remote monitoring and data export.