A method for monitoring the morphology of lentinula edodes fermentation mycelial pellets and predicting the end of cultivation

CN122885407APending Publication Date: 2026-10-09GUIZHOU TONGHUI EDIBLE FUNGI DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611141794.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]本发明提供一种香菇菌种发酵菌丝球形态监测与培养终点预测方法,解决相关技术中缺乏对发酵过程中菌丝球形态的定量监测手段、无法准确预测培养终点从而导致培养质量不稳定的技术问题

Benefits of technology

[0024]本发明通过按照采集周期连续获取菌丝球图像并同步采集环境参数,形成菌丝球时间序列数据集,使菌丝球从萌发到成熟的形态演变过程能够被连续追踪,克服了人工定时取样仅能获取离散时间节点状态信息的局限。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122885407A_ABST
    Figure CN122885407A_ABST
Patent Text Reader

Abstract

The present application relates to edible mushroom liquid culture technology field, disclose a kind of shiitake mushroom fermentation mycelium spherical form monitoring and culture end point prediction method, wherein the method includes: according to acquisition cycle to obtain mycelium image and environmental parameter, form mycelium ball time series dataset;Extract equivalent diameter, sphericity, surface mycelium extension proportion, internal structure density and gray space gradient change, generate morphological feature matrix;Calculate mycelium ball activity index and determine growth stage;Morphological parameters and environmental parameters are input into the prediction network of fusion attention, and output mature probability prediction value;Determine culture end point based on mature probability and activity index change rate and output control instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of liquid spawn culture technology for edible fungi, specifically to a method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom spawn based on image feature extraction and time series prediction. Background Technology

[0002] During the liquid spawn cultivation of shiitake mushrooms, the mycelial balls undergo morphological evolution from germination and aggregation to formation and maturity, and their morphological state directly affects the quality of the spawn. Current cultivation methods mainly rely on manual sampling at regular intervals to obtain mycelial state information at discrete time points through microscopic observation or dry weight detection.

[0003] The above methods have the following shortcomings: First, the detection frequency is low, and only information on the state of mycelial balls at discrete time points can be obtained, which cannot reflect the continuous dynamic changes in the morphology of mycelial balls; Second, the evaluation indicators are mainly based on single parameters such as the diameter and number of mycelial balls, which cannot characterize the changes in the internal structural density and biological activity of mycelial balls, and it is difficult to identify internal hypoxic areas and aging states; Third, the culture endpoint is usually determined according to a fixed time, without considering the impact of strain differences, batch differences in culture media, and environmental fluctuations on the optimal harvest time, which easily leads to over-culturing or under-culturing problems. Summary of the Invention

[0004] This invention provides a method for monitoring the morphology of mycelial balls during the fermentation of shiitake mushroom strains and predicting the culture endpoint, solving the technical problem in related technologies that lack quantitative monitoring methods for the morphology of mycelial balls during fermentation and cannot accurately predict the culture endpoint, thus leading to unstable culture quality.

[0005] This invention discloses a method for monitoring the morphology of fermented mycelial balls and predicting the end point of cultivation in shiitake mushroom spawn. The method includes: acquiring images of mycelial liquid and synchronous environmental parameters of mycelial balls in a fermenter according to a preset collection cycle; correlating the mycelial liquid images, environmental parameters, and cultivation time to generate three-dimensional correlation data; storing the data in chronological order to form a mycelial ball time-series dataset; performing grayscale enhancement, background separation, and edge recognition processing on the mycelial liquid images to obtain the target region of the mycelial balls; segmenting the target region of the mycelial balls to obtain segmented images of each independent mycelial ball; extracting the equivalent diameter, sphericity, surface mycelial extension ratio, internal structural density, and grayscale gradient change of each mycelial ball to generate a mycelial ball morphology feature matrix; standardizing the parameters in the mycelial ball morphology feature matrix and obtaining the mycelial ball activity index through weighted calculation; inputting an input vector sequence composed of morphological parameters and environmental parameters from multiple consecutive collection times into a prediction network to output a maturity probability prediction value; and determining whether the cultivation end point has been reached based on the maturity probability prediction value and the rate of change of the mycelial ball activity index within the most recent multiple consecutive collection cycles and outputting a control command.

[0006] Furthermore, the sphericity The calculation method is as follows:

[0007] ;

[0008] in, The projected area of ​​the mycelial ball. The perimeter of the mycelial ball's edge. Pi; the equivalent diameter To the projected area of ​​the mycelial ball Equal diameters of circles; the surface hyphae extension ratio The ratio of the length of hyphae extending outward from the edge of the hyphal ball to the equivalent diameter of the hyphal ball; the internal structural density. The grayscale gradient change is the ratio of the number of pixels with grayscale values ​​higher than a preset density threshold within the target area of ​​the mycelial ball to the total number of pixels in the target area of ​​the mycelial ball. The gray value variation range along the radial direction from the center to the edge within the target area of ​​the mycelial ball is obtained by dividing the target area of ​​the mycelial ball into several concentric rings at equal intervals along the radial direction, calculating the absolute value of the difference in average gray value between adjacent rings, and taking the mean of the absolute values ​​of the gray value differences between all adjacent rings.

[0009] Furthermore, the mycelial ball activity index The calculation method is as follows:

[0010] ;

[0011] in, , , , Sphericity Internal structure density Gray-scale gradient changes and the proportion of surface hyphae extension The corresponding weight parameters, all of which are positive, were obtained through linear regression analysis of historical training batch data.

