Bread Shrimp Microbe Growth Simulation and Prediction System Based on Neural Network

: According to the requirements of a scientific research project, a set of bread shrimp microbial growth simulation and prediction system is designed and implemented in detail. The system is established by taking vibrio parahemolyticus in bread shrimp as research objects, according to effects of temperature, salt and time on their growth, and employing neural network technology. In order to improve its compatibility, the system is developed by using C# on Visual Studio 2008 platform, and its design and implementation are based on AForge.NET framework and sliding-window modeling method. The system consists of three parts: data management, data simulation and data prediction, which would provide an effective analytical tool for bread shrimp safe production. After tested carefully, the system can meet the requirements of the project design.


Introduction
Intelligent simulation and prediction for microbial growth refers to that under the premise of without microbial detection and analysis and according to the characteristic data of the food microbe in different processing, storage and circulation, the dynamic changes of the growth and survival of main pathogenic bacteria and spoilage bacteria in food is going to be determined by processing with computers, thus the quality and safety of food can be evaluated and predicted quickly. According to the existing limited experimental data, using neural network prediction algorithm, and through intelligent simulation and prediction neural network-based microbial growth simulation and prediction system can provide more data than one that come from real experiments, which could provide reference data for safe food production.
According to the requirements of a research project, sub project of National Science and Technology Support Program of China: Key Integrated and Demonstrated Technologies for Quality and Safety Control in Aquatic Product Processing Process (No. 2012BAD29B06), the authors of this paper have developed a set of bread shrimp microbial growth simulation and prediction system. The system is established by taking vibrio parahemolyticus in bread shrimp as research objects, according to effects of temperature, salt and time on their growth, and employing neural network technology. The system consists of three parts: data management, data simulation and data prediction, which would provide an effective analytical tool for bread shrimp safe production.
In order to improve its compatibility, the system is developed by using C# on Visual Studio 2008 platform, and its design and implementation are based on AForge.NET framework and sliding-window modeling method. Through intelligent simulation and prediction in the system, users can predict vibrio parahemolyticus growth and survival data in various conditions only providing a limited number of experimental vibrio parahemolyticus growth and survival data in the conditions. By this way, users do not need to perform experiments in each condition, greatly reducing the number of experiments and saving experimental time and costs. its compatibility is not good. In the light of such reasons, in order to meet the requirement of the research project (No. 2012BAD29B06) and to improve the compatibility of system, in this paper we have developed an intelligent simulation and prediction system for bread shrimp microbial growth by using C# on Visual Studio 2008 platform, and its design and implementation are based on AForge.NET framework and sliding-window modeling method.

