Method and device for detecting quality of bio-fermented feed, electronic equipment and storage medium
By acquiring images and parameters before and after fermentation, and combining image processing and quality inspection models, the implicit correlation information in the fermentation process is automatically analyzed, solving the problem of detection relying on experience and achieving high-accuracy quality inspection of bio-fermented feed.
Patent Information
- Application Number
- CN202210925407.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-08-03
AI Technical Summary
Current methods for testing the quality of bio-fermented feed rely on the experience of the testing personnel, resulting in low accuracy.
By acquiring images and fermentation parameters before and after fermentation, and using image processing and feature extraction techniques combined with a quality inspection model, the implicit correlation information in the fermentation process can be automatically analyzed to achieve high-accuracy detection without the need for experience.
This improves the accuracy of testing bio-fermented feed, reduces reliance on the experience of testing personnel, and ensures the reliability of test results.
Smart Images

Figure CN115165884B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of feed testing technology, and in particular to a method, apparatus, electronic device, and storage medium for testing the quality of bio-fermented feed. Background Technology
[0002] Roughage fermented by microorganisms is called bio-fermented feed. Bio-fermented feed uses microorganisms and compound enzymes as fermentation agents to transform feed ingredients into a unified biological fermentation process, including microbial protein, bioactive small peptides and amino acids, active probiotics, and compound enzyme preparations. Roughage is rich in crude fiber and protein, such as cellulose, hemicellulose, pectin, and lignin, but it is difficult for animals to directly digest and absorb. Consuming it can increase the burden on the intestines and cause intestinal diseases. Bio-fermented feed not only compensates for the amino acids that are easily lacking in conventional feeds but also rapidly transforms the nutrients in other roughage ingredients, enhancing digestibility and absorption. The fermentation process of bio-fermented feed is usually controlled manually based on experience. Once the fermentation conditions are met, the bio-fermented feed is considered to be ready. However, since the growth of the microorganisms participating in the fermentation is not predictable, different growth patterns can occur even under the same conditions, thus affecting the preparation effect of the bio-fermented feed. This results in varying quality of bio-fermented feed obtained under the same fermentation conditions. Currently, the quality testing of bio-fermented feed is usually done manually, and its accuracy depends on the testing personnel's experience. If the testing personnel lack relevant testing experience, the accuracy of bio-fermented feed testing will be low. Summary of the Invention
[0003] This invention provides a method for quality testing of bio-fermented feed, aiming to address the problem that existing bio-fermented feed quality testing is usually done manually, and its accuracy depends on the testing personnel's experience. If the testing personnel lack relevant testing experience, the accuracy of bio-fermented feed testing will be low. This method uses the implicit correlation information between pre-fermentation images, post-fermentation images, and fermentation parameters to test the quality of bio-fermented feed. It does not require the testing personnel to have relevant testing experience to test the quality of bio-fermented feed. Since the implicit correlation information represents the implicit changes in the fermentation process, the accuracy of bio-fermented feed testing can be improved by utilizing these implicit changes.
[0004] In a first aspect, embodiments of the present invention provide a method for quality testing of bio-fermented feed, the method comprising the following steps:
[0005] Acquire images of the bio-fermented feed to be tested before fermentation and after fermentation, wherein both the images before fermentation and the images after fermentation have a first resolution;
[0006] Obtain the fermentation parameters of the bio-fermented feed to be tested;
[0007] Based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters, the quality of the bio-fermented feed is tested to obtain the quality test results of the bio-fermented feed.
[0008] Optionally, acquiring pre-fermentation and post-fermentation images of the bio-fermented feed to be tested includes:
[0009] A sample of unfermented feed was taken out from the unfermented feed and placed in a first observation dish with a preset thickness. The first observation dish was photographed from a fixed position to obtain an image before fermentation.
[0010] A sample of the bio-fermented feed is taken out from the bio-fermented feed and placed in a second observation dish with the preset thickness. The second observation dish is photographed by the fixed position to obtain an image before fermentation. The first and second observation dishes have the same shape and structure. The bio-fermented feed is obtained by fermenting the unfermented feed with the fermentation parameters.
[0011] Optionally, obtaining the fermentation parameters of the bio-fermented feed to be tested includes:
[0012] Starting from the start of fermentation, the added parameters, environmental parameters, and internal parameters of the bio-fermented feed are recorded at preset time intervals to obtain a fermentation parameter table, which includes the fermentation parameters.
[0013] Optionally, the step of performing quality testing on the bio-fermented feed based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters to obtain the quality testing results of the bio-fermented feed includes:
[0014] Feature extraction is performed on the pre-fermentation image to obtain the first solid matter feature;
[0015] Feature extraction is performed on the fermented image to obtain the second solid matter feature;
[0016] Feature extraction is performed on the fermentation parameters to obtain the prior features of the fermentation process;
[0017] Based on the first solid material characteristics, the second solid material characteristics, and the prior characteristics, the quality of the bio-fermented feed is tested to obtain the quality test results of the bio-fermented feed.
[0018] Optionally, the step of extracting features from the fermentation parameters to obtain prior features of the fermentation process includes:
[0019] The fermentation parameter table is matrixed to obtain the fermentation parameter matrix;
[0020] The fermentation parameter matrix is decomposed into a first factor matrix and a second factor matrix.
[0021] The first factor matrix and the second factor matrix are linearly transformed to obtain the target factor matrix;
[0022] Feature extraction is performed on the target factor matrix to obtain the prior features of the fermentation process.
[0023] Optionally, the step of performing quality testing on the bio-fermented feed based on the first solid matter characteristics, the second solid matter characteristics, and the prior characteristics to obtain the quality testing results of the bio-fermented feed includes:
[0024] The first solid object feature, the second solid object feature, and the prior feature are fused together to obtain the fused feature;
[0025] Linear regression was performed on the fusion features to obtain the quality test results of the bio-fermented feed.
[0026] Optionally, after the step of performing quality testing on the bio-fermented feed based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters to obtain the quality testing result of the bio-fermented feed, the method includes:
[0027] If the quality test result is unqualified, the degree of fermentation of the bio-fermented feed shall be determined according to the fusion characteristics;
[0028] When the fermentation degree is less than the preset fermentation degree, the predicted time to reach the preset fermentation degree is predicted based on the post-fermentation image and the fermentation parameters.
[0029] When the predicted time is reached, the quality of the bio-fermented feed will be tested again.
[0030] Secondly, embodiments of the present invention provide a bio-fermented feed quality testing device, the device comprising:
[0031] The first acquisition module is used to acquire pre-fermentation and post-fermentation images of the bio-fermented feed to be tested, wherein both the pre-fermentation and post-fermentation images have a first resolution.
[0032] The second acquisition module is used to acquire the fermentation parameters of the bio-fermented feed to be tested;
[0033] The quality inspection module is used to perform quality inspection on the bio-fermented feed based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters, and to obtain the quality inspection result of the bio-fermented feed.
[0034] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the bio-fermented feed quality detection method provided in embodiments of the present invention.
[0035] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the bio-fermented feed quality detection method provided in the embodiments of the present invention.
[0036] In this embodiment of the invention, pre-fermentation and post-fermentation images of the bio-fermented feed to be tested are acquired, both having a first resolution; fermentation parameters of the bio-fermented feed to be tested are acquired; based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters, the bio-fermented feed is subjected to quality testing to obtain the quality testing result of the bio-fermented feed. By using the implicit correlation information between the pre-fermentation image, the post-fermentation image, and the fermentation parameters to perform quality testing of the bio-fermented feed, no relevant testing experience is required for the testing personnel. Since the implicit correlation information represents the implicit changes in the fermentation process, utilizing these implicit changes can improve the accuracy of bio-fermented feed testing. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart of a bio-fermented feed quality testing method provided in an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram of the structure of a bio-fermented feed quality testing device provided in an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] Please see Figure 1 , Figure 1 This is a flowchart of a bio-fermented feed quality testing method provided in an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0043] 101. Obtain images of the bio-fermented feed to be tested before and after fermentation.
[0044] In this embodiment of the invention, both the pre-fermentation image and the post-fermentation image have a first resolution. The first resolution refers to the number of pixels in the image, and can be M*N. The pre-fermentation image and the post-fermentation image can be RGB images or grayscale images. In this embodiment of the invention, the pre-fermentation image and the post-fermentation image are preferably RGB images. An RGB image can be understood as an image including an R channel, a G channel, and a B channel, where the R channel is the red channel, the G channel is the green channel, and the B channel is the blue channel. Using RGB images preserves the image's color information.
[0045] The images before fermentation refer to the images of the main feed components without the addition of fermentation materials, while the images after fermentation refer to the images of the main feed components after the addition of fermentation materials. The fermentation materials may include the microorganisms used for fermentation, the basic substances required for microbial growth, etc.
[0046] The images before and after fermentation can be obtained by taking pictures of the same batch of fermented feed before and after fermentation. The images before fermentation are taken before fermentation, and the images after fermentation are taken after fermentation.
[0047] 102. Obtain the fermentation parameters of the biological fermented feed to be tested.
[0048] In this embodiment of the invention, the bio-fermented feed to be tested is a fermented feed. The fermentation parameters may include additive parameters, environmental parameters, and internal parameters. The additive parameters may include the type of bacteria added, the amount of bacteria added, the basic substances required for the growth of the corresponding bacteria, and the amount of basic substances added. The environmental parameters may include the temperature, humidity, and light of the fermentation environment. The internal parameters may include the internal temperature and humidity of the bio-fermented feed during the fermentation process. The fermentation parameters may be the fermentation parameters recorded from the start of fermentation to the empirical completion of fermentation.
[0049] 103. Based on pre-fermentation images, post-fermentation images, and fermentation parameters, the quality of the bio-fermented feed was tested, and the quality test results of the bio-fermented feed were obtained.
[0050] In this embodiment of the invention, the images before and after fermentation can be processed by image processing methods to extract the implicit correlation between the images before and after fermentation. Using the implicit correlation between the images before and after fermentation, combined with fermentation parameters, the quality of the bio-fermented feed can be tested to obtain the quality test results of the bio-fermented feed.
[0051] In one possible embodiment, the fermentation parameters mentioned above are fermentation parameters recorded based on fermentation experience. For example, if fermentation experience shows that fermenting type A bacteria under conditions B for C days can yield qualified fermented bio-fermented feed, then the fermentation parameters are the addition parameters, environmental parameters, and internal parameters corresponding to fermentation of type A bacteria under conditions B for C days. Implicit information about the fermentation process can be extracted through the implicit correlation between pre-fermentation and post-fermentation images. This implicit information is then regressed into predicted fermentation parameters. The predicted fermentation parameters are compared and analyzed with the actual fermentation parameters to obtain the quality test results of the bio-fermented feed. If the similarity between the predicted fermentation parameters and the actual fermentation parameters is greater than a preset similarity, the bio-fermented feed can be confirmed to meet the quality requirements. If the similarity is less than a preset similarity, the bio-fermented feed can be confirmed to not meet the quality requirements.
[0052] In another possible embodiment, a quality detection model can be used to predict the pre-fermentation images, post-fermentation images, and fermentation parameters. This quality detection model is a pre-trained model. It is trained using a dataset containing a large number of samples. Each sample is a triplet, consisting of a pre-fermentation image, a post-fermentation image, and fermentation parameters. These samples, along with the fermentation parameters, represent the same batch of bio-fermented feed. Each sample corresponds to a labeled data point, which can be the quality score of the bio-fermented feed, assigned by experts. By training the quality detection model on the dataset, it learns the implicit relationships between the pre-fermentation images, post-fermentation images, and fermentation parameters, and outputs an accurate quality score as the quality detection result.
[0053] In this embodiment of the invention, pre-fermentation and post-fermentation images of the bio-fermented feed to be tested are acquired, both having a first resolution; fermentation parameters of the bio-fermented feed to be tested are acquired; based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters, the bio-fermented feed is subjected to quality testing to obtain the quality testing result of the bio-fermented feed. By using the implicit correlation information between the pre-fermentation image, the post-fermentation image, and the fermentation parameters to perform quality testing of the bio-fermented feed, no testing personnel need to have relevant testing experience to perform quality testing of the bio-fermented feed. Since the implicit correlation information represents the implicit changes in the fermentation process, utilizing these implicit changes can improve the accuracy of bio-fermented feed testing.
[0054] Optionally, in the steps of acquiring images of the bio-fermented feed to be tested before and after fermentation, a sample of unfermented feed can be taken from the unfermented feed and placed in a first observation dish with a preset thickness. The first observation dish is then photographed from a fixed position to obtain an image before fermentation. Similarly, a sample of fermented feed can be taken from the bio-fermented feed and placed in a second observation dish with a preset thickness. The second observation dish is then photographed from a fixed position to obtain an image before fermentation. The first and second observation dishes have the same shape and structure, and the bio-fermented feed is obtained by fermenting the unfermented feed using fermentation parameters.
[0055] In this embodiment of the invention, there is a time interval between acquiring the images before and after fermentation. Sampling is performed on the unfermented feed to obtain a predetermined amount of unfermented feed sample. This predetermined amount is related to the cavity parameters and preset thickness of the first observation dish. For example, if the cavity parameter is radius r and the preset thickness is h, then the volume is hπr. 2As a predetermined amount. Furthermore, the aforementioned preset thickness is determined based on the particle size of the unfermented feed. The preset thickness can be an integer multiple of the average particle size of the unfermented feed. In this embodiment of the invention, it is preferably 2 times the average particle size. This allows for a certain overlap space when the feed is laid flat, increasing the amount of information contained in the image before fermentation and further improving the accuracy of the detection results.
[0056] Similarly, samples are taken from the fermented feed to obtain a predetermined amount of fermented feed sample. The predetermined amount is related to the cavity parameters and preset thickness of the first observation dish. For example, if the cavity parameter is radius r and the preset thickness is h, then the volume is hπr. 2 As a predetermined amount. Furthermore, the aforementioned preset thickness is determined based on the particle size of the unfermented feed. The aforementioned preset thickness can be an integer multiple of the average particle size of the fermented feed. In this embodiment of the invention, it is preferably 2 times, which allows for a certain overlap space when the feed is laid flat, increasing the amount of information contained in the image after fermentation and further improving the accuracy of the detection results.
[0057] The shooting environment for the pre-fermentation image is the same as that for the post-fermentation image. The shooting environment includes the shape and structure of the first and second observation dishes. In this embodiment of the invention, the first and second observation dishes may have the same radius and the same background color. The background color of the first and second observation dishes is related to the color of the unfermented and fermented feed. Specifically, the contrasting color between the intermediate color of the unfermented and fermented feed can be used as the background color of the first and second observation dishes. This can result in a shooting image with a strong contrast between the background and the foreground, thereby improving the image quality of the pre-fermentation and post-fermentation images.
[0058] By setting the acquisition parameters for pre-fermentation and post-fermentation images, images taken under the same conditions can be obtained, thereby further improving the accuracy of quality testing for bio-fermented feed.
[0059] Optionally, in the step of obtaining the fermentation parameters of the bio-fermented feed to be tested, the added parameters, environmental parameters and internal parameters of the bio-fermented feed can be recorded at preset time intervals from the start of fermentation to obtain a fermentation parameter table, which includes fermentation parameters.
[0060] In this embodiment of the invention, the above-mentioned added parameters may include the type of bacteria, the amount of bacteria added, the basic substances required for the growth of the corresponding bacteria, and the amount of basic substances added. The above-mentioned environmental parameters may include the temperature, humidity, and light of the fermentation environment. The above-mentioned internal parameters may include the internal temperature and humidity of the biological fermented feed during the fermentation process.
[0061] The aforementioned preset time period can be one day. Each day, the added parameters, environmental parameters, and internal parameters of the bio-fermented feed are recorded to obtain a fermentation parameter table, which includes fermentation parameters.
[0062] In one possible embodiment, the aforementioned preset time period can also be based on the minimum addition interval of the added parameters. For example, if strain E is added on the first day and strain F is added on the second day, the addition interval is one day. If substance G is added at 7:00 on the first day and substance H is added at 20:00 on the first day, the addition interval is 13 hours. If the minimum interval is 13 hours, then the preset time period is 13 hours. Every 13 hours, the added parameters, environmental parameters, and internal parameters of the bio-fermented feed are recorded to obtain a fermentation parameter table, which includes fermentation parameters.
[0063] The fermentation parameters mentioned above can be shown in Table 1:
[0064]
[0065] Table 1
[0066] In Table 1, each cell represents the corresponding parameter at the corresponding time T. Table 1 above is only one example of the parameters in this embodiment of the invention. When adding new fermentation parameters, corresponding columns can be added for adaptive modification.
[0067] Optionally, in the step of performing quality testing on bio-fermented feed based on pre-fermentation images, post-fermentation images, and fermentation parameters to obtain the quality testing results of bio-fermented feed, features can be extracted from the pre-fermentation images to obtain first solid features; features can be extracted from the post-fermentation images to obtain second solid features; features can be extracted from the fermentation parameters to obtain prior features of the fermentation process; and the bio-fermented feed can be tested based on the first solid features, the second solid features, and the prior features to obtain the quality testing results of bio-fermented feed.
[0068] In this embodiment of the invention, the quality detection of bio-fermented feed based on pre-fermentation images, post-fermentation images, and fermentation parameters can be performed by a quality detection model. The quality detection model includes a first feature extraction network, a second feature extraction network, a third feature extraction network, and an output network. The first feature extraction network, the second feature extraction network, and the third feature extraction network are parallel networks, and the outputs of the first feature extraction network, the second feature extraction network, and the third feature extraction network are all connected to the input of the output network.
[0069] The first feature extraction network can extract features from the image before fermentation to obtain the first solid matter feature; the second feature extraction network can extract features from the image after fermentation to obtain the second solid matter feature; the third feature extraction network can extract features from the fermentation parameters to obtain the prior features of the fermentation process; the output network can perform regression output on the first solid matter feature, the second solid matter feature, and the prior features to obtain the quality test results of the bio-fermented feed.
[0070] In this context, the first feature extraction network, the second feature extraction network, the third feature extraction network, and the output network are all trained networks. Specifically, by training the quality detection model to obtain a trained quality detection model, we can obtain trained first feature extraction networks, second feature extraction networks, third feature extraction networks, and the output network.
[0071] The first solids characteristic mentioned above can be used to represent the solids distribution of unfermented feed, and the second solids characteristic mentioned above can be used to represent the solids distribution of fermented feed. The implicit correlation between the solids distribution of unfermented feed and the solids distribution of fermented feed can represent the implicit changes in the fermentation process based on the results. The a priori features mentioned above are used to represent the implicit changes in the corresponding fermentation parameters during the fermentation process based on experience. By combining the implicit changes in the fermentation process based on the results and the implicit changes in the fermentation process based on experience, the quality test results of the fermented feed can be obtained. When the implicit changes in the fermentation process based on the results and the implicit changes in the fermentation process based on experience are the same or similar, it can be determined that the quality of the fermented feed meets expectations, and the quality test result can be qualified; when the implicit changes in the fermentation process based on the results and the implicit changes in the fermentation process based on experience are dissimilar, it can be determined that the quality of the fermented feed does not meet expectations, and the quality test result can be unqualified.
[0072] Based on the first solid characteristics, the second solid characteristics, and prior characteristics, the quality of bio-fermented feed is tested. By utilizing the implicit correlation between the first solid characteristics, the second solid characteristics, and prior characteristics, the quality test results of bio-fermented feed can be improved.
[0073] Optionally, in the step of extracting features from fermentation parameters to obtain prior features of the fermentation process, the fermentation parameter table can be matrixed to obtain a fermentation parameter matrix; the fermentation parameter matrix can be factored to obtain a first factor matrix and a second factor matrix; the first factor matrix and the second factor matrix can be linearly transformed to obtain a target factor matrix; and features can be extracted from the target factor matrix to obtain prior features of the fermentation process.
[0074] In this embodiment of the invention, the parameter table is shown in Table 1. Matrixing the fermentation parameter table allows for the encoding of added parameters, environmental parameters, and internal parameters. For example, added parameters, environmental parameters, and internal parameters can be encoded as numbers between [0, 1]. For instance, strain A can be encoded as 0.01, strain E as 0.05, and temperature 35 degrees Celsius as 0.35, etc. After matrixing, the fermentation parameter matrix S = {xi,j} = {x11, x12, ..., x96, x97} is obtained, where i represents the column number and j represents the row number.
[0075] After obtaining the fermentation parameter matrix S, factor matrix decomposition can be performed on the fermentation parameter matrix S, decomposing it into a first factor matrix U and a second factor matrix V, where the fermentation parameter matrix S = first factor matrix U * second factor matrix V, the first factor matrix U = {ui, k}, which are the type-related factors of the fermentation parameters, and the second factor matrix V = {k, vj}, which are the time-related factors of the fermentation parameters.
[0076] The first factor matrix U and the second factor matrix V can be transformed into a target factor matrix with a first resolution through linear transformation. The first resolution can be M*N.
[0077] The target factor matrix can be used to extract features through a third feature extraction network to obtain the prior features of the fermentation process.
[0078] By performing factor matrix decomposition on the fermentation parameter matrix, a first factor matrix and a second factor matrix can be obtained. By performing linear transformation on the first factor matrix and the second factor matrix, a target factor matrix can be obtained. The data distribution in the fermentation parameters can be integrated through the target factor matrix. Since the first factor matrix is based on the type-related factors of the fermentation parameters and the second factor matrix is based on the time-related factors of the fermentation parameters, the prior characteristics of the fermentation parameters can be further explored, thereby improving the reliability of the prior features.
[0079] Optionally, in the step of conducting quality testing on bio-fermented feed based on the first solid characteristics, the second solid characteristics, and prior characteristics to obtain the quality testing results of bio-fermented feed, the first solid characteristics, the second solid characteristics, and the prior characteristics can be fused to obtain fused characteristics; linear regression can then be performed on the fused characteristics to obtain the quality testing results of bio-fermented feed.
[0080] In this embodiment of the invention, the first solid object feature, the second solid object feature, and the prior feature all have a second resolution. The second resolution can be m*n. The first solid object feature, the second solid object feature, and the prior feature are fused. Specifically, the first solid object feature, the second solid object feature, and the prior feature are fused by channel fusion, which can yield a fused feature of m*n*3. The 3 indicates that the first solid object feature, the second solid object feature, and the prior feature are each a channel, for a total of 3 channels.
[0081] The output network includes a first linear regression layer. This layer performs linear regression on the fused features to obtain the quality test results of the bio-fermented feed. The linear regression layer can be a fully connected layer. This fully connected layer performs a linear transformation on the fused features to obtain corresponding feature values. Each feature value corresponds to an output category, which includes "qualified" and "unqualified."
[0082] Optionally, after the step of conducting quality testing on the bio-fermented feed based on pre-fermentation images, post-fermentation images, and fermentation parameters to obtain the quality testing results, if the quality testing results are unqualified, the degree of fermentation of the bio-fermented feed can be determined based on the fusion characteristics; when the degree of fermentation is less than the preset degree of fermentation, the predicted time to reach the preset degree of fermentation is predicted based on the post-fermentation images and fermentation parameters; when the predicted time is reached, the quality testing of the bio-fermented feed is then conducted.
[0083] In this embodiment of the invention, a failure to meet quality inspection standards indicates insufficient fermentation time. It should be noted that bio-fermented feed, under unchanged fermentation conditions, can be stored for several years without spoiling, and its effectiveness is even better. Therefore, a failure to meet quality inspection standards indicates insufficient fermentation time.
[0084] The output network includes a second linear regression layer. This layer performs linear regression on the fused features to obtain the fermentation level of the bio-fermented feed. It's important to note that this second linear regression layer needs to be added during the training of the quality detection model. A labeled data point corresponding to the fermentation level needs to be added to the sample data in the dataset; this labeled data point is determined by experts.
[0085] When the fermentation degree is less than the preset fermentation degree, it indicates that the fermentation time is insufficient and further fermentation is needed. A time series model can be used to predict the time required to reach the preset fermentation degree based on post-fermentation images and fermentation parameters; this time is called the prediction time. The aforementioned time series model can be based on an RNN (Recurrent Neural Network) or an LSTM (Long Short-Term Memory) network.
[0086] Furthermore, during the training of the time series model, the sample data used are fermentation parameters and post-fermentation images under historical time series. The labeled data is the time point at which the preset fermentation degree is reached, which is a time point after the historical time series.
[0087] It should be noted that the bio-fermented feed quality testing method provided in this embodiment of the invention can be applied to devices such as smartphones, computers, and servers.
[0088] Optionally, embodiments of the present invention provide a bio-fermented feed quality testing device; please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is a schematic diagram of the structure of a bio-fermented feed quality testing device provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the device includes:
[0089] The first acquisition module 201 is used to acquire pre-fermentation and post-fermentation images of the bio-fermented feed to be detected, wherein both the pre-fermentation and post-fermentation images have a first resolution.
[0090] The second acquisition module 202 is used to acquire the fermentation parameters of the bio-fermented feed to be tested;
[0091] The quality inspection module 203 is used to perform quality inspection on the bio-fermented feed based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters, and obtain the quality inspection result of the bio-fermented feed.
[0092] Optionally, the first acquisition module 201 is further configured to: remove a sample of unfermented feed from unfermented feed and place the sample of unfermented feed in a first observation dish with a preset thickness; and take an image of the first observation dish from a fixed position to obtain an image before fermentation; remove a sample of fermented feed from fermented feed and place the sample of fermented feed in a second observation dish with the preset thickness; and take an image of the second observation dish from the fixed position to obtain an image before fermentation. The first and second observation dishes have the same shape and structure, and the fermented feed is obtained by fermenting the unfermented feed using the fermentation parameters.
[0093] Optionally, the second acquisition module 202 is further configured to record the added parameters, environmental parameters, and internal parameters of the bio-fermented feed at preset time intervals from the start of fermentation, and obtain a fermentation parameter table, wherein the fermentation parameter table includes the fermentation parameters.
[0094] Optionally, the quality inspection module 203 is further configured to extract features from the pre-fermentation image to obtain a first solid matter feature; extract features from the post-fermentation image to obtain a second solid matter feature; extract features from the fermentation parameters to obtain prior features of the fermentation process; and perform quality inspection on the bio-fermented feed based on the first solid matter feature, the second solid matter feature, and the prior features to obtain the quality inspection result of the bio-fermented feed.
[0095] Optionally, the quality detection module 203 is further configured to perform matrix processing on the fermentation parameter table to obtain a fermentation parameter matrix; perform factor matrix decomposition on the fermentation parameter matrix to obtain a first factor matrix and a second factor matrix; perform linear transformation on the first factor matrix and the second factor matrix to obtain a target factor matrix; and perform feature extraction on the target factor matrix to obtain prior features of the fermentation process.
[0096] Optionally, the quality detection module 203 is further configured to fuse the first solid material feature, the second solid material feature, and the prior feature to obtain a fused feature; and to perform linear regression on the fused feature to obtain the quality detection result of the bio-fermented feed.
[0097] Optionally, the device includes:
[0098] A determination module is used to determine the degree of fermentation of the bio-fermented feed based on the fusion characteristics if the quality test result is unqualified.
[0099] The prediction module is used to predict the time to reach the preset fermentation level based on the post-fermentation image and the fermentation parameters when the fermentation level is less than the preset fermentation level.
[0100] The re-detection module is used to perform quality testing on the bio-fermented feed again when the predicted time is reached.
[0101] It should be noted that the behavior detection device provided in this embodiment of the invention can be applied to devices such as smartphones, computers, and servers that can perform quality detection of bio-fermented feed.
[0102] The behavior detection device provided in this embodiment of the invention can realize all the processes implemented by the bio-fermented feed quality detection method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, further details are omitted here.
[0103] See Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 3As shown, it includes: a memory 302, a processor 301, and a computer program for a bio-fermented feed quality detection method stored in the memory 302 and executable on the processor 301, wherein:
[0104] The processor 301 is used to call the computer program stored in the memory 302 and perform the following steps:
[0105] Acquire images of the bio-fermented feed to be tested before fermentation and after fermentation, wherein both the images before fermentation and the images after fermentation have a first resolution;
[0106] Obtain the fermentation parameters of the bio-fermented feed to be tested;
[0107] Based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters, the quality of the bio-fermented feed is tested to obtain the quality test results of the bio-fermented feed.
[0108] Optionally, the acquisition of pre-fermentation and post-fermentation images of the bio-fermented feed to be detected, performed by processor 301, includes:
[0109] Take a sample of unfermented feed from the unfermented feed and place the sample in a first observation dish with a preset thickness. Take a picture of the first observation dish from a fixed position to obtain an image before fermentation.
[0110] A sample of the bio-fermented feed is taken out from the bio-fermented feed and placed in a second observation dish with the preset thickness. The second observation dish is photographed by the fixed position to obtain an image before fermentation. The first and second observation dishes have the same shape and structure. The bio-fermented feed is obtained by fermenting the unfermented feed with the fermentation parameters.
[0111] Optionally, the process of acquiring the fermentation parameters of the bio-fermented feed to be tested, executed by processor 301, includes:
[0112] Starting from the start of fermentation, the added parameters, environmental parameters, and internal parameters of the bio-fermented feed are recorded at preset time intervals to obtain a fermentation parameter table, which includes the fermentation parameters.
[0113] Optionally, the processor 301 performs quality testing on the bio-fermented feed based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters to obtain the quality testing result of the bio-fermented feed, including:
[0114] Feature extraction is performed on the pre-fermentation image to obtain the first solid matter feature;
[0115] Feature extraction is performed on the fermented image to obtain the second solid matter feature;
[0116] Feature extraction is performed on the fermentation parameters to obtain the prior features of the fermentation process;
[0117] Based on the first solid material characteristics, the second solid material characteristics, and the prior characteristics, the quality of the bio-fermented feed is tested to obtain the quality test results of the bio-fermented feed.
[0118] Optionally, the processor 301 performs feature extraction on the fermentation parameters to obtain prior features of the fermentation process, including:
[0119] The fermentation parameter table is matrixed to obtain the fermentation parameter matrix;
[0120] The fermentation parameter matrix is decomposed into a first factor matrix and a second factor matrix.
[0121] The first factor matrix and the second factor matrix are linearly transformed to obtain the target factor matrix;
[0122] Feature extraction is performed on the target factor matrix to obtain the prior features of the fermentation process.
[0123] Optionally, the process executed by processor 301 to perform quality testing on the bio-fermented feed based on the first solid material characteristics, the second solid material characteristics, and the prior characteristics, and to obtain the quality testing result of the bio-fermented feed, includes:
[0124] The first solid object feature, the second solid object feature, and the prior feature are fused together to obtain the fused feature;
[0125] Linear regression was performed on the fusion features to obtain the quality test results of the bio-fermented feed.
[0126] Optionally, after the step of performing quality testing on the bio-fermented feed based on the pre-fermentation image, the post-fermentation image, and the fermentation parameters to obtain the quality testing result of the bio-fermented feed, the method executed by the processor 301 includes:
[0127] If the quality test result is unqualified, the degree of fermentation of the bio-fermented feed shall be determined according to the fusion characteristics;
[0128] When the fermentation degree is less than the preset fermentation degree, the predicted time to reach the preset fermentation degree is predicted based on the post-fermentation image and the fermentation parameters.
[0129] When the predicted time is reached, the quality of the bio-fermented feed will be tested again.
[0130] It should be noted that the electronic device provided in this embodiment of the invention can be applied to devices such as smartphones, computers, and servers that can perform quality testing of bio-fermented feed.
[0131] The electronic device provided in this embodiment of the invention can realize all the processes implemented by the bio-fermented feed quality detection method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, further details are omitted here.
[0132] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the bio-fermented feed quality detection method or the application-side bio-fermented feed quality detection method provided in this invention, and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0133] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0134] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for detecting the quality of a bio-fermented feed, characterized by, The method comprises the following steps: An image before fermentation and an image after fermentation of the biological fermentation feed to be detected are acquired, including: taking an unbiologically fermented feed sample from unbiologically fermented feed, laying the unbiologically fermented feed sample in a first observation dish at a preset thickness, and shooting the first observation dish from a fixed position to obtain the image before fermentation; taking a biologically fermented feed sample from biologically fermented feed, laying the biologically fermented feed sample in a second observation dish at the preset thickness, and shooting the second observation dish from the fixed position to obtain the image after fermentation, wherein the first observation dish and the second observation dish have the same shape structure, the biologically fermented feed is obtained by fermenting the unbiologically fermented feed with fermentation parameters, and the image before fermentation and the image after fermentation both have a first resolution; The fermentation parameters of the biological fermentation feed to be detected are acquired, including: recording the addition parameters, the environmental parameters and the internal parameters of the biologically fermented feed at intervals of a preset period from the start of fermentation to obtain a fermentation parameter table, and the fermentation parameter table comprises the fermentation parameters; Based on the image before fermentation, the image after fermentation and the fermentation parameters, the quality of the biological fermentation feed is detected to obtain a quality detection result of the biological fermentation feed, including: extracting features from the image before fermentation to obtain first solid features; extracting features from the image after fermentation to obtain second solid features; extracting features from the fermentation parameters to obtain prior features of the fermentation process; and based on the first solid features, the second solid features and the prior features, the quality of the biological fermentation feed is detected to obtain the quality detection result of the biological fermentation feed.
2. The method of claim 1, wherein, The features of the fermentation parameters are extracted to obtain the prior features of the fermentation process, including: The fermentation parameter table is matrix processed to obtain a fermentation parameter matrix; The fermentation parameter matrix is factor matrix decomposed to obtain a first factor matrix and a second factor matrix; The first factor matrix and the second factor matrix are linearly changed to obtain a target factor matrix; The target factor matrix is feature extracted to obtain the prior features of the fermentation process.
3. The method of claim 2, wherein, Based on the first solid features, the second solid features and the prior features, the quality of the biological fermentation feed is detected to obtain the quality detection result of the biological fermentation feed, including: The first solid features, the second solid features and the prior features are fused to obtain fused features; The fused features are linearly regressed to obtain the quality detection result of the biological fermentation feed.
4. The method of claim 3, wherein, After the step of detecting the quality of the biological fermentation feed based on the image before fermentation, the image after fermentation and the fermentation parameters to obtain the quality detection result of the biological fermentation feed, the method comprises: If the quality detection result is unqualified, the fermentation degree of the biological fermentation feed is determined according to the fused features. When the fermentation degree is less than the preset fermentation degree, a prediction time to reach the preset fermentation degree is predicted according to the post-fermentation image and the fermentation parameter; When the prediction time is reached, the quality detection of the biological fermentation feed is performed again.
5. A biological fermentation feed quality detection device, characterized in that, The device comprises: The first obtaining module is configured to obtain a pre-fermentation image and a post-fermentation image of the biological fermentation feed, including: taking an unbiological fermentation feed sample from unbiological fermentation feed, laying the unbiological fermentation feed sample in a first observation dish at a preset thickness, and shooting the first observation dish at a fixed position to obtain the pre-fermentation image; taking a biological fermentation feed sample from biological fermentation feed, laying the biological fermentation feed sample in a second observation dish at the preset thickness, and shooting the second observation dish at the fixed position to obtain the post-fermentation image, wherein the first observation dish and the second observation dish have the same shape structure, the biological fermentation feed is obtained by fermenting the unbiological fermentation feed with a fermentation parameter, and the pre-fermentation image and the post-fermentation image both have a first resolution; The second obtaining module is configured to obtain a fermentation parameter of the biological fermentation feed, including: recording the addition parameter, the environmental parameter and the internal parameter of the biological fermentation feed at a preset interval from the start of fermentation to obtain a fermentation parameter table, and the fermentation parameter table comprises the fermentation parameter; The quality detection module is configured to perform quality detection on the biological fermentation feed based on the pre-fermentation image, the post-fermentation image and the fermentation parameter to obtain a quality detection result of the biological fermentation feed, including: extracting features from the pre-fermentation image to obtain a first solid feature; extracting features from the post-fermentation image to obtain a second solid feature; extracting features from the fermentation parameter to obtain a prior feature of the fermentation process; and performing quality detection on the biological fermentation feed based on the first solid feature, the second solid feature and the prior feature to obtain the quality detection result of the biological fermentation feed.
6. An electronic device, comprising: The device comprises: The memory, the processor and the computer program stored on the memory and executable on the processor, wherein the processor implements the steps in the biological fermentation feed quality detection method according to any one of claims 1 to 4 when executing the computer program.
7. A computer readable storage medium characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executable on the processor to implement the steps in the biological fermentation feed quality detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Fermentation process statue monitoring and controlling method based on multi-sensor information fusion
CN102876816A