[0012] Furthermore, in calculating the mycelial ball activity index... Previously, the method also included: dividing the target area of ​​the mycelial ball into three concentric rings along the radial direction: an outer layer, a middle layer, and a core layer; calculating the average gray value of each ring; calculating the difference between the average gray value of the outer layer and the average gray value of the core layer to obtain the gray value difference between the inner and outer layers; and when the gray value difference between the inner and outer layers exceeds a preset difference threshold, changing the gray space gradient. Replace the grayscale difference value between the inner and outer layers with the mycelial ball activity index. The calculation.

[0013] Furthermore, the current acquisition time in the input vector sequence corresponding input vector for:

[0014] ;

[0015] in, , , These represent the current data acquisition time. The equivalent diameter, sphericity, and internal structure density after standardization processing Indicates the current data collection time The mycelial ball activity index, , , These represent the current data acquisition time. Standardized temperature, pH value, and dissolved oxygen content; the input vector The changes in the mycelial extension ratio and grayscale spatial gradient on the mid-surface are expressed by the mycelial ball activity index. The weighted calculation is integrated into the input vector.

[0016] Furthermore, the prediction network is a time-series prediction network with fused attention, comprising a time feature encoding layer, a morphological change association layer, an environmental perturbation correction layer, and a state prediction output layer connected in sequence. The time feature encoding layer encodes the input vector at each time step with temporal position information and outputs a feature sequence with temporal position information. The morphological change association layer performs self-attention calculation on the feature sequence and outputs a morphological association feature sequence. The environmental perturbation correction layer separates the environmental parameter dimensions in the morphological association feature sequence, calculates the absolute value of the difference between each environmental parameter between the current time step and the previous time step as the fluctuation amplitude, multiplies the fluctuation amplitude by the feature value of the corresponding dimension in the morphological association feature sequence, and adds it back to the original feature sequence to output the corrected feature sequence. The state prediction output layer includes three parallel fully connected sublayers that output predicted values ​​for mycelial ball size change, activity change, and maturity probability, respectively.

[0017] Furthermore, the determination of whether the cultivation endpoint has been reached based on the predicted maturity probability value and the rate of change of the mycelial ball activity index includes: calculating the mycelial ball activity index. In recent consecutive The rate of change sequence within the acquisition period, the th Change rate of mycelial ball activity index within each collection cycle for:

[0018] ;

[0019] in, and The first The data collection time and the first Mycelial ball activity index at each collection time. The time interval between two adjacent data collection times. The preset observation window length; when the maturity probability Greater than or equal to the preset maturity threshold and continuous Change rate of mycelial ball activity index within each collection cycle All meet At that time, it is determined that the current culture has reached its end point, among which... This is the preset stable range threshold.

[0020] Furthermore, in the input vector Based on this, the initial culture conditions of the current culture batch are also used as additional inputs and spliced ​​into the input vectors at each collection time before being input into the prediction network. The initial culture conditions include the culture medium formula number, inoculum amount, and initial mycelial ball density. The culture medium formula number is converted into a numerical vector using one-heat encoding, and the inoculum amount and initial mycelial ball density are normalized using Z-score.

[0021] Furthermore, when it is determined that the culture endpoint has not been reached, the predicted value of the activity change output by the prediction network is compared with the preset target activity curve; when the predicted value of the future activity change is lower than the target value of the target activity curve at the corresponding time, an environmental parameter adjustment command is generated and sent to the culture control system of the fermenter for execution.

[0022] This invention discloses a system for monitoring the morphology of mycelial balls in shiitake mushroom fermentation and predicting the end point of cultivation. It is used to execute the aforementioned method for monitoring the morphology of mycelial balls in shiitake mushroom fermentation and predicting the end point of cultivation. The system includes: a data acquisition module, used to acquire images of the mycelial liquid and synchronous environmental parameters of the mycelial balls in the fermenter according to a preset acquisition cycle; correlate the mycelial liquid images, environmental parameters, and cultivation time to generate three-dimensional correlated data; and store the data in chronological order to form a mycelial ball time-series dataset; and a morphological feature extraction module, used to perform grayscale enhancement, background separation, and edge recognition processing on the mycelial liquid images to obtain the target region of the mycelial balls; segment the target region of the mycelial balls and extract the isomorphic features of each mycelial ball. The system generates a mycelial ball morphology feature matrix by considering effective diameter, sphericity, surface hyphal extension ratio, internal structural density, and grayscale gradient changes. An activity evaluation module standardizes the parameters in the mycelial ball morphology feature matrix and then calculates the mycelial ball activity index using weighted summation. A growth trend prediction module inputs an input vector sequence composed of morphological and environmental parameters from multiple consecutive sampling times into a prediction network and outputs a maturity probability prediction value. An endpoint determination and control module determines whether the cultivation endpoint has been reached based on the rate of change of the maturity probability prediction value and the mycelial ball activity index over the most recent consecutive sampling periods and outputs control commands.

[0023] The present invention has the following beneficial effects:

[0024] This invention continuously acquires images of mycelial balls according to a collection cycle and simultaneously collects environmental parameters to form a time series dataset of mycelial balls. This allows the morphological evolution of mycelial balls from germination to maturity to be continuously tracked, overcoming the limitation that manual time-based sampling can only obtain discrete time node state information.

[0025] This invention extracts morphological parameters from five dimensions: equivalent diameter, sphericity, surface hyphae extension ratio, internal structural density, and grayscale spatial gradient change. After standardizing each parameter, a weighted calculation is performed to obtain the mycelial ball activity index, which can comprehensively reflect the regularity of the external morphology of the mycelial ball, the tightness of the internal hyphae arrangement, and the degree of difference between the inner and outer layer structures. This overcomes the shortcomings of relying on a single indicator to identify internal hypoxic areas and aging states.

