A machine learning-based tea fresh leaf picking and primary processing planning and scheduling method
By combining machine learning with CNN and greedy algorithms, the planning and scheduling problems of tea leaf picking and primary processing sites were solved, achieving efficient and stable production and low-cost management of fresh tea leaves, thus ensuring the quality and supply of fresh tea leaves.
Patent Information
- Application Number
- CN202311448338.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-11-02
AI Technical Summary
In the existing technology, the planning and scheduling of tea garden fresh leaf picking and primary processing sites lack real-time prediction and reasonable arrangement, resulting in unstable picking time and primary processing quality, low picking efficiency, high cost, and inconsistent quality of tea leaves from batch to batch.
A machine learning-based approach, combining convolutional neural networks (CNN) and greedy algorithms, is used to construct a tea garden fresh leaf picking plan model. The model is trained using a multi-task loss function and the Nadam optimization algorithm to predict the growth of fresh tea leaves, formulate picking plans, and optimize the resource allocation of the primary processing plant, ensuring high-quality production and improved efficiency of fresh tea leaves.
This has enabled coordination between the tea garden's fresh leaf picking plan and the primary processing plant, improved picking efficiency and the quality stability of fresh tea leaves, reduced production costs, and ensured timely supply and inventory management of fresh tea leaves.
Smart Images

