Pleurotus citrinopileatus growth prediction model training method, device and equipment
By combining the growth prediction model of bidirectional long short-term memory network and graph convolutional network, the problem of insufficient prediction accuracy of the growth status of Pleurotus citrinopileatus was solved, the accurate prediction of the growth law of Pleurotus citrinopileatus was achieved, and the application effect of smart agriculture was improved.
Patent Information
- Application Number
- CN202510614363.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-05-13
AI Technical Summary
The existing technology lacks the accuracy in predicting the growth status of Pleurotus citrinopileatus, making it difficult to meet the precision needs of smart agriculture. The single model fails to fully tap into various types of information during the growth process.
A growth prediction model combining bidirectional long short-term memory networks and graph convolutional networks was adopted. By collecting morphological data, image data and growth environment data of Pleurotus citrinopileatus, a multimodal dataset was constructed. Spatial features were extracted using graph convolutional networks, and temporal features were captured using bidirectional long short-term memory networks. The model was trained through an attention fusion layer and an extreme gradient boosting regression model to achieve deep fusion and dynamic modeling of multimodal data.
The prediction accuracy of the growth status of Pleurotus citrinopileatus has been improved, and a comprehensive analysis and accurate prediction of the growth patterns of Pleurotus citrinopileatus have been achieved, supporting the efficient application of smart agriculture.
Smart Images