[0026] This invention inputs morphological and environmental parameters from multiple consecutive sampling times into a prediction network that integrates attention to predict the probability of mycelial ball maturation within a future time window. It then combines the change rate of mycelial ball activity index to determine the culture endpoint. This transforms the determination of the culture endpoint from a fixed culture time to a dynamic prediction result based on the actual growth status of the current batch, overcoming the problem of deviations in optimal harvest time caused by strain differences, batch differences in culture medium, and environmental fluctuations. Attached Figure Description

[0027] Figure 1 This is a flowchart of the method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint provided in this embodiment of the invention;

[0028] Figure 2 This is a schematic diagram illustrating the changing trends of environmental parameters at various cultivation times provided in the embodiments of the present invention;

[0029] Figure 3 This is a schematic diagram illustrating the changes in the mycelial ball activity index at various culture times provided in the embodiments of the present invention;

[0030] Figure 4 This is a schematic diagram comparing the standardized values ​​of mycelial ball morphology parameters after 72 hours of culture, provided in an embodiment of the present invention.

[0031] Figure 5 This is a schematic diagram comparing standardized morphological parameters at different culture times provided in the embodiments of the present invention;

[0032] Figure 6 This is a schematic diagram of the predicted values ​​of maturity probability and activity change within the predicted time window provided in the embodiments of the present invention;

[0033] Figure 7 This is a schematic diagram of the activity index and maturity probability within the culture endpoint determination window provided in this embodiment of the invention;

[0034] Figure 8 This is a schematic diagram illustrating the changes in stirring speed and aeration rate over culture time according to an embodiment of the present invention;

[0035] Figure 9 This is a schematic diagram of the distribution of standardized values ​​of each component of the prediction network input vector provided in an embodiment of the present invention. Detailed Implementation Example 1

[0036] In the liquid spawn cultivation of shiitake mushrooms, the morphological evolution of mycelial balls from germination, aggregation, formation to maturity directly affects the quality of the spawn. Current cultivation methods primarily rely on manual, timed sampling to obtain mycelial state information at discrete time points through microscopic observation or dry weight testing. This method has the following shortcomings: low detection frequency, failing to capture continuous dynamic changes in mycelial balls; evaluation indicators mainly based on single parameters such as mycelial ball diameter and quantity, failing to reflect changes in the internal structural density and biological activity of the mycelial balls; and the cultivation endpoint is usually determined at a fixed time, failing to consider the impact of strain differences, batch-to-batch differences in culture media, and environmental fluctuations on the optimal harvest time, easily leading to over-cultivation or under-cultivation.

[0037] In this embodiment, a sterile visual acquisition component is installed at the observation window of the fermenter. This component acquires images of mycelial balls in the culture medium through a corrosion-resistant, transparent observation structure. The fermenter is equipped with a ring-shaped polarized light source to reduce glare interference caused by turbidity in the culture medium. The fermenter also includes an environmental parameter acquisition module for simultaneously collecting data on temperature, pH, dissolved oxygen, stirring speed, and aeration rate. Both the sterile visual acquisition component and the environmental parameter acquisition module are connected to a data processing terminal via an image transmission module.

[0038] A method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint according to an embodiment of the present invention includes the following steps:

[0039] Step S1: Periodically collect images of mycelial balls and environmental parameters to generate three-dimensional correlation data.

[0040] Using a sterile visual acquisition component, images of mycelial balls in the culture medium within the fermenter are acquired according to a preset acquisition cycle, obtaining the image of the bacterial culture at the current acquisition moment. Simultaneously, the environmental parameter acquisition module acquires the temperature, pH value, dissolved oxygen level, stirring speed, and aeration rate at the current acquisition moment. The bacterial culture images and environmental parameters are correlated with the corresponding culture time to generate three-dimensional correlated data for the current acquisition moment. The three-dimensional correlated data for each acquisition moment are stored in chronological order to form a mycelial ball time-series dataset.

[0041] It should be noted that the above-mentioned collection cycle refers to the time interval between two consecutive collections. In the early stages of cultivation, when the mycelial pellets are still in the germination and aggregation phase and morphological changes are relatively slow, the collection cycle can be set to a longer time interval. In the middle and later stages of cultivation, when the mycelial pellets enter a rapid proliferation phase or are close to maturity, morphological changes accelerate, and the collection cycle can be shortened accordingly.

[0042] Step S2: Preprocess and segment the bacterial culture image, and extract multidimensional morphological features of mycelial balls.

[0043] The bacterial culture image was sequentially processed with grayscale enhancement, background separation, and edge recognition to obtain the target region of the mycelial balls. The target region of the mycelial balls was then segmented to obtain segmented images of each individual mycelial ball.

[0044] The following morphological parameters are extracted from the segmented images of each mycelial ball to generate a mycelial ball morphological feature matrix. :

[0045] ;

[0046] in, Indicates the equivalent diameter of the mycelial ball. Indicates sphericity, Indicates the proportion of surface hyphae extension. Indicates internal structural density. This represents the gradient change in grayscale space.

[0047] Among them, sphericity The calculation method is as follows:

[0048] ;

[0049] in, The projected area of ​​the mycelial ball. The perimeter of the mycelial ball's edge. π is the value of a circle. When... The closer the value is to 1, the closer the shape of the mycelial ball is to the ideal circle.

