CN117554302B - Liquid detection method, device, equipment and storage medium - Google Patents

Liquid detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN117554302B
CN117554302B CN202410030532.3A CN202410030532A CN117554302B CN 117554302 B CN117554302 B CN 117554302B CN 202410030532 A CN202410030532 A CN 202410030532A CN 117554302 B CN117554302 B CN 117554302B
Authority
CN
China
Prior art keywords
reaction
detection
reactant
sample
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410030532.3A
Other languages
Chinese (zh)
Other versions
CN117554302A (en
Inventor
陈越云
陈曦
林鹤全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanmu Shenzhen Biotechnology Co ltd
Original Assignee
Shanmu Shenzhen Biotechnology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanmu Shenzhen Biotechnology Co ltd filed Critical Shanmu Shenzhen Biotechnology Co ltd
Priority to CN202410030532.3A priority Critical patent/CN117554302B/en
Publication of CN117554302A publication Critical patent/CN117554302A/en
Application granted granted Critical
Publication of CN117554302B publication Critical patent/CN117554302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a liquid detection method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a sample to be detected and detection matters of the sample to be detected, and determining a detection reagent corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise detection proportion and reaction conditions; adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding detection proportion capacities into the liquid path equipment according to reaction conditions, and collecting reaction data in the liquid path equipment through a sensor; and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and reaction data until the reaction of the sample to be detected and the detection reagent is completed. The method adopts a multi-sensor technology, and can collect more comprehensive detection data, thereby improving the accuracy of detection results. Meanwhile, through a preset closed-loop control algorithm and sensor data, the accurate control of the reaction conditions can be realized, and the influence of environmental factors is reduced.

Description

Liquid detection method, device, equipment and storage medium
Technical Field
The present invention relates to the field of liquid detection, and in particular, to a liquid detection method, apparatus, device, and storage medium.
Background
Liquid detection is an important analysis method and is widely applied to the fields of chemistry, biology, environment and the like. The traditional liquid detection method generally needs manual operation, and is easy to cause misoperation and errors, so that the detection result is inaccurate. With the development of science and technology, people gradually realize the automation and informatization of a liquid detection method so as to improve the detection efficiency and accuracy.
In this context, some scholars and engineers have begun to study how to introduce automated techniques into liquid detection methods. For example, the automation and the intellectualization of the liquid detection are realized by computer programming and sensor collection of reaction data. However, the existing automatic liquid detection method still has some problems, such as difficult control of reaction conditions, easy influence of environmental factors on the detection process, and the like.
Disclosure of Invention
The invention mainly aims to solve the technical problems that the existing reaction conditions are not easy to control and the detection process is easily influenced by environmental factors.
A first aspect of the present invention provides a liquid detection method applied to a liquid detection system including a liquid path apparatus, and a sensor, a pump, and a valve installed in the liquid path apparatus, the liquid detection method including:
Acquiring a sample to be detected and detection matters of the sample to be detected, and determining a detection reagent corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise a detection proportion and reaction conditions;
adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor;
and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed.
Optionally, in a first implementation manner of the first aspect of the present invention, the dynamically adjusting the pump and the valve in the liquid path device according to a preset closed-loop control algorithm and the reaction data until the reaction between the sample to be detected and the detection reagent is completed includes:
determining a real-time set value of the reaction data according to a preset closed-loop control algorithm, and calculating control signals of the pump and the valve in real time according to the real-time set value and the reaction data;
And dynamically controlling the pump and the valve in real time according to the control signal until the reaction of the sample to be detected and the detection reagent is completed.
Optionally, in a second implementation manner of the first aspect of the present invention, the determining, according to a preset closed-loop control algorithm, a real-time set value of the reaction data, and calculating, in real time, control signals of the pump and the valve according to the real-time set value and the reaction data includes:
determining a real-time set value of the reaction data according to a preset closed-loop control algorithm, and determining a reaction deviation between the real-time set value and the reaction data;
obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a reaction correction value of the reaction of the sample to be detected and the detection reagent according to the reaction time and the reaction deviation value;
and determining control signals of the pump and the valve according to the reaction correction value.
Optionally, in a third implementation manner of the first aspect of the present invention, the reaction correction value includes a proportional deviation value, an integral deviation value, and a differential deviation value;
the step of obtaining the reaction time of the sample to be detected and the detection reagent, and calculating the reaction correction value of the reaction of the sample to be detected and the detection reagent according to the reaction time and the reaction deviation value comprises the following steps:
Obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a proportional deviation value according to the reaction deviation value and a preset proportional gain factor;
accumulating the reaction deviation according to the reaction time of the sample to be detected and the detection reagent to obtain an integral correction value;
and calculating the change rate of the reaction deviation, and calculating a differential correction value according to the change rate and a preset differential gain factor.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the sensor further includes a spectrum sensor;
and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed, and further comprising:
when the reaction of the sample to be detected and the detection reagent is completed, acquiring spectral parameters of all reaction substances in a mixed reactant through the spectral sensor, wherein the mixed reactant is a plurality of reaction substances obtained after the reaction of the sample to be detected and the detection reagent is completed;
determining a concentration detection model corresponding to the mixed reactant according to the sample to be detected and the detection reagent;
and inputting spectral parameters of each reactant in the to-be-detected sample and the detection reagent when the reaction is completed into the concentration detection model, and calculating the reactant concentrations of various reactant in the mixed reactant according to the spectral parameters through the concentration detection model.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the concentration detection model includes detection sub-models corresponding to each reaction substance, and each detection sub-model is composed of a convolutional neural network and a two-way long-short-term memory network;
the step of inputting the spectral parameters of each reactant into a preset concentration detection model when the reaction of the sample to be detected and the detection reagent is completed, and calculating the reactant concentrations of a plurality of reactant in the mixed reactant according to the spectral parameters through the concentration detection model comprises the following steps:
inputting the spectral parameters of each reaction substance into each detection sub-model corresponding to the concentration detection model when the reaction of the sample to be detected and the detection reagent is completed, and acquiring local spatial information of the spectral parameters of the corresponding reaction substance through a convolution neural network in the corresponding detection sub-model;
inputting the local space information into a two-way long-short-term memory network of the detection sub-model, and extracting time sequence information of corresponding spectrum parameters through the two-way long-term memory network;
and inputting the time series information of each spectral parameter into an output layer of the concentration detection model, and mapping the time series information of each spectral parameter onto the corresponding concentration of the reactant through the output layer to obtain the reactant concentration of each reactant.
Optionally, in a sixth implementation manner of the first aspect of the present invention, before the dynamically adjusting the pump and the valve in the liquid path device according to the preset closed-loop control algorithm and the reaction data until the reaction between the sample to be detected and the detection reagent is completed, the method further includes:
acquiring training data of the mixed reactant, wherein the mixed reactant comprises a first reactant and a second reactant, and the training data comprises historical spectral parameters of the first reactant and the second reactant at each actual reactant concentration;
initializing a first and a second characteristic representation of the first and second reactive species;
respectively inputting each training data and a corresponding first characteristic representation and/or second characteristic representation into an initial sub-model of a corresponding reaction substance, and detecting the concentration of the input training data and the first characteristic representation and/or second characteristic representation through the initial sub-model to respectively obtain the current detection concentration corresponding to the first reaction substance and the second reaction substance;
respectively calculating preset loss functions according to the current detection concentration and the actual reaction concentration of the first reactant and the second reactant to respectively obtain loss function values of the first reactant and the second reactant;
Judging whether the loss function value of the first reactant and/or the second reactant is greater than a preset loss threshold value;
if the loss function value of the first reaction substance is greater than a preset loss threshold value, taking the current detection concentration of the second reaction substance as a first characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the first reaction substance is not greater than the preset loss threshold value;
if the loss function value of the second reaction substance is larger than a preset loss threshold value, taking the current detection concentration of the first reaction substance as a second characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the second reaction substance is not larger than the preset loss threshold value;
when the loss function value of the first reactant and/or the second reactant is not greater than a preset loss threshold value, taking the corresponding initial sub-model as a detection sub-model;
And forming a concentration detection model of the mixed reactant according to the detection submodel of the first reactant and the second reactant.
A second aspect of the present invention provides a liquid detection apparatus applied to a liquid detection system including a liquid path device, and a sensor, a pump, and a valve installed in the liquid path device; the liquid detection device includes:
the detection device comprises an acquisition module, a detection module and a detection module, wherein the acquisition module is used for acquiring a sample to be detected and detection matters of the sample to be detected, and determining detection reagents corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise detection proportion and reaction conditions;
the mixing reaction module is used for adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor;
and the dynamic adjustment module is used for dynamically adjusting the pump and the valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed.
A third aspect of the present invention provides a liquid detection apparatus comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the liquid detection apparatus to perform the steps of the liquid detection method described above.
A fourth aspect of the present invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the steps of the liquid detection method described above.
The liquid detection method is applied to a liquid detection system, the liquid detection system comprises liquid path equipment, and a sensor, a pump and a valve which are arranged in the liquid path equipment, a sample to be detected and detection matters of the sample to be detected are obtained, and detection reagents corresponding to the sample to be detected are determined according to the detection matters, wherein the detection matters comprise detection proportion and reaction conditions; adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor; and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed. The method can collect more comprehensive detection data by adopting a multi-sensor technology, thereby improving the accuracy of detection results. Meanwhile, through a preset closed-loop control algorithm and sensor data, the accurate control of the reaction conditions can be realized, and the influence of environmental factors is reduced.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
FIG. 1 is a schematic diagram of a first embodiment of a liquid detection method according to an embodiment of the present invention;
FIG. 2 is a schematic view of an embodiment of a liquid detection device according to an embodiment of the present invention;
FIG. 3 is a schematic view of another embodiment of a liquid detection device according to an embodiment of the present invention;
fig. 4 is a schematic view of an embodiment of a liquid detection apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "comprising" and "having" and any variations thereof, as used in the embodiments of the present invention, are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or apparatus.
For the convenience of understanding the present embodiment, a liquid detection method disclosed in the embodiment of the present invention will be described in detail first. As shown in fig. 1, the liquid detection is applied to a liquid detection system, the liquid detection system comprises a liquid path device, and a sensor, a pump and a valve which are installed in the liquid path device, and the method comprises the following steps:
101. acquiring a sample to be detected and detection matters of the sample to be detected, and determining a detection reagent corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise detection proportion and reaction conditions;
in one embodiment of the invention, the sample to be tested first needs to be obtained before any chemical or biological tests can be performed. These samples may be a variety of different substances including chemicals, biomolecules, food, environmental samples, and the like. The choice of sample to be tested will generally depend on the particular purpose of the study or assay. The collecting and preparing stages of the sample are very critical, because they will directly affect the subsequent detection process, for example, when urine is detected, urine input into the liquid path device can be directly used as a sample to be detected, so that environmental pollution is avoided. Based on the sample to be detected, a user can select corresponding detection matters, such as routine urine detection and poison screening in urine detection, the detection proportion and detection conditions required by different detection matters are different, and once the detection proportion and reaction conditions of the sample to be detected are known, a proper detection reagent can be selected. The detection reagent is a substance that reacts with the sample to be detected during the detection process. Such reagents may include indicators, substrates, antibodies, enzymes, etc., and the particular choice will depend on the nature of the sample to be tested and the desired method of detection. In selecting a detection reagent, its interaction with the sample to be detected needs to be considered, as well as its specificity and sensitivity for the desired detection result. The quality and purity of the detection reagent is also an important factor in ensuring accurate detection. The reaction conditions include temperature, pressure, pH value, reaction time and other factors. These conditions are critical to the performance of a chemical or biological reaction. Different reaction conditions can affect the speed and specificity of the reaction. The selection of appropriate reaction conditions is a key factor in ensuring the accuracy of the detection results.
102. Adjusting a pump and a valve in the liquid path equipment, inputting a to-be-detected sample and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and implementing the reaction data in the liquid path equipment through a sensor;
in one embodiment of the invention, the adjustment range of the pump and valve can be determined based on the detection event and the reaction conditions. For example, if high accuracy of flow and pressure measurements are required, then high accuracy pumps and valves need to be selected; if a fast response is detected, a fast response pump and valve are selected. Depending on the determined adjustment range, suitable pumps and valves are selected. For example, if proper pumps and valves are selected to ensure high accuracy of flow and pressure, then high accuracy pumps and valves may be selected; if a suitable pump and valve are selected to be able to respond quickly, a quick response pump and valve may be selected. The pump and valve are adjusted according to their adjustment ranges. For example, the flow rate and pressure of the pump may be adjusted using a method of adjusting the opening degree of the valve, or the flow rate and pressure of the valve may be adjusted using a method of adjusting the pressure of the pump.
103. And dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and reaction data until the reaction of the sample to be detected and the detection reagent is completed.
In one embodiment of the present invention, the dynamically adjusting the pump and the valve in the liquid path device according to a preset closed-loop control algorithm and the reaction data until the reaction between the sample to be tested and the detection reagent is completed comprises: determining a real-time set value of the reaction data according to a preset closed-loop control algorithm, and calculating control signals of the pump and the valve in real time according to the real-time set value and the reaction data; and dynamically controlling the pump and the valve in real time according to the control signal until the reaction of the sample to be detected and the detection reagent is completed.
Specifically, according to a preset closed-loop control algorithm, a real-time set value of the reaction data can be determined. This algorithm is based on a deep understanding of the system performance and target results, as well as observations and measurements of the reaction process. The real-time setting value is calculated according to the current reaction data, and reflects the optimal state of the current reaction environment so that the expected reaction result can be realized. Once the real-time set point is available, the pump and valve control signals can be calculated in real time based on this set point and the response data. These signals can directly affect the operation of pumps and valves, thereby affecting the reaction environment and further affecting the reaction data. The goal of (2) is to have the pump and valves work in an optimal manner to achieve the desired reaction results. The pumps and valves are then dynamically controlled in real time based on these control signals. The operation of the pump and the valve and the change of response data can be closely focused, so that the control signal can be adjusted in time, and the pump and the valve can be ensured to work in the optimal state all the time. It is possible that the control signal may be adjusted according to the change of the reaction data or that the control signal may be adjusted immediately when the reaction environment is considered to need to be changed.
Specifically, in the present embodiment, the reinforcement learning algorithm may be used to design an optimal control algorithm in a closed-loop control algorithm, such as a Deep Q Network (DQN), by requiring a state space in a liquid detection system to be defined. The state space may include various parameters during liquid mixing and reaction, such as flow, temperature, pressure, and concentration of reaction products, etc., which in turn require defining the space of action of pumps and valves in the liquid path apparatus. The action space represents an action that can be taken, such as adjusting the flow rate of the pump or changing the degree of opening and closing of the valve. These actions will be the output of the DQN. An appropriate reward function is defined for evaluating the system state and action combination for each time step. The reward function is typically designed based on the performance metrics and objectives of the liquid detection system, such as stability of reaction product concentration, uniformity of mixing, and reaction rate. From the defined state space and action space, a deep neural network is constructed as an approximation function of the DQN. The network takes as input the received status and outputs a Q value estimate for each possible action. During the training of the algorithm, an empirical playback mechanism is used to store and randomly sample the data of the previous state, action, reward, and next state. Thus, the training samples can be more independent, and the training stability is improved. Training for reinforcement learning is performed using the DQN algorithm. By constantly and iteratively interacting with the environment, an optimal action is selected according to the current state, and parameters of the DQN network are updated by the reward signal so that it gradually learns the optimal control strategy. After training, the optimal DQN network obtained by training can be used for selecting optimal actions according to the current state, so that dynamic adjustment of the pump and the valve in the liquid detection system is realized, and the mixing and reaction process of the sample to be detected and the detection reagent is completed.
Further, the determining the real-time set value of the reaction data according to the preset closed-loop control algorithm, and calculating the control signals of the pump and the valve in real time according to the real-time set value and the reaction data includes: determining a real-time set value of the reaction data according to a preset closed-loop control algorithm, and determining a reaction deviation between the real-time set value and the reaction data; obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a reaction correction value of the reaction of the sample to be detected and the detection reagent according to the reaction time and the reaction deviation value; and determining control signals of the pump and the valve according to the reaction correction value.
Specifically, according to a preset closed-loop control algorithm, a real-time set value of the reaction data can be determined. This set point is calculated from a series of preset conditions and target values, which are adjusted in real time as the reaction proceeds. Once the real-time setpoint is determined, attention to changes in the reaction data may be initiated and progress of the reaction may be assessed by comparing the deviation between the actual data and the setpoint. Once the reaction data of the sample to be tested and the detection reagent can be obtained, the efficiency of the reaction can be estimated from the reaction deviation between these data and the real-time set point. In addition, it is also necessary to obtain the reaction time of the sample to be tested and the detection reagent. This time can be obtained by observing the reaction process or by measurement. With this time, the reaction correction value can be calculated from the reaction time and the reaction deviation value. This correction reflects the change in reaction efficiency and helps to better understand the reaction process and predict future reaction results. Finally, the control signals for the pump and the valves can be determined from this reaction correction value. The closed loop control algorithm will adjust the opening or speed of the pump and valve based on this correction value to make the reaction process more efficient and accurate. The control mode can ensure that the reaction process is always carried out in an optimal state, thereby improving the accuracy and the reliability of detection.
Further, the reaction correction value comprises a proportional deviation value, an integral deviation value and a differential deviation value; the step of obtaining the reaction time of the sample to be detected and the detection reagent, and calculating the reaction correction value of the reaction of the sample to be detected and the detection reagent according to the reaction time and the reaction deviation value comprises the following steps: obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a proportional deviation value according to the reaction deviation value and a preset proportional gain factor; accumulating the reaction deviation according to the reaction time of the sample to be detected and the detection reagent to obtain an integral correction value; and calculating the change rate of the reaction deviation, and calculating a differential correction value according to the change rate and a preset differential gain factor.
Specifically, a proportional-integral-derivative (PID) control algorithm may be used as the closed-loop control algorithm by calculating correction values of three control modes including proportional control, integral control, and derivative control, corresponding to the proportional deviation value, the integral deviation value, and the derivative deviation value, respectively, wherein the proportional control is adjusted according to the difference between the reaction data and the set value. Specifically, a reaction deviation is calculated according to reaction data acquired in real time, and then the deviation is multiplied by a preset proportional gain factor to obtain a proportional correction value, namely a control signal. The integral control is used to eliminate the persistent static error. It accumulates the reaction bias and multiplies the accumulated error by a preset integral gain factor to obtain an integral correction value, which changes with the increase of time. Differential control is used to predict reaction trends and suppress overshoot. The method obtains a differential correction value by calculating the change rate of the reaction deviation and multiplying the change rate by a preset differential gain factor. In summary, the PID control algorithm can calculate the control signal by:
Control signal=proportional correction value+integral correction value+differential correction value
In practical applications, it is desirable to adjust the proportional, integral and derivative gain factors to balance the sensitivity, stability and tamper resistance of the system response. The pump and the valve in the liquid path equipment can be dynamically adjusted according to the reaction state by calculating the reaction data in real time and applying a PID control algorithm, and the mixing and reaction process is iteratively optimized, so that the complete reaction of the sample to be detected and the detection reagent is finally realized.
Further, the sensor further comprises a spectrum sensor; and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed, and further comprising: when the reaction of the sample to be detected and the detection reagent is completed, acquiring spectral parameters of all reaction substances in a mixed reactant through the spectral sensor, wherein the mixed reactant is a plurality of reaction substances obtained after the reaction of the sample to be detected and the detection reagent is completed; determining a concentration detection model corresponding to the mixed reactant according to the sample to be detected and the detection reagent; and inputting spectral parameters of each reactant in the to-be-detected sample and the detection reagent when the reaction is completed into the concentration detection model, and calculating the reactant concentrations of various reactant in the mixed reactant according to the spectral parameters through the concentration detection model.
Specifically, in the liquid detection system, when the reaction between the sample to be detected and the detection reagent is completed, a plurality of mixed reactants of the reaction substances are formed in the liquid mixture. At this time, the spectral parameters of the respective reaction substances in the mixed reactants can be acquired by the spectral sensor. These spectral parameters include absorption spectra, fluorescence spectra, etc., which can reflect the characteristics of the different reactants in the mixed reactants. Based on the spectral parameters, the reactant concentrations of various reactant substances in the mixed reactant can be determined, so that the detection of the sample to be detected is realized.
Specifically, a concentration detection model corresponding to the mixed reactant needs to be determined according to specific conditions of the sample to be detected and the detection reagent. The concentration detection model can be a linear regression model, a support vector machine model, a neural network model and other models of various types. In the specific implementation, an appropriate concentration detection model may be selected in consideration of accuracy, complexity, computational efficiency, and the like. After the concentration detection model is obtained, the spectral parameters of each reactant in the mixed reactant can be acquired by using the spectral sensor and input into the concentration detection model for calculation. Specifically, the concentration of the reactant of each reactant may be calculated by a concentration detection model, with the spectral parameter as an input. Based on the reaction data and the spectral parameters, the reactant concentrations of the various reactant species in the mixed reactant can be obtained.
Further, the concentration detection model comprises detection sub-models corresponding to all the reaction substances, and each detection sub-model is composed of a convolutional neural network and a two-way long-short-term memory network; the step of inputting the spectral parameters of each reactant into a preset concentration detection model when the reaction of the sample to be detected and the detection reagent is completed, and calculating the reactant concentrations of a plurality of reactant in the mixed reactant according to the spectral parameters through the concentration detection model comprises the following steps: inputting the spectral parameters of each reaction substance into each detection sub-model corresponding to the concentration detection model when the reaction of the sample to be detected and the detection reagent is completed, and acquiring local spatial information of the spectral parameters of the corresponding reaction substance through a convolution neural network in the corresponding detection sub-model; inputting the local space information into a two-way long-short-term memory network of the detection sub-model, and extracting time sequence information of corresponding spectrum parameters through the two-way long-term memory network; and inputting the time series information of each spectral parameter into an output layer of the concentration detection model, and mapping the time series information of each spectral parameter onto the corresponding concentration of the reactant through the output layer to obtain the reactant concentration of each reactant.
Specifically, each detection sub-model is composed of a convolutional neural network and a two-way long-short-term memory network, and the detection sub-model is further provided with three parts of a full-connection output module. Firstly, the preprocessed data is input into a convolutional neural network, and data extraction is carried out by utilizing a plurality of convolutional layers and pooling layers. The one-dimensional convolution layer extracts valuable features in spectral parameters through a sliding window calculation mode, the pooling layer reduces the dimension of the extracted features through a maximum pooling mode, and the data are tiled and flattened through the flat layer. After the CNN module finishes processing, taking the output information of the CNN module as the input of the BiLSTM layer, and correspondingly optimizing the batch_size, the number and the structure of the neural network layer according to the output result of the verification set. Meanwhile, in order to avoid overfitting of the model and enhance generalization capability of the model, a Dropout layer is added, a part of neuron information is randomly discarded, and finally, a prediction result is output through a fully-connected neural network module.
Specifically, each detection sub-model may be formed by a convolutional neural network and a two-way long-short term memory network, and a combination algorithm including, but not limited to, a machine learning model such as PLS (Partial least squares regression, partial least squares regression analysis), a linear regression model and various variants thereof such as Lasso, ridge, etc., a multi-layer perceptron/artificial neural network, and algorithms other than PLS above in combination with various dimension reduction algorithms such as PCA may be used to form the detection sub-model.
Further, before the pump and the valve in the liquid path device are dynamically adjusted according to a preset closed-loop control algorithm and the reaction data until the reaction between the sample to be detected and the detection reagent is completed, the method further comprises: acquiring training data of the mixed reactant, wherein the mixed reactant comprises a first reactant and a second reactant, and the training data comprises historical spectral parameters of the first reactant and the second reactant at each actual reactant concentration; initializing a first and a second characteristic representation of the first and second reactive species; respectively inputting each training data and a corresponding first characteristic representation and/or second characteristic representation into an initial sub-model of a corresponding reaction substance, and detecting the concentration of the input training data and the first characteristic representation and/or second characteristic representation through the initial sub-model to respectively obtain the current detection concentration corresponding to the first reaction substance and the second reaction substance; respectively calculating preset loss functions according to the current detection concentration and the actual reaction concentration of the first reactant and the second reactant to respectively obtain loss function values of the first reactant and the second reactant; judging whether the loss function value of the first reactant and/or the second reactant is greater than a preset loss threshold value; if the loss function value of the first reaction substance is greater than a preset loss threshold value, taking the current detection concentration of the second reaction substance as a first characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the first reaction substance is not greater than the preset loss threshold value; if the loss function value of the second reaction substance is larger than a preset loss threshold value, taking the current detection concentration of the first reaction substance as a second characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the second reaction substance is not larger than the preset loss threshold value; when the loss function value of the first reactant and/or the second reactant is not greater than a preset loss threshold value, taking the corresponding initial sub-model as a detection sub-model; and forming a concentration detection model of the mixed reactant according to the detection submodel of the first reactant and the second reactant.
Specifically, certain chemical reactions occurring between the various reactant species in the mixed reactants may have an impact on the stability of the model. Meanwhile, in order to improve the accuracy of model prediction, a link relation is established in the training process of different initial sub-models, so that a single-output regression model is converted into a multi-output regression model, and the influence caused by possible reactions of mixed dye liquor is reduced from a mathematical iteration angle. When the first iteration predicts the concentration of the first reactant in the mixed reactant, the rest reactant is regarded as a second reactant, the current reactant concentration predicted by the initial submodel of the second reactant is used as a new characteristic and added into the initial submodel of the first reactant for training prediction, the iterative operation is performed similarly corresponding to the second reactant, the iterative operation is performed similarly, each iteration after the iterative operation uses the iterative output of the rest reactant of the previous iteration as the characteristic of the new iteration, and all detection submodels finally obtained by training are used as the concentration detection model of the corresponding mixed reactant.
In this embodiment, a sample to be detected and detection matters of the sample to be detected are obtained, and a detection reagent corresponding to the sample to be detected is determined according to the detection matters, wherein the detection matters comprise a detection proportion and reaction conditions; adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor; and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed. The method can collect more comprehensive detection data by adopting a multi-sensor technology, thereby improving the accuracy of detection results. Meanwhile, through a preset closed-loop control algorithm and sensor data, the accurate control of the reaction conditions can be realized, and the influence of environmental factors is reduced.
The liquid detection method in the embodiment of the present invention is described above, and the liquid detection apparatus in the embodiment of the present invention is described below, where the liquid detection apparatus is applied to a liquid detection system, and the liquid detection system includes a liquid path device, and a sensor, a pump, and a valve installed in the liquid path device, and referring to fig. 2, one embodiment of the liquid detection apparatus in the embodiment of the present invention includes:
an obtaining module 201, configured to obtain a sample to be detected and a detection item of the sample to be detected, and determine a detection reagent corresponding to the sample to be detected according to the detection item, where the detection item includes a detection ratio and a reaction condition;
the mixing reaction module 202 is configured to adjust a pump and a valve in the liquid path device, input a sample to be detected and a detection reagent with corresponding capacities of the detection ratio into the liquid path device according to the reaction conditions, and collect reaction data in the liquid path device in real time through the sensor;
and the dynamic adjustment module 203 is configured to dynamically adjust the pump and the valve in the liquid path device according to a preset closed-loop control algorithm and the reaction data until the reaction between the sample to be detected and the detection reagent is completed.
In the embodiment of the invention, the liquid detection device runs the liquid detection method, and the liquid detection device obtains a sample to be detected and detection matters of the sample to be detected, and determines detection reagents corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise detection proportion and reaction conditions; adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor; and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed. The method can collect more comprehensive detection data by adopting a multi-sensor technology, thereby improving the accuracy of detection results. Meanwhile, through a preset closed-loop control algorithm and sensor data, the accurate control of the reaction conditions can be realized, and the influence of environmental factors is reduced.
Referring to fig. 3, a second embodiment of a liquid detection device according to an embodiment of the present invention includes:
An obtaining module 201, configured to obtain a sample to be detected and a detection item of the sample to be detected, and determine a detection reagent corresponding to the sample to be detected according to the detection item, where the detection item includes a detection ratio and a reaction condition;
the mixing reaction module 202 is configured to adjust a pump and a valve in the liquid path device, input a sample to be detected and a detection reagent with corresponding capacities of the detection ratio into the liquid path device according to the reaction conditions, and collect reaction data in the liquid path device in real time through the sensor;
and the dynamic adjustment module 203 is configured to dynamically adjust the pump and the valve in the liquid path device according to a preset closed-loop control algorithm and the reaction data until the reaction between the sample to be detected and the detection reagent is completed.
In one embodiment of the present invention, the dynamic adjustment module 203 includes:
a signal generating unit 2031, configured to determine a real-time set value of the reaction data according to a preset closed-loop control algorithm, and calculate control signals of the pump and the valve in real time according to the real-time set value and the reaction data;
and the dynamic control unit 2032 is used for dynamically controlling the pump and the valve in real time according to the control signal until the reaction of the sample to be detected and the detection reagent is completed.
In one embodiment of the present invention, the signal generating unit 2031 is specifically configured to:
determining a real-time set value of the reaction data according to a preset closed-loop control algorithm, and determining a reaction deviation between the real-time set value and the reaction data;
obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a reaction correction value of the reaction of the sample to be detected and the detection reagent according to the reaction time and the reaction deviation value;
and determining control signals of the pump and the valve according to the reaction correction value.
In one embodiment of the present invention, the reaction correction value includes a proportional deviation value, an integral deviation value, and a differential deviation value;
the signal generating unit 2031 is specifically further configured to:
obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a proportional deviation value according to the reaction deviation value and a preset proportional gain factor;
accumulating the reaction deviation according to the reaction time of the sample to be detected and the detection reagent to obtain an integral correction value;
and calculating the change rate of the reaction deviation, and calculating a differential correction value according to the change rate and a preset differential gain factor.
In one embodiment of the invention, the sensor further comprises a spectral sensor;
The liquid detection device further comprises a concentration detection module 204, the concentration detection module 204 comprising:
a spectrum acquisition unit 2041, configured to acquire, by using the spectrum sensor, spectrum parameters of each reaction substance in a mixed reactant when the reaction between the sample to be detected and the detection reagent is completed, where the mixed reactant is a plurality of reaction substances obtained after the reaction between the sample to be detected and the detection reagent is completed;
a model determining unit 2042 for determining a concentration detection model corresponding to the mixed reactant according to the sample to be detected and the detection reagent;
and a calculating unit 2043 for inputting the spectral parameters of the respective reaction substances when the reaction of the sample to be detected and the detection reagent is completed into the concentration detection model, and calculating the reactant concentrations of the plurality of reaction substances in the mixed reactant according to the spectral parameters through the concentration detection model.
In one embodiment of the invention, the concentration detection model comprises detection sub-models corresponding to each reaction substance, and each detection sub-model is composed of a convolutional neural network and a two-way long-short-term memory network;
the computing unit 2043 is specifically configured to:
inputting the spectral parameters of each reaction substance into each detection sub-model corresponding to the concentration detection model when the reaction of the sample to be detected and the detection reagent is completed, and acquiring local spatial information of the spectral parameters of the corresponding reaction substance through a convolution neural network in the corresponding detection sub-model;
Inputting the local space information into a two-way long-short-term memory network of the detection sub-model, and extracting time sequence information of corresponding spectrum parameters through the two-way long-term memory network;
and inputting the time series information of each spectral parameter into an output layer of the concentration detection model, and mapping the time series information of each spectral parameter onto the corresponding concentration of the reactant through the output layer to obtain the reactant concentration of each reactant.
In one embodiment of the present invention, the liquid detection apparatus further comprises a model training module 205, the model training module 205 comprising:
acquiring training data of the mixed reactant, wherein the mixed reactant comprises a first reactant and a second reactant, and the training data comprises historical spectral parameters of the first reactant and the second reactant at each actual reactant concentration;
initializing a first and a second characteristic representation of the first and second reactive species;
respectively inputting each training data and a corresponding first characteristic representation and/or second characteristic representation into an initial sub-model of a corresponding reaction substance, and detecting the concentration of the input training data and the first characteristic representation and/or second characteristic representation through the initial sub-model to respectively obtain the current detection concentration corresponding to the first reaction substance and the second reaction substance;
Respectively calculating preset loss functions according to the current detection concentration and the actual reaction concentration of the first reactant and the second reactant to respectively obtain loss function values of the first reactant and the second reactant;
judging whether the loss function value of the first reactant and/or the second reactant is greater than a preset loss threshold value;
if the loss function value of the first reaction substance is greater than a preset loss threshold value, taking the current detection concentration of the second reaction substance as a first characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the first reaction substance is not greater than the preset loss threshold value;
if the loss function value of the second reaction substance is larger than a preset loss threshold value, taking the current detection concentration of the first reaction substance as a second characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the second reaction substance is not larger than the preset loss threshold value;
When the loss function value of the first reactant and/or the second reactant is not greater than a preset loss threshold value, taking the corresponding initial sub-model as a detection sub-model;
and forming a concentration detection model of the mixed reactant according to the detection submodel of the first reactant and the second reactant.
The embodiment describes the specific functions of each module and the unit constitution of part of the modules in detail on the basis of the previous embodiment, obtains a sample to be detected and detection matters of the sample to be detected through each module and each unit in the modules, and determines detection reagents corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise detection proportion and reaction conditions; adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor; and dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed. The method can collect more comprehensive detection data by adopting a multi-sensor technology, thereby improving the accuracy of detection results. Meanwhile, through a preset closed-loop control algorithm and sensor data, the accurate control of the reaction conditions can be realized, and the influence of environmental factors is reduced.
The liquid detection device in the embodiment of the present invention is described in detail above in terms of the modularized functional entity in fig. 2 and 3, and the liquid detection apparatus in the embodiment of the present invention is described in detail below in terms of hardware processing.
Fig. 4 is a schematic structural diagram of a liquid detection device according to an embodiment of the present invention, where the liquid detection device 400 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 410 (e.g., one or more processors) and a memory 420, one or more storage media 430 (e.g., one or more mass storage devices) storing application programs 433 or data 432. Wherein memory 420 and storage medium 430 may be transitory or persistent storage. The program stored in the storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations in the liquid detection apparatus 400. Still further, the processor 410 may be configured to communicate with the storage medium 430 and execute a series of instruction operations in the storage medium 430 on the liquid detection device 400 to implement the steps of the liquid detection method described above.
The fluid detection apparatus 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input/output interfaces 460, and/or one or more operating systems 431, such as Windows Server, mac OS X, unix, linux, freeBSD, rtos, and the like. It will be appreciated by those skilled in the art that the configuration of the liquid detection apparatus shown in fig. 4 is not limiting of the liquid detection apparatus provided by the present invention and may include more or fewer components than shown, or may be combined with certain components, or may be arranged in a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, or a volatile computer readable storage medium, having stored therein instructions that, when executed on a computer, cause the computer to perform the steps of the liquid detection method.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (4)

1. A liquid detection method, the liquid detection method being applied to a liquid detection system including a liquid path apparatus and a sensor, a pump, and a valve installed in the liquid path apparatus, the liquid detection method comprising:
acquiring a sample to be detected and detection matters of the sample to be detected, and determining a detection reagent corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise a detection proportion and reaction conditions;
adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor;
the method comprises the steps of dynamically adjusting a pump and a valve in the liquid path equipment according to a preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed, wherein the step of dynamically adjusting the pump and the valve in the liquid path equipment according to the preset closed-loop control algorithm and the reaction data until the reaction of the sample to be detected and the detection reagent is completed comprises the following steps: determining a real-time set value of the reaction data according to a preset closed-loop control algorithm, and determining a reaction deviation value between the real-time set value and the reaction data; obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a proportional deviation value according to the reaction deviation value and a preset proportional gain factor; accumulating the reaction deviation values according to the reaction time of the sample to be detected and the detection reagent to obtain integral deviation values; calculating the change rate of the reaction deviation value, and calculating a differential deviation value according to the change rate and a preset differential gain factor; determining control signals of the pump and the valve according to the proportional deviation value, the integral deviation value and the differential deviation value; dynamically controlling the pump and the valve in real time according to the control signal until the reaction of the sample to be detected and the detection reagent is completed;
The sensor further comprises a spectral sensor; when the reaction of the sample to be detected and the detection reagent is completed, acquiring spectral parameters of all reaction substances in a mixed reactant through the spectral sensor, wherein the mixed reactant is a plurality of reaction substances obtained after the reaction of the sample to be detected and the detection reagent is completed; the method comprises the steps that a pump and a valve in liquid path equipment are dynamically adjusted according to a preset closed-loop control algorithm and the reaction data, training data of the mixed reactant is obtained until the reaction of a sample to be detected and a detection reagent is completed, wherein the mixed reactant comprises a first reaction substance and a second reaction substance, and the training data comprises historical spectrum parameters of the first reaction substance and the second reaction substance under the concentration of each actual reaction substance; initializing a first and a second characteristic representation of the first and second reactive species; respectively inputting each training data and a corresponding first characteristic representation and/or second characteristic representation into an initial sub-model of a corresponding reaction substance, and detecting the concentration of the input training data and the first characteristic representation and/or second characteristic representation through the initial sub-model to respectively obtain the current detection concentration corresponding to the first reaction substance and the second reaction substance; respectively calculating preset loss functions according to the current detection concentration and the actual concentration of the first reactant and the second reactant to respectively obtain loss function values of the first reactant and the second reactant; judging whether the loss function value of the first reactant and/or the second reactant is greater than a preset loss threshold value; if the loss function value of the first reaction substance is greater than a preset loss threshold value, taking the current detection concentration of the second reaction substance as a first characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the first reaction substance is not greater than the preset loss threshold value; if the loss function value of the second reaction substance is larger than a preset loss threshold value, taking the current detection concentration of the first reaction substance as a second characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the second reaction substance is not larger than the preset loss threshold value; when the loss function value of the first reactant and/or the second reactant is not greater than a preset loss threshold value, taking the corresponding initial sub-model as a detection sub-model; forming a concentration detection model of the mixed reactant according to the detection submodels of the first reactant and the second reactant;
The detection sub-model consists of a convolutional neural network and a two-way long-short-term memory network; inputting the spectral parameters of each reaction substance into each detection sub-model corresponding to the concentration detection model when the reaction of the sample to be detected and the detection reagent is completed, and acquiring local spatial information of the spectral parameters of the corresponding reaction substance through a convolution neural network in the corresponding detection sub-model; inputting the local space information into a two-way long-short-term memory network of the detection sub-model, and extracting time sequence information of corresponding spectrum parameters through the two-way long-term memory network; and inputting the time series information of each spectral parameter into an output layer of the concentration detection model, and mapping the time series information of each spectral parameter onto the corresponding concentration of the reactant through the output layer to obtain the reactant concentration of each reactant.
2. A liquid detection device, characterized in that the liquid detection device is applied to a liquid detection system, the liquid detection system comprises a liquid path device, and a sensor, a pump and a valve which are arranged in the liquid path device; the liquid detection device includes:
the detection device comprises an acquisition module, a detection module and a detection module, wherein the acquisition module is used for acquiring a sample to be detected and detection matters of the sample to be detected, and determining detection reagents corresponding to the sample to be detected according to the detection matters, wherein the detection matters comprise detection proportion and reaction conditions;
The mixing reaction module is used for adjusting a pump and a valve in the liquid path equipment, inputting a sample to be detected and a detection reagent with corresponding capacities of the detection proportion into the liquid path equipment according to the reaction conditions, and collecting reaction data in the liquid path equipment in real time through the sensor;
the dynamic adjustment module is configured to dynamically adjust the pump and the valve in the liquid path device according to a preset closed-loop control algorithm and the reaction data until the reaction between the sample to be detected and the detection reagent is completed, where the dynamically adjusting the pump and the valve in the liquid path device according to the preset closed-loop control algorithm and the reaction data until the reaction between the sample to be detected and the detection reagent is completed includes: determining a real-time set value of the reaction data according to a preset closed-loop control algorithm, and determining a reaction deviation value between the real-time set value and the reaction data; obtaining the reaction time of the sample to be detected and the detection reagent, and calculating a proportional deviation value according to the reaction deviation value and a preset proportional gain factor; accumulating the reaction deviation values according to the reaction time of the sample to be detected and the detection reagent to obtain integral deviation values; calculating the change rate of the reaction deviation value, and calculating a differential deviation value according to the change rate and a preset differential gain factor; determining control signals of the pump and the valve according to the proportional deviation value, the integral deviation value and the differential deviation value; dynamically controlling the pump and the valve in real time according to the control signal until the reaction of the sample to be detected and the detection reagent is completed;
The sensor further comprises a spectral sensor; when the reaction of the sample to be detected and the detection reagent is completed, acquiring spectral parameters of all reaction substances in a mixed reactant through the spectral sensor, wherein the mixed reactant is a plurality of reaction substances obtained after the reaction of the sample to be detected and the detection reagent is completed; the method comprises the steps that a pump and a valve in liquid path equipment are dynamically adjusted according to a preset closed-loop control algorithm and the reaction data, training data of the mixed reactant is obtained until the reaction of a sample to be detected and a detection reagent is completed, wherein the mixed reactant comprises a first reaction substance and a second reaction substance, and the training data comprises historical spectrum parameters of the first reaction substance and the second reaction substance under the concentration of each actual reaction substance; initializing a first and a second characteristic representation of the first and second reactive species; respectively inputting each training data and a corresponding first characteristic representation and/or second characteristic representation into an initial sub-model of a corresponding reaction substance, and detecting the concentration of the input training data and the first characteristic representation and/or second characteristic representation through the initial sub-model to respectively obtain the current detection concentration corresponding to the first reaction substance and the second reaction substance; respectively calculating preset loss functions according to the current detection concentration and the actual concentration of the first reactant and the second reactant to respectively obtain loss function values of the first reactant and the second reactant; judging whether the loss function value of the first reactant and/or the second reactant is greater than a preset loss threshold value; if the loss function value of the first reaction substance is greater than a preset loss threshold value, taking the current detection concentration of the second reaction substance as a first characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the first reaction substance is not greater than the preset loss threshold value; if the loss function value of the second reaction substance is larger than a preset loss threshold value, taking the current detection concentration of the first reaction substance as a second characteristic representation, and returning to the step of respectively inputting each training data and the corresponding first characteristic representation and/or second characteristic representation into the corresponding initial submodel of the reaction substance until the loss function value of the second reaction substance is not larger than the preset loss threshold value; when the loss function value of the first reactant and/or the second reactant is not greater than a preset loss threshold value, taking the corresponding initial sub-model as a detection sub-model; forming a concentration detection model of the mixed reactant according to the detection submodels of the first reactant and the second reactant;
The detection sub-model consists of a convolutional neural network and a two-way long-short-term memory network; inputting the spectral parameters of each reaction substance into each detection sub-model corresponding to the concentration detection model when the reaction of the sample to be detected and the detection reagent is completed, and acquiring local spatial information of the spectral parameters of the corresponding reaction substance through a convolution neural network in the corresponding detection sub-model; inputting the local space information into a two-way long-short-term memory network of the detection sub-model, and extracting time sequence information of corresponding spectrum parameters through the two-way long-term memory network; and inputting the time series information of each spectral parameter into an output layer of the concentration detection model, and mapping the time series information of each spectral parameter onto the corresponding concentration of the reactant through the output layer to obtain the reactant concentration of each reactant.
3. A liquid detection apparatus, characterized in that the liquid detection apparatus comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the liquid detection apparatus to perform the steps of the liquid detection method of claim 1.
4. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the steps of the liquid detection method of claim 1.
CN202410030532.3A 2024-01-09 2024-01-09 Liquid detection method, device, equipment and storage medium Active CN117554302B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410030532.3A CN117554302B (en) 2024-01-09 2024-01-09 Liquid detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410030532.3A CN117554302B (en) 2024-01-09 2024-01-09 Liquid detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117554302A CN117554302A (en) 2024-02-13
CN117554302B true CN117554302B (en) 2024-04-02

Family

ID=89823445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410030532.3A Active CN117554302B (en) 2024-01-09 2024-01-09 Liquid detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117554302B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN88103591A (en) * 1987-05-01 1988-12-28 富士胶片公司 Method for controlling liquids and powders and metering mixer
CN113756969A (en) * 2021-09-23 2021-12-07 潍柴动力股份有限公司 EGR control method and device and electronic equipment
CN116519613A (en) * 2023-03-08 2023-08-01 哈尔滨工程大学 Ocean water quality detection method based on deep neural network
CN116838458A (en) * 2023-06-16 2023-10-03 中国船舶集团有限公司第七一一研究所 SCR closed-loop control device and control method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11035227B2 (en) * 2017-07-14 2021-06-15 The Board Of Regents Of The University Of Oklahoma Generating spectral responses of materials
CN111337768B (en) * 2020-03-02 2021-01-19 武汉大学 Deep parallel fault diagnosis method and system for dissolved gas in transformer oil
KR20230038480A (en) * 2020-06-17 2023-03-20 넥세리스 이노베이션 홀딩스 엘엘씨 Systems and methods for monitoring gaseous analytes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN88103591A (en) * 1987-05-01 1988-12-28 富士胶片公司 Method for controlling liquids and powders and metering mixer
CN113756969A (en) * 2021-09-23 2021-12-07 潍柴动力股份有限公司 EGR control method and device and electronic equipment
CN116519613A (en) * 2023-03-08 2023-08-01 哈尔滨工程大学 Ocean water quality detection method based on deep neural network
CN116838458A (en) * 2023-06-16 2023-10-03 中国船舶集团有限公司第七一一研究所 SCR closed-loop control device and control method

Also Published As

Publication number Publication date
CN117554302A (en) 2024-02-13

Similar Documents

Publication Publication Date Title
Ge et al. A comparative study of just-in-time-learning based methods for online soft sensor modeling
Ren et al. A tutorial review of neural network modeling approaches for model predictive control
Grbić et al. Adaptive soft sensor for online prediction and process monitoring based on a mixture of Gaussian process models
Shokry et al. Data-driven soft-sensors for online monitoring of batch processes with different initial conditions
Li et al. Selection of model parameters for off-line parameter estimation
Palancar et al. pH-control system based on artificial neural networks
US5740033A (en) Model predictive controller
Zhu et al. Robust supervised probabilistic principal component analysis model for soft sensing of key process variables
Ni et al. Localized, adaptive recursive partial least squares regression for dynamic system modeling
Liu et al. Active selection of informative data for sequential quality enhancement of soft sensor models with latent variables
Chen et al. Soft sensors for on-line biomass measurements
Li et al. Adaptive selective ensemble-independent component analysis models for process monitoring
Gins et al. Finding the optimal time resolution for batch-end quality prediction: MRQP–A framework for multi-resolution quality prediction
Brunner et al. Biomass soft sensor for a Pichia pastoris fed‐batch process based on phase detection and hybrid modeling
CN117554302B (en) Liquid detection method, device, equipment and storage medium
Hematillake et al. Design and optimization of a penicillin fed-batch reactor based on a deep learning fault detection and diagnostic model
Çıtmacı et al. Machine learning-based ethylene and carbon monoxide estimation, real-time optimization, and multivariable feedback control of an experimental electrochemical reactor
Craven et al. Process analytical technology and quality-by-design for animal cell culture
Šundić et al. Fuzzy inference system for sensor array calibration: prediction of CO and CH4 levels in variable humidity conditions
Ruisanchez et al. On-line automated analytical signal diagnosis in sequential injection analysis systems using artificial neural networks
Forster et al. Modeling of bioprocesses via MINLP-based symbolic regression of S-system formalisms
Li et al. Online prediction of quality‐related variables for batch processes using a sequential phase partition method
Zhang Software sensors and their applications in bioprocess
Zhang et al. Active learning strategy for online prediction of particle size distribution in cobalt oxalate synthesis process
CN113377075A (en) Method and device for optimizing rare earth extraction process in real time and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant