Identification model construction method and device, computer device, and storage medium
By monitoring the training status of the microfluidic model in real time and adjusting the training strategy, the problem of low training efficiency of traditional microfluidic recognition models is solved, and efficient model training and recognition are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2023-06-29
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional microfluidic recognition models have low training efficiency and require a lot of time for repeated training.
By acquiring gas-liquid input data and standard gas mass transfer data, the model is trained and curve fitting is performed. The training status is monitored in real time, and the training strategy is adjusted to avoid divergence until the training termination condition is met, thus obtaining the target recognition model.
It improves the efficiency of model training, avoids the waste of computing resources and time caused by divergence, and enables real-time monitoring and efficient adjustment of the model training process.
Smart Images

Figure CN116776153B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device and storage medium for constructing a recognition model. Background Technology
[0002] With the rapid development of computer technology, artificial neural network technology has become increasingly widely used in applications and scenarios. For example, in the gas-liquid two-phase flow identification scenario of microfluidics corresponding to microchips, image recognition combined with deep learning models can be used to identify microfluidic parameters, which can improve the efficiency of identification.
[0003] In traditional techniques, training a microfluidic recognition model requires a significant amount of time for repeated training, resulting in low training efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for constructing a recognition model to address the aforementioned technical problems, which can effectively improve the training efficiency of the recognition model.
[0005] This application provides a method for constructing a recognition model, including:
[0006] Acquire training gas-liquid input data and corresponding standard gas mass transfer data; the gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration and internal structure information of the gas and liquid input into the microchannel; the standard gas mass transfer data is used to characterize the bubble state information obtained by inputting the training gas-liquid input data into the microchannel.
[0007] The current training model is trained based on gas-liquid input data and gas mass transfer data to obtain the corresponding current model output results. Curve fitting is performed on the current model output results. The difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, and the current training state is determined based on the comparison results of the difference and the threshold.
[0008] Based on the current training state, the model is trained to obtain an updated training model, which is then used as the current training model. The process of training the current training model based on gas-liquid input data and gas mass transfer data is then repeated until the training termination condition is met, resulting in a target recognition model. This recognition model is used to identify the corresponding gas mass transfer data based on the gas-liquid input data.
[0009] In one embodiment, the current training model is trained based on gas-liquid input data and gas mass transfer data to obtain the corresponding current model output result, and curve fitting is performed on the current model output result, including:
[0010] Get the current iteration number for the training;
[0011] When the current iteration count reaches a preset threshold, obtain the current model output corresponding to the current iteration count;
[0012] Curve fitting is performed on the current model output to obtain the fitted curve corresponding to the current iteration output.
[0013] In one embodiment, the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, and the current training state is determined based on the comparison result of the difference and a threshold, including:
[0014] Calculate the error distribution between the fitted curve and the standard curve;
[0015] When the error result distribution is a preset normal distribution and the expected parameter is less than or equal to the expected threshold and the standard deviation is less than or equal to the standard deviation threshold, the current training state is determined to be a convergent state.
[0016] When the error result distribution is not a preset normal distribution, or the expected parameter is greater than the expected threshold, or the standard deviation is greater than the standard deviation threshold, the current training state is determined to be a divergent state.
[0017] In one embodiment, based on the current training state, the model is trained to obtain an updated training model, which is then used as the current training model. The process of training the current training model based on gas-liquid input data and gas mass transfer data is then repeated until the training termination condition is met, resulting in a target recognition model. This includes:
[0018] Update the training model when the current training state is convergent.
[0019] The updated training model is used as the current training model. The steps for training the current training model based on gas-liquid input data and gas mass transfer data are returned until the maximum number of training iterations is reached, thus obtaining the target recognition model.
[0020] In one embodiment, based on the current training state, the model is trained to obtain an updated training model, which is then used as the current training model. The process of training the current training model based on gas-liquid input data and gas mass transfer data is then repeated until the training termination condition is met, resulting in a target recognition model. This includes:
[0021] When the current training state is divergent, stop the current training of the model;
[0022] Based on the gas-liquid input data and gas mass transfer data, restart the model training, return to the steps of training the current training model based on the gas-liquid input data and gas mass transfer data, until the training termination condition is met, and obtain the target recognition model.
[0023] This application also provides a microfluidic state recognition method, including:
[0024] Acquire gas-liquid input data, which includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel.
[0025] The gas-liquid input data is input into the target recognition model, and the gas mass transfer data corresponding to the gas-liquid input data is output. The gas mass transfer data is used to characterize the bubble state information corresponding to the microchannel output.
[0026] The target recognition model is obtained by acquiring training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel. The standard gas mass transfer data is used to characterize the bubble state information obtained by inputting the training gas-liquid input data into the microchannel. The current training model is trained based on the gas-liquid input data and gas mass transfer data to obtain the corresponding current model output result, and curve fitting is performed on the current model output result. The difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, and the current training state is determined based on the comparison result of the difference and a threshold. According to the current training state, the model is trained to obtain an updated training model, which is used as the current training model. The process of training the current training model based on the gas-liquid input data and gas mass transfer data is repeated until the training termination condition is met, thus obtaining the target recognition model.
[0027] This application also provides a recognition model construction apparatus, including:
[0028] The acquisition module is used to acquire training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration and internal structure information of the gas and liquid input into the microchannel. The standard gas mass transfer data is used to characterize the bubble state information obtained by inputting the training gas-liquid input data into the microchannel.
[0029] The determination module is used to train the current training model based on gas-liquid input data and gas mass transfer data, obtain the corresponding current model output results, and perform curve fitting on the current model output results; determine the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data, and determine the current training state based on the comparison result of the difference and the threshold.
[0030] The training module is used to train the model according to the current training state to obtain an updated training model, use the updated training model as the current training model, and return the steps of training the current training model based on gas-liquid input data and gas mass transfer data until the training termination condition is met, and obtain the target recognition model. The recognition model is used to identify the corresponding gas mass transfer data based on the gas-liquid input data.
[0031] This application also provides a microfluidic state recognition device, including:
[0032] The acquisition module is used to acquire gas-liquid input data, which includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel.
[0033] The identification module is used to input gas-liquid input data into the target identification model and output gas mass transfer data corresponding to the gas-liquid input data. The gas mass transfer data is used to characterize the bubble state information corresponding to the microchannel output. The target identification model is obtained by acquiring training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel. The standard gas mass transfer data is used to characterize the bubble state information corresponding to the training gas-liquid input data input into the microchannel. The current training model is trained based on the gas-liquid input data and gas mass transfer data to obtain the corresponding current model output result, and curve fitting is performed on the current model output result. The difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, and the current training state is determined based on the comparison result of the difference and a threshold. According to the current training state, the model is trained to obtain an updated training model, which is used as the current training model. The steps of training the current training model based on the gas-liquid input data and gas mass transfer data are returned until the training termination condition is met, thus obtaining the target identification model.
[0034] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described identification model construction method or microfluidic state identification method.
[0035] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described identification model construction method or microfluidic state identification method.
[0036] The aforementioned identification model construction method, apparatus, computer equipment, and storage medium train the initial identification model by using the gas-liquid input data of the microchannel and the corresponding standard gas mass transfer data as training sample data. During the model training process, the current model output result is obtained, and the difference between the current model output result and its corresponding standard curve is compared with a threshold. The current training state is then determined based on the comparison result, and the model training process is completed based on the current training state. This achieves real-time monitoring of the model's state during the training process. Compared with model training without a monitoring mechanism, this model training method based on real-time monitoring of the training process can effectively avoid the waste of computer resources and time caused by the inability to adjust the model training strategy in time after the model training diverges, which is a problem in traditional technologies. This is beneficial to improving the efficiency of model training. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating the identification model construction method in one embodiment;
[0038] Figure 2 This is a flowchart illustrating the process of generating the fitted curve corresponding to the current iteration output in one embodiment.
[0039] Figure 3 This is a flowchart illustrating a method for determining the current training state in one embodiment;
[0040] Figure 4 This is a schematic diagram of the model training process in the convergence state in one embodiment;
[0041] Figure 5 This is a schematic diagram of the model training process under divergent conditions in one embodiment;
[0042] Figure 6 This is a flowchart illustrating a microfluidic state recognition method in one embodiment;
[0043] Figure 7 This is a schematic diagram illustrating the data association and distribution characteristics in one embodiment;
[0044] Figure 8 This is a schematic diagram of the model prediction error distribution in one embodiment;
[0045] Figure 9 This is a schematic diagram illustrating the prediction effect of a microfluidic state model in one embodiment;
[0046] Figure 10 This is a structural block diagram of the identification model building device in one embodiment;
[0047] Figure 11 This is a structural block diagram of a microfluidic state recognition device in one embodiment;
[0048] Figure 12 This is an internal structural diagram of a computer device in one embodiment;
[0049] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] In one embodiment, such as Figure 1 As shown, a method for constructing a recognition model is provided. This embodiment uses the application of this method to a terminal as an example for illustration. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction between the terminal and the server.
[0052] In this embodiment, the method includes the following steps:
[0053] Step S102: Obtain training gas-liquid input data and corresponding standard gas mass transfer data.
[0054] The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel corresponding to the gas and liquid input. Standard gas mass transfer data is used to characterize the bubble state information obtained by inputting the training gas-liquid input data into the microchannel.
[0055] Specifically, the computer equipment retrieves pre-stored raw experimental data from the database, samples the raw experimental data at certain sampling intervals, and obtains training sample data.
[0056] For example, the original experimental data was obtained by changing the conditions of gas and liquid flow into the microchip (such as gas flow rate, liquid flow rate, and whether there is a microstructure). The gas flow rate was 20-300 ml / h and the liquid flow rate was 50-130 ml / h. The training sample data was obtained by sampling at intervals of 20 ml / h. The training sample data recorded parameters such as the length of the bubbles at the outlet and inlet of the microchip, the number of bubbles in the channel, the generation frequency, and the gas pressure under different flow conditions.
[0057] Step S104: Train the current training model based on gas-liquid input data and gas mass transfer data to obtain the corresponding current model output result, and perform curve fitting on the current model output result to determine the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data. Determine the current training state based on the comparison result of the difference and the threshold.
[0058] The current model output refers to the output of the model when a preset iteration condition is reached during the model training process. This iteration condition can be a preset number of model iterations, etc.
[0059] Specifically, the computer equipment trains the initial model based on the gas-liquid input data and gas mass transfer data determined in the above steps, and obtains the current iteration number of the model training in real time. When the current iteration number of the model reaches the preset iteration number, the corresponding current model output result is obtained, and curve fitting is performed on the current model output result to obtain the fitted curve. The fitted curve is then compared with the standard curve corresponding to the gas mass transfer data to obtain the difference. Based on the comparison result of the difference and the threshold, the current training state of the model is determined.
[0060] Step S106: Based on the current training state, train the model to obtain an updated training model, use the updated training model as the current training model, and return to the step of training the current training model based on gas-liquid input data and gas mass transfer data until the training termination condition is met, and obtain the target recognition model.
[0061] The identification model is used to identify the corresponding gas mass transfer data based on the gas-liquid input data.
[0062] Specifically, the computer device determines the current training state of the model based on the aforementioned steps, and then determines the next training strategy of the model based on the current training state, thereby realizing intelligent adjustment of the model training process according to the specific training situation during the training process, thereby improving the overall efficiency of model training.
[0063] In this embodiment, the initial recognition model is trained by using the gas-liquid input data of the microchannel and the corresponding standard gas mass transfer data as training sample data. During the model training process, the current model output result is obtained, and the difference between the current model output result and its corresponding standard curve is compared with a threshold. The current training state is then determined based on the comparison result, and the model training process is completed based on the current training state. This achieves real-time monitoring of the model's state during the training process. Compared with model training without a monitoring mechanism, this model training method based on real-time monitoring of the training process can effectively avoid the waste of computer resources and time caused by the inability to adjust the model training strategy in time after the model training diverges in traditional technologies, which is conducive to improving the efficiency of model training.
[0064] In one embodiment, such as Figure 2 As shown, the current training model is trained based on gas-liquid input data and gas mass transfer data to obtain the corresponding current model output results. Curve fitting is then performed on the current model output results, including:
[0065] Step S202: Obtain the current iteration number corresponding to the training.
[0066] Step S204: When the current iteration number reaches a preset threshold, obtain the current model output result corresponding to the current iteration number.
[0067] The preset threshold can be flexibly set by technicians as needed, or it can be determined based on the historical convergence and divergence of the corresponding model in the past training process in this scenario. The specific method is not limited here.
[0068] Specifically, the computer device obtains the current iteration number according to the above steps, analyzes the range of the current iteration number, and then determines the corresponding preset threshold based on the range of the current iteration number. For example, the iteration number can be preset to be between 200 and 300, and a first preset threshold can be set for this range. When the iteration number is between 500 and 700, a second preset threshold can be set, and so on. The number of preset thresholds can be flexibly set according to the specific scenario or needs, and no specific limitation is made here. When the computer device analyzes that the current iteration number has reached the preset threshold, it obtains the current model output result corresponding to the current iteration number.
[0069] Step S206: Perform curve fitting on the current model output to obtain the fitting curve corresponding to the current iteration output.
[0070] Specifically, the computer device performs curve fitting based on the current model output. Common fitting methods can be used, such as approximating discrete data with analytical expressions or the least squares method. Alternatively, a line graph can be plotted directly based on the current model output, so that the output data corresponding to each time point is included in the plotted line graph. No specific restrictions are placed on the specific method.
[0071] In this embodiment, the current iteration number corresponding to the training is obtained. When the current iteration number reaches a preset threshold, the current model output result corresponding to the current iteration number is obtained. Then, curve fitting is performed on the current model output result to obtain the fitting curve corresponding to the current iteration output. This allows for intuitive curve plotting of the current model output result, making the current training state determined based on the fitting curve more accurate.
[0072] In one embodiment, such as Figure 3 As shown, the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, and the current training state is determined based on the comparison result of the difference and the threshold, including:
[0073] Step S302: Calculate the error distribution between the fitted curve and the standard curve.
[0074] Specifically, the computer device determines the fitting curve of the model at the current iteration number based on the aforementioned steps, and then obtains the error distribution result between the fitting curve and the standard curve at each corresponding time point by comparing the residual of the fitting curve and the standard curve.
[0075] Step S304: When the error result distribution is a preset normal distribution and the expected parameter is less than or equal to the expected threshold and the standard deviation is less than or equal to the standard deviation threshold, the current training state is determined to be a convergent state.
[0076] Step S306: When the error result distribution is not a preset normal distribution or the expected parameter is greater than the expected threshold or the standard deviation is greater than the standard deviation threshold, the current training state is determined to be a divergent state.
[0077] In this embodiment, the error distribution between the fitted curve and the standard curve is calculated, and then the corresponding morphological characteristics and corresponding parameters of the error distribution are analyzed to determine the current training state information. Specifically, when the error distribution is a preset normal distribution and the expected parameter is less than or equal to the expected threshold and the standard deviation is less than or equal to the standard deviation threshold, the current training state is determined to be a convergent state; when the error distribution is not a preset normal distribution or the expected parameter is greater than the expected threshold or the standard deviation is greater than the standard deviation threshold, the current training state is determined to be a divergent state, thereby improving the accuracy of determining the current training state.
[0078] In one embodiment, such as Figure 4As shown, based on the current training state, the model is trained to obtain an updated training model, which is then used as the current training model. The process of training the current training model based on gas-liquid input data and gas mass transfer data is repeated until the training termination condition is met, resulting in the target recognition model, including:
[0079] Step S402: When the current training state is converged, update the training model.
[0080] The convergence state is the state where the error between the fitted curve corresponding to the current training state and the corresponding standard curve is less than a preset threshold.
[0081] Specifically, when the computer determines that the current training state is converged, it continues the remaining training process. For example, if the maximum number of iterations for training the model is set to 1000, and the current iteration number is 500 and the current training state is converged, then the remaining 501 to 1000 iterations will continue to be executed.
[0082] Step S404: The updated training model is used as the current training model. The steps of training the current training model based on gas-liquid input data and gas mass transfer data are returned until the maximum number of training times is reached, and the target recognition model is obtained.
[0083] The maximum number of iterations can be flexibly set by technicians according to actual needs, or it can be determined based on the model convergence status recorded when training the model with the same amount of data in the same scenario during historical training.
[0084] In this embodiment, when the current training state is in a convergence state, the training model is updated and used as the current training model. The steps of training the current training model based on gas-liquid input data and gas mass transfer data are returned until the maximum number of training times is reached, and the target recognition model is obtained. This enables the model training strategy to be reasonably adjusted according to the training state of the model in the intermediate training process in real time, which is beneficial to improving the efficiency of model training.
[0085] In one embodiment, such as Figure 5 As shown, based on the current training state, the model is trained to obtain an updated training model, which is then used as the current training model. The process of training the current training model based on gas-liquid input data and gas mass transfer data is repeated until the training termination condition is met, resulting in the target recognition model, including:
[0086] Step S502: When the current training state is divergent, stop the current training of the model.
[0087] The divergent state is the state in which the error between the fitted curve corresponding to the current training state and the corresponding standard curve is greater than a preset threshold.
[0088] Specifically, when the computer device determines that the current training state is divergent based on the aforementioned steps, it immediately stops the current training of the model.
[0089] Step S504: Based on the gas-liquid input data and gas mass transfer data, restart the model training, return to the steps of training the current training model based on the gas-liquid input data and gas mass transfer data, until the training termination condition is met, and obtain the target recognition model.
[0090] Specifically, after the computer equipment stops the current model training, it restarts the model training process based on the gas-liquid input data and gas mass transfer data, returning to the steps of training the current training model based on the gas-liquid input data and gas mass transfer data, until the training termination condition is met, and the target recognition model is obtained.
[0091] In this embodiment, when the current training state is divergent, the current training of the model is stopped, and the training of the model is restarted based on the gas-liquid input data and gas mass transfer data. The process of training the current training model based on the gas-liquid input data and gas mass transfer data is returned until the training termination condition is met and the target recognition model is obtained. This ensures that when the model training diverges, the current model training process can be stopped in time and the model training can be restarted in time, instead of restarting the model training based on the training results after the model training is completed. This effectively saves the computing and memory resources and time of the computer equipment and improves the model training efficiency.
[0092] In one embodiment, such as Figure 6 As shown, a microfluidic state recognition method is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0093] Step S602: Obtain gas-liquid input data, which includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel.
[0094] Step S604: Input the gas-liquid input data into the target recognition model and output the gas mass transfer data corresponding to the gas-liquid input data. The gas mass transfer data is used to characterize the bubble state information corresponding to the microchannel output.
[0095] The target recognition model is obtained by acquiring training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel. The standard gas mass transfer data is used to characterize the bubble state information obtained by inputting the training gas-liquid input data into the microchannel. The current training model is trained based on the gas-liquid input data and gas mass transfer data to obtain the corresponding current model output result, and curve fitting is performed on the current model output result. The difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, and the current training state is determined based on the comparison result of the difference and a threshold. According to the current training state, the model is trained to obtain an updated training model, which is used as the current training model. The process of training the current training model based on the gas-liquid input data and gas mass transfer data is repeated until the training termination condition is met, thus obtaining the target recognition model.
[0096] In this embodiment, the initial recognition model is trained using the gas-liquid input data of the microchannel and the corresponding standard gas mass transfer data as training sample data. During the model training process, the current model output result is obtained, and the difference between the current model output result and its corresponding standard curve is compared with a threshold. The current training state is then determined based on the comparison result, and the model training process is completed based on the current training state. This achieves real-time monitoring of the model's state during training. Compared with model training without a monitoring mechanism, this model training method based on real-time monitoring of the training process can effectively avoid the waste of computer resources and time caused by the inability to adjust the model training strategy in time after the model training diverges in traditional technologies. This is beneficial to improving the efficiency of model training, and thus the recognition model can be used to identify the state of microfluidics, thereby improving the recognition efficiency.
[0097] This application also provides an application scenario in which the above-described identification model construction method is applied to the identification of gas-liquid two-phase flow in microfluidics corresponding to a microchip. Specifically, the application of the identification model construction method in this scenario is as follows:
[0098] This project uses the Keras deep learning library in Python's Tensorflow 2.11 package to build a sequential logistic regression model. The model consists of an input layer, two closely connected hidden layers (each hidden layer containing 64 neurons), and an output layer that returns a single, continuous value. The number of mesh layers in a model typically affects the completeness of data description and the accuracy of predictions. More mesh layers can achieve more functionality with fewer parameters, but they can also lead to gradient explosion, vanishing gradients, and overfitting during model fitting, affecting the model's accuracy and stability. Increasing the number of mesh layers, depending on the connection method of the mesh structure, can potentially lead to model degradation during training.
[0099] An early stopping callback is used to test the training progress at each epoch. If, after 100 epochs, the fit has not improved (i.e., the fitted curve diverges), training automatically stops. Early stopping saves training time, even if hyperparameter modifications are needed.
[0100] The model was configured with a momentum of 0.9, a batch size of 10, 1000 training epochs, 64925 data points, and a learning rate of 0.001. 80% of the data was randomly selected as the training set, and the remaining 20% was used as the test set. The model was trained using the Stochastic Gradient Descent (SGD) method.
[0101] Using 3D-printed chips, images were obtained measuring the presence or absence of microstructures (microneedle height h=0 and h=300μm) at liquid flow rates of 50-130mL / h (intervals of 20mL / h) and gas flow rates of 25-500mL / h. Image recognition data was used to extract information such as the number of bubbles and the size of inlet / outlet points, resulting in 187,010 data points. Python functions were used for initial data cleaning, followed by manual image screening to remove images with identification errors. This method eliminated some non-compliant data points, such as those with fewer than a certain threshold of incorrectly identified bubbles, uneven bubble size distribution at inlet / outlet points, identification errors, and duplicates. The final data volume was 64,925. The data correlation and distribution are as follows: Figure 7 As shown. Where Q L Q G L in L out n, f, k L'a' represents liquid flow rate, gas flow rate, inlet bubble length, outlet bubble length, number of bubbles, frequency, and volumetric mass transfer coefficient, respectively. The chart provides an approximate distribution and trend of each data point with its related data, which can be used for data cleaning and model type determination before deep learning. The model predicts four parameters: frequency f, number of bubbles n, and inlet / outlet length L, all as output values, using chip type h and gas flow rate Q. G Liquid flow rate Q L It is used as the input layer for training. Predict the volumetric mass transfer coefficient k. L In the case of a, the frequency f, the number of bubbles n, and the inlet / outlet length L are all used as input parameters for the input layer.
[0102] The model exhibits significant variations across different input data samples. To minimize the impact of input parameters on the results, all data was randomly shuffled and reordered to prevent duplicate data samples with the same feature value, which would negatively affect the model's generalization ability. Therefore, before training the model, the data was randomly shuffled, and 80% of the total 64,925 data points were selected for logistic regression model training, while the remaining 20% was used for model validation.
[0103] By adjusting hyperparameters such as the number of hidden layers, the number of neurons, training epochs, learning rate, and batch size, the model can achieve convergence after approximately 200 training epochs. The training error curve closely matches the validation error curve without divergence, indicating that the model is well-trained. The model uses another 20% of the data for testing, and the distribution of test error results is as follows: Figure 8 As shown, (a) the inlet bubble length L in (a) Model; (b) Bubble number n model; (c) Outlet bubble length L out Model; (d) Bubble production frequency f model; (e) Volumetric mass transfer coefficient k L Model A; most of the errors are distributed around 0, and the error distribution follows a normal distribution, indicating that the model's predicted numerical errors are small and its accuracy is good. A comparison of the predicted values with the actual values is shown below. Figure 9 As shown, (a) the inlet bubble length L in (a) Model; (b) Bubble number n model; (c) Outlet bubble length L out Model; (d) Bubble production frequency f model; (e) Volumetric mass transfer coefficient k L Model A reflects the comparison between predicted and actual values. Data points located near the diagonal indicate that the model has been trained and the predictions are accurate.
[0104] In this embodiment, the initial recognition model is trained by using the gas-liquid input data of the microchannel and the corresponding standard gas mass transfer data as training sample data. During the model training process, the current model output result is obtained, and the difference between the current model output result and its corresponding standard curve is compared with a threshold. The current training state is then determined based on the comparison result, and the model training process is completed based on the current training state. This achieves real-time monitoring of the model's state during the training process. Compared with model training without a monitoring mechanism, this model training method based on real-time monitoring of the training process can effectively avoid the waste of computer resources and time caused by the inability to adjust the model training strategy in time after the model training diverges in traditional technologies, which is conducive to improving the efficiency of model training.
[0105] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0106] In one embodiment, such as Figure 10 As shown, a recognition model construction device is provided. This device can be a software module, a hardware module, or a combination of both integrated into a computer device. Specifically, the device includes: an acquisition module 1002, a determination module 1004, and a training module 1006, wherein:
[0107] The acquisition module 1002 is used to acquire training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration and internal structure information of the gas and liquid input into the microchannel. The standard gas mass transfer data is used to characterize the bubble state information obtained by inputting the training gas-liquid input data into the microchannel.
[0108] The determination module 1004 is used to train the current training model based on gas-liquid input data and gas mass transfer data, obtain the corresponding current model output result, and perform curve fitting on the current model output result; determine the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data, and determine the current training state based on the comparison result of the difference and the threshold.
[0109] The training module 1006 is used to train the model according to the current training state to obtain an updated training model, use the updated training model as the current training model, and return the steps of training the current training model based on gas-liquid input data and gas mass transfer data until the training termination condition is met, and obtain the target recognition model. The recognition model is used to identify the corresponding gas mass transfer data based on the gas-liquid input data.
[0110] In one embodiment, the determining module 1004 is further configured to obtain the current iteration number corresponding to the training; when the current iteration number reaches a preset threshold, obtain the current model output result corresponding to the current iteration number; and perform curve fitting on the current model output result to obtain the fitting curve corresponding to the current iteration output.
[0111] In one embodiment, the determining module 1004 is further configured to calculate the error result distribution between the fitted curve and the standard curve; when the error result distribution is a preset normal distribution and the expected parameter is less than or equal to the expected threshold and the standard deviation is less than or equal to the standard deviation threshold, the current training state is determined to be a convergent state; when the error result distribution is not a preset normal distribution or the expected parameter is greater than the expected threshold or the standard deviation is greater than the standard deviation threshold, the current training state is determined to be a divergent state.
[0112] In one embodiment, the training module 1006 is further configured to update the training model when the current training state is a convergence state; use the updated training model as the current training model, and return the steps of training the current training model based on gas-liquid input data and gas mass transfer data until the training times reach the maximum number of training times, thereby obtaining the target recognition model.
[0113] In one embodiment, the training module 1006 is further configured to stop the current training of the model when the current training state is divergent; restart the training of the model based on the gas-liquid input data and the gas mass transfer data; return to the steps of training the current training model based on the gas-liquid input data and the gas mass transfer data until the training termination condition is met and the target recognition model is obtained.
[0114] The aforementioned identification model construction device trains the initial identification model by using the gas-liquid input data of the microchannel and the corresponding standard gas mass transfer data as training sample data. During the model training process, the current model output result is obtained, and the difference between the current model output result and its corresponding standard curve is compared with a threshold. The current training state is then determined based on the comparison result, and the model training process is completed based on the current training state. This achieves real-time monitoring of the model's state during the training process. Compared with model training without a monitoring mechanism, this model training method based on real-time monitoring of the training process can effectively avoid the waste of computer resources and time caused by the inability to adjust the model training strategy in time after the model training diverges, which is a problem in traditional technologies. This is beneficial to improving the efficiency of model training.
[0115] Specific limitations regarding the recognition model construction device can be found in the limitations of the recognition model construction method described above, and will not be repeated here. Each module in the aforementioned recognition model construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0116] In one embodiment, such as Figure 11 As shown, a microfluidic state recognition device is provided. This device can be a software module, a hardware module, or a combination of both as part of a computer device. Specifically, the device includes: an acquisition module 1102 and a recognition module 1104, wherein:
[0117] The acquisition module 1102 is used to acquire gas-liquid input data, which includes gas flow rate information, liquid flow rate information, ionic liquid concentration and internal structure information of the microchannel corresponding to the gas and liquid input.
[0118] The recognition module 1104 is used to input gas-liquid input data into the target recognition model and output gas mass transfer data corresponding to the gas-liquid input data. The gas mass transfer data is used to characterize the bubble state information corresponding to the microchannel output. The target recognition model is obtained by acquiring training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel corresponding to the gas and liquid input. The standard gas mass transfer data is used to characterize the bubble state information corresponding to the training gas-liquid input data input into the microchannel. The current training model is trained based on the gas-liquid input data and gas mass transfer data to obtain the corresponding current model output result, and curve fitting is performed on the current model output result. The difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, and the current training state is determined based on the comparison result of the difference and the threshold. According to the current training state, the model is trained to obtain an updated training model, which is used as the current training model. The steps of training the current training model based on the gas-liquid input data and gas mass transfer data are returned until the training termination condition is met, thus obtaining the target recognition model.
[0119] The aforementioned microfluidic state recognition device trains an initial recognition model by using the gas-liquid input data of the microchannel and the corresponding standard gas mass transfer data as training sample data. During the model training process, the current model output result is acquired, and the difference between the current model output result and its corresponding standard curve is compared with a threshold. The current training state is then determined based on the comparison result, and the model training process is completed based on the current training state. This achieves real-time monitoring of the model's state during training. Compared with model training without a monitoring mechanism, this model training method based on real-time monitoring of the training process can effectively avoid the waste of computer resources and time caused by the inability to adjust the model training strategy in time after the model training diverges in traditional technologies. This is beneficial to improving the efficiency of model training, and thus the recognition model can be used to identify the state of microfluidics, thereby improving the recognition efficiency.
[0120] Specific limitations regarding the microfluidic state recognition device can be found in the limitations of the microfluidic state recognition method described above, and will not be repeated here. Each module in the aforementioned microfluidic state recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0121] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores training gas-liquid input data and corresponding standard gas mass transfer data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a recognition model construction method or a microfluidic state recognition method.
[0122] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a recognition model construction method or a microfluidic state recognition method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0123] Those skilled in the art will understand that Figure 12 and Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0124] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0125] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0126] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0127] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for constructing a recognition model, characterized in that, The method includes: Acquire training gas-liquid input data and corresponding standard gas mass transfer data; the gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration and internal structure information of the microchannel corresponding to the gas and liquid input into the microchannel; the standard gas mass transfer data is used to characterize the corresponding bubble state information obtained by inputting the training gas-liquid input data into the microchannel. The current training model is trained based on the gas-liquid input data and gas mass transfer data. The current iteration number is obtained. When the current iteration number reaches a preset threshold, the corresponding current model output result is obtained, and the current model output result is curve fitted. The difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, the error result distribution between the fitted curve and the standard curve is calculated, and the current training state is determined based on the morphological characteristics of the error result distribution, the expected parameter, and the comparison result between the difference and the threshold; wherein, the current training state is a convergent state or a divergent state. Based on the current training state, the model is trained to obtain an updated training model. The updated training model is then used as the current training model. The process of training the current training model based on the gas-liquid input data and gas mass transfer data is repeated until the training termination condition is met, resulting in a target recognition model. This recognition model is used to identify the corresponding gas mass transfer data based on the gas-liquid input data.
2. The method according to claim 1, characterized in that, The process of training the current training model based on the gas-liquid input data and gas mass transfer data, obtaining the current iteration number corresponding to the training, obtaining the corresponding current model output result when the current iteration number reaches a preset threshold, and performing curve fitting on the current model output result includes: Obtain the current iteration number corresponding to the training; When the current iteration count reaches a preset threshold, the current model output result corresponding to the current iteration count is obtained; Curve fitting is performed on the current model output to obtain the fitted curve corresponding to the current iteration output.
3. The method according to claim 1, characterized in that, The process of determining the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data, calculating the error distribution between the fitted curve and the standard curve, and determining the current training state based on the morphological characteristics of the error distribution, the expected parameter, and the comparison result of the difference with a threshold includes: Calculate the error distribution between the fitted curve and the standard curve; When the error result distribution is a preset normal distribution and the expected parameter is less than or equal to the expected threshold and the standard deviation is less than or equal to the standard deviation threshold, the current training state is determined to be a convergent state. When the error result distribution is not a preset normal distribution, or the expected parameter is greater than the expected threshold, or the standard deviation is greater than the standard deviation threshold, the current training state is determined to be a divergent state.
4. The method according to claim 1, characterized in that, The step of training the model according to the current training state to obtain an updated training model, using the updated training model as the current training model, and returning to the step of training the current training model based on the gas-liquid input data and gas mass transfer data, until the training termination condition is met to obtain the target recognition model, includes: When the current training state is a convergent state, update the training model; The updated training model is used as the current training model. The step of training the current training model based on the gas-liquid input data and gas mass transfer data is returned until the maximum number of training times is reached, and the target recognition model is obtained.
5. The method according to claim 1, characterized in that, The step of training the model according to the current training state to obtain an updated training model, using the updated training model as the current training model, and returning to the step of training the current training model based on the gas-liquid input data and gas mass transfer data, until the training termination condition is met to obtain the target recognition model, includes: When the current training state is a divergent state, stop the current training of the model; Based on the gas-liquid input data and gas mass transfer data, restart the model training, return to the step of training the current training model based on the gas-liquid input data and gas mass transfer data, until the training termination condition is met, and obtain the target recognition model.
6. A microfluidic state recognition method, characterized in that, The method includes: Acquire gas-liquid input data, which includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel corresponding to the gas and liquid input to the microchannel. The gas-liquid input data is input into the target recognition model, and the gas mass transfer data corresponding to the gas-liquid input data is output. The gas mass transfer data is used to characterize the bubble state information corresponding to the output of the microchannel. The target recognition model acquires training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel. The standard gas mass transfer data characterizes the bubble state information obtained by inputting the training gas-liquid input data into the microchannel. The current training model is trained based on the gas-liquid input data and gas mass transfer data, and the current iteration number is obtained. When the current iteration number reaches a preset threshold, the corresponding current model output result is obtained, and the current model output result is then processed. Curve fitting; determining the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data, calculating the error result distribution between the fitted curve and the standard curve, and determining the current training state based on the morphological characteristics of the error result distribution, the expected parameters, and the comparison results of the difference and the threshold; wherein, the current training state is a convergent state or a divergent state; according to the current training state, training the model to obtain an updated training model, using the updated training model as the current training model, and returning to the step of training the current training model based on the gas-liquid input data and the gas mass transfer data until the training termination condition is met, thereby obtaining the target recognition model.
7. A recognition model construction device, characterized in that, The device includes: The acquisition module is used to acquire training gas-liquid input data and corresponding standard gas mass transfer data; the gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration and internal structure information of the gas and liquid input into the microchannel; the standard gas mass transfer data is used to characterize the bubble state information obtained by inputting the training gas-liquid input data into the microchannel. The determination module is used to train the current training model based on the gas-liquid input data and gas mass transfer data, obtain the current iteration number corresponding to the training, obtain the corresponding current model output result when the current iteration number reaches a preset threshold, and perform curve fitting on the current model output result; determine the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data, calculate the error result distribution between the fitted curve and the standard curve, and determine the current training state based on the morphological characteristics of the error result distribution, the expected parameters, and the comparison result of the difference and the threshold; wherein, the current training state is a convergent state or a divergent state; The training module is used to train the model according to the current training state to obtain an updated training model, use the updated training model as the current training model, and return to the step of training the current training model based on the gas-liquid input data and gas mass transfer data until the training termination condition is met to obtain a target recognition model. The recognition model is used to identify the corresponding gas mass transfer data based on the gas-liquid input data.
8. A microfluidic state recognition device, characterized in that, The device includes: The acquisition module is used to acquire gas-liquid input data, which includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel corresponding to the gas and liquid input. The identification module is used to input the gas-liquid input data into the target identification model and output gas mass transfer data corresponding to the gas-liquid input data. The gas mass transfer data is used to characterize the bubble state information corresponding to the output of the microchannel. The target identification model is obtained by acquiring training gas-liquid input data and corresponding standard gas mass transfer data. The gas-liquid input data includes gas flow rate information, liquid flow rate information, ionic liquid concentration, and internal structure information of the microchannel corresponding to the gas and liquid input. The standard gas mass transfer data is used to characterize the bubble state information corresponding to the input of the training gas-liquid input data into the microchannel. The current training model is trained based on the gas-liquid input data and gas mass transfer data, and the current iteration number corresponding to the training is obtained. When the number of iterations reaches a preset threshold, the corresponding current model output result is obtained, and curve fitting is performed on the current model output result; the difference between the fitted curve and the standard curve corresponding to the gas mass transfer data is determined, the error result distribution between the fitted curve and the standard curve is calculated, and the current training state is determined based on the morphological characteristics of the error result distribution, the expected parameters, and the comparison result between the difference and the threshold; wherein, the current training state is a convergent state or a divergent state; according to the current training state, the model is trained to obtain an updated training model, the updated training model is used as the current training model, and the step of training the current training model based on the gas-liquid input data and gas mass transfer data is returned until the training termination condition is met, and the target recognition model is obtained.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.