[0050] It should be noted that the above equivalent diameter This refers to the projected area of ​​the mycelial ball. The diameters of equal circles, i.e. ,in The projected area of ​​the mycelial ball. Pi is the mathematical constant. The above describes the extension ratio of surface hyphae. It refers to the ratio of the length of hyphae extending outward from the edge of the hyphal ball to the equivalent diameter of the hyphal ball. A higher value indicates longer, more spiky hyphae on the surface of the mycelial ball. The aforementioned internal structure density... This refers to the ratio of the number of pixels with grayscale values ​​higher than a preset density threshold within the target area of ​​the mycelial ball to the total number of pixels in the target area of ​​the mycelial ball. The aforementioned grayscale spatial gradient change... This refers to the variation in grayscale value along the radial direction from the center to the edge within the target area of ​​the mycelial ball. Specifically, the target area of ​​the mycelial ball is divided into several concentric rings at equal intervals along the radial direction. The absolute value of the difference in average grayscale value between adjacent rings is calculated, and the mean of the absolute values ​​of the grayscale differences between all adjacent rings is taken as the average value. The value of .

[0051] Due to the equivalent diameter sphericity Surface hyphae extension ratio Internal structure density Gray-scale gradient changes The different dimensions and numerical ranges of the various morphological parameters result in different morphological feature matrices for the formation of mycelial balls. Subsequently, each morphological parameter was standardized using Z-score to eliminate the influence of dimensional differences on subsequent weighted calculations. The standardized morphological parameters are all dimensionless values ​​and can be directly used in the weighted summation of the activity index.

[0052] In this embodiment, to uniformly characterize the morphological features of multiple mycelial balls collected at various collection times, after extracting the mycelial ball morphological feature matrix for each mycelial ball, the mean and standard deviation of various morphological parameters of all mycelial balls at the current collection time are calculated to generate a population morphological feature vector for the current collection time. The population morphological feature vector can reflect the overall morphological distribution of mycelial balls in the culture medium, avoiding evaluation bias caused by individual abnormal mycelial balls.

[0053] Step S3: Calculate the mycelial ball activity index based on the mycelial ball morphology feature matrix to evaluate the mycelial ball growth stage.

[0054] Based on the standardized mycelial ball morphology feature matrix The parameters in the data are used to calculate the mycelial ball activity index. :

[0055] ;

[0056] in, , , , Sphericity Internal structure density Gray-scale gradient changes and the surface hyphae extension ratio The corresponding weight parameters, all of which are positive, were obtained through linear regression analysis of historical training batch data.

[0057] The above mycelial ball activity index The calculation logic is as follows: sphericity The higher the density, the more regular the shape of the mycelial ball and the better its growth status; the denser the internal structure. The higher the value, the denser the mycelium arrangement inside the mycelial ball, and the more abundant the biomass; grayscale spatial gradient change The larger the size, the more significant the difference in structure between the inner and outer layers of the mycelial ball, indicating the presence of an active outer layer proliferation region; the surface mycelial extension ratio A higher elevation indicates excessive elongation of the edge hyphae, which may indicate the start of senescence; therefore, the proportion of surface hyphae extension is lower. Negative weights are used in the calculation.

[0058] It should be noted that the mycelial ball activity index The calculation formula does not include the equivalent diameter. The reason is the equivalent diameter This reflects the absolute size of the mycelial ball, not its growth activity state. Equivalent diameter It is retained in the input vector as an independent morphological parameter. In this process, it directly participates in the growth trend prediction of step S4 to characterize the dynamic changes in the size of the mycelial balls.

[0059] Based on the mycelial ball activity index The trend of changes in mycelial activity over time can be used to determine the growth stage of the mycelial pellets: when the mycelial pellet activity index changes... When the mycelial ball activity index continues to rise, it indicates that the mycelial ball is in a rapid proliferation phase; when the mycelial ball activity index... When the mycelial ball reaches a stable level, it enters the mature stage; when the mycelial ball activity index... As the decline begins, the mycelial balls enter the decay phase.

[0060] It should be noted that the above weight parameters to This was obtained through linear regression analysis of historical culture batch data. Specifically, morphological parameters at each acquisition time from multiple historical culture batches were collected. , , , The corresponding manually labeled mycelial ball activity level was used as the independent variable, and linear regression fitting was performed with morphological parameters as independent variables and mycelial ball activity level as dependent variable to obtain the weight parameters corresponding to each morphological parameter.

[0061] In this embodiment of the application, in order to more accurately evaluate the internal structural state of the mycelial balls, the mycelial ball activity index is calculated. Previously, a stratified analysis of the grayscale gradient distribution of mycelial balls was conducted. Specifically, the target area of ​​the mycelial ball was divided into three concentric rings along the radial direction: an outer region, a middle region, and a core region. The average grayscale value of each ring was calculated to obtain the average grayscale values ​​of the outer, middle, and core regions. The difference between the average grayscale values ​​of the outer and core regions was calculated to obtain the grayscale difference value between the inner and outer layers. When the grayscale difference value between the inner and outer layers exceeds a preset difference threshold, it indicates that there is a significant difference in the density of the mycelial ball's core region compared to the outer region, and the core region may form a low-activity area due to insufficient oxygen transfer. At this time, the grayscale spatial gradient change... Replace the grayscale difference between the inner and outer layers with the mycelial ball activity index. The calculations are used to more accurately reflect the internal activity distribution of the mycelial balls.

[0062] Step S4: Based on the mycelial ball time series dataset and environmental parameters, predict the future growth trend of the mycelial balls.

[0063] The morphological and environmental parameters from each acquisition time in the mycelial ball time-series dataset are combined into an input vector. Before combination, temperature, pH, and dissolved oxygen are standardized using Z-scores to ensure that the environmental and morphological parameters are within similar numerical ranges, thus eliminating the impact of dimensional differences on the prediction network training. Current acquisition time. corresponding input vector for:

[0064] ;