AForge.NET
AForge.NET is an open source C# framework designed for developers and researchers in the fields of computer vision and artificial intelligence -image processing, neural networks, genetic algorithms, fuzzy logic, machine learning, robotics, etc.
The framework is comprised by the set of libraries and sample applications, which demonstrate their features. Typically, AForge.NET is comprised of a series of components, such as AForge.Imaging, AForge.Vision, AForge.Video, AForge.Neuro, AForge. Genetic, AForge.Fuzzy, AForge.Robotics, AForge.MachineLearning, etc. AForge.Imaging is a library with image processing routines and filters; AForge.Vision is a computer vision library; AForge.Video is a set of libraries for video processing; AForge.Neuro is a neural networks computation library; AForge.Genetic is an evolution programming library; AForge.Fuzzy is a fuzzy computations library; AForge.Robotics is a library providing support of some robotics kits; AForge.MachineLearning is a machine learning library. The framework is provided not only with different libraries and their sources, but with many sample applications, which demonstrate the use of this framework, and with documentation help files, which are provided in HTML Help format. The documentation is also available on-line. [25] When a neural network-based system is developed, a neural networks computation library, AForge.Neuro, should be used. The C# library on AForge.Neuro contains six main entities shown in Figure 1. From Figure 1, we can see that there are six main entities in C# library on AForge.Neuro, namely, Neuron, Layer, Network, IActivationFunction, ISupervisedLearning, IUnsupervisedLearning. Neural network is made of a collection of neurons, in which each neuron is described by Neuron. Neuron is a base abstract class for all neurons, which encapsulates such common entities like a neuron's weight, output value, and input value. Other neuron classes inherit from the base class to extend it with additional properties and specialize it. Neural network is also made of some layers, in which each layer is described by Layer. Layer represents a collection of neurons. This is a base abstract class, which encapsulates common functionality for all neuron's layers. A network consists of a collection of neuron's layers, which is described be Network, what is a base abstract class, which provides common functionality of a generic neural network. To implement a specific neural network, it is required to inherit the class, extending it with specific functionalities of any neural network architecture. IActivationFunction is an activation function's interface. Activation functions are used in activation neurons -the type of neuron, where the weighted sum of its inputs is calculated and then the value is passed as input to the activation function, and the output value becomes the output value of the neuron. ISupervisedLearning is an interface for supervised learning algorithms -the type of learning algorithms where a system is provided with sample inputs, with desired output values during the learning phase. The aim of the system is to generalize learning data, and learn to provide the correct output value when it is presented with the input value only. IUnsupervisedLearning is an interface for unsupervised learning algorithms -the type of learning algorithms where a system is provided with sample inputs only during the learning phase, but not with the desired outputs. The aim of the system is to organize itself in such a way to find correlation and similarities between data samples.
The C# library on AForge.Neuro provides the following two types of neural network architectures: Activation Network and Distance Network. In engineering practice, we can select one of the two types of neural network architectures, but how to make a choice depends on concrete problems. Activation Network is commonly used neural network where each neuron computes its output as the activation function's output, and the argument is a weighted sum of its inputs combined with the threshold value. The network may consist of a single layer, or of multiple layers. Trained with supervised learning algorithms, the network allows to solve such tasks as approximation, prediction, classification, and recognition. Another neural network is Distance Network where each neuron computes its output as a distance between its weight values and input values. The network consists of a single layer, and may be used as a base for such networks like Kohonen Self Organizing Map, Elastic Network, and Hamming Network.
The C# library on AForge.Neuro also provides abundant learning algorithms, which could be used to train different neural networks and to solve different problems. Primary learning algorithms include Back Propagation Learning, Perceptron Learning, SOM Learning, Delta Rule Learning, Elastic Network Learning. Back Propagation Learning is one of the most popular, known and commonly used algorithms for multi-layer neural network learning. Because the algorithm is able to train multi-layer neural networks, the range of its applications is very great, and includes such tasks as approximation, prediction, object recognition, etc. Perceptron Learning could be used with a one-layer activation network, where each neuron has a threshold activation function. SOM Learning treats neural network as a 2D map of nodes, where each node may represent a separate class. The algorithm organizes a network in such a way, that it becomes possible to find the correlation and similarities between data samples. Delta Rule Learning utilizes the activation function's derivative, and may be applicable to single-layer activation networks only, where each neuron has a continuous activation function instead of a threshold activation function. The most popular continuous activation function is the unipolar and bipolar sigmoid function. Elastic Network Learning is similar to the idea of the SOM learning algorithm, but it treats network neurons not as a 2D map of nodes, but as a ring. During the learning procedure, the ring gets some shape, which represents a solution. [26] Software design process based on AForge.NET could be described as follows: Firstly in order to use the classes and interfaces of AForge. Neuro to construct and train the neural network model, it is needed to open VisualStudio2008 software and add the three dynamic link libraries AForge. Controls. dll, AForge. dll and AForge. Neuro. dll in its solution manager.
Secondly the activation network or distance network class should be introduced to instantiate the neural network model in accordance with the actual requirements. Subsequently, it is needed to choose a suitable learning algorithm for each model from the classes of BP Learning, Delta rule Learning, Perceptron Learning, SOM Learning or Elastic Network Learning, and set the parameters such as relevant learning rate and impulse value.
Finally the neural network model can be trained by using the training data sets generated by sliding-window method. At the same time, the error curves in the training process can be drawn onto the Chart control provided by AForge.NET framework so as to view the data conveniently. When the error of neural network is less than the preset error or the number of training is reached, the training process will be stopped [27].