Figure CN120670838A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device and equipment for training a growth prediction model of Pleurotus citrinopileatus. Background Art
[0002] As an edible and medicinal fungus with high economic value, the growth process of Pleurotus citrinopileatus is affected by many factors. Accurately predicting the growth status of Pleurotus citrinopileatus can not only optimize the resource input in the planting process and improve the yield and quality, but also promote the in-depth application of smart agricultural technology in the Pleurotus citrinopileatus planting industry, helping the industry to upgrade to intelligence and efficiency.
[0003] In the existing technology, the growth status of Pleurotus citrinopileatus mostly relies on a single model for prediction, and these models do not fully explore various types of information in the growth process of Pleurotus citrinopileatus during training, resulting in limited prediction accuracy. It is difficult to effectively meet the urgent need for accurate prediction in the actual planting process, which seriously restricts the effective promotion and application of smart agricultural technology in the Pleurotus citrinopileatus planting industry. Summary of the Invention
[0004] The present application provides a method, device and equipment for training a growth prediction model of Pleurotus citrinopileatus, which is used to solve the defect of insufficient prediction accuracy of the growth status of Pleurotus citrinopileatus in the existing technology, and can realize comprehensive analysis and accurate prediction of the growth status of Pleurotus citrinopileatus.
[0005] The present application provides a method for training a growth prediction model for Pleurotus citrinopileatus, wherein the growth prediction model includes at least a bidirectional long short-term memory network and a graph convolutional network, and includes the following steps: At preset time intervals, morphological data, image data, and growth environment data of multiple Pleurotus citrinopileatus samples are collected to obtain multiple sets of sample morphological data, multiple sets of sample image data, and multiple sets of sample growth environment data; Obtaining multiple adjacency matrices based on the multiple groups of sample image data, wherein one adjacency matrix is obtained based on one group of sample image data, the adjacency matrix represents the similarity between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; Inputting the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data into the graph convolutional network to obtain morphological feature vectors; Inputting the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; The growth prediction model is trained according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
[0006] According to the growth prediction model training method provided in this application, the step of obtaining multiple adjacency matrices based on the multiple groups of sample image data includes: For each set of sample image data, a corresponding graph structure is determined, wherein a node in the graph structure represents a Pleurotus citrinopileatus sample; determining the morphological characteristics of the caps of the respective Pleurotus citrinopileatus samples according to the sample image data; Determining the weight of each edge in the graph structure according to the similarity between the morphological features of the pileus corresponding to different nodes; According to the weights of each node and each edge in the graph structure, an adjacency matrix corresponding to each group of sample image data is obtained.
[0007] According to the growth prediction model training method provided in the present application, the number of the graph convolutional networks is multiple, and the different graph convolutional networks are used to extract features of different dimensions. The multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data are input into the graph convolutional network to obtain the morphological feature vector, including: Performing feature extraction on the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data through multiple graph convolutional networks to obtain multiple sub-morphological feature vectors of different dimensions; The multiple sub-morphological feature vectors of different dimensions are concatenated to obtain the morphological feature vector.
[0008] According to the growth prediction model training method provided in the present application, the multiple adjacency matrices, the multiple sets of sample morphological data, and the multiple sets of sample image data are input into the graph convolutional network to obtain the morphological feature vector, including: Performing feature extraction on the plurality of groups of sample image data to obtain a plurality of groups of first-category features, wherein the first-category features at least include the area, outline, and texture of the pileus; splicing the multiple sets of first-category features and the features in the multiple sets of sample morphological data to obtain second-category features; The multiple adjacency matrices and the second type of features are input into the graph convolutional network to obtain the morphological feature vector.
[0009] According to the growth prediction model training method provided in the present application, the growth prediction model further includes an attention fusion layer, and the training of the growth prediction model based on the growth environment feature vector and the morphological feature vector includes: Projecting the growth environment feature vector and the morphological feature vector into the same space through linear transformation and aligning feature dimensions; Inputting the growth environment feature vector and the morphological feature vector after aligning the feature dimensions into the attention fusion layer to obtain a multimodal feature vector, the attention fusion layer is used to fuse the aligned growth environment feature vector and the morphological feature vector through a cross-attention mechanism based on multiple independent heads, wherein one head represents an independent subspace processing unit divided by linear projection; The growth prediction model is trained according to the multimodal feature vector.
[0010] According to the growth prediction model training method provided in this application, the growth environment feature vector and the morphological feature vector after aligning the feature dimensions are input into the attention fusion layer to obtain a multimodal feature vector, including: In each independent head, the growth environment feature vector is used as the query vector, the morphology feature vector is used as the key vector, and the attention weight matrix is determined through the cross attention mechanism; Taking the morphological feature vector as a value vector, and obtaining a fusion feature vector corresponding to the current independent head according to the product of the value vector and the attention weight matrix; The fused feature vectors corresponding to the independent heads are concatenated to obtain the multimodal feature vector.
[0011] According to the growth prediction model training method provided in the present application, the growth prediction model further includes a prediction output layer, and the prediction output layer includes an extreme gradient boosting regression model; the training of the growth prediction model based on the multimodal feature vector includes: Inputting the multimodal feature vector into the prediction output layer, and obtaining a prediction result of the growth state of the Pleurotus citrinopileatus sample through the extreme gradient boosting regression model; The growth prediction model is trained according to the predicted results and the corresponding true results using a target loss function, where the target loss function is determined based on a mean square error function and / or a mean absolute error function.
[0012] According to the growth prediction model training method provided by the present application, after the preset stop condition is met, the method further includes: The morphological data, image data and growth environment data of the target Pleurotus citrinopileatus collected before the first moment are input into the growth prediction model to obtain a prediction result of the growth status of the target Pleurotus citrinopileatus at the second moment, where the second moment is later than the first moment, and the prediction result of the growth status at least includes the maturity period and the area of the cap.
[0013] The present application also provides a growth prediction model training device for Pleurotus citrinopileatus, wherein the growth prediction model includes at least a bidirectional long short-term memory network and a graph convolutional network, and the growth prediction model training device includes the following modules: The acquisition module is used to collect morphological data, image data and growth environment data of multiple Pleurotus citrinopileatus samples at preset time intervals to obtain multiple sets of sample morphological data, multiple sets of sample image data and multiple sets of sample growth environment data; a first obtaining module, configured to obtain a plurality of adjacency matrices based on the plurality of groups of sample image data, wherein one adjacency matrix is obtained based on one group of sample image data, the adjacency matrix represents similarities between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; A second acquisition module is configured to input the plurality of adjacency matrices, the plurality of groups of sample morphological data, and the plurality of groups of sample image data into the graph convolutional network to obtain a morphological feature vector; A third acquisition module is configured to input the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; A training module is used to train the growth prediction model according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
[0014] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a growth prediction model training method for Pleurotus citrinopileatus as described above is implemented.
[0015] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for training a growth prediction model of Pleurotus citrinopileatus as described above is implemented.
[0016] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements a growth prediction model training method for Pleurotus citrinopileatus as described in any one of the above.
[0017] In this application, a multimodal dataset is constructed by integrating the morphological data, image data and growth environment data of the entire growth cycle of the elm citrus mushroom, which can improve the prediction accuracy of the growth prediction model; in addition, this application uses a bidirectional long short-term memory network and a graph convolutional network to deeply fuse and dynamically model the multimodal data, which can achieve a comprehensive analysis and accurate prediction of the growth pattern of the elm citrus mushroom, and solve the problem of insufficient prediction accuracy in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 This is a flow chart of a method for training a growth prediction model for Pleurotus citrinopileatus according to an embodiment of the present application; Figure 2 This is a schematic diagram of the structure of a growth prediction model shown in one embodiment of the present application; Figure 3 This is a schematic diagram of an elm citrinum mushroom shown in an embodiment of the present application; Figure 4 This is a structural block diagram of a growth prediction model training device for Pleurotus citrinopileatus according to an embodiment of the present application; Figure 5 This is a schematic diagram of the physical structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0020] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] The growth prediction model for Pleurotus citrinopileatus provided in this application can be used to predict the future growth status of Pleurotus citrinopileatus, such as the area of the cap and the maturity period. The growth prediction model includes at least a bidirectional long short-term memory network (BiLSTM) and a graph convolutional network (GCN).
[0022] Figure 1 This is a flow chart of a method for training a growth prediction model for Pleurotus citrinum according to an embodiment of the present application. Figure 1 The growth prediction model training method of Pleurotus citrinopileatus of the present application may include: Step 101: Collect morphological data, image data, and growth environment data of multiple Pleurotus citrinopileatus samples at preset time intervals to obtain multiple sets of sample morphological data, multiple sets of sample image data, and multiple sets of sample growth environment data.
[0023] The preset time interval can be set according to actual needs, for example, 1 day.
[0024] For example, taking a preset time interval of one day as an example, for multiple selected Pleurotus citrinum samples, it is necessary to collect morphological data, image data, and growth environment data of each Pleurotus citrinum sample daily. The morphological data of the multiple Pleurotus citrinum samples on each day is used as a set of sample morphological data, the image data of the multiple Pleurotus citrinum samples on each day is used as a set of sample image data, and the growth environment data of the multiple Pleurotus citrinum samples on each day is used as a set of sample growth environment data. After collecting data for multiple consecutive days, multiple sets of sample morphological data, multiple sets of sample image data, and multiple sets of sample growth environment data are obtained. Among them, one image data contains one Pleurotus citrinum sample.
[0025] Specifically, a method for collecting morphological data can be as follows: Step a1: Select samples. Group the Pleurotus citrinopileatus by growth stage, with each group containing at least a first number of samples to ensure that the samples cover different growth stages and are evenly distributed. The samples are then numbered to ultimately obtain multiple Pleurotus citrinopileatus samples. The first number can be set based on actual needs, for example, 20.
[0026] Step a2: Whole plant measurement. Use a length measuring tool to accurately measure the length, width, and height of the entire plant of each Pleurotus citriodora sample, and record the measurement results in detail. Among them, the length measuring tool can be set according to actual needs. The length measuring tools in this application include a ruler and a vernier caliper with an accuracy of 0.1mm. The length and width of the entire plant can be measured by a vernier caliper, and the height of the entire plant can be measured by a ruler.
[0027] Step a3: Record the number of differentiated flowers. Observe and record the number of differentiated flowers of each Pleurotus citrinopileatus sample, that is, the number of independent mushroom pieces grown from one mushroom body.
[0028] Step a4: Cap and stipe measurements: Use a vernier caliper to measure the length, width, and thickness of the cap and record the results. Also use a ruler to measure the length and diameter of the stipe and record the results.
[0029] All measurement results in steps a2 to a4 above are recorded in a pre-established table. The fields in the table include at least: sample number, collection date, measurement time, whole plant size (length, width, height), number of differentiated flowers, cap size (length, width, thickness), and stipe characteristics (length, diameter).
[0030] Through steps a1-a4 above, morphological data of the Pleurotus citrinopileatus sample can be obtained, including overall plant dimensions (length, width, height), number of differentiated flowers, cap dimensions (length, width, thickness), and stipe characteristics (length, diameter). Of course, the morphological data may also include other data, which can be configured based on actual needs and is not limited by this application.
[0031] Specifically, a method for collecting image data may be as follows: Step b1: Prepare your filming equipment. Use a high-resolution digital camera with a resolution of at least 12 megapixels, equipped with a tripod, LED fill light, ruler, and a solid-color background (white), ensuring consistent filming conditions.
[0032] Step b2: Set up the shooting environment. Choose an environment with even lighting, no direct strong light, and avoid distracting shadows. Use a plain white background to ensure a clear contrast between the target area and the background. Place a calibration grid in the shooting area for image scale calibration.
[0033] Step b3: Select samples. The samples have been determined in step a1. In this step, the samples determined in step a1 are directly used to ensure a one-to-one correspondence between the image data and the morphological data.
[0034] Step b4: Sample placement. Place the Agaricus citriodora sample in the center of the background plate, ensuring it is intact and unobstructed. Adjust the sample's position to ensure key areas, such as the cap and stem, are clearly visible.
[0035] Step b5: Set the shooting parameters. Set the resolution to 1080p, ensuring clear image details, a 50mm focal length, an aperture of f / 6.3, and an ISO range of 400-1000, avoiding overexposure or underexposure. Shoot from the front, capturing the overall shape of the cap and stem.
[0036] Step b6: Naming and storing images. Name image files using the format "date-planting area-number" for easy management. Store images in a dedicated folder and back them up regularly to prevent data loss.
[0037] Specifically, a method for collecting growth environment data may be as follows: Step c1: Prepare collection equipment. To efficiently collect data about the growth environment of Pleurotus citrinopileatus, this application uses a multifunctional integrated sensor. This integrated sensor integrates a high-precision digital temperature sensor, humidity sensor, light sensor, and carbon dioxide sensor, capable of simultaneously monitoring temperature, humidity, light intensity, and carbon dioxide concentration. This multifunctional integrated sensor is equipped with a multi-channel data logger that supports real-time data storage and transmission, ensuring the comprehensiveness, accuracy, and continuity of growth environment data, providing a reliable data foundation for subsequent model training.
[0038] Step c2: Set up data collection conditions. Deploy multifunctional integrated sensors in the planting area and collect data at preset time intervals.
[0039] In the present application, the morphological data, image data and growth environment data collected at the same starting collection moment and the same preset time interval can be used to ensure a good correspondence between different types of data.
[0040] After executing step 101, the data may be pre-processed to improve the quality of the data.
[0041] Specifically, the methods for preprocessing morphological data mainly include: 1) Data cleaning. Check the data recording form to ensure that there are no omissions or errors in the record; mark abnormal values (such as measurements that are significantly deviated from the normal range) and use Correction can be made using the principle or box plot method.
[0042] 2) Missing value filling: Missing data are filled using linear interpolation; for consecutive missing data segments, time series-based forecasting methods (such as the ARIMA model) are used to fill them.
[0043] 3) Standardization: Unify the measurement units (length units are millimeters) and scale the data to the interval [0, 1] using Min-Max normalization.
[0044] Specifically, the methods for preprocessing image data mainly include: 1) Noise removal: Use Gaussian filtering to remove noise from the image and reduce environmental interference.
[0045] 2) Image enhancement: Histogram equalization is used to enhance image details and highlight key features of the Pleurotus citrinopileatus sample (e.g., the texture of the cap and the outline of the stipe).
[0046] 3) Extract the target area. The Canny edge detection algorithm is used to separate the target area corresponding to the Pleurotus citrinopileatus sample from the background area to ensure accurate extraction of the target area.
[0047] 4) Feature extraction. Key features are extracted from the segmented target region, including area (calculated using pixel statistics), contour (obtained through edge detection), and texture (calculated using the gray-level co-occurrence matrix).
[0048] Specifically, the methods for preprocessing growth environment data mainly include: 1) Data cleaning. Check the data records to ensure that there are no omissions or errors; mark outliers and use Principle revision.
[0049] 2) Missing value filling: Linear interpolation is used to fill missing data; for consecutive missing data segments, the ARIMA model is used to fill them.
[0050] 3) Standardization. Unify the temperature unit to Celsius (℃) and the humidity unit to relative humidity , the unit of light intensity is photon flux density , the unit of carbon dioxide concentration is .
[0051] 4) Normalization. Scale the data to the interval [0, 1] using the following formula: in, is the original data, and are the minimum and maximum values in the data, respectively.
[0052] 5) Time window division: The preprocessed growth environment data is divided into several time window units according to a fixed time length (e.g., 7 days). Each time window unit contains a complete growth environment data within a fixed time length (e.g., 7 days).
[0053] If the preset time interval is 1 day, then the growth environment data for one day is a set of sample growth environment data, including 4 characteristics: temperature, humidity, light intensity and carbon dioxide concentration.
[0054] Through the above step 101, various types of information during the growth process of Pleurotus citrinopileatus can be fully mined to obtain multimodal data (including morphological data, image data, and growth environment data), providing data support for improving the prediction accuracy of the growth prediction model.
[0055] Step 102: obtain multiple adjacency matrices based on multiple groups of sample image data. One adjacency matrix is obtained based on one group of sample image data. The adjacency matrix represents the similarity between different Pleurotus citrinopileatus samples in the sample image data. One sample image data contains one Pleurotus citrinopileatus sample.
[0056] Specifically, step 102 may include: Step 1021: for each set of sample image data, determine a corresponding graph structure, where a node in the graph structure represents a Pleurotus citrinopileatus sample; Step 1022: determining the morphological characteristics of the caps of the respective Pleurotus citrinopileatus samples based on the sample image data; Step 1023: Determine the weight of each edge in the graph structure based on the similarity between the morphological features of the pileus corresponding to different nodes; Step 1024: Obtain the adjacency matrix corresponding to each group of sample image data according to the weights of each node and each edge in the graph structure.
[0057] In this application, the degree of association between nodes is represented by the similarity between nodes.
[0058] For example, if the preset time interval is one day, since multiple Pleurotus citrinum samples are imaged every day, each set of sample image data collected each day corresponds to an independent graph structure. If 200 Pleurotus citrinum samples are imaged on a given day, the graph structure for that day will contain 200 nodes.
[0059] In this application, the weights of the edges between nodes can be determined based on the similarity of the cap morphology (such as area, outline, texture, etc.). The adjacency matrix is , N is the number of nodes, Indicates the The morphology of the cap of the first node and the The similarity of the shapes of the caps of the nodes may be a cosine similarity.
[0060] Step 103: Input multiple adjacency matrices, multiple sets of sample morphological data, and multiple sets of sample image data into a graph convolutional network to obtain morphological feature vectors.
[0061] This application's growth prediction model uses an improved Attention-LSTM-GCN hybrid algorithm. In this algorithm, the temporal features processed by the bidirectional LSTM and the spatial features analyzed by the GCN are integrated through the attention mechanism to improve algorithm performance. The attention mechanism adaptively assigns weights to different features, allowing the model to focus more on important information.
[0062] Specifically, step 103 may include: Step 1031 : Perform feature extraction on the multiple groups of sample image data to obtain multiple groups of first-category features. The first-category features at least include the area, outline, and texture of the pileus.
[0063] In the present application, the first type of features can be directly obtained by extracting features from the image data in the preprocessing stage, including the area, outline, and texture of the cap.
[0064] Step 1032: Concatenate the multiple sets of first-category features and the features in the multiple sets of sample morphological data to obtain the second-category features.
[0065] Step 1033: Input multiple adjacency matrices and second-category features into a graph convolutional network to obtain a morphological feature vector.
[0066] In this application, after multiple adjacency matrices and second-category features are input into the graph convolutional network, the graph convolutional network further extracts features of the second-category features based on the multiple adjacency matrices, and finally obtains a morphological feature vector.
[0067] In one embodiment, there are multiple graph convolutional networks, and different graph convolutional networks are used to extract features of different dimensions. Accordingly, step 103 may also include: Through multiple graph convolutional networks, multiple adjacency matrices, multiple sets of sample morphological data, and multiple sets of sample image data are extracted to obtain multiple sub-morphological feature vectors of different dimensions; Multiple sub-morphological feature vectors of different dimensions are concatenated to obtain a morphological feature vector.
[0068] In this application, when initializing the graph convolutional network, set in_feats=18 and out_feats=32. in_feats represents the dimension of the input features. out_feats represents the dimension of the output features of the graph convolutional network.
[0069] During the forward propagation process, the input shape of the graph convolutional network is (batch_size, num_nodes, in_feats) and the output shape is (batch_size, num_nodes, out_feats).
[0070] batch_size represents the number of Pleurotus citrinopileatus samples fed into the graph convolutional network for training at each time. num_nodes corresponds to the fixed duration of the time window in the preprocessing phase (e.g., 7 days).
[0071] This application uses a three-layer graph convolutional network with output dimensions of 32, 64, and 128 dimensions, respectively, to capture features at different scales. The 32-dimensional graph convolutional network corresponds to a shallow layer, capturing local details (such as subtle changes in the cap edge); the 64-dimensional graph convolutional network is used to extract mid-level structure (such as the evolution of the overall cap shape); and the 128-dimensional graph convolutional network is used to learn global patterns (such as macroscopic features at different growth stages).
[0072] In this application, the adjacency matrix represents the spatial structure of a graph in a graph convolutional network (GCN), specifically the connectivity between nodes. Its functions at each GCN layer include: first, conveying spatial correlation information between nodes, aggregating features of adjacent nodes using the weights of the adjacency matrix (e.g., similarity in cap morphology); and second, maintaining spatial structure invariance. Regardless of changes in feature dimensionality (e.g., from 32 to 128 dimensions), the adjacency matrix remains the structural foundation of the graph, ensuring consistent spatial correlation analysis.
[0073] In the first-layer graph convolutional network, 18-dimensional initial features are input, combined with the adjacency matrix, and output 32-dimensional features. The adjacency matrix is used to capture low-dimensional (local) spatial correlations. In the second-layer graph convolutional network, 32-dimensional features and the adjacency matrix are input, and 64-dimensional features are output. The adjacency matrix further integrates the spatial relationships of the low-dimensional features at this layer. In the third-layer graph convolutional network, 64-dimensional features and the adjacency matrix are input, and 128-dimensional features are output. The adjacency matrix integrates the global spatial patterns of the medium-dimensional features to produce high-dimensional features.
[0074] In this application, the adjacency matrix is the underlying structural foundation of the graph convolutional network, ensuring the consistency of spatial correlation analysis. It is responsible for gradually integrating the constructed morphological similarity information of the cap into features of different dimensions, ultimately achieving efficient extraction of multi-scale spatial features.
[0075] After obtaining the sub-morphological feature vectors output by each layer of the graph convolutional network, the sub-morphological feature vectors are concatenated to obtain the final morphological feature vector.
[0076] Step 104: Input multiple groups of sample growth environment data into a bidirectional long short-term memory network to obtain a growth environment feature vector.
[0077] In this application, during the forward propagation phase, the input shape of the bidirectional long short-term memory network is (batch_size, seq_len, input_dim), and the output shape is (batch_size, hidden_dim * 2). During initialization, set input_dim to 4 (corresponding to 4 environment parameters) and hidden_dim to 64.
[0078] Batch_size represents the number of Pleurotus citrinopileatus samples fed into the bidirectional LSTM network for training. For example, if it is set to 32, it means that the growth environment data sets corresponding to 32 Pleurotus citrinopileatus samples are fed into the bidirectional LSTM network each time.
[0079] seq_len represents the length of the time window, which corresponds to the fixed time window length in the preprocessing phase. For example, if seq_len = 7 days, it indicates that the input data sets for the growth environment of the elm citrinum mushroom samples must be seven consecutive days (if the preset time interval is 1 day, then seven data sets are required). input_dim represents the feature dimension at each time step. In this application, these correspond to four environmental parameters: temperature, humidity, CO2 concentration, and light intensity, so input_dim = 4. hidden_dim is the number of neurons in the LSTM hidden layer, which is 64 in this application. It determines the model's ability to learn temporal features. Because this application uses a bidirectional long short-term memory network, each time step processes both forward and reverse sequence information. Therefore, the output dimension is twice the hidden layer dimension, that is, 64 × 2 = 128. Assume that the total input data dimension is (32, 7, 4), that is, the input data sets for 32 elm citrinum mushroom samples each time, each containing four environmental parameters for seven days. After being processed by the bidirectional long short-term memory network, the output dimension becomes (32, 128), that is, each set of data is compressed into a 128-dimensional time series feature vector for subsequent fusion with the spatial feature vector.
[0080] Step 105: Train the growth prediction model according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
[0081] In this application, the attention fusion layer uses multiple independent attention heads to dynamically adjust the weights to strengthen the correlation between the temporal feature vector output by the bidirectional long short-term memory network and the spatial feature vector output by the graph convolutional network, thereby improving the growth prediction model's attention to key information.
[0082] Figure 2 This is a schematic diagram of a growth prediction model shown in an embodiment of the present application. Figure 2 , the growth prediction model in this application may also include an attention fusion layer. Accordingly, step 105 may include: Step 1051: Project the growth environment feature vector and the morphological feature vector into the same space through linear transformation, and align the feature dimensions.
[0083] Projecting to the same space refers to mapping the growth environment feature vectors and morphological feature vectors of different modalities from their respective original spaces into a shared semantic vector space, eliminating the original dimensionality differences between the features of different modalities. Assuming the output of a bidirectional long short-term memory network is [B, T, D1], it can be converted to [B, T, D] through a linear transformation. Assuming the output of a graph convolutional network is [N, B, D2], it can be converted to [N, B, D] through a linear transformation.
[0084] Aligning feature dimensions means adjusting the order and structure of feature dimensions after projecting them into the same space so that they meet the requirements of subsequent tasks. For example, transposing the output of a graph convolutional network [N, B, D] yields [B, N, D], while the output of a bidirectional long short-term memory network [B, T, D1] does not require adjustment.
[0085] Step 1052: Input the growth environment feature vector and the morphological feature vector after aligning the feature dimensions into the attention fusion layer to obtain a multimodal feature vector. The attention fusion layer is used to fuse the aligned growth environment feature vector and the morphological feature vector through a cross-attention mechanism based on multiple independent heads, where one head represents an independent subspace processing unit divided by linear projection.
[0086] Specifically, step 1052 may include: In each independent head, the growth environment feature vector is used as the query vector, the morphology feature vector is used as the key vector, and the attention weight matrix is determined through the cross-attention mechanism; The morphological feature vector is used as the value vector, and the fusion feature vector corresponding to the current independent head is obtained by multiplying the value vector and the attention weight matrix; The fused feature vectors corresponding to each independent head are concatenated to obtain a multimodal feature vector.
[0087] When executing step 1052, firstly, a plurality of independent heads are initialized and the number of heads is set, for example, the number of heads is set to 8.
[0088] Then, in each head, the dynamic weights of the growth environment feature vector and the morphological feature vector (i.e., the attention weight matrix) are calculated through the cross-attention mechanism, and dynamic fusion features are generated based on the dynamic weights.
[0089] Among them, the core formula of the cross attention mechanism is: Among them, the growth environment feature vector (time series feature vector) is used as the query vector (i.e. Query). The morphological feature vector (spatial feature vector) serves as the key vector K (i.e. Key) and the value vector (i.e. Value), is the dimension of K.
[0090] Through the above The formula calculates the correlation weight of each growth environment feature (Q) and all morphological features (K), and weighted aggregates the corresponding morphological features (V) to generate a dynamic fusion feature. With each Perform dot product operation to get the similarity score , then divided by , to prevent the gradient from disappearing, then use Normalize the scores and get the weights , indicating the attention paid by the growth environment characteristics to each morphological feature: , finally, according to the weight Perform weighted summation on V to obtain a fusion feature .
[0091] Finally, the fused feature vectors output by each head are concatenated to obtain the final multimodal feature vector.
[0092] In this application, the attention fusion layer uses multiple independent attention heads to improve the granularity of feature fusion, dynamically adapting the importance weights of features from different modalities and avoiding information loss caused by the spatial limitations of single-head mechanisms. Therefore, this multi-head mechanism can help growth prediction models more accurately correlate the temporal changes in the mushroom growth environment with the spatial structural characteristics of the cap morphology, ultimately improving the accuracy of multimodal analysis.
[0093] Step 1053: Train the growth prediction model based on the multimodal feature vector.
[0094] Reference Figure 2 The growth prediction model of the present application further includes a prediction output layer, which includes an extreme gradient boosting regression model (i.e., an XGBoost regression model). Accordingly, step 105 may include: Step 1051: Input the multimodal feature vector into the prediction output layer, and obtain the prediction result of the growth status of the Pleurotus citrinopileatus sample through the extreme gradient boosting regression model.
[0095] Step 1052: Based on the predicted results and the corresponding actual results, the growth prediction model is trained using a target loss function. The target loss function is determined based on a mean squared error (MSE) function and / or a mean absolute error (MAE) function.
[0096] The data structure in the XGBoost regression model uses the DMatrix data structure.
[0097] The above steps 101 to 105 describe how the growth prediction model processes the multimodal data (morphological data, image data, and growth environment data) of the Pleurotus citrinopileatus samples. The overall training process of the growth prediction model will be described in detail below.
[0098] Step 1: Data Partitioning. Divide the original sample data into a training set (70%), a validation set (20%), and a test set (10%) in a ratio of 7:2:1. The specific division ratio can be set based on actual needs and is provided here for illustrative purposes only.
[0099] Step 2: Perform 5-fold cross validation within the training set.
[0100] The training set (70%) is further divided into five subsets, such as A, B, C, D, and E. In each iteration, four subsets (e.g., A+B+C+D) are used as training subsets to train the growth prediction model. The remaining subset (e.g., E) is used as the validation subset to calculate metrics such as the mean square error (MSE), mean average error (MAE), and coefficient of determination (R²). This is repeated five times to ensure that each subset is validated once.
[0101] Step 3: Model training and verification are performed alternately.
[0102] During each fold training, model parameters are initialized. Then, the training subset of the current fold is trained for 50 epochs (the number of iterations per epoch is equal to the number of samples in the current fold training subset divided by the batch size, rounded up if the number is not divisible). The Adam optimizer is used with a learning rate of 0.001. After each epoch, metrics such as MSE, MAE, and R² are calculated using the validation subset of the current fold. This temporary validation subset is used only to evaluate the performance of the model for the current fold and does not participate in hyperparameter tuning. In other words, it is used to evaluate the stability of the model on the training set, not to perform hyperparameter tuning.
[0103] Step 4: After completing the 5-fold cross-validation, retrain the growth prediction model using the training set (70%) without further folding. During training, construct the target loss function using MSE and / or MAE. Train based on this target loss function and use the validation set (20%) to adjust hyperparameters (such as the learning rate and number of layers) to ensure optimal performance on the unseen validation set.
[0104] Step 5: Based on the model obtained in Step 4, use the test set (10%) to calculate indicators such as MSE, MAE, and R² to evaluate the true generalization ability of the model and ensure that the results are not contaminated by the training / validation data.
[0105] The method for implementing the present application comprises the following steps: first, collecting morphological data, image data and growth environment data of multiple Pleurotus citrinopileatus samples at preset time intervals to obtain multiple groups of sample morphological data, multiple groups of sample image data and multiple groups of sample growth environment data; then, obtaining multiple adjacency matrices based on the multiple groups of sample image data, where one adjacency matrix is obtained based on one group of sample image data, and the adjacency matrix represents the similarity between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; then, inputting the multiple adjacency matrices, multiple groups of sample morphological data and multiple groups of sample image data into a graph convolutional network to obtain morphological feature vectors; then, inputting the multiple groups of sample growth environment data into a bidirectional long short-term memory network to obtain growth environment feature vectors; then, training a growth prediction model based on the growth environment feature vectors and the morphological feature vectors until a preset stopping condition is met, wherein the growth prediction model is used to predict the growth status of Pleurotus citrinopileatus at a future moment. This application constructs a multimodal dataset by integrating the morphological data, image data and growth environment data of the entire growth cycle of Pleurotus citrinopileatus, which can improve the prediction accuracy of the growth prediction model. In addition, this application uses a bidirectional long short-term memory network and a graph convolutional network to deeply fuse and dynamically model the multimodal data, which can achieve a comprehensive analysis and accurate prediction of the growth pattern of Pleurotus citrinopileatus, and solve the problem of insufficient prediction accuracy in related technologies.
[0106] In combination with the above embodiments, in one implementation, until a preset stop condition is met, the method of the present application may further include: The morphological data, image data and growth environment data of the target elm citrinum collected before the first moment are input into the growth prediction model to obtain the prediction result of the growth status of the target elm citrinum at the second moment. The second moment is later than the first moment, and the prediction result of the growth status at least includes the maturity period and the area of the cap.
[0107] The trained growth prediction model can be used in this application to predict the maturity period and cap area of the target erinaceus, which can be directly applied to erinaceus cultivation practices. For example, growers can rationally arrange planting plans, fertilization and irrigation, and harvesting times based on the predicted area and maturity period, thereby improving planting efficiency.
[0108] The area of the cap can be Figure 3 shown. Figure 3 This is a schematic diagram of an elm yellow mushroom shown in an embodiment of the present application. Figure 3In the figure, the circled area indicates the area corresponding to the predicted cap area.
[0109] This application proposes a new architecture, the Attention-LSTM-GCN hybrid algorithm, which deeply integrates the bidirectional long short-term memory network for processing time series data, the graph convolutional network for analyzing spatial correlation, and the multi-head attention mechanism for realizing dynamic feature weighting, breaking through the limitations of traditional single models or simple combination models. This fusion method can give full play to the advantages of each model, model and analyze the growth data of Pleurotus citrinopileatus from different dimensions, and provide a more comprehensive and in-depth perspective for accurate prediction. At the same time, compared with the method of using a single model for prediction in the prior art, the Attention-LSTM-GCN hybrid algorithm of this application can simultaneously capture the time series characteristics and spatial characteristics of the growth process of Pleurotus citrinopileatus, and dynamically adjust the feature weights through the attention mechanism, significantly improving the model's ability to learn and express complex growth laws, and realizing accurate prediction of the growth status of Pleurotus citrinopileatus.
[0110] The present application also provides a growth prediction model training device for Agaricus citrinum. The growth prediction model training device provided by the present application is described below. The growth prediction model training device described below and the growth prediction model training method described above can be referenced to each other.
[0111] Figure 4 This is a structural block diagram of a growth prediction model training device for Pleurotus citrinum shown in an embodiment of the present application. Figure 4 The growth prediction model training device of Pleurotus citrinopileatus of the present application may include: The acquisition module 401 is used to collect morphological data, image data and growth environment data of multiple Pleurotus citrinopileatus samples at preset time intervals to obtain multiple sets of sample morphological data, multiple sets of sample image data and multiple sets of sample growth environment data; A first obtaining module 402 is configured to obtain multiple adjacency matrices based on the multiple sets of sample image data, wherein one adjacency matrix is obtained based on one set of sample image data, and the adjacency matrix represents similarities between different Pleurotus citrinopileatus samples in the sample image data, and one set of sample image data contains one Pleurotus citrinopileatus sample; A second obtaining module 403 is configured to input the plurality of adjacency matrices, the plurality of groups of sample morphological data, and the plurality of groups of sample image data into the graph convolutional network to obtain a morphological feature vector; A third obtaining module 404 is configured to input the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; The training module 405 is used to train the growth prediction model according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
[0112] According to a growth prediction model training device 400 for Pleurotus citrinopileatus provided in the present application, the first obtaining module 402 includes: A first determining submodule is configured to determine a corresponding graph structure for each set of sample image data, wherein a node in the graph structure represents a Pleurotus citrinopileatus sample; A second determining submodule is configured to determine the morphological characteristics of the cap of each of the Pleurotus citrinopileatus samples based on the sample image data; a third determining submodule, configured to determine the weight of each edge in the graph structure according to the similarity between the morphological features of the pileus corresponding to different nodes; The first obtaining submodule is used to obtain the adjacency matrix corresponding to each group of sample image data according to the weights of each node and each edge in the graph structure.
[0113] According to a growth prediction model training device 400 for Pleurotus citrinopileatus provided in the present application, there are multiple graph convolutional networks, and the different graph convolutional networks are used to extract features of different dimensions. The second acquisition module 403 includes: A second obtaining submodule is configured to perform feature extraction on the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data through multiple graph convolutional networks to obtain multiple sub-morphological feature vectors of different dimensions; The third obtaining submodule is used to splice the multiple sub-morphological feature vectors of different dimensions to obtain the morphological feature vector.
[0114] According to the growth prediction model training device 400 of Pleurotus citrinopileatus provided in the present application, the second obtaining module 403 may include: a fourth obtaining submodule, configured to perform feature extraction on the plurality of groups of sample image data to obtain a plurality of groups of first-category features, wherein the first-category features include at least the area, outline, and texture of the pileus; a fifth obtaining submodule, configured to combine the plurality of first-category features and the features in the plurality of sample morphological data to obtain second-category features; The sixth acquisition submodule is used to input the multiple adjacency matrices and the second type of features into the graph convolutional network to obtain the morphological feature vector.
[0115] According to a growth prediction model training device 400 for Pleurotus citrinopileatus provided in the present application, the growth prediction model further includes an attention fusion layer, and the training module 405 may include: an alignment submodule, configured to project the growth environment feature vector and the morphological feature vector into the same space through linear transformation and align feature dimensions; a seventh obtaining submodule, configured to input the growth environment feature vector and the morphological feature vector after aligning feature dimensions into the attention fusion layer to obtain a multimodal feature vector, wherein the attention fusion layer is configured to fuse the aligned growth environment feature vector and the morphological feature vector through a cross-attention mechanism based on multiple independent heads, wherein one head represents an independent subspace processing unit divided by linear projection; The first training submodule is used to train the growth prediction model according to the multimodal feature vector.
[0116] According to the growth prediction model training device 400 of Pleurotus citrinopileatus provided in this application, the seventh obtaining submodule includes: A first determination submodule is configured to, in each independent head, use the growth environment feature vector as a query vector and the morphological feature vector as a key vector to determine an attention weight matrix through a cross-attention mechanism; an eighth obtaining submodule, configured to use the morphological feature vector as a value vector and obtain a fused feature vector corresponding to the current independent head according to the product of the value vector and the attention weight matrix; The ninth obtaining submodule is used to splice the fused feature vectors corresponding to the independent heads to obtain the multimodal feature vector.
[0117] According to a growth prediction model training device 400 for Pleurotus citrinopileatus provided in the present application, the growth prediction model further includes a prediction output layer, and the first training submodule includes: a tenth obtaining submodule, configured to input the multimodal feature vector into the prediction output layer, and obtain a prediction result of the growth state of the Pleurotus citrinopileatus sample through the extreme gradient boosting regression model; The second training submodule is used to train the growth prediction model according to the predicted results and the corresponding actual results through a target loss function, where the target loss function is determined according to a mean square error function and / or a mean absolute error function.
[0118] According to the present application, a growth prediction model training device 400 for Pleurotus citrinopileatus is provided, further comprising: The prediction module is used to input the morphological data, image data and growth environment data of the target elm citronella collected before the first moment into the growth prediction model to obtain the prediction result of the growth status of the target elm citronella at the second moment, where the second moment is later than the first moment, and the prediction result of the growth status at least includes the maturity period and the area of the cap.
[0119] Figure 5 This is a schematic diagram of the physical structure of an electronic device shown in an embodiment of the present application. Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the growth prediction model training method of the Pleurotus citrinopileatus, which includes: At preset time intervals, morphological data, image data, and growth environment data of multiple Pleurotus citrinopileatus samples are collected to obtain multiple sets of sample morphological data, multiple sets of sample image data, and multiple sets of sample growth environment data; Obtaining multiple adjacency matrices based on the multiple groups of sample image data, wherein one adjacency matrix is obtained based on one group of sample image data, the adjacency matrix represents the similarity between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; Inputting the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data into the graph convolutional network to obtain morphological feature vectors; Inputting the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; The growth prediction model is trained according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
[0120] In addition, the logical instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program code.
[0121] On the other hand, the present application also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the growth prediction model training method for Pleurotus citrinopileatus provided by the above methods, which method includes: At preset time intervals, morphological data, image data, and growth environment data of multiple Pleurotus citrinopileatus samples are collected to obtain multiple sets of sample morphological data, multiple sets of sample image data, and multiple sets of sample growth environment data; Obtaining multiple adjacency matrices based on the multiple groups of sample image data, wherein one adjacency matrix is obtained based on one group of sample image data, the adjacency matrix represents the similarity between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; Inputting the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data into the graph convolutional network to obtain morphological feature vectors; Inputting the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; The growth prediction model is trained according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
[0122] In another aspect, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the growth prediction model training method for Pleurotus citrinopileatus provided by the above methods, the method comprising: At preset time intervals, morphological data, image data, and growth environment data of multiple Pleurotus citrinopileatus samples are collected to obtain multiple sets of sample morphological data, multiple sets of sample image data, and multiple sets of sample growth environment data; Obtaining multiple adjacency matrices based on the multiple groups of sample image data, wherein one adjacency matrix is obtained based on one group of sample image data, the adjacency matrix represents the similarity between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; Inputting the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data into the graph convolutional network to obtain morphological feature vectors; Inputting the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; The growth prediction model is trained according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
[0123] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0124] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A growth prediction model training method for Pleurotus citrinopileatus, characterized in that: The growth prediction model includes at least a bidirectional long short-term memory network and a graph convolutional network, and the growth prediction model training method includes: At preset time intervals, morphological data, image data, and growth environment data of multiple Pleurotus citrinopileatus samples are collected to obtain multiple sets of sample morphological data, multiple sets of sample image data, and multiple sets of sample growth environment data; Obtaining multiple adjacency matrices based on the multiple groups of sample image data, wherein one adjacency matrix is obtained based on one group of sample image data, the adjacency matrix represents the similarity between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; Inputting the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data into the graph convolutional network to obtain morphological feature vectors; Inputting the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; The growth prediction model is trained according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
2. The growth prediction model training method according to claim 1, characterized in that: The step of obtaining a plurality of adjacency matrices according to the plurality of groups of sample image data comprises: For each set of sample image data, a corresponding graph structure is determined, wherein a node in the graph structure represents a Pleurotus citrinopileatus sample; determining the morphological characteristics of the caps of the respective Pleurotus citrinopileatus samples according to the sample image data; Determining the weight of each edge in the graph structure according to the similarity between the morphological features of the pileus corresponding to different nodes; According to the weights of each node and each edge in the graph structure, an adjacency matrix corresponding to each group of sample image data is obtained.
3. The growth prediction model training method according to claim 1, characterized in that: There are multiple graph convolutional networks, and the different graph convolutional networks are used to extract features of different dimensions. The multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data are input into the graph convolutional networks to obtain morphological feature vectors, including: Performing feature extraction on the multiple adjacency matrices, the multiple groups of sample morphological data, and the multiple groups of sample image data through multiple graph convolutional networks to obtain multiple sub-morphological feature vectors of different dimensions; The multiple sub-morphological feature vectors of different dimensions are concatenated to obtain the morphological feature vector.
4. The growth prediction model training method according to claim 1, characterized in that: Inputting the plurality of adjacency matrices, the plurality of groups of sample morphological data, and the plurality of groups of sample image data into the graph convolutional network to obtain morphological feature vectors includes: Performing feature extraction on the plurality of groups of sample image data to obtain a plurality of groups of first-category features, wherein the first-category features at least include the area, outline, and texture of the pileus; splicing the multiple sets of first-category features and the features in the multiple sets of sample morphological data to obtain second-category features; The multiple adjacency matrices and the second type of features are input into the graph convolutional network to obtain the morphological feature vector.
5. The growth prediction model training method according to claim 1, characterized in that: The growth prediction model further includes an attention fusion layer, and the training of the growth prediction model according to the growth environment feature vector and the morphological feature vector includes: Projecting the growth environment feature vector and the morphological feature vector into the same space through linear transformation and aligning feature dimensions; Inputting the growth environment feature vector and the morphological feature vector after aligning the feature dimensions into the attention fusion layer to obtain a multimodal feature vector, the attention fusion layer is used to fuse the aligned growth environment feature vector and the morphological feature vector through a cross-attention mechanism based on multiple independent heads, wherein one head represents an independent subspace processing unit divided by linear projection; The growth prediction model is trained according to the multimodal feature vector.
6. The growth prediction model training method according to claim 5, characterized in that: The step of inputting the growth environment feature vector and the morphological feature vector after aligning the feature dimensions into the attention fusion layer to obtain a multimodal feature vector includes: In each independent head, the growth environment feature vector is used as the query vector, the morphological feature vector is used as the key vector, and the attention weight matrix is determined through the cross attention mechanism; Taking the morphological feature vector as a value vector, and obtaining a fusion feature vector corresponding to the current independent head according to the product of the value vector and the attention weight matrix; The fused feature vectors corresponding to the independent heads are concatenated to obtain the multimodal feature vector.
7. The growth prediction model training method according to claim 5, characterized in that: The growth prediction model further includes a prediction output layer, wherein the prediction output layer includes an extreme gradient boosting regression model; and training the growth prediction model according to the multimodal feature vector includes: Inputting the multimodal feature vector into the prediction output layer, and obtaining a prediction result of the growth state of the Pleurotus citrinopileatus sample through the extreme gradient boosting regression model; The growth prediction model is trained according to the predicted results and the corresponding true results using a target loss function, where the target loss function is determined based on a mean square error function and / or a mean absolute error function.
8. The growth prediction model training method according to claim 1, characterized in that: After the preset stop condition is met, the method further includes: The morphological data, image data and growth environment data of the target Pleurotus citrinopileatus collected before the first moment are input into the growth prediction model to obtain a prediction result of the growth status of the target Pleurotus citrinopileatus at the second moment, where the second moment is later than the first moment, and the prediction result of the growth status at least includes the maturity period and the area of the cap.
9. A growth prediction model training device for Pleurotus citrinopileatus, characterized in that: The growth prediction model includes at least a bidirectional long short-term memory network and a graph convolutional network, and the growth prediction model training device includes: The acquisition module is used to collect morphological data, image data and growth environment data of multiple Pleurotus citrinopileatus samples at preset time intervals to obtain multiple sets of sample morphological data, multiple sets of sample image data and multiple sets of sample growth environment data; a first obtaining module, configured to obtain a plurality of adjacency matrices based on the plurality of groups of sample image data, wherein one adjacency matrix is obtained based on one group of sample image data, the adjacency matrix represents similarities between different Pleurotus citrinopileatus samples in the sample image data, and one sample image data contains one Pleurotus citrinopileatus sample; A second acquisition module is configured to input the plurality of adjacency matrices, the plurality of groups of sample morphological data, and the plurality of groups of sample image data into the graph convolutional network to obtain a morphological feature vector; A third acquisition module is configured to input the plurality of groups of sample growth environment data into the bidirectional long short-term memory network to obtain a growth environment feature vector; A training module is used to train the growth prediction model according to the growth environment feature vector and the morphological feature vector until a preset stop condition is met, wherein the growth prediction model is used to predict the growth state of Pleurotus citrinopileatus at a future moment.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for training a growth prediction model of Pleurotus citrinopileatus as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Student score prediction method and system based on time sequence dynamic graph neural network
CN115659787A
Disease and insect pest target detection method, device and equipment based on improved YOLOv8
CN117115640A
Model training method, runoff prediction method, electronic equipment and storage medium
CN118114057A
Cited By
Agricultural data processing method and device, electronic equipment and storage medium
CN121707099A