[0065] in, , , These represent the current data collection time. The equivalent diameter, sphericity, and internal structure density after standardization processing Indicates the current data collection time The mycelial ball activity index, , , These represent the current data acquisition time. The temperature, pH value, and dissolved oxygen levels after standardization treatment The time stamp indicates the current data collection time.

[0066] It should be noted that the above input vector Includes mycelial ball morphology feature matrix equivalent diameter sphericity Internal structure density The three parameters do not include the surface hyphae extension ratio. With grayscale gradient change Surface hyphae extension ratio With grayscale gradient change Mycelial ball activity index has been passed The weighted calculation is integrated into the input vector, using the mycelial ball activity index. The input to the prediction network is used in the form of [a specific input], avoiding interaction with the mycelial ball activity index. This results in information redundancy.

[0067] The input vectors from multiple consecutive acquisition times are combined into a time series and input into the prediction network. The network outputs the predicted values ​​of mycelial ball size change, activity change, and maturity probability at each time point within a preset future time window.

[0068] It should be noted that the aforementioned prediction network is a time-series prediction network with fused attention, comprising a temporal feature encoding layer, a morphological change association layer, an environmental perturbation correction layer, and a state prediction output layer connected in sequence. The temporal feature encoding layer receives a sequence of input vectors from multiple consecutive acquisition times, encodes the temporal position of the input vectors at each time point, and outputs a feature sequence with temporal position information. The morphological change association layer performs self-attention calculation on the feature sequence with temporal position information, capturing the correlation between various morphological parameters and between different times, and outputs a morphological association feature sequence. The environmental perturbation correction layer separates the environmental parameter dimensions in the morphological association feature sequence, calculates the fluctuation amplitude of the environmental parameters, corrects the morphological association feature sequence based on the fluctuation amplitude, and outputs the corrected feature sequence. Specifically, the environmental perturbation correction layer calculates the absolute value of the difference between each environmental parameter between the current time and the previous time as the fluctuation amplitude, multiplies the fluctuation amplitude by the feature value of the corresponding dimension in the morphological association feature sequence, and adds it back to the original feature sequence, thus achieving explicit correction of environmental fluctuations. The state prediction output layer consists of three parallel fully connected sublayers, which output predicted values ​​for mycelial ball size change, activity change, and maturity probability, respectively. The maturity probability prediction value is mapped to a Sigmoid activation function. Interval.

[0069] The aforementioned prediction network requires training before use. The training data comes from time-series datasets of mycelial balls from multiple historical culture batches. During training, the input vector sequence of multiple consecutive collection times in the historical batch is used as the training input, and the actual morphological parameters and manually labeled maturity probabilities within the corresponding subsequent time windows are used as training labels. The mean squared error between the predicted value and the training label is used as the loss function, and the Adam optimization algorithm is used to update the parameters.

[0070] In this embodiment of the application, in order to improve the predictive network's adaptability to differences in different culture batches, the input vector... Building upon this, the initial culture conditions of the current culture batch are also used as additional input. These initial culture conditions include the culture medium formulation number, inoculum size, and initial mycelial ball density. The culture medium formulation number is categorical data, converted into a numerical vector using one-heat encoding; the inoculum size and initial mycelial ball density are continuous values, normalized using Z-score. The encoded initial culture conditions are concatenated into a fixed-length condition vector, which is then concatenated with the input vectors from each data collection time point before being input into the prediction network. By incorporating initial culture condition information, the prediction network can distinguish fundamental differences between different batches, reducing prediction bias caused by batch variations.

[0071] Step S5: Based on the maturity probability and the rate of change of mycelial ball activity index, determine the culture endpoint and output control commands.

[0072] Based on the maturity probability of the current acquisition time as predicted by the network output. and mycelial ball activity index The rate of change over several recent consecutive data collection periods is used to determine whether the cultivation endpoint has been reached. Among these factors is the maturity probability. The state prediction output layer of the prediction network outputs a value based on the mapping between the morphological state of the mycelial balls and environmental parameters at the current acquisition time. The value range is [value range missing]. .

[0073] Calculate the mycelial ball activity index In recent consecutive The rate of change sequence within each acquisition period, where This is the preset observation window length. Specifically, the... Change rate of mycelial ball activity index within a collection period Defined as:

[0074] ;