Figure CN117592684B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent tea manufacturing technology, specifically to a planning and scheduling method for fresh tea leaf picking and initial processing based on machine learning. Background Technology
[0002] With the rapid development and practical application of artificial intelligence, machine vision, machine learning, and digital transformation, the tea industry is increasingly conducting in-depth research in intelligent manufacturing and artificial intelligence. The management of fresh tea leaves in tea gardens is of paramount importance, as the quality and taste of tea are closely related to the timing of fresh leaf harvesting and initial processing. Currently, tea garden management, combining fresh leaf harvesting with initial processing, is increasingly emphasizing digitalization, integration, and intelligence, placing greater emphasis on the timeliness of fresh leaf harvesting and the capacity of initial processing.
[0003] Current technologies primarily rely on extensive and complex observations and analyses combining human experience with the natural environment to determine the growth status of fresh tea leaves, harvesting timing, and production plans. This constitutes passive production planning. The lack of real-time forecasting of the tea garden's fresh leaves and the inability to rationally arrange primary processing sites makes it difficult to guarantee the freshness and tenderness of the tea, and also hinders improvements in harvesting efficiency and the consistency and stability of primary processing quality.
[0004] Taking into account both fresh tea leaves from tea gardens and primary processing sites, it is becoming increasingly important to predict tea leaf harvesting plans and rationally arrange primary processing sites to reduce the impact of seasons and climate and improve the production efficiency and quality of primary processing. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems by providing a machine learning-based planning and scheduling method for tea leaf harvesting and primary processing. This method combines tea garden harvesting plans with primary processing plant scheduling through machine learning, resolving issues of mismatched allocation between tea garden fresh leaves and primary processing, as well as unstable batch quality of fresh leaves. It enables adaptive adjustment of tea garden fresh leaf harvesting and allocation to primary processing plants, improving harvesting efficiency and ensuring the freshest harvested tea leaves. It also optimizes the allocation of harvested fresh leaves for primary processing, maximizing the utilization of equipment and resources in primary processing facilities, reducing production costs, ensuring timely supply of fresh leaves, and minimizing inventory and procurement costs.
[0006] The technical solution of the present invention is as follows:
[0007] This invention discloses a machine learning-based method for planning and scheduling the harvesting and initial processing of fresh tea leaves, comprising the following steps:
[0008] Step 1: Collect information on tea gardens and fresh leaves, and process the data;
[0009] Step 2: Construct a tea garden fresh leaf picking plan model based on convolutional neural networks, and define the input layer and output layer of the model;
[0010] Step 3: Train the tea garden fresh leaf picking plan model, define a multi-task loss function, use the mean square error between the actual value and the predicted value as the single-task loss function, and add it with the constraint parameters to obtain the total loss; for different seasons and climate conditions, use the Nadam optimization algorithm to minimize the multi-task loss function for training.
[0011] Step 4: Use the trained model to predict the growth of fresh tea leaves in the tea garden, detect the mature leaves, and formulate a harvesting plan and priorities.
[0012] Step 5: Based on the harvesting plan and priorities, as well as the production capacity of the primary processing plant, a greedy algorithm is used to select the optimal strategy to allocate the harvested fresh leaves to the primary processing plant for production.
[0013] The above method, by combining the Nadam-optimized CNN model and the greedy algorithm, and by combining the tea garden fresh leaf picking plan with the primary processing plant's scheduling plan, solves the problems of uncoordinated allocation of tea garden fresh leaves and primary processing and unstable batch quality of fresh leaves, ensuring the production of high-quality tea leaves while reducing costs and improving efficiency.
[0014] Among these methods, convolutional neural networks (CNNs) are used to monitor the growth of fresh tea leaves and plan harvesting. The CNN model can provide harvesters with information on which areas have more mature leaves, thus helping to optimize the harvesting sequence and plan. This can improve harvesting efficiency and reduce waste.
[0015] Furthermore, in step two, the input layer and the output layer include input parameters and output parameters, wherein the input parameters are: geographical information of the tea garden, weather conditions, soil conditions, tea tree varieties, growth stages, availability and work efficiency of picking workers; and the output parameters are: time and location of picking tasks, allocation of picking workers, and priority of picking tasks.
[0016] Furthermore, in step three, the total loss of task i includes minimizing Li(θ) and a penalty term for satisfying certain constraints. When optimizing the fresh leaf harvesting task, the constraints are satisfied as much as possible, as shown in the following formula:
[0017] Total Loss(θ)=∑(Li(θ)+λ*ConstraintPenalty(θ)),i=1,2,...,n
[0018] Here, θ represents the combination of parameters, namely the learnable parameters such as weights and biases in the convolutional neural network, used to calculate the loss value, ConstraintPenalty(θ) represents the penalty term for the constraint, and λ is a hyperparameter that balances the task and the constraint.
[0019] Furthermore, in step three, the method of minimizing the multi-task loss function using the Nadam optimization algorithm is as follows:
[0020] Calculate the gradient g_t: Calculate the current gradient g_t based on the current model parameters θ_t and the gradient of the loss function; Calculate the momentum term m_t: Use Nesterov momentum to adjust the gradient direction and calculate the momentum term m_t;
[0021] m_t=β_1*m_t-1+(1-β_1)*g_t
[0022] Where β_1 is the momentum decay coefficient, which is usually close to 1;
[0023] Calculate the adaptive learning rate term v_t: Use Adam's adaptive learning rate mechanism to calculate the adaptive learning rate term v_t;
[0024] v_t=β_2*v_t-1+(1-β_2)*g_t^2
[0025] Wherein, β_2 is the learning rate decay coefficient, which is usually close to 1;
[0026] Update parameter θ_t+1: Update parameter θ_t+1 based on momentum term m_t and adaptive learning rate term v_t;
[0027] θ_t+1=θ_t-α*(m_t / (sqrt(v_t)+ε))
[0028] Where α is the initial learning rate, and ε is a very small number used to avoid the denominator being zero;
[0029] The momentum decay coefficient β_1 is adjusted according to the magnitude and direction of the gradient g_t; the learning rate decay coefficient β_2 is adaptively adjusted considering the seasonal and climatic characteristics of fresh tea leaves; constraint optimization is introduced for the temporary task of fresh leaf picking to ensure that the parameter θ_t+1 meets specific constraints; different learning rate scheduling strategies are adopted to improve the running efficiency of the convolutional neural network model; and necessary hyperparameter adjustments and optimizations are performed.
[0030] Furthermore, the optimization method for the multi-task loss function also includes: In a general multi-task loss function, the weights of each task—tea garden fresh leaf picking plan, personnel allocation plan, and tea garden picking yield—are allocated according to the importance of the task. The priority task of tea garden fresh leaf picking has a higher weight in the total loss, and the loss formula is expressed as:
[0031] Total Loss(θ)=∑(wi*Li(θ)),i=1,2,...,n
[0032] Where wi is the weight of task i.
[0033] Furthermore, the optimization method for the multi-task loss function also includes: if there is a correlation between the tea garden fresh leaf planning tasks, that is, multiple adjacent tea gardens are harvesting at the same time, the loss function prompts the model to share information when learning tasks, which is achieved through the cross loss term between tasks. The loss formula is Total Loss(θ)=∑(Li(θ))+α*∑∑(Cij*Lij(θ)),i,j=1,2,...,n, where Lij(θ) is the cross loss term between task i and task j, Cij is the correlation coefficient between them, and α is the correlation weight.
[0034] Furthermore, the optimization method for the multi-task loss function also includes: when the importance of the tea garden fresh leaf picking plan task changes over time, the weight of the task is dynamically adjusted during training through the loss function to quickly allocate human resources and task priority.
[0035] Furthermore, step five specifically includes:
[0036] Step 1: Collect and organize data on the amount of fresh leaves picked in the tea garden, the production capacity data of the primary processing plant, and the geographical location data; determine the production capacity limit of the primary processing plant, that is, the number of fresh leaves that each primary processing plant can process.
[0037] Step 2: Initialize an empty primary processing plant allocation scheme, indicating that each primary processing plant has not yet been allocated fresh leaves;
[0038] Step 3: For each batch of fresh leaves, select the most suitable primary processing plant for allocation according to the strategy;
[0039] Step 4: Update the primary processing plant allocation plan, mark the selected primary processing plants as allocated, and reduce their capacity restrictions; if there are still unallocated fresh leaves, return to Step 3;
[0040] Step 5: The plan is complete when all fresh leaves have been allocated and there are no unmet production capacity constraints.
[0041] Furthermore, the strategy in Step 3 includes:
[0042] Nearest primary processing plant: Allocate fresh leaves to the nearest primary processing plant to reduce transportation costs and time; Maximum capacity primary processing plant: Allocate fresh leaves to the primary processing plant with the largest capacity to maximize total output;
[0043] Comprehensive evaluation: Taking into account factors such as distance, production capacity, and others, the most suitable primary manufacturing plant is selected using a certain weighting.
[0044] Furthermore, based on different task attribute rules, the weighting factors are adjusted for comprehensive evaluation. The comprehensive evaluation calculation formula is as follows: Total_Score(task) = w1*output + w2*distance - w3*(allocated capacity / initial capacity), where w1, w2, and w3 are weighting factors, Total_Score(task) represents the task score, output represents the output of the harvesting plan task, distance represents the distance of fresh leaves supplied to the primary processing plant, and allocated capacity / initial capacity represents the capacity utilization rate of a primary processing plant after completing part of the task; for optimization of multiple primary processing task objectives, multiple primary processing task objective score functions are calculated and sorted from high to low: Total_Score(task) = α*Score1(task) + β*Score2(task) + γ*Score3(task), where Score1, Score2, and Score3 are score functions of different objective tasks, and α, β, and γ are their weights.
[0045] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0046] 1. This invention combines tea garden fresh leaf picking plans with primary processing plant scheduling through machine learning, comprehensively addressing the issues of uncoordinated allocation between tea garden fresh leaves and primary processing, as well as unstable batch quality of fresh leaves.
[0047] 2. This invention combines the Nadam-optimized CNN model with a greedy algorithm to achieve intelligent management of fresh tea leaf production. The entire process from tea garden to primary processing plant can be optimized to ensure the production of high-quality fresh tea leaves, while reducing costs and improving efficiency.
[0048] 3. This invention reduces the large amount of human resources required for tea picking and strengthens the close connection between tea gardens and primary processing plants.
[0049] 4. This invention enables adaptive adjustment of tea garden fresh leaf picking and fresh leaf distribution primary processing, improves picking efficiency and ensures the freshest tea leaves, ensures timely supply of fresh leaves, and reduces inventory and procurement costs. Attached Figure Description
[0050] The present invention will be described by way of example and with reference to the accompanying drawings, wherein:
[0051] Figure 1 This is a flowchart of a planning and scheduling method for tea leaf picking and initial processing based on machine learning, according to the present invention.
[0052] Figure 2 This is a flowchart of a machine learning-based planning and scheduling method for tea leaf picking and initial processing in another embodiment of the present invention.
[0053] Figure 3This is a detailed flowchart of a machine learning-based planning and scheduling method for tea leaf picking and initial processing according to the present invention. Detailed Implementation
[0054] All features disclosed in this specification, or all steps in all disclosed methods or processes, may be combined in any way, except for mutually exclusive features and / or steps.
[0055] Any feature disclosed in this specification (including any appended claims and abstract) may be replaced by other equivalent or similar features, unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is merely one example of a series of equivalent or similar features.
[0056] The features and performance of the present invention will be further described in detail below with reference to embodiments.
[0057] like Figure 1 As shown, this invention discloses a machine learning-based method for planning and scheduling the harvesting and initial processing of fresh tea leaves, comprising the following steps:
[0058] Step 1: Collect information on tea gardens and fresh leaves, and process the data;
[0059] Step 2: Construct a tea garden fresh leaf picking plan model based on convolutional neural networks, and define the input layer and output layer of the model;
[0060] Step 3: Train the tea garden fresh leaf picking plan model, define a multi-task loss function, use the mean square error between the actual value and the predicted value as the single-task loss function, and add it with the constraint parameters to obtain the total loss; for different seasons and climate conditions, use the Nadam optimization algorithm to minimize the multi-task loss function for training.
[0061] Step 4: Use the trained model to predict the growth of fresh tea leaves in the tea garden, detect the mature leaves, and formulate a harvesting plan and priorities.
[0062] Step 5: Based on the harvesting plan and priorities, as well as the production capacity of the primary processing plant, a greedy algorithm is used to select the optimal strategy to allocate the harvested fresh leaves to the primary processing plant for production.
[0063] like Figure 2 As shown, in one embodiment, the initial processing plan for fresh tea leaves and the harvesting plan for fresh tea leaves in the tea garden are obtained from an external system. Based on the initial processing plan for fresh tea leaves, a total harvesting plan is formulated according to the output ratio. The initial processing plan for fresh tea leaves and the harvesting plan for fresh tea leaves in the tea garden obtained from the external system only represent the routine production task plan and are used as input parameters for the tea garden harvesting plan model, mainly to adapt to changes in market supply and demand.
[0064] like Figure 3 As shown, the specific method for scheduling tea leaf harvesting and initial processing based on machine learning is as follows: Real-time and historical tea garden data are acquired, including weather information, tea garden extent, images of fresh tea leaves, and information on harvesting workers, and the data is cleaned, standardized, and missing value handled. Features relevant to the harvesting plan are extracted and selected, and image data is preprocessed, such as resizing and standardization. Image data of the tea garden is collected, including images of tea gardens in different seasons and growth stages. Images are labeled to facilitate training the convolutional neural network model, i.e., labels are assigned to each tea garden area in each image, such as health status and tea leaf growth stage. This can be done manually or using semi-automated tools. The labeled image data is used to train the tea leaf harvesting plan model. During training, the CNN model will learn to extract features related to the growth of fresh tea leaves. Simultaneously, using environmental data as input features can also help the model better understand the tea garden's growth environment.
[0065] When training the convolutional neural network, a multi-task loss function is used because the fresh leaf project involves multiple collaborative tasks. In each training step, for each task, the difference between the actual value (yield, labor cost, quality, distance from the tea garden to the primary processing plant, etc.) and the model's predicted value is calculated, using the mean squared error (MSE) as the loss function. If the tea garden fresh leaf project considers constraints between tasks, the loss of a single task needs to be added to the constraint method through the multi-task loss to obtain the total loss. For example, the loss of task i may include minimizing Li(θ) and a penalty term for satisfying a certain constraint. When optimizing the fresh leaf harvesting task, constraints should be satisfied as much as possible. The formula is as follows:
[0066] Total Loss(θ)=∑(Li(θ)+λ*ConstraintPenalty(θ)),i=1,2,...,n
[0067] Here, θ is used to represent the combination of parameters, namely the learnable parameters such as weights and biases in the convolutional neural network, in order to calculate the loss value and adjust these parameters through optimization algorithms to minimize the loss, so that the model can better fit the training data and generalize on new data. ConstraintPenalty(θ) is the penalty term of the constraint, and λ is the hyperparameter that weighs the task and the constraint.
[0068] Subsequently, the Nadam optimization algorithm is used to minimize the multi-task loss function. The Nadam formula consists of two main parts: momentum and adaptive learning rate. The Nadam optimization algorithm helps the CNN model automatically adjust its parameters to adapt to different seasonal and climatic conditions of fresh tea leaves. This increases the model's robustness. Its main update rules are as follows:
[0069] Calculate the gradient g_t: Calculate the current gradient g_t based on the current model parameters θ_t and the gradient of the loss function.
[0070] Calculating the momentum term m_t: Nadam uses Nesterov momentum to adjust the gradient direction and calculates the momentum term m_t.
[0071] m_t=β_1*m_t-1+(1-β_1)*g_t
[0072] Where β_1 is the momentum decay coefficient, which is usually close to 1.
[0073] Calculating the adaptive learning rate term v_t: Nadam uses Adam's adaptive learning rate mechanism to calculate the adaptive learning rate term v_t.
[0074] v_t=β_2*v_t-1+(1-β_2)*g_t^2
[0075] Where β_2 is the learning rate decay coefficient, which is usually close to 1.
[0076] Update parameter θ_t+1: Update parameter θ_t+1 based on the momentum term and the adaptive learning rate term.
[0077] θ_t+1=θ_t-α*(m_t / (sqrt(v_t)+ε))
[0078] Here, α is the initial learning rate, and ε is a very small number used to avoid the denominator being zero.
[0079] Areas for improvement:
[0080] 1) Adaptive momentum: The momentum decay coefficient β_1 is adjusted according to the magnitude and direction of the gradient. This allows for better adaptation to the characteristics of fresh leaf quality, harvesting personnel costs, and the growth of fresh leaves in the tea garden.
[0081] 2) Adaptive learning rate: The learning rate decay coefficient β_2 is adaptively adjusted to take into account the seasonal and climatic characteristics of fresh tea leaves. Different learning rate decay strategies are required for different tea gardens with different fresh leaf picking priorities.
[0082] 3) Constraint optimization: For the temporary task of fresh leaf picking, constraint optimization can be introduced based on Nadam to ensure that the parameter θ_t+1 meets specific constraints.
[0083] 4) Learning rate scheduling strategy: Different learning rate scheduling strategies can be adopted to improve the running efficiency of CNN models, such as learning rate decay or learning rate warm-up, to better balance the convergence speed and stability of the model.
[0084] Finally, the performance of the CNN model was evaluated using a validation dataset, and necessary hyperparameter adjustments and optimizations were performed to ensure good generalization ability. When the model detects that the tea leaves in certain tea gardens are ripe or that the initial processing plant is scheduled for production, a harvesting plan and tea garden priority are generated to notify the harvesting team to harvest the corresponding tea garden fresh leaves at the appropriate time to ensure the best quality of fresh tea leaves.
[0085] Furthermore, the calculation formula for improving the multi-task loss function typically depends on the tasks and data of the initial tea leaf processing plan. Here are some methods for improving the multi-task loss function, and the formula can be customized according to actual needs: 1) Weighted Multi-Task Loss: In a general multi-task loss function, the weight of each task (tea garden fresh leaf picking plan, personnel allocation plan, tea garden yield, etc.) can be allocated according to the importance of the task. More critical tea garden fresh leaf picking priority tasks will have a higher weight in the total loss. The loss formula can be expressed as:
[0086] Total Loss(θ)=∑(wi*Li(θ)),i=1,2,...,n
[0087] Where wi is the weight of task i.
[0088] 2) Multi-task loss and constraints: The loss of task i can include minimizing Li(θ) and a penalty term for satisfying certain constraints. When optimizing the temporary task of fresh leaf picking under conditions of weather or human intervention, constraints should be satisfied as much as possible. For example:
[0089] Total Loss(θ)=∑(Li(θ)+λ*ConstraintPenalty(θ)),i=1,2,...,n
[0090] Where ConstraintPenalty(θ) is the penalty term of the constraint, and λ is a hyperparameter that balances the task and the constraint.
[0091] 3) Task Relevance: If there is correlation between the tea garden fresh leaf harvesting tasks, i.e., multiple adjacent tea gardens are harvesting simultaneously, a loss function should be designed to encourage the model to share information when learning the tasks. This can be achieved through cross-task loss terms. For example:
[0092] Total Loss(θ)=∑(Li(θ))+α*∑∑(Cij*Lij(θ)),i,j=1,2,...,n
[0093] Where Lij(θ) is the cross-loss term between task i and task j, Cij is the correlation coefficient between them, and α is the correlation weight.
[0094] 4) Dynamic Loss Weights: The importance of certain tasks in a tea garden's fresh leaf picking plan may change over time. A loss function is designed to dynamically adjust task weights during training, enabling rapid allocation of human resources and task priorities.
[0095] Finally, based on the aforementioned tea garden fresh leaf plan and market primary processing plan, a greedy algorithm is used to schedule the primary processing sites for tea garden fresh leaves. This involves collecting and organizing data on fresh leaves from each tea garden area, the timeliness of fresh leaf supply, the capacity data of the primary processing plants, and their geographical location to determine the capacity limits of each primary processing plant—that is, the number of fresh leaves each plant can process. For each batch of tea garden fresh leaves predicted by the CNN, the most suitable primary processing plant is selected and allocated according to a certain rule. The selection rule can be based on the following strategies:
[0096] 1) The nearest primary processing plant: Distribute fresh leaves to the nearest primary processing plant to reduce transportation costs and time;
[0097] 2) Primary processing plant with the largest capacity: Allocate fresh leaves to the primary processing plant with the largest capacity to maximize total output;
[0098] 3) Comprehensive evaluation: Taking into account distance, production capacity and other factors, the most suitable primary manufacturing plant is selected using certain weights.
[0099] This invention employs a task scheduling method based on tea garden fresh leaf yield, supply distance, and primary processing capacity. To better reflect the priority of fresh leaf planning and primary processing tasks, and to balance the relationship between yield, distance, and primary processing capacity, this invention also introduces a weighting factor, assigning different weights to different task attributes. A comprehensive evaluation is achieved by adjusting the weighting factor. The calculation formula is as follows:
[0100] Total_Score(task) = w1 * output + w2 * distance - w3 * (allocated capacity / initial capacity)
[0101] Among them, w1, w2, and w3 are weighting factors. By adjusting them, different objectives can be balanced according to the importance of task attributes, allowing for more flexible adjustment of fresh leaf primary processing tasks. Total_Score(task) represents the task score, output represents the output of the harvesting plan task, distance represents the distance of fresh leaf supply to the primary processing plant, and allocated capacity / initial capacity represents the capacity utilization rate of a primary processing plant after completing part of the task. This can be used to measure how much capacity the primary processing plant has currently used, so as to better balance the allocation of tasks in the scheduling of fresh leaf primary processing. Allocated capacity refers to the total capacity of tasks already undertaken by the primary processing plant under the current scheduling. That is, the total capacity required for fresh leaf supply tasks already allocated to the primary processing plant. Initial capacity refers to the total capacity of the primary processing plant, that is, the maximum capacity of the primary processing plant before task allocation.
[0102] To optimize multiple initial task objectives, multiple scoring functions are also introduced.
[0103] Total_Score(task)=α*Score1(task)+β*Score2(task)+γ*Score3(task)
[0104] Here, Score1, Score2, and Score3 are the scoring functions for different target tasks, and α, β, and γ are their weights.
[0105] Greedy algorithm explanation using primary manufacturing plant capacity as an example:
[0106] 1) Initialize a dictionary or array representing the allocated output, and also initialize a dictionary or array representing the available capacity of each primary workshop. Also initialize a list to store unassigned tasks, initially containing all fresh leaf supply tasks.
[0107] 2) Sort the tasks in the unassigned task list from highest to lowest according to Total_Score(task).
[0108] 3) Iterate through the sorted task list, and for each task:
[0109] • Start with the primary manufacturing plant with the largest available capacity, and try to assign tasks to the primary manufacturing plants in turn.
[0110] • If the initial manufacturing plant has sufficient capacity to accommodate the task, assign the task to the initial manufacturing plant and update the assigned output and available capacity.
[0111] If the primary manufacturing plant's capacity cannot accommodate the task, skip the task and move on to the next one.
[0112] 4) Repeat step 3 until all tasks are processed or no primary manufacturing facility has sufficient capacity to accommodate the tasks.
[0113] 5) Returns the results of the assigned tasks, which indicate how the supply tasks are allocated to maximize Total_Score.
[0114] The advantage of greedy algorithms lies in their simplicity and speed; they can generate a reasonable initial processing plan in a short time. However, they may not find the globally optimal solution because they only make decisions based on the best current choice. Therefore, in practice, genetic algorithms are used for iterative optimization, including operations such as selection, crossover, and mutation, to improve the allocation scheme for fresh leaf initial processing.
[0115] In another embodiment, combining a tea garden fresh leaf picking plan based on a convolutional neural network (CNN) model with a fresh leaf initial processing plan allocation based on a greedy algorithm can achieve more comprehensive optimization of the tea production process scheduling. The following are the implementation steps and methods for combining these two technologies:
[0116] Step 1: Data Acquisition and Integration: Collect growth data in the tea garden, including meteorological information, soil conditions, and tea tree health status; use aerial drones, fixed cameras, handheld cameras, or other sensor technologies to collect image data on tea leaf growth, and train a CNN model for predicting the growth and quality of fresh tea leaves in the tea garden.
[0117] Step 2: Real-time prediction: Deploy a CNN model to predict the growth of fresh tea leaves in the tea garden in real time. The model can detect leaves with high maturity and formulate a harvesting plan.
[0118] Step 3: Harvesting Plan Development: Based on the output of the CNN model, develop a fresh leaf harvesting plan for the tea garden. The plan should include information such as harvesting time, location, and quantity. Match the harvesting plan with market demand and inventory levels to ensure that the produced tea meets market demand.
[0119] Step 4: Primary Processing Plant Allocation: Based on the harvesting plan and the production capacity of the primary processing plant, a greedy algorithm is used to select the optimal strategy to allocate the harvested fresh leaves to the primary processing plant.
[0120] Step 5: Data Analysis and Optimization: Continuously collect and analyze production data to improve the performance of CNN models and the efficiency of greedy algorithms.
[0121] The specific steps to implement this include:
[0122] 1) Obtain the tea garden's initial processing plan or picking plan from external systems, and generate a total picking plan based on the ratio of fresh leaves to dried tea.
[0123] 2) Obtain information on the growth of fresh tea leaves and process the data. Establish a convolutional neural network (CNN) model to formulate a tea leaf harvesting plan. This requires clearly defining the input parameters, output parameters, and optimization coefficients. The specific steps are as follows:
[0124] Step 1: Determine the input and output parameters
[0125] Input parameters: These parameters are the data required for model training and prediction. For a fresh leaf picking plan, input parameters might include:
[0126] Geographical information of the tea plantation: longitude, latitude, etc.
[0127] Weather conditions: temperature, humidity, rainfall, etc.
[0128] Soil conditions: soil moisture, soil pH, etc.
[0129] Tea tree varieties, growth stages, etc.
[0130] Availability and efficiency of harvesting workers.
[0131] Output parameters: These are the model's target or predicted results. For a harvesting plan, the output parameters can be...
[0132] include:
[0133] Time and location of the picking task: Determine when and in which tea garden the picking will take place.
[0134] Worker allocation: Which workers are responsible for which tea garden picking tasks?
[0135] Prioritizing Harvesting Tasks: Assign a priority to each task, taking into account urgency or other factors.
[0136] Step 2: Data Preparation and Preprocessing
[0137] Collect and organize historical harvesting data, including the aforementioned input and output parameters. Perform data preprocessing, such as standardization, missing value handling, and outlier handling. Geocoding or other domain-specific data processing may be required.
[0138] Step 3: Construct the CNN model
[0139] Build an appropriate CNN model based on the complexity and data type of the problem. The model architecture will depend on the type and number of input and output parameters. Consider using convolutional layers, pooling layers, fully connected layers, etc., along with appropriate activation functions. Depending on the task requirements, a single model can be used to predict time and location, or multi-task learning can be used to predict multiple output parameters simultaneously.
[0140] Step 4: Split the dataset
[0141] The dataset is divided into training, validation, and test sets, typically in a ratio of 70-80% training set, 10-15% validation set, and 10-15% test set.
[0142] Step 5: Loss Function and Optimizer
[0143] Choose an appropriate loss function based on the problem type. For example, for a regression task involving fresh leaf picking time and tea garden location, use mean squared error (MSE) loss and sum the losses from multiple tasks. Select a suitable optimizer, Nadam.
[0144] Step 6: Model Training
[0145] The model is trained using the training set, while the model performance is monitored and hyperparameters are tuned using the validation set.
[0146] Step 7: Parameter Adjustment
[0147] Adjusting model hyperparameters, such as learning rate, batch size, kernel size, and number of layers, can improve performance. Cross-validation can be used to help select the optimal combination of hyperparameters.
[0148] Step 8: Model Evaluation
[0149] Use a test set to evaluate the model's performance. Different evaluation metrics can be used, such as mean squared error, accuracy, and the effectiveness of priority assignment; choose the appropriate metric based on the problem type.
[0150] Step 9: Deployment and Continuous Monitoring
[0151] Deploy the trained model to the production environment for actual fresh leaf harvesting plans. Monitor the model's performance regularly and retrain it as needed to adapt to new data and requirements.
[0152] During the modeling and hyperparameter tuning process, depending on the complexity of the actual problem, it may be necessary to continuously try different model architectures and hyperparameter combinations to obtain the best planning results.
[0153] 3) Taking into account the yield of fresh tea leaves in the tea garden, the capacity of the primary processing plant, and its geographical location, a greedy algorithm is applied to rationally plan the production of fresh tea leaves in the primary processing plant. The following are the general steps for using a greedy algorithm to formulate a production plan for primary processing of fresh tea leaves:
[0154] Step 1: Data Preparation
[0155] Collect and organize data on fresh leaf harvesting volume, primary processing plant capacity, and geographical location. Determine the capacity limits of the primary processing plants, i.e., the number of fresh leaves each plant can process.
[0156] Step 2: Algorithm Initialization
[0157] Initialize an empty primary processing plant allocation scheme, indicating that each primary processing plant has not yet been allocated fresh leaves.
[0158] Step 3: Greedy Algorithm Iteration
[0159] For each batch of fresh leaves, the most suitable primary processing facility is selected and allocated according to a certain rule. The selection rule can be based on the following strategies:
[0160] Distribute fresh leaves to the nearest primary processing plant to reduce transportation costs and time.
[0161] The primary processing plant with the largest capacity: allocate fresh leaves to the primary processing plant with the largest capacity to maximize total output.
[0162] Comprehensive evaluation: Taking into account factors such as distance, production capacity and other factors, the most suitable primary manufacturing plant is selected using certain weights.
[0163] Step 4: Update the initial production allocation scheme
[0164] Update the primary processing plant allocation scheme, mark the selected primary processing plants as allocated, and reduce their capacity limits. If there are still unallocated fresh leaves, return to Step 3.
[0165] Step 5: Plan Completed
[0166] The plan is complete when all fresh leaves have been allocated and there are no unmet production capacity constraints.
[0167] Step 6: Evaluation and Optimization
[0168] Evaluate the quality of the plan, taking into account various factors such as total output, transportation costs, and primary processing plant utilization. If necessary, the plan can be optimized, for example, by rearranging the allocation of certain fresh leaves to improve plan performance.
[0169] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
Claims
1. A machine learning-based method for planning and scheduling the harvesting and initial processing of fresh tea leaves, characterized in that, Includes the following steps: Step 1: Collect information on tea gardens and fresh leaves, and process the data; Step 2: Construct a tea garden fresh leaf picking plan model based on convolutional neural networks, and define the input layer and output layer of the model; Step 3: Train the tea garden fresh leaf picking plan model, define a multi-task loss function, use the mean square error between the actual value and the predicted value as the single-task loss function, and add it with the constraint parameters to obtain the total loss; for different seasons and climate conditions, use the Nadam optimization algorithm to minimize the multi-task loss function for training. Step 4: Use the trained model to predict the growth of fresh tea leaves in the tea garden, detect the mature leaves, and formulate a harvesting plan and priorities. Step 5: Based on the harvesting plan and priorities, as well as the production capacity of the primary processing plant, a greedy algorithm is used to select the optimal strategy to allocate the harvested fresh leaves to the primary processing plant for production. Step five specifically includes: Step 1: Collect and organize data on the amount of fresh leaves picked in the tea garden, the production capacity data of the primary processing plant, and the geographical location data; determine the production capacity limit of the primary processing plant, that is, the number of fresh leaves that each primary processing plant can process. Step 2: Initialize an empty primary processing plant allocation scheme, indicating that each primary processing plant has not yet been allocated fresh leaves; Step 3: For each batch of fresh leaves, select the most suitable primary processing plant for allocation according to the strategy; Step 4: Update the primary processing plant allocation plan, mark the selected primary processing plants as allocated, and reduce their capacity restrictions; if there are still unallocated fresh leaves, return to Step 3; Step 5: The plan is complete when all fresh leaves have been allocated and there are no unmet production capacity constraints. The strategies in Step 3 include: The nearest primary processing plant: Distribute fresh leaves to the nearest primary processing plant to reduce transportation costs and time; The primary processing plant with the largest capacity: allocate fresh leaves to the primary processing plant with the largest capacity to maximize total output; Comprehensive evaluation: Taking into account factors such as distance, production capacity, and others, the most suitable primary manufacturing plant is selected using a certain weighting. Based on different task attribute rules, the weighting factors are adjusted for comprehensive evaluation. The comprehensive evaluation calculation formula is as follows: Total_Score(task) = w1 * output + w2 * distance - w3 * (allocated capacity / initial capacity), where w1, w2, and w3 are weighting factors, Total_Score(task) represents the score of the task, output represents the output of the harvesting plan task, distance represents the distance of fresh leaves supplied to the primary processing plant, and allocated capacity / initial capacity represents the capacity utilization rate of a primary processing plant after completing part of the task; For optimization of multiple initial task objectives, the score functions of multiple initial task objectives are calculated and sorted from high to low; Total_Score(task) = α * Score1(task) + β * Score2(task) + γ * Score3(task) where Score1, Score2, and Score3 are the score functions of different objective tasks, and α, β, and γ are their weights.
2. The machine learning-based planning and scheduling method for tea leaf harvesting and initial processing according to claim 1, characterized in that, In step two, the input layer and the output layer contain input parameters and output parameters. The input parameters include: geographical information of the tea garden, weather conditions, soil conditions, tea tree varieties, growth stages, availability and work efficiency of picking workers; the output parameters include: time and location of picking tasks, allocation of picking workers, and priority of picking tasks.
3. The machine learning-based planning and scheduling method for tea leaf harvesting and initial processing according to claim 1, characterized in that, In step three, the total loss of task i includes minimizing Li(θ) and a penalty term for satisfying a certain constraint. When optimizing the fresh leaf picking task, the constraint conditions should be satisfied as much as possible. The formula is as follows: Total Loss(θ) = ∑(Li(θ) + λ * ConstraintPenalty(θ)), i = 1, 2, ..., n Here, θ represents the combination of parameters, namely the learnable parameters such as weights and biases in the convolutional neural network, used to calculate the loss value, ConstraintPenalty(θ) represents the penalty term for the constraint, and λ is a hyperparameter that balances the task and the constraint.
4. The machine learning-based planning and scheduling method for tea leaf harvesting and initial processing according to claim 1, characterized in that, In step three, the method of minimizing the multi-task loss function using the Nadam optimization algorithm is as follows: Calculate the gradient g_t: Calculate the current gradient g_t based on the current model parameters θ_t and the gradient of the loss function; Calculate the momentum term m_t: Use Nesterov momentum to adjust the gradient direction and calculate the momentum term m_t; m_t = β_1 * m_t-1 + (1 - β_1) * g_t Where β_1 is the momentum decay coefficient, which is usually close to 1; Calculate the adaptive learning rate term v_t: Use Adam's adaptive learning rate mechanism to calculate the adaptive learning rate term v_t; v_t = β_2 * v_t-1 + (1 - β_2) * g_t^2 Wherein, β_2 is the learning rate decay coefficient, which is usually close to 1; Update parameter θ_t+1: Update parameter θ_t+1 based on momentum term m_t and adaptive learning rate term v_t; θ_t+1 = θ_t - α * (m_t / (sqrt(v_t) + ε)) Where α is the initial learning rate, and ε is a very small number used to avoid the denominator being zero; The momentum decay coefficient β_1 is adjusted according to the magnitude and direction of the gradient g_t; the learning rate decay coefficient β_2 is adaptively adjusted considering the seasonal and climatic characteristics of fresh tea leaves; constraint optimization is introduced for the temporary task of fresh leaf picking to ensure that the parameter θ_t+1 meets specific constraints; different learning rate scheduling strategies are adopted to improve the running efficiency of the convolutional neural network model; and necessary hyperparameter adjustments and optimizations are performed.
5. The machine learning-based planning and scheduling method for tea leaf harvesting and initial processing according to claim 1, characterized in that, Optimization methods for multi-task loss functions also include: In a general multi-task loss function, the weights of tasks such as tea garden fresh leaf picking plan, personnel allocation plan, and tea garden picking yield are allocated according to the importance of the tasks. The priority task of tea garden fresh leaf picking has a higher weight in the total loss, and the loss formula is expressed as: Total Loss(θ) = ∑(wi * Li(θ)), i = 1, 2, ..., n Where wi is the weight of task i.
6. The machine learning-based planning and scheduling method for tea leaf picking and initial processing according to claim 1, characterized in that, Optimization methods for multi-task loss functions also include: if there is a correlation between tea garden fresh leaf planning tasks, that is, multiple adjacent tea gardens are harvesting at the same time, the loss function prompts the model to share information when learning tasks, which is achieved through the cross loss term between tasks. The loss formula is Total Loss(θ) = ∑(Li(θ)) + α * ∑∑(Cij * Lij(θ)), i, j =1, 2, ..., n, where Lij(θ) is the cross loss term between task i and task j, Cij is the correlation coefficient between them, and α is the correlation weight.
7. The machine learning-based planning and scheduling method for tea leaf harvesting and initial processing according to claim 1, characterized in that, Optimization methods for multi-task loss functions also include: when the importance of tea garden fresh leaf picking tasks changes over time, the weights of tasks can be dynamically adjusted during training through the loss function to quickly allocate human resources and task priorities.
Citation Information
Patent Citations
Tea leaf maturity detection method, tea leaf picking method and related equipment
CN114049574A
Adaptive-learning intelligent scheduling unified computing frame and system for industrial personalized customized production
US20220413455A1