Data interaction method and device based on bacterial colony recognition
Through automated image acquisition and data analysis based on the colony number student growth model, the time-consuming and labor-intensive and artificial error problems of traditional colony monitoring methods are solved, accurate monitoring of colony growth and real-time data access are achieved, and customer experience and research efficiency are improved.
Patent Information
- Application Number
- CN202411145406.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional colony monitoring methods rely on manual observation, which is time-consuming and labor-intensive and prone to human errors. The existing automation system cannot dynamically adjust the frequency of photography, resulting in the acquired colony images that cannot truly reflect the critical moment of growth, and the customer interaction experience is poor.
Based on the pre-constructed colony number student growth model, the colony photography prediction time point is determined by obtaining data such as temperature, pH value, oxygen level, etc., to realize automated image acquisition and data analysis, form accurate colony reports, and provide real-time data access through HTTP requests .
It improves the scientificity and accuracy of the frequency of colony photography, reduces labor costs, shortens the research cycle, improves customer interaction experience, and realizes accurate monitoring of colony growth status and data sharing.
Smart Images

Figure CN119131789A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of colony identification, and in particular to a data interaction method and device based on colony identification. Background Art
[0002] Monitoring the growth of microbial colonies is an important part of biological research and is crucial for understanding the characteristics of microorganisms and evaluating their growth status under different conditions.
[0003] Traditional colony monitoring methods usually rely on manual observation and recording, which is not only time-consuming and labor-intensive, but also prone to human errors, resulting in inaccurate data.
[0004] In order to overcome the problems of traditional colony detection methods, some colony detection systems have been developed to achieve automatic image capture of colonies by setting colony detection postures. However, this system still has some shortcomings:
[0005] 1. Most detection systems usually use timed photography to capture colony images. Since the photography frequency cannot be dynamically adjusted according to the actual growth changes of the colonies, the acquired colony images cannot truly and accurately reflect the key moments of colony growth.
[0006] 2. Most colony detection systems provide customers with a poor interactive experience. Summary of the invention
[0007] One of the purposes of the present invention is to provide a data interaction method and device based on colony identification, which can achieve the rationalization and scientificization of the frequency of colony photography while improving the customer's interactive experience.
[0008] In order to achieve the above object, a data interaction method based on colony recognition is provided, comprising the following steps:
[0009] S1. Acquire current colony growth data, wherein the current colony growth data includes temperature, pH value, nutrient concentration and oxygen level data;
[0010] S2. According to the current growth data and based on a pre-built mathematical growth model of the colony, the corresponding predicted time points for colony photography are determined. The predicted time points for colony photography are important nodes in the colony growth process.
[0011] S3, taking a photo of the current colony according to the corresponding predicted time point of colony photography, and generating corresponding current colony image information;
[0012] S4. According to the current colony image information, identify the colony number result data corresponding to the current colony image information, form a corresponding colony report and upload it to the server;
[0013] S5, receiving the http colony data request sent by the external client;
[0014] S6. According to the received http colony data request, the corresponding colony report is retrieved from the server and sent to the external client.
[0015] Technical principles and effects of this solution: In this solution, the current colony growth data is first acquired, including temperature, pH value, nutrient concentration and oxygen level data. The acquisition of the current colony growth data can provide reliable support for the prediction of the subsequent photo-taking prediction time point.
[0016] Then, based on the pre-built mathematical growth model of the colony, the predicted time point of colony photography corresponding to the current growth data is determined and predicted, where the colony photography time point is each important node in the colony growth process. Use the camera to capture the image of the colony at the predicted time point, and these images will be used for subsequent colony quantity evaluation. Image acquisition is one of the key links in realizing automated evaluation. According to the current colony image information, the corresponding colony number result data in the current colony image information is identified, and the corresponding colony report is formed and uploaded to the server; users can send HTTP requests to the server through external clients (such as web pages or mobile applications) to obtain reports on specific colonies. After receiving the request, the server retrieves the corresponding report from the database and sends it back to the client for the user to view.
[0017] 1. The important time nodes of colony growth can be accurately determined by the pre-constructed mathematical growth model of the colony, so as to arrange image acquisition more effectively. At the predicted time point of colony photography, the current colony image information formed by photographing the current colony can truly and accurately reflect the key moment of colony growth, realize the rationalization of colony photography frequency, and solve the problem that the existing technology uses timed photography to capture colony images, resulting in the fixed photography frequency, which makes the acquired colony images unable to truly and accurately reflect the key moment of colony growth.
[0018] The automated process significantly reduces labor costs and shortens research cycles by improving the efficiency of data collection and analysis.
[0019] 2. Users can access the status report of colony growth anytime and anywhere through the Internet, which facilitates data sharing and management and improves the customer's interactive experience.
[0020] Furthermore, the pre-constructed mathematical growth model of the bacterial colony is:
[0021]
[0022] Where N is the number of colonies, t is the time, μ(T, PH, O 2 ,Y) is the growth rate function, T is the temperature, PH is the pH value, O 2 is the oxygen concentration; μ max is the maximum growth rate, f(T) is the temperature function, g(PH) is the pH value function, h(O 2 ) is the oxygen concentration influence function, T opt is the optimum temperature, σ T is the temperature standard deviation, PH opt is the optimum pH value, σ PH is the standard deviation of pH value, The optimum oxygen concentration is is the standard deviation of oxygen concentration.
[0023] Furthermore, before S1, the step further includes:
[0024] S010, obtaining historical colony growth data and corresponding historical colony number result data;
[0025] S011. Construct the corresponding mathematical growth model of bacterial colonies;
[0026] S012. According to the acquired historical colony growth data and the corresponding historical colony number result data, based on the respective corresponding parameter fitting strategies, the model parameters in the colony mathematical growth model are fitted to form fitted model parameters and the model parameters in the colony mathematical growth model are updated to obtain the fitted colony mathematical growth model;
[0027] S013. According to the fitted mathematical growth model of the colony, based on the time step fitting strategy, the time step in the mathematical growth model of the colony is fitted to form the best fitting curve.
[0028] Beneficial effects: By collecting historical colony growth data and corresponding colony number result data, a rich training sample is provided for model construction. Using these historical data to construct a mathematical growth model of the colony, it lays the foundation for subsequent prediction and analysis. Through the parameter fitting strategy, the parameters in the model can be effectively fitted to improve the prediction accuracy of the model. The fitted model parameters can more accurately reflect the actual situation of colony growth and provide a guarantee for the accuracy of the model. By fitting the time step, the time resolution of the model can be more finely controlled to ensure the timeliness and accuracy of the prediction results. The best fitting curve formed based on the time step fitting strategy can more accurately predict the key time nodes of colony growth, thereby guiding the best time for automatic photography.
[0029] Further, the parameter fitting strategy is:
[0030] Initializing model parameters, wherein the model parameters include initial colony number, maximum carrying capacity and maximum growth rate;
[0031] In the current iteration, according to the preset error calculation formula, the error at time t is calculated. i The error value between the predicted value of the number of colonies corresponding to the mathematical growth model of the colony and the true value of the number of colonies is calculated, and it is determined whether the error value is less than or equal to the preset error threshold. If not, the next step is executed; if so, the model parameters corresponding to this iteration are determined to be the final parameters;
[0032] The error calculation formula is:
[0033]
[0034] In the formula, MSE is the error value, N pred (t i ) is the time t i The predicted value of the number of colonies corresponding to the mathematical growth model of the colony, N true (t i ) is the time t i The actual value of the number of colonies corresponding to the location, n is the number of corresponding data points;
[0035] According to the gradient calculation formula, calculate the gradient of the loss function relative to each model parameter;
[0036] The gradient calculation formula is:
[0037]
[0038] Where θ is the model parameter initial colony number, maximum carrying capacity or maximum growth rate;
[0039] According to the calculated gradients corresponding to the various model parameters, based on the preset gradient update parameter calculation formula, the corresponding model parameters are updated, and then the error value calculation is re-executed;
[0040] The gradient update parameter calculation formula is:
[0041]
[0042] In the formula, α is the corresponding learning rate, which is used to control the amplitude of each model parameter update.
[0043] Beneficial effects: In this embodiment, by iteratively adjusting the model parameters (including the initial colony number, maximum carrying capacity and maximum growth rate), the model prediction value is closer to the actual observed value, thereby significantly improving the prediction accuracy of the model. The gradient descent method is used to update the parameters, and by calculating the gradient of the loss function relative to each parameter, it is ensured that each iteration can move in the direction of reducing the error, effectively speeding up the speed of parameter optimization.
[0044] Further, the time step fitting strategy is:
[0045] Set the initial colony number and colony growth data;
[0046] Select the corresponding time step, and in each time step, calculate the corresponding growth rate based on the current colony growth data and the colony mathematical growth model;
[0047] According to the calculated growth rate, the calculation formula is updated based on the number of colonies to calculate the number of colonies corresponding to each time step;
[0048] The colony number update calculation formula is:
[0049] N(t+Δt)=N(t)+μ(T,PH,O 2 ,Y)×N(t)×Δt
[0050] In the formula, N(t+Δt) is the number of colonies corresponding to time t+Δt;
[0051] Repeat the above steps until t+Δt is greater than or equal to the preset total time;
[0052] The data points corresponding to the number of colonies in all time steps were connected into a curve to obtain the best fitting curve of colony growth over time.
[0053] The present invention also provides a data interaction device based on colony identification, which uses the above-mentioned data interaction method based on colony identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 The figure is a flow chart of the data interaction method based on colony recognition in the first embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following is further described in detail through specific implementation methods:
[0056] Embodiment 1
[0057] A data interaction method based on colony identification, basically as follows Figure 1 As shown, the following steps are included:
[0058] The S1 also includes:
[0059] S010, obtaining historical colony growth data and corresponding historical colony number result data;
[0060] S011. Construct a corresponding mathematical growth model of the colony; the mathematical growth model of the colony can adopt the Monroe model or the Logstie model, etc. In this embodiment, the Monroe model is adopted. Through the extended Monroe model, the influence of time on the growth of the colony can be considered, and a curve of the number of colonies changing with time can be generated through numerical simulation. This method can more accurately describe and predict the growth dynamics of the colony under different environmental conditions in the laboratory culture dish.
[0061] S012. According to the acquired historical colony growth data and the corresponding historical colony number result data, based on the corresponding parameter fitting strategy and time step fitting strategy, the model parameters in the colony mathematical growth model are fitted to form fitted model parameters and the model parameters in the colony mathematical growth model are updated to obtain the fitted colony mathematical growth model;
[0062] The parameter fitting strategy is:
[0063] Initializing model parameters, wherein the model parameters include initial colony number, maximum carrying capacity and maximum growth rate;
[0064] In the current iteration, according to the preset error calculation formula, the error at time t is calculated. i The error value between the predicted value of the number of colonies corresponding to the mathematical growth model of the colony and the true value of the number of colonies is calculated, and it is determined whether the error value is less than or equal to the preset error threshold. If not, the next step is executed; if so, the model parameters corresponding to this iteration are determined to be the final parameters;
[0065] The error calculation formula is:
[0066]
[0067] In the formula, MSE is the error value, N pred (t i ) is the time t i The predicted value of the number of colonies corresponding to the mathematical growth model of the colony, N true (t i ) is the time t i The actual value of the number of colonies corresponding to the location, n is the number of corresponding data points;
[0068] According to the gradient calculation formula, calculate the gradient of the loss function relative to each model parameter;
[0069] The gradient calculation formula is:
[0070]
[0071] Wherein, θ is the model parameter initial colony number, maximum carrying capacity or maximum growth rate; in this embodiment, the model parameters also include optimum temperature, temperature standard deviation, optimum pH value, pH value standard deviation, optimum oxygen concentration and oxygen concentration standard deviation. is the partial derivative of the model prediction with respect to the parameters.
[0072] According to the calculated gradients corresponding to the various parameters, the corresponding model parameters are updated based on the preset gradient update parameter calculation formula, and then the error value calculation is re-executed; in the present embodiment, in the colony mathematical growth model, the maximum growth rate is usually fitted or estimated by experimental data, and the specific method that can be used is:
[0073] Through a large amount of historical colony growth data and historical colony number results, multiple experiments were conducted to record the data of colony number changes over time under different conditions. Then, a controlled variable experiment was conducted, that is, keeping other conditions unchanged and only changing one of the variables to observe the impact on the growth rate, so as to achieve the estimation of the maximum growth rate.
[0074] The gradient update parameter calculation formula is:
[0075]
[0076] In the formula, α is the corresponding learning rate, which is used to control the amplitude of each model parameter update.
[0077] S013. According to the fitted mathematical growth model of the colony, based on the time step fitting strategy, the time step in the mathematical growth model of the colony is fitted to form the best fitting curve.
[0078] The time step fitting strategy is:
[0079] Set the initial colony number and colony growth data;
[0080] Select the corresponding time step, and in each time step, according to the current colony growth data, based on the colony mathematical growth model, calculate the corresponding growth rate; in this embodiment, the time step is a dynamic process. Considering the time scale of biological processes, colony growth is a relatively slow process, while the consumption of nutrients and the accumulation of metabolites may be relatively fast. Therefore, the time step should be small enough to capture these changes. Stability and accuracy, in the numerical solution process, too large a step will lead to instability and numerical oscillation of the calculation. Especially in the case of large changes in growth rate, a larger step may not accurately reflect the state of the system. The step should be small enough to ensure that the approximate calculation of the model in each time step is accurate. You can choose a step that strikes a balance between accuracy and computational cost by testing different step sizes and comparing the results. Preliminarily select a smaller time step (in units of half an hour or fifteen minutes), simulate and observe the results. If the result is smooth and stable (in units of hours), you can gradually increase the time step until you find that the result has a large deviation or instability, and then appropriately reduce the step.
[0081] According to the calculated growth rate, the calculation formula is updated based on the number of colonies to calculate the number of colonies corresponding to each time step;
[0082] The colony number update calculation formula is:
[0083] N(t+Δt)=N(t)+μ(T,PH,O 2 ,Y)×N(t)×△t
[0084] In the formula, N(t+Δt) is the number of colonies corresponding to time t+Δt;
[0085] Repeat the above steps until t+Δt is greater than or equal to the preset total time;
[0086] The data points corresponding to the number of colonies in all time steps were connected into a curve to obtain the best fitting curve of colony growth over time.
[0087] S1. Acquire current colony growth data, wherein the current colony growth data includes temperature, pH value, nutrient concentration and oxygen level data;
[0088] S2. According to the current growth data and based on a pre-built mathematical growth model of the colony, the corresponding predicted time points for colony photography are determined. The predicted time points for colony photography are important nodes in the colony growth process.
[0089] The pre-constructed mathematical growth model of the bacterial colony is:
[0090]
[0091] Where N is the number of colonies, t is the time, μ(T, PH, O 2 ,Y) is the growth rate function, T is the temperature, PH is the pH value, O 2 is the oxygen concentration; μ max is the maximum growth rate, f(T) is the temperature function, g(PH) is the pH value function, h(O 2 ) is the oxygen concentration influence function, T opt is the optimum temperature, σ T is the temperature standard deviation, PH opt is the optimum pH value, σ PH is the standard deviation of pH value, The optimum oxygen concentration is is the standard deviation of oxygen concentration. In this embodiment, the prediction time point of colony photography is determined by the best fitting curve. In this embodiment, exp is the abbreviation of exponential function, which means an exponential function with the base e of natural logarithm as the base. The form of exponential function is as follows:
[0092] exp(x) = e x
[0093] In this embodiment, T opt , σ T , PH opt , σ PH , The strategy for obtaining these parameters is: change one of the parameters, keep other parameters unchanged, and observe the changes in the prediction results, so as to record the impact of each parameter change on the prediction results, thereby determining these parameters.
[0094] S3, taking a photo of the current colony according to the corresponding predicted time point of colony photography, and generating corresponding current colony image information;
[0095] S4. According to the current colony image information, the corresponding colony number result data in the current colony image information is identified, and a corresponding colony report is formed and uploaded to the server. In this embodiment, after the corresponding colony number result data is identified, the colony mathematical growth model is also feedback-adjusted, specifically:
[0096] Identify the photographing time corresponding to the corresponding colony data result data and the photographing time corresponding to the first photographing when the colony begins to be cultivated, calculate the time difference corresponding to the two photographing times, and then determine the number of fitted colonies on the fitting curve corresponding to the time difference from the best fitting curve, compare whether the difference in colony count between the identified colony data result and the fitted colony count is less than the preset number difference, if so, judge that the corresponding best fitting curve is a feasible curve, that is, the colony mathematical growth model is a feasible model, if not, select one of the model parameters in the colony mathematical growth model to change the value, keep the values of other model parameters unchanged, take photos and samples at the corresponding photographing time, record the influence of each model parameter change on the number of fitted colonies corresponding to the best fitting curve, and select the model parameter whose changed value is the smallest with the original value and makes the difference between the changed fitted colony count and the identified colony data result data the smallest, so as to complete the update of the corresponding model parameters in the colony mathematical growth model. In this embodiment, the shelf life of the sample or food can be known through the colony count result data, that is, the shelf life of the food or sample can be determined if the growth time of the colonies is lower than the maximum growth time of the specified colony number.
[0097] S5, receiving the http colony data request sent by the external client;
[0098] S6. According to the received http colony data request, the corresponding colony report is retrieved from the server and sent to the external client.
[0099] This embodiment also discloses a data interaction device based on colony identification, using the above-mentioned data interaction method based on colony identification. The corresponding device is based on a device based on the Qualcomm 6490 platform of the Android system, which can preview and store pictures through the colony application. Special light source equipment, temperature and humidity sensors are integrated in the device. The nutrient solution (carbon source or nitrogen source vitamin, etc.) in the bacterial culture dish provides energy for the bacteria. According to the cycle characteristics of bacterial growth (hysteresis period, logarithmic period, stable period, decay period), combined with a mathematical model, the change of bacteria over time is predicted to trigger automatic photography and then the actual number of colonies is obtained. In this embodiment, an http service is pulled up by service for data interaction processing (the Bluetooth communication protocol adopts the standard Bluetooth protocol, and the data format of Bluetooth transmission adopts the json data format for general use. It is used to send the algorithm results after the algorithm is processed in real time after taking pictures. An http server is built inside the data interaction device in a client / server manner.
[0100] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is described too much here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can know all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A data interaction method based on colony identification, characterized in that: The following steps are involved: S1. Acquire current colony growth data, wherein the current colony growth data includes temperature, pH value, nutrient concentration and oxygen level data; S2. According to the current growth data and based on a pre-built mathematical growth model of the colony, the corresponding predicted time points for colony photography are determined. The predicted time points for colony photography are important nodes in the colony growth process. S3, taking a photo of the current colony according to the corresponding predicted time point of colony photography, and generating corresponding current colony image information; S4. According to the current colony image information, identify the colony number result data corresponding to the current colony image information, form a corresponding colony report and upload it to the server; S5, receiving the http colony data request sent by the external client; S6. According to the received http colony data request, the corresponding colony report is retrieved from the server and sent to the external client.
2. A data interaction method based on colony recognition according to claim 1, characterized in that: The pre-constructed mathematical growth model of the bacterial colony is: Where N is the number of colonies, t is time, μ(T, PH, O2, Y) is the growth rate function, T is temperature, PH is pH value, O2 is oxygen concentration; μ max is the maximum growth rate, f(T) is the temperature influence function, g(PH) is the pH value influence function, h(O2) is the oxygen concentration influence function, T opt is the optimum temperature, σ T is the temperature standard deviation, PH opt is the optimum pH value, σ PH is the standard deviation of pH value, The optimum oxygen concentration is is the standard deviation of oxygen concentration.
3. A data interaction method based on colony recognition according to claim 2, characterized in that: The S1 also includes: S010, obtaining historical colony growth data and corresponding historical colony number result data; S011. Construct the corresponding mathematical growth model of bacterial colonies; S012. According to the acquired historical colony growth data and the corresponding historical colony number result data, based on the corresponding parameter fitting strategy and time step fitting strategy, the model parameters in the colony mathematical growth model are fitted to form fitted model parameters and the model parameters in the colony mathematical growth model are updated to obtain the fitted colony mathematical growth model; S013. According to the fitted mathematical growth model of the colony, based on the time step fitting strategy, the time step in the mathematical growth model of the colony is fitted to form the best fitting curve.
4. A data interaction method based on colony recognition according to claim 3, characterized in that: The parameter fitting strategy is: Initializing model parameters, wherein the model parameters include initial colony number, maximum carrying capacity and maximum growth rate; In the current iteration, according to the preset error calculation formula, the error at time t is calculated. i The error value between the predicted value of the number of colonies corresponding to the mathematical growth model of the colony and the true value of the number of colonies is calculated, and it is determined whether the error value is less than or equal to the preset error threshold. If not, the next step is executed; if so, the model parameters corresponding to this iteration are determined to be the final parameters; The error calculation formula is: In the formula, MSE is the error value, N pred (t i ) is the time t i The predicted value of the number of colonies corresponding to the mathematical growth model of the colony, N true (t i ) is the time t i The actual value of the number of colonies corresponding to the location, n is the number of corresponding data points; According to the gradient calculation formula, calculate the gradient of the loss function relative to each model parameter; The gradient calculation formula is: Where θ is the model parameter initial colony number, maximum carrying capacity or maximum growth rate; According to the calculated gradients corresponding to the various model parameters, based on the preset gradient update parameter calculation formula, the corresponding model parameters are updated, and then the error value calculation is re-executed; The gradient update parameter calculation formula is: In the formula, α is the corresponding learning rate, which is used to control the amplitude of each model parameter update.
5. A data interaction method based on colony recognition according to claim 4, characterized in that: The time step fitting strategy is: Set the initial colony number and colony growth data; Select the corresponding time step, and in each time step, calculate the corresponding growth rate based on the current colony growth data and the colony mathematical growth model; According to the calculated growth rate, the calculation formula is updated based on the number of colonies to calculate the number of colonies corresponding to each time step; The colony number update calculation formula is: N(t+Δt)=N(t)+μ(T,PH,O2,Y)×N(t)×Δt In the formula, N(t+Δt) is the number of colonies corresponding to time t+Δt; Repeat the above steps until t+Δt is greater than or equal to the preset total time; The data points corresponding to the number of colonies in all time steps were connected into a curve to obtain the best fitting curve of colony growth over time.
6. A data interaction device based on bacterial colony recognition, characterized in that: A data interaction method based on colony identification using any one of claims 1 to 5 above.