[0075] in, and The first The data collection time and the first Mycelial ball activity index at each collection time. The time interval between two adjacent data collection times. The sequence number of the acquisition time and The range of values ​​is to , This is the preset observation window length. When the maturity probability... Greater than or equal to the preset maturity threshold and continuous Change rate of mycelial ball activity index within a collection period All meet (in When the preset stable range threshold is reached, the current culture is determined to have reached its end.

[0076] When the culture endpoint is determined to have been reached, a culture endpoint arrival signal is output, along with a suggested harvest time and the current culture status level. When the culture endpoint is determined not to have been reached, based on the current growth stage of the mycelium and the predicted growth trend, a continuation of culture signal and the estimated remaining culture time are output.

[0077] In this embodiment, to actively optimize the growth conditions of mycelial pellets during cultivation, the predicted value of activity change is compared with a preset target activity curve based on the prediction results in step S4. When the predicted value of future activity change is lower than the target value at the corresponding time of the target activity curve, an environmental parameter adjustment command is generated. The environmental parameter adjustment command includes increasing the aeration rate to improve dissolved oxygen levels, reducing the stirring speed to reduce mycelial pellet shear damage, or adjusting the cultivation temperature to promote mycelial metabolism. The environmental parameter adjustment command is sent to the cultivation control system of the fermenter for execution, forming a closed-loop regulation from monitoring and prediction to control.

[0078] On the other hand, this invention also proposes a system for monitoring the morphology of fermented mycelial balls and predicting the end point of cultivation of shiitake mushroom strains, comprising:

[0079] The data acquisition module is used to acquire images of the mycelial balls in the fermenter according to a preset acquisition cycle, as well as synchronous temperature, pH value, dissolved oxygen, stirring speed and aeration rate, and generate three-dimensional correlation data at each acquisition time to form a mycelial ball time series dataset.

[0080] The morphological feature extraction module is used to perform grayscale enhancement, background separation, edge recognition, and target segmentation on the bacterial culture image. It extracts the equivalent diameter, sphericity, surface hyphal extension ratio, internal structural density, and grayscale gradient changes of each hyphal ball to generate a hyphal ball morphological feature matrix.

[0081] The activity evaluation module is used to calculate the mycelial ball activity index based on the parameters in the standardized mycelial ball morphology feature matrix, and to determine the growth stage of the mycelial ball based on the trend of the mycelial ball activity index with the culture time.

[0082] The growth trend prediction module is used to input a sequence of morphological and environmental parameters from multiple consecutive collection times into a prediction network that integrates attention, and outputs predicted values ​​for mycelial ball size changes, activity changes, and maturity probability within a preset time window.

[0083] The endpoint determination and control module is used to determine whether the cultivation endpoint has been reached based on the maturity probability and the rate of change of mycelial ball activity index, and outputs suggested harvest time, cultivation status level, and environmental parameter adjustment instructions.

[0084] By way of example, the system proposed in this invention may also include various features and combinations thereof in the method embodiments, which will not be elaborated here.

[0085] Technical effect

[0086] This implementation method continuously acquires images of mycelial balls according to the acquisition cycle and simultaneously collects environmental parameters to form a time series dataset of mycelial balls. This allows the morphological evolution process of mycelial balls from germination to maturity to be continuously tracked, overcoming the limitation that manual time-based sampling can only obtain discrete time node state information.

[0087] This embodiment extracts morphological parameters from five dimensions: equivalent diameter, sphericity, surface hyphae extension ratio, internal structural density, and grayscale gradient variation. After standardizing each parameter, a weighted calculation is performed to obtain the mycelial ball activity index, which can comprehensively reflect the regularity of the external morphology of the mycelial ball, the tightness of the internal hyphae arrangement, and the degree of difference between the inner and outer layer structures. This overcomes the shortcomings of relying solely on single indicators such as the diameter or number of mycelial balls, which cannot identify internal hypoxic areas and aging states.

[0088] This implementation method inputs morphological and environmental parameters from multiple consecutive sampling times into a prediction network that integrates attention to predict the probability of mycelial ball maturation within a future time window. It then combines the change rate of mycelial ball activity index to determine the culture endpoint, thus changing the basis for determining the culture endpoint from a fixed culture time to a dynamic prediction result based on the actual growth status of the current batch. This overcomes the problem of deviation in optimal harvest time caused by strain differences, batch differences in culture medium, and environmental fluctuations.

[0089] A spawn production company is conducting batch cultivation of liquid shiitake mushroom spawn in its fermentation workshop. This batch uses culture medium formula F-07, with an inoculum size of 5%, an initial mycelial ball density of approximately 120 per milliliter, and a fermentation tank with an effective volume of 50 liters. The fermentation tank's observation window is equipped with a sterile visual acquisition system and a ring-polarized light source to simultaneously collect data on temperature, pH, dissolved oxygen, stirring speed, and aeration rate. A data processing terminal receives all collected data and performs morphological feature extraction, activity index calculation, growth trend prediction, and cultivation endpoint determination. The goal of this cultivation is to harvest when the mycelial balls are fully mature and at optimal activity, avoiding over-cultivation or under-cultivation.

[0090] Implementation process corresponding to step S1

[0091] After the culture is started, the aseptic visual acquisition component acquires images of the culture medium inside the tank according to a preset acquisition cycle. In the early stage of culture (0 to 24 hours), the mycelial balls are in the germination and aggregation stage, and the morphological changes are slow, so the acquisition cycle is set to 2 hours. In the middle and late stages of culture (after 48 hours), the morphological changes of the mycelial balls accelerate, and the acquisition cycle is shortened to 1 hour. Each acquisition simultaneously records the temperature, pH value, dissolved oxygen, stirring speed, and aeration rate, which are correlated with the bacterial culture images and culture time to form three-dimensional correlated data, and stored in the mycelial ball time series dataset in chronological order.

[0092] Table 1. Example of a time-series dataset of mycelial balls (partial collection times)

[0093]

[0094] Implementation process corresponding to step S2

[0095] Taking a bacterial culture image with a 72-hour incubation period as an example, the image undergoes grayscale enhancement, background separation, and edge recognition processing sequentially to obtain the target region of the mycelial balls and segment individual mycelial balls within the current field of view. The equivalent diameter is then extracted from each segmented image of the mycelial ball. sphericity Surface hyphae extension ratio Internal structure density Gray-scale gradient changes Generate mycelial ball morphology feature matrix Subsequently, Z-score standardization was applied to each of the five parameters to eliminate dimensional differences. The mean and standard deviation of each parameter for all mycelial balls at the current time were calculated to generate a population morphological feature vector.

[0096] Table 2. Results of mycelial ball morphology extraction at 72 hours of culture.

[0097]

[0098] Implementation process corresponding to step S3

[0099] Using the standardized population morphological feature vector at a 72-hour training time as input, and based on the weight parameters obtained from historical batch linear regression... , , , Calculate the mycelial ball activity index Simultaneously, the target area of ​​the mycelial ball was divided into three concentric rings along the radial direction: an outer layer, a middle layer, and a core layer. The average gray value of each ring was calculated, and the gray value difference between the inner and outer layers was evaluated to determine whether it was necessary to replace the inner and outer layers based on the gray value difference. participate Calculation. Combining the data from each acquisition time point. Analyze the changing trends to determine the current growth stage.

[0100] Table 3. Mycelial ball activity index and growth stage determination at different culture times

[0101]

[0102] As can be seen in the table, The continuous increase from 24 to 72 hours indicates that the mycelial balls are in a rapid proliferation phase; at 84 hours... The mycelial balls have stabilized and entered the maturation stage. Meanwhile, stratified analysis at 72 hours showed that the difference between the average gray value of the outer layer and the average gray value of the core did not exceed the preset difference threshold. Using the original grayscale spatial gradient change value to participate calculate.

[0103] Implementation process corresponding to step S4

[0104] The standardized morphological parameters and standardized environmental parameters at each acquisition time are combined into an input vector. Simultaneously, the initial culture conditions for this batch (culture medium formula number F-07 converted into a numerical vector through unique thermal encoding, and inoculum size and initial mycelial ball density normalized by Z-score) were concatenated into a condition vector, which was then concatenated with the input vectors at each time point and input into the prediction network. The prediction network sequentially passed through a time feature encoding layer, a morphological change association layer, and an environmental disturbance correction layer. Finally, the three parallel fully connected sublayers of the state prediction output layer output predicted values ​​for mycelial ball size changes, activity changes, and maturity probability within a preset time window of 84 to 96 hours.

[0105] Table 4. Examples of input vectors for the prediction network (72-hour training time).

[0106]

[0107] Table 5. Prediction network output results (prediction time window: 84 to 96 hours of incubation)

[0108]

[0109] The prediction results show that the maturity probability at 90 hours is... The predicted activity value reached a peak of 0.88, after which it continued to decline, indicating that the mycelial pellets might enter a decline phase after 96 hours. Simultaneously, the predicted activity value was lower than the target value corresponding to the target activity curve between 84 and 90 hours. The system generated environmental parameter adjustment instructions: increasing the aeration rate from 1.10 L / min to 1.30 L / min and decreasing the stirring speed from 160 rpm to 140 rpm to improve dissolved oxygen levels and reduce shear damage to the mycelial pellets. These instructions were then sent to the culture control system for execution.

[0110] Implementation process corresponding to step S5

[0111] After each data acquisition cycle, the system calculates the most recent consecutive data. (Take the sequence of changes in the mycelial ball activity index within 4 collection periods) And read the maturity probability at the current moment. .Will Compared with the preset maturity threshold (Use 0.85) for comparison, and simultaneously determine all Do they all meet the requirements? ( (Take a value of 0.05). Both conditions must be met simultaneously at the same time for the culture endpoint to be considered reached.

[0112] Table 6 Data on the determination of culture endpoint

[0113]

[0114] At 90 hours of cultivation, the probability of maturity... (0.88) Exceeds the preset maturity threshold of 0.85, and within 4 consecutive collection cycles (81 hours, 84 hours, 87 hours, 90 hours) If both conditions are met, and neither exceeds 0.05, the system determines that the cultivation has reached its endpoint. It outputs a cultivation endpoint arrival signal, recommends a harvest time of 90 hours, and states the current cultivation status as "excellent and mature".

[0115] Throughout the process, data starts with the raw bacterial culture image and environmental parameters from step S1. Step S2 involves image preprocessing and morphological feature extraction, transforming the data into a morphological feature matrix containing five morphological parameters. Step S3 calculates the mycelial ball activity index based on standardized parameters, compressing multidimensional morphological information into a single activity evaluation index while retaining the stage-based judgment capability of each parameter. Step S4 combines the morphological parameters, activity index, and environmental parameters into a time-series input vector, which is then used by a prediction network to output the maturity probability and activity change trend within the future time window, triggering environmental parameter adjustment commands. Step S5 utilizes the maturity probability output from step S4 and the activity index change rate calculated in step S3 to complete a dual-condition joint judgment, requiring that both activity stability and maturity probability exceeding a threshold be simultaneously met for four consecutive collection cycles. Finally, the cultivation endpoint signal and suggested harvest time are output. The data from each step are interconnected, forming a complete closed loop from collection to judgment.

[0116] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains, characterized in that, include: According to the preset acquisition cycle, the bacterial liquid images and synchronous environmental parameters of the mycelial balls in the fermenter are acquired. The bacterial liquid images, environmental parameters and culture time are correlated to generate three-dimensional correlation data, and stored in time order to form a mycelial ball time series dataset. Gray-scale enhancement, background separation, and edge recognition are performed on the bacterial culture image to obtain the target region of the mycelial ball. The target region of the mycelial ball is segmented to obtain the segmented image of each independent mycelial ball. The equivalent diameter, sphericity, surface hyphal extension ratio, internal structure density, and gray-scale gradient change of each mycelial ball are extracted to generate a mycelial ball morphology feature matrix. After standardizing the parameters in the mycelial ball morphology feature matrix, the mycelial ball activity index was obtained by weighted calculation. The input vector sequence, composed of morphological parameters and environmental parameters from multiple consecutive acquisition times, is input into the prediction network, which outputs a maturity probability prediction value. Based on the rate of change of the maturity probability prediction value and the mycelial ball activity index in the most recent consecutive collection periods, it is determined whether the culture endpoint has been reached and a control command is output.

2. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 1, characterized in that, sphericity The calculation method is as follows: ; in, The projected area of ​​the mycelial ball. The perimeter of the mycelial ball's edge. Pi; equivalent diameter To the projected area of ​​the mycelial ball Equal diameters of circles; surface hyphae extension ratio The ratio of the length of hyphae extending outward from the edge of the hyphal ball to the equivalent diameter of the hyphal ball; internal structural density. The ratio of the number of pixels with grayscale values ​​higher than a preset density threshold within the target area of ​​the mycelial ball to the total number of pixels in the target area of ​​the mycelial ball; grayscale spatial gradient change. The gray value variation range along the radial direction from the center to the edge within the target area of ​​the mycelial ball is obtained by dividing the target area of ​​the mycelial ball into several concentric rings at equal intervals along the radial direction, calculating the absolute value of the difference in average gray value between adjacent rings, and taking the mean of the absolute values ​​of the gray value differences between all adjacent rings.

3. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 1, characterized in that, The mycelial ball activity index The calculation method is as follows: ; in, , , , Sphericity Internal structure density Gray-scale gradient changes and the proportion of surface hyphae extension The corresponding weight parameters, all of which are positive, were obtained through linear regression analysis of historical training batch data.

4. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 3, characterized in that, In calculating the mycelial ball activity index Previously, it also included: The target area of ​​the mycelial ball is divided into three concentric rings along the radial direction: an outer layer, a middle layer, and a core layer. The average gray value of each ring is calculated. The difference between the average gray value of the outer layer and the average gray value of the core layer is calculated to obtain the gray value difference between the inner and outer layers. When the gray value difference between the inner and outer layers exceeds a preset difference threshold, the gray space gradient is changed. Replace the grayscale difference between the inner and outer layers with the mycelial ball activity index. The calculation.

5. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 1, characterized in that, The current acquisition time in the input vector sequence corresponding input vector for: ; in, , , These represent the current data collection time. The equivalent diameter, sphericity, and internal structure density after standardization processing Indicates the current data collection time The mycelial ball activity index, , , These represent the current data collection time. Standardized temperature, pH value, and dissolved oxygen level; input vector The changes in the proportion of mycelial extension on the mid-surface and the gray-scale spatial gradient are expressed through the mycelial ball activity index. The weighted calculation is integrated into the input vector.

6. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 1, characterized in that, The prediction network is a time series prediction network with fused attention, comprising a time feature encoding layer, a morphological change association layer, an environmental perturbation correction layer, and a state prediction output layer connected in sequence. The time feature encoding layer encodes the input vector at each time step with temporal position information and outputs a feature sequence with temporal position information. The morphological change association layer performs self-attention calculation on the feature sequence and outputs a morphological association feature sequence. The environmental perturbation correction layer separates the environmental parameter dimensions in the morphological association feature sequence, calculates the absolute value of the difference between each environmental parameter between the current time step and the previous time step as the fluctuation amplitude, multiplies the fluctuation amplitude by the feature value of the corresponding dimension in the morphological association feature sequence, and adds it back to the original feature sequence to output the corrected feature sequence. The state prediction output layer includes three parallel fully connected sublayers that output predicted values ​​for mycelial ball size change, activity change, and maturity probability, respectively.

7. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 1, characterized in that, The determination of whether the culture endpoint has been reached based on the predicted maturity probability value and the rate of change of mycelial ball activity index includes: Calculate the mycelial ball activity index In recent consecutive The rate of change sequence within the acquisition period, the th Change rate of mycelial ball activity index within each collection cycle for: ; in, and The first The data collection time and the first Mycelial ball activity index at each collection time. The time interval between two adjacent data collection times. The preset observation window length; when the maturity probability Greater than or equal to the preset maturity threshold and continuous Change rate of mycelial ball activity index within a collection period All meet At that time, the current culture is determined to have reached its end point, among which... This is the preset stable range threshold.

8. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 5, characterized in that, In the input vector Based on this, the initial culture conditions of the current culture batch are also used as additional inputs and spliced ​​into the input vectors at each collection time before being input into the prediction network. The initial culture conditions include the culture medium formula number, inoculum amount and initial mycelial ball density. The culture medium formula number is converted into a numerical vector using one-heat encoding, and the inoculum amount and initial mycelial ball density are normalized using Z-score.

9. The method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom strains according to claim 1, characterized in that, When it is determined that the culture endpoint has not been reached, the predicted value of the activity change output by the prediction network is compared with the preset target activity curve; when the predicted value of the future activity change is lower than the target value at the corresponding time of the target activity curve, an environmental parameter adjustment command is generated and sent to the culture control system of the fermenter for execution.

10. A system for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom spawn, used to execute the method for monitoring the morphology of fermented mycelial balls and predicting the culture endpoint of shiitake mushroom spawn as described in any one of claims 1 to 9, characterized in that, include: The data acquisition module is used to acquire images of mycelial balls in the fermenter and synchronous environmental parameters according to a preset acquisition cycle. It then associates the mycelial ball images, environmental parameters and culture time to generate three-dimensional correlation data and stores them in chronological order to form a mycelial ball time series dataset. The morphological feature extraction module is used to perform grayscale enhancement, background separation and edge recognition processing on the bacterial liquid image to obtain the target area of ​​mycelial balls. The target area of ​​mycelial balls is segmented and the equivalent diameter, sphericity, surface hyphal extension ratio, internal structural density and grayscale spatial gradient change of each mycelial ball are extracted to generate a mycelial ball morphological feature matrix. The activity evaluation module is used to obtain the mycelial ball activity index by standardizing the parameters in the mycelial ball morphology feature matrix and then calculating the weighted values. The growth trend prediction module is used to input a sequence of morphological parameters and environmental parameters from multiple consecutive data collection times into the prediction network and output a maturity probability prediction value. The endpoint determination and control module is used to determine whether the culture endpoint has been reached based on the rate of change of the maturity probability prediction value and the mycelial ball activity index in the most recent consecutive collection cycles, and outputs control commands.