Neural Network Sliding-Window Modeling Method
In general, neural network modeling uses sliding-window method. In order to facilitate computer programming, a neural network sliding-window modeling method is theoretically derived in detail by one of the authors of the paper Xiao Laisheng [32]. Specific method is described as follows. Figure 2 Shows neural network architecture for sliding-window modeling. In Figure 2, assume that M is total number of nodes in x

Neural Network Architecture for Sliding-Window Modeling
, total error function is defined as

Learning Algorithm
When sliding-window is used, the learning algorithm of wavelet neural network is described as follows.
Step one, Initialize network weights, thresholds, scale and translation parameters of wavelet function.
Give corresponding initial values for each of the following parameters: scale parameter j a and translation parameter j b of the wavelet, weights of the network ( ), 1, 2, , ij r r U ω = ⋯ and ( ), 1, 2, jk s s V ω = ⋯ , learning rate η and momentum factor λ .
Set sample counter 1 p = and number of iterations 1 n = , and provided maximum number of iterations is N .
Step two, Input learning sample s { } Outputs of hidden layer are ( ) Sliding-window outputs of output layer are In equations (1), (2), and (3), Step three, Calculate target error and gradient vectors. Define target error function p E as is sliding-window calculated outputs of output layer.
Energy function gradient respectively are can affect all level component of output layer, so But, ( ) ij s ω can only affect kth level component of output layer, so Step four, Error back propagation and modify network parameters.
Computational formulas are Step five, Input next sample, namely set 1 p p = + . If p P ≤ , then go to Step two.
Step six, Calculate total error of the network 1 1 2 And judge if E is smaller than preset progress value ( 0) ε ε > . If E ε < or n N > , stop the learning of network, otherwise, set 1 n n = + and 1 p = , go to Step two. It is needed to explain that, in the process of derivation as an example the wavelet function is taken as activation function of the neural network. In fact, other functions can be used as activation functions too, such as Sigmoid Function: S shape function. But in engineering practice how the final effects to use these functions are depends on a series of simulation experiments, in which a lot of tests and comparisons should be done.

Requirement Regulation
Firstly, users acquire the number of bacterial colonies on temperature, salinity, PH, low temperature, temperature +PH and temperature + salinity at several time points by experiments. Secondly the system storages related experimental data, and begins neural network simulation according to the experimental data and finally predicts the number of bacterial colonies of vibrio parahaemolyticus on each time point.
This system consists of the following three parts. Data management Data management includes data addition, data deletion, data loading, data query. Users add the experimental data into the database for management through data addition and can delete the added data if needed.
According to the experimental conditions, the number of bacterial colonies of vibrio parahaemolyticus could be inquired through data query. Data loading can load experimental data into the system under certain conditions. It is needed to load the relevant data before simulation.
Data simulation According to the experimental data of a certain state, the number of bacterial colonies at all time points in the state could be simulated through the BP neural network algorithm. Data prediction According to the experimental data of a certain state, the number of bacterial colonies at a certain time point in the state could be predicted through the BP neural network algorithm. This time point can be the one that the user has not acquired by experiments. In this way, users can predict the number of bacterial colonies at each time point through a limited number of experiments.

Overall Function Structure
According to the demand, the system is divided into three parts: data management module, data simulation module, data prediction module. Data management module includes functions of data addition, data deletion, data query and data loading. Overall function structure diagram is as shown in Figure 3.

Basic Process Flow
The process of data simulation and prediction is shown in Figure 4. The growth experiment data of vibrio parahaemolyticus in bread shrimp in the six states of temperature, salinity, pH, temperature, temperature + PH, temperature + salinity at some time points are acquired through experiments in the laboratory. Then, these data are made as initial input data to a neural network and processed as input normalization, and finally the algorithm of Back Propagation Learning is taken for training the neural network. The trained neural network can be used for predicting the number of bacterial colonies of vibrio parahaemolyticus for each time point.

Overall Scheme
The system is developed as an easy-to-use microbial growth simulation and prediction system, in which the growth experimental data of vibrio parahaemolyticus in bread shrimp in the six states of temperature, salinity, pH, low temperature, temperature + PH, temperature + salinity at some time points are taken as input data for neural network. Neural network algorithm, Back Propagation Learning, is used for neural network simulation. The program structure of the system is to take Visual Studio 2008 as its front, SQL Server2008 as its database, and use open source AForge.NET for its framework. The front desk interface displays two-dimensional data graphics, while in the background the system loads experimental data stored in the database, applies open source framework AForge.NET for neural network simulation, and outputs the prediction results to the front desk interface.

Database Design
The background database of the system uses SQL Server database, which is used to store the experimental growth data of vibrio parahaemolyticus. Interface connects to the database through the System. Data. SqlClient provided by the C# namespace method. Experimental data of vibrio parahaemolyticus in bread shrimp in six states of temperature, salinity, pH, low temperature; temperature + PH, temperature + salinity are provided by experiments in laboratory, which can be changed with a certain period of time. Six pieces of corresponding data tables in the database are established to store data.

System Function Module Detailed Design i. Neural network training module:
The basic principle of neural network training is that experimental data are used as its inputs and needed to be normalized, and the network is trained through an activation function. In the system we use Sigmoid Function as its activation function. After training, the network can be used to perform data prediction. The key codes are as follows. privateconstint tempreture = 0;// tempreture -0，salty -1, ph-2，lowSurvival -3，temprePh ph-4，tempreSalty -5 privateconstint salty = 1; privateconstint ph = 2; privateconstint lowSurvival = 3;

Implementation of Data Management Module
In the data management module, the experimental data can be added, deleted, queried, and data can be also loaded from the database.
Data addition is as shown in Figure 5. Enter data that is needed to add in the input box, and then click the Add button to add. Data query interface is similar to data addition, enter the data into the corresponding input boxes to temperature and time, and then click on the Query button to search. If the queried data does not exist in the database, it will give tips.
Data loading is as shown in Figure 6, after clicking on the Load button, the experimental data of the corresponding state in the database will be loaded into the table. Data deletion interface is similar to data loading interface, select a record in the table, and then click the Del button, you can delete the data from the database.

Implementation of Data Simulation Module
Data simulation is as shown in Figure 7. Select the condition that is needed to be simulated at the top of the list box, and then click on the Simul button, you can perform neural network training and two-dimensional data simulation.

Implementation of Data Prediction Module
Data prediction is as shown in Figure 8. Enter the prediction condition in the corresponding condition box, and then click the Pred button, and the results of the prediction will be displayed on the bacterial value box.

Conclusions
According to the requirements of a research project, sub project of National Science and Technology Support Program of China: Key Integrated and Demonstrated Technologies for Quality and Safety Control in Aquatic Product Processing Process (No. 2012BAD29B06), the authors of this paper have developed a set of bread shrimp microbial growth simulation and prediction system. The system is established by taking vibrio parahemolyticus in bread shrimp as research objects, according to effects of temperature, salt and time on their growth, and employing neural network technology. The system consists of three parts: data management, data simulation and data prediction, which would provide an effective analytical tool for bread shrimp safe production. In order to improve its compatibility, the system is developed by using C# on Visual Studio 2008 platform, and its design and implementation are based on Aforge.NET framework and sliding-window modeling method.
The system is developed as an easy-to-use microbial growth simulation and prediction system, in which experimental growth data of vibrio parahaemolyticus in bread shrimp in the six states of temperature, salinity, pH, low temperature, temperature + PH, temperature + salinity at some time points are taken as input data for neural network. Neural network algorithm, Back Propagation Learning, is used for neural network simulation. The program structure of the system is to take Visual Studio 2008 as its front, SQL Server2008 as its database, and use open source AForge.NET for its framework. The front desk interface displays two-dimensional data graphics, while in the background the system loads experimental data stored in the database, applies open source framework AForge.NET for neural network simulation, and outputs the prediction results to the front desk interface. After tested carefully, the system can meet the requirements of the project design.
Through intelligent simulation and prediction in the system, users can predict vibrio parahemolyticus growth and survival data in various conditions only providing a limited number of vibrio parahemolyticus growth and survival data in the conditions. By this way, users do not need to perform experiments in each condition, greatly reducing the number of experiments and saving experimental time and costs.