Hot-air drying method and apparatus for agricultural product drying control

By using a pre-defined hot air drying model trained with a deep deterministic strategy gradient algorithm and semantic segmentation technology, the problems of low detection efficiency and poor control effect in the hot air drying process of agricultural products are solved, and automated control and efficient detection of the agricultural product drying process are realized.

CN117760190BActive Publication Date: 2026-06-26CHINA AGRI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA AGRI UNIV
Filing Date
2023-12-22
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing hot air drying technologies for agricultural products suffer from low detection efficiency and poor drying control, making it impossible to achieve automatic control of temperature, humidity, and wind speed within the drying chamber. Furthermore, conventional detection methods can damage the drying environment.

Method used

A pre-defined hot air drying model, trained using a depth-deterministic gradient algorithm, is employed. By acquiring images of agricultural products and performing semantic segmentation, the model detects the appearance information of the agricultural products in real time, determines the target drying action, and achieves automatic control.

Benefits of technology

It improves the detection efficiency during the hot air drying process of agricultural products, enables automatic control without damaging the drying environment, and enhances the drying effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117760190B_ABST
    Figure CN117760190B_ABST
Patent Text Reader

Abstract

The application discloses a hot air drying method and device for agricultural product drying control. In the method, a target agricultural product image of an agricultural product is acquired; initial environmental state information of the agricultural product under an initial drying action is acquired according to the target agricultural product image, and the initial environmental state information is used to represent appearance information of the agricultural product under the initial drying action; the initial environmental state information is input into a preset hot air drying model to determine a target drying action, and the preset hot air drying model is generated by training based on a deep deterministic policy gradient algorithm; and the agricultural product is dried according to the target drying action. In this way, the target drying action can be acquired through the preset hot air drying model, the drying environment of the agricultural product does not need to be destroyed, the detection efficiency in the hot air drying process of the agricultural product is improved to a certain extent, the agricultural product is dried according to the target drying action, and automatic control of the drying process can be realized, thereby achieving good control effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of agricultural product drying, and in particular to a hot air drying method and apparatus based on agricultural product drying control. Background Technology

[0002] Agricultural product drying technology is a crucial step in the processing and storage of agricultural products, with hot air drying being one of the most commonly used techniques. As the drying process progresses, the internal and external structure of agricultural products changes. If temperature, humidity, and air velocity remain constant during drying, energy consumption is high, and the dried products may suffer from deteriorated appearance and loss of internal nutrients. To ensure drying efficiency while preserving the appearance and nutrients of agricultural products to the greatest extent possible, temperature, humidity, and air velocity can be automatically adjusted based on the different properties of the agricultural products and their real-time conditions. Inevitably, real-time monitoring of the appearance quality of agricultural products during the drying process is necessary.

[0003] Current testing methods mostly involve periodically removing dried agricultural products from the drying chamber and extracting relevant appearance information, such as taking images, measuring roundness, and measuring area. However, these methods not only fail to achieve automatic control of temperature, humidity, and airflow within the drying chamber, but also damage the drying environment of the agricultural products. In other words, existing technologies suffer from low testing efficiency and poor drying control during the hot air drying process of agricultural products. Summary of the Invention

[0004] This application provides a hot air drying method and apparatus for controlling the drying of agricultural products, which can improve the detection efficiency and control effect during the hot air drying process of agricultural products.

[0005] In a first aspect, this application provides a hot air drying method for controlling the drying of agricultural products, the method comprising:

[0006] Acquire the target agricultural product image;

[0007] The initial environmental state information of the agricultural product under the initial drying action is obtained from the target agricultural product image. The initial environmental state information is used to characterize the appearance information of the agricultural product under the initial drying action.

[0008] The initial environmental state information is input into a preset hot air drying model to determine the target drying action. The preset hot air drying model is generated by training based on a deep deterministic strategy gradient algorithm.

[0009] The agricultural products are dried according to the target drying action.

[0010] Optionally, the method further includes:

[0011] The first environmental state information, the second environmental state information, the first drying action, and the first reward value of an agricultural product are randomly selected from the target experience pool. The target experience pool is used to store the environmental state information, reward value, and value information of the agricultural product. The first reward value is used to represent the reward for performing the first drying action on the agricultural product.

[0012] An initial hot air drying model is obtained based on the first environmental state information. The initial hot air drying model is constructed based on the deep determination strategy gradient algorithm, which includes an initial Actor policy network, an initial Critic value network, an Actor_Target network, and a Critic_Target network.

[0013] Based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action, first value information of the first drying action and second value information of the second drying action are obtained; the second drying action is obtained by inputting the second environmental state information into the Actor_Target network; the first value information is used to characterize the cumulative reward for performing the first drying action on the agricultural product, and the second value information is used to characterize the cumulative reward for performing the second drying action on the agricultural product.

[0014] Based on the first value information and the second value information, the parameters of the initial Actor network and the initial Critic network are updated to obtain the target Actor network and the target Critic network;

[0015] Get the current iteration number for parameter updates;

[0016] If the current iteration number is less than the preset iteration number, then the first environmental state information, the second environmental state information, the first drying action, and the first reward value of the agricultural products randomly selected from the target experience pool are executed until the current iteration number meets the preset iteration number.

[0017] Obtain the preset hot air drying model, which includes the target Critic network and the target Actor network.

[0018] Optionally, before randomly selecting the first environmental state information, second environmental state information, first drying action, and first reward value of agricultural products from the target experience pool, the method further includes:

[0019] Obtain the first environmental state information of the agricultural product;

[0020] The initial Actor network is invoked to select the first drying action corresponding to the first environmental state information;

[0021] The agricultural products are dried according to the first drying action to obtain the first reward value and the second environmental status information;

[0022] The first environmental state information, the first drying action, the first reward value, and the second environmental state information are stored in the initial experience pool.

[0023] Using the second environmental state as the first environmental state information, the process involves calling the initial Actor network to select the first drying action corresponding to the first environmental state information and drying the agricultural product according to the first drying action to obtain the first reward value and the second environmental state information, until the environmental state information of the agricultural product meets the agricultural product drying termination condition, and obtaining the target experience pool.

[0024] Optionally, obtaining the first value information of the first drying action and the second value information of the second drying action based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action includes:

[0025] The first environmental state information, the second environmental state information, the first drying action, and the first reward value are input into the initial Critic network to obtain the first value information.

[0026] The first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action are input into the Critic_Target network to obtain the second value information.

[0027] Optionally, updating the parameters of the initial Actor network and the initial Critic network based on the first value information and the second value information to obtain the target Actor network and the target Critic network includes:

[0028] The policy loss of the initial Actor network is calculated based on the first value information;

[0029] The parameters of the initial Actor network are updated according to the policy loss to obtain the target Actor network;

[0030] The value loss of the initial Critic network is calculated based on the second value information and the first value information.

[0031] The parameters of the initial Critic network are updated based on the value loss to obtain the target Critic network.

[0032] Optionally, the method further includes:

[0033] Obtain an initial image of the agricultural product under the initial drying action;

[0034] The initial agricultural product image is input into a preset semantic segmentation model to obtain the target agricultural product image.

[0035] Optionally, the preset semantic segmentation model includes an encoder and a decoder. The encoder includes a backbone feature extraction network and a spatial pyramid pooling module. The step of inputting the initial agricultural product image into the preset semantic segmentation model to obtain the target agricultural product image includes:

[0036] The initial agricultural product image is input into the backbone feature extraction network in the encoder for feature extraction, resulting in a shallow feature map, a third-layer feature map, and an initial deep feature map.

[0037] The initial deep feature map is input into the spatial pyramid pooling module in the encoder for multi-scale pooling and upsampling to obtain the target deep feature map;

[0038] Based on the decoder, the shallow feature map, the third-layer feature map, and the target deep feature map are stacked, fused, and upsampled to obtain the target agricultural product image.

[0039] Optionally, the step of stacking, fusing, and upsampling the shallow feature map, the third-layer feature map, and the target deep feature map based on the decoder to obtain the target agricultural product image includes:

[0040] Based on the decoder, the target deep feature map and the third layer feature map are stacked and fused to obtain a first fused feature and a first feature, wherein the first feature is obtained by upsampling the first fused feature;

[0041] Based on the decoder, the first feature and the shallow feature map are stacked and fused to obtain the second fused feature;

[0042] The first fusion feature and the second fusion feature are stacked and fused based on the decoder, and then upsampled to obtain the target agricultural product image.

[0043] Secondly, this application also provides a hot air drying apparatus for controlling the drying of agricultural products, the apparatus comprising a control component, a drying chamber, and a drying component, wherein:

[0044] The control component is used to acquire a target agricultural product image; acquire initial environmental state information of the agricultural product under the initial drying action based on the target agricultural product image, the initial environmental state information being used to characterize the appearance information of the agricultural product under the initial drying action; input the initial environmental state information into a preset hot air drying model to determine the target drying action, the preset hot air drying model being generated by training based on a depth-determining strategy gradient algorithm;

[0045] The drying assembly is used to dry the agricultural product in the drying chamber according to the target drying action.

[0046] Optionally, the apparatus further includes a training component, the training component being used for:

[0047] The first environmental state information, the second environmental state information, the first drying action, and the first reward value of an agricultural product are randomly selected from the target experience pool. The target experience pool is used to store the environmental state information, reward value, and value information of the agricultural product. The first reward value is used to represent the reward for performing the first drying action on the agricultural product.

[0048] An initial hot air drying model is obtained based on the first environmental state information. The initial hot air drying model is constructed based on the deep determination strategy gradient algorithm, which includes an initial Actor policy network, an initial Critic value network, an Actor_Target network, and a Critic_Target network.

[0049] Based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action, first value information of the first drying action and second value information of the second drying action are obtained; the second drying action is obtained by inputting the second environmental state information into the Actor_Target network; the first value information is used to characterize the cumulative reward for performing the first drying action on the agricultural product, and the second value information is used to characterize the cumulative reward for performing the second drying action on the agricultural product.

[0050] Based on the first value information and the second value information, the parameters of the initial Actor network and the initial Critic network are updated to obtain the target Actor network and the target Critic network;

[0051] Get the current iteration number for parameter updates;

[0052] If the current iteration number is less than the preset iteration number, then the first environmental state information, the second environmental state information, the first drying action, and the first reward value of the agricultural products randomly selected from the target experience pool are executed until the current iteration number meets the preset iteration number.

[0053] Obtain the preset hot air drying model, which includes the target Critic network and the target Actor network.

[0054] Optionally, the training component is further used for:

[0055] Obtain the first environmental state information of the agricultural product;

[0056] The initial Actor network is invoked to select the first drying action corresponding to the first environmental state information;

[0057] The agricultural products are dried according to the first drying action to obtain the first reward value and the second environmental status information;

[0058] The first environmental state information, the first drying action, the first reward value, and the second environmental state information are stored in the initial experience pool.

[0059] Using the second environmental state as the first environmental state information, the process involves calling the initial Actor network to select the first drying action corresponding to the first environmental state information and drying the agricultural product according to the first drying action to obtain the first reward value and the second environmental state information, until the environmental state information of the agricultural product meets the agricultural product drying termination condition, and obtaining the target experience pool.

[0060] Optionally, the training component is specifically used for:

[0061] The first environmental state information, the second environmental state information, the first drying action, and the first reward value are input into the initial Critic network to obtain the first value information.

[0062] The first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action are input into the Critic_Target network to obtain the second value information.

[0063] Optionally, the training component is specifically used for:

[0064] The policy loss of the initial Actor network is calculated based on the first value information;

[0065] The parameters of the initial Actor network are updated according to the policy loss to obtain the target Actor network;

[0066] The value loss of the initial Critic network is calculated based on the second value information and the first value information.

[0067] The parameters of the initial Critic network are updated based on the value loss to obtain the target Critic network.

[0068] Optionally, the device further includes an imaging component, the imaging component being used for:

[0069] Acquire an initial image of the agricultural product under the initial drying action; send the initial image of the agricultural product to the control component.

[0070] Optionally, the control component is further configured to:

[0071] Receive the initial image of the agricultural product under the initial drying action; input the initial image of the agricultural product into a preset semantic segmentation model to obtain the target image of the agricultural product.

[0072] Optionally, the preset semantic segmentation model includes an encoder and a decoder, the encoder including a backbone feature extraction network and a spatial pyramid pooling module, and the control component is further used for:

[0073] The initial agricultural product image is input into the backbone feature extraction network in the encoder for feature extraction, resulting in a shallow feature map, a third-layer feature map, and an initial deep feature map.

[0074] The initial deep feature map is input into the spatial pyramid pooling module in the encoder for multi-scale pooling and upsampling to obtain the target deep feature map;

[0075] Based on the decoder, the shallow feature map, the third-layer feature map, and the target deep feature map are stacked, fused, and upsampled to obtain the target agricultural product image.

[0076] Optionally, the control component is further configured to:

[0077] Based on the decoder, the target deep feature map and the third layer feature map are stacked and fused to obtain a first fused feature and a first feature, wherein the first feature is obtained by upsampling the first fused feature;

[0078] Based on the decoder, the first feature and the shallow feature map are stacked and fused to obtain the second fused feature;

[0079] The first fusion feature and the second fusion feature are stacked and fused based on the decoder, and then upsampled to obtain the target agricultural product image.

[0080] Therefore, this application has the following beneficial effects:

[0081] This application provides a hot air drying method and apparatus for controlling the drying of agricultural products. The method involves: acquiring a target image of the agricultural product; obtaining initial environmental state information of the agricultural product under initial drying action based on the target image, whereby the initial environmental state information characterizes the appearance of the agricultural product under the initial drying action; inputting the initial environmental state information into a preset hot air drying model to determine the target drying action, whereby the preset hot air drying model is generated based on a depth-deterministic gradient algorithm; and drying the agricultural product according to the target drying action. In this way, the target drying action can be obtained through the preset hot air drying model without damaging the drying environment of the agricultural product, thus improving the detection efficiency during the hot air drying process to a certain extent. Drying the agricultural product according to this target drying action enables automatic control of the drying process and has a good control effect. Attached Figure Description

[0082] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0083] Figure 1 This is a schematic flowchart of a hot air drying method for controlling the drying of agricultural products in an embodiment of this application.

[0084] Figure 2 A schematic diagram of the framework of the preset semantic segmentation model provided in the embodiments of this application;

[0085] Figure 3 A logical schematic diagram of a preset hot air drying model provided in the embodiments of this application;

[0086] Figure 4 This is a schematic diagram of the structure of a hot air drying device 400 for controlling the drying of agricultural products, provided in an embodiment of this application.

[0087] Figure 5 This is a schematic diagram of the structure of a hot air dryer provided in an embodiment of this application. Detailed Implementation

[0088] The "multiple" mentioned in the embodiments of this application refers to two or more. It should be noted that in the description of the embodiments of this application, terms such as "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance, nor should they be construed as indicating or implying order.

[0089] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods. It should be understood that the specific embodiments described herein are merely for explaining this application and are not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not the entire structure.

[0090] Agricultural product drying technology is a crucial step in the processing and storage of agricultural products, with hot air drying being one of the most commonly used techniques. As the drying process progresses, the internal and external structures of agricultural products change. If temperature, humidity, and wind speed remain constant during drying, not only will drying efficiency decrease, leading to increased energy consumption, but the dried products will also suffer from poor appearance and loss of internal nutrients, significantly reducing their commercial value.

[0091] During hot air drying, if the temperature, humidity, and airflow are automatically adjusted according to the different properties and real-time conditions of agricultural products, the appearance quality and nutrients of the products can be preserved to the greatest extent while ensuring drying efficiency. Existing research shows that adjusting the hot air temperature, humidity, and airflow at different stages of agricultural product drying helps improve the color and shape of the dried product. To achieve the above objectives, precise and real-time monitoring of the appearance quality of agricultural products during the drying process is necessary.

[0092] The inventors discovered that current detection methods mostly involve periodically removing dried agricultural products from the drying chamber and extracting relevant appearance information, such as taking images, measuring roundness, and measuring area. However, these methods not only fail to achieve automatic control of temperature, humidity, and wind speed within the drying chamber, but also damage the drying environment of the agricultural products. In other words, existing technologies suffer from low detection efficiency and poor drying control during the hot air drying process of agricultural products.

[0093] Furthermore, the existing technology for acquiring images of agricultural products uses the traditional image thresholding method, which can achieve online detection, but requires a significant color contrast between the agricultural product and the environment to function properly. Moreover, this method has limited image segmentation accuracy and cannot accurately acquire information about the appearance quality of agricultural products during the drying process.

[0094] Based on this, embodiments of this application provide a hot air drying method and apparatus for controlling the drying of agricultural products. The method involves: acquiring a target image of the agricultural product; acquiring initial environmental state information of the agricultural product under an initial drying action based on the target image, the initial environmental state information being used to characterize the appearance of the agricultural product under the initial drying action; inputting the initial environmental state information into a preset hot air drying model to determine the target drying action, the preset hot air drying model being generated based on a depth-deterministic gradient algorithm; and drying the agricultural product according to the target drying action. In this way, the target drying action can be obtained through a preset hot air drying model without damaging the drying environment of the agricultural product, thus improving the detection efficiency during the hot air drying process to a certain extent. Drying the agricultural product according to the target drying action enables automatic control of the drying process and has a good control effect.

[0095] To facilitate understanding of the specific implementation of the hot air drying method for agricultural product drying control provided in the embodiments of this application, the following description will be provided in conjunction with the accompanying drawings.

[0096] Please see Figure 1 , Figure 1 This application provides a schematic flowchart of a hot air drying method for controlling the drying of agricultural products. This method can be applied to a hot air drying device for controlling the drying of agricultural products. Figure 4 The hot air drying device 400 shown is used for the control of agricultural product drying.

[0097] In this embodiment of the application, the following steps may be included, for example:

[0098] S101: Obtain the target agricultural product image.

[0099] It should be noted that the target agricultural product image can be regarded as an image obtained by processing the initial agricultural product image, which is the original image of the agricultural product obtained without processing.

[0100] In some implementations, the process of acquiring the target agricultural product image may include: S201: acquiring an initial image of the agricultural product under the initial drying action; S202: inputting the initial agricultural product image into a preset semantic segmentation model to obtain the target agricultural product image.

[0101] Please see Figure 2This is a logical diagram of a preset semantic segmentation model provided in this application embodiment. The preset semantic segmentation model includes an encoder and a decoder. The encoder includes a backbone feature extraction network and a spatial pyramid pooling module. The backbone feature extraction network may be part of a deep convolutional neural network (DCNN). Therefore, the process of acquiring the target agricultural product image may include:

[0102] S2021: Input the initial agricultural product image into the backbone feature extraction network in the encoder for feature extraction to obtain shallow feature maps, third-layer feature maps and initial deep feature maps.

[0103] S2022: Input the initial deep feature map into the spatial pyramid pooling module in the encoder for multi-scale pooling and upsampling to obtain the target deep feature map.

[0104] S2023: Based on the decoder, the shallow feature map, the third-layer feature map and the target deep feature map are stacked, fused and upsampled to obtain the target agricultural product image.

[0105] In some implementations, S2023 provided in this application embodiment may specifically include: stacking and fusing the target deep feature map and the third layer feature map based on the decoder to obtain a first fused feature and a first feature, wherein the first feature is obtained by upsampling the first fused feature; stacking and fusing the first feature and the shallow feature map based on the decoder to obtain a second fused feature; and stacking and fusing the first fused feature and the second fused feature based on the decoder and upsampling to obtain a target agricultural product image.

[0106] Thus, the preset semantic segmentation model provided in this application embodiment can be used to distinguish between agricultural product areas and background areas in agricultural product images even when the color difference between agricultural products and the background is very small. This provides high-quality agricultural product images for subsequent environmental state information extraction, thereby further improving the effect of drying control of agricultural products.

[0107] S102: Obtain the initial environmental state information of the agricultural product under the initial drying action based on the target agricultural product image.

[0108] It should be noted that the initial environmental state information is used to characterize the appearance of agricultural products during the initial drying process. For example, the drying process may include temperature, humidity, and wind speed. This appearance information may include the roundness, shrinkage rate, and color difference value of the agricultural product. In some implementations, the drying time can be calculated simultaneously to determine the moisture content, drying rate, etc., corresponding to the target agricultural product image according to a preset formula.

[0109] S103: Input the initial environmental state information into the preset hot air drying model to determine the target drying action.

[0110] It should be noted that the preset hot air drying model is generated based on the Deep Deterministic Policy Gradient (DDPG) algorithm. DDPG includes an Actor policy network, a Critic value network, an Actor_Target network, and a Critic_Target network. The Actor network learns the policy, determining the action to be taken given environmental state information. The Critic network evaluates the quality of the policy, assessing the value of taking a particular action. The Actor_Target network is a copy of the Actor network. During training, the parameters of the Actor network are periodically updated to the Actor_Target network; this delayed update helps reduce oscillations and instability during training. Similarly, the Critic_Target network is a copy of the Critic network, and its parameters are periodically updated to the Critic_Target network during training; this delayed update also helps reduce oscillations and instability during training.

[0111] It should be noted that by acquiring the initial environmental state information of agricultural products and inputting the initial environmental state information into the preset hot air drying model, the drying actions to be performed on the agricultural products can be determined, such as adjusting the temperature, adjusting the humidity, or adjusting the wind speed.

[0112] It should be noted that the preset hot air drying model provided in the embodiments of this application can be found in [reference needed]. Figure 3 The schematic diagram of the preset hot air drying model shown can be considered as two stages: the stage of obtaining the experience pool and the stage of selecting parameters from the experience pool for model training.

[0113] In some implementations, the experience pool acquisition phase may include:

[0114] S301: Obtain the first environmental status information of agricultural products.

[0115] S302: Call the initial Actor network to select the first drying action corresponding to the first environmental state information.

[0116] S303: Dry agricultural products according to the first drying action to obtain the first reward value and the second environmental status information.

[0117] It should be noted that the first reward value represents the reward for performing the first drying action on the agricultural product, while the second environmental state information refers to the environmental state information after the first drying action on the agricultural product. As an example, under the conditions of 70℃, wind speed of 5m / s, and humidity of 30%, the shrinkage rate, drying rate, and color difference value of the agricultural product at the current moisture content are first calculated. Based on the magnitude of the shrinkage rate, drying rate, and color difference value, the corresponding reward value can be obtained through conversion.

[0118] S304: Store the first environmental state information, the first drying action, the first reward value, and the second environmental state information in the initial experience pool.

[0119] S305: Use the second environmental state information as the first environmental state information, execute S302 and S303 until the environmental state information of the agricultural product meets the agricultural product drying termination conditions, and obtain the target experience pool.

[0120] It should be noted that the target experience pool is used to store the environmental status information, reward value, and value information of agricultural products. The drying termination condition for agricultural products can be that the moisture content of the agricultural products is less than 20%, or other conditions for terminating drying, none of which will affect the implementation of the embodiments of this application.

[0121] S305 can be found here. Figure 3 The next agricultural product drying process environmental status information will be used as the initial agricultural product drying process environmental status.

[0122] In some implementations, when the moisture content of agricultural products is less than 20%, information addition to the initial experience pool is stopped, and the target experience pool is obtained. It should be noted that if the initial experience pool is full before the agricultural product drying termination condition is met, then when adding information to the initial experience pool, inferior old information can be deleted first.

[0123] It should be noted that when the moisture content of the agricultural product is not less than 20%, the experience pool acquisition stage and the parameter training stage are executed simultaneously. The next agricultural product drying process environment state information is used as the initial agricultural product drying process environment state. Simultaneously, the initial agricultural product drying process environment state, the next agricultural product drying process environment state, action information, and reward value are retrieved from the experience pool and input into the Critic network to obtain the value information of the next action. At the same time, the initial agricultural product drying process environment state, the next agricultural product drying process environment state, action information, and reward value, along with the next action information, are input into the Critic_Target network to obtain the value information of the action information. The loss of the Critic network is calculated using the value information of the action information and the value information of the next action, and the Critic network is updated. The loss of the Actor network is calculated using the value information of the action information, and the Actor network is updated. Drying ends when a preset termination condition (here set to a moisture content of less than 15%) is detected.

[0124] In some implementations, selecting parameters from the experience pool for the model training phase may include:

[0125] S401 randomly selects the first environmental state information, second environmental state information, first drying action, and first reward value of agricultural products from the target experience pool.

[0126] S402 obtains an initial hot air drying model based on the first environmental state information. The initial hot air drying model is constructed based on the depth-determined strategy gradient algorithm.

[0127] It should be noted that the initial hot air drying model includes the initial Actor policy network, the initial Critic value network, the Actor_Target network, and the Critic_Target network. The target network is obtained by updating the network parameters. The preset hot air drying model includes this target network.

[0128] S403 obtains the first value information of the first drying action and the second value information of the second drying action based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action.

[0129] It should be noted that the second drying action is obtained by inputting the second environmental state information into the Actor_Target network. The first value information is used to characterize the cumulative reward for performing the first drying action on agricultural products, and the second value information is used to characterize the cumulative reward for performing the second drying action on agricultural products.

[0130] S404 updates the parameters of the initial Actor network and the initial Critic network based on the first value information and the second value information to obtain the target Actor network and the target Critic network.

[0131] S405 retrieves the current iteration number for parameter updates.

[0132] S406 If the current iteration number is less than the preset iteration number, then execute S401 to S405 until the current iteration number meets the preset iteration number.

[0133] It should be noted that the preset number of iterations can be set according to actual needs. In some implementations, the preset number of iterations can be 10,000. Of course, it can also be other numbers. This is just an example and does not affect the implementation of the embodiments of this application.

[0134] S407 obtains a preset hot air drying model, which includes a target Critic network and a target Actor network.

[0135] S104: Dry agricultural products according to the target drying action.

[0136] Thus, the method provided in this application embodiment obtains the target drying action through a preset hot air drying model without damaging the drying environment of agricultural products, thereby improving the detection efficiency during the hot air drying process of agricultural products to a certain extent. Drying agricultural products based on this target drying action enables automatic control of the drying process and has a good control effect. Furthermore, the preset semantic segmentation model provided in this application embodiment can distinguish between agricultural product areas and background areas in agricultural product images even when the color difference between the agricultural product and the background is very small. This provides high-quality agricultural product images for subsequent environmental state information extraction, further improving the effect of drying control of agricultural products.

[0137] To facilitate understanding of the specific implementation of the hot air drying method for agricultural product drying control provided in the embodiments of this application, the following description will be provided in conjunction with the accompanying drawings.

[0138] Please see Figure 4 , Figure 4 A hot air drying device for controlling the drying of agricultural products is provided in this application embodiment. The device includes a control component 1, a drying chamber 2, and a drying component 4, wherein:

[0139] The control component 1 is used to acquire a target agricultural product image; acquire initial environmental state information of the agricultural product under the initial drying action based on the target agricultural product image, the initial environmental state information being used to characterize the appearance information of the agricultural product under the initial drying action; input the initial environmental state information into a preset hot air drying model to determine the target drying action, the preset hot air drying model being generated by training based on a depth-determining strategy gradient algorithm;

[0140] The drying component 4 is used to dry the agricultural product in the drying chamber according to the target drying action.

[0141] Optionally, the apparatus further includes a training component, the training component being used for:

[0142] The first environmental state information, the second environmental state information, the first drying action, and the first reward value of an agricultural product are randomly selected from the target experience pool. The target experience pool is used to store the environmental state information, reward value, and value information of the agricultural product. The first reward value is used to represent the reward for performing the first drying action on the agricultural product.

[0143] An initial hot air drying model is obtained based on the first environmental state information. The initial hot air drying model is constructed based on the deep determination strategy gradient algorithm, which includes an initial Actor policy network, an initial Critic value network, an Actor_Target network, and a Critic_Target network.

[0144] Based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action, first value information of the first drying action and second value information of the second drying action are obtained; the second drying action is obtained by inputting the second environmental state information into the Actor_Target network; the first value information is used to characterize the cumulative reward for performing the first drying action on the agricultural product, and the second value information is used to characterize the cumulative reward for performing the second drying action on the agricultural product.

[0145] Based on the first value information and the second value information, the parameters of the initial Actor network and the initial Critic network are updated to obtain the target Actor network and the target Critic network;

[0146] Get the current iteration number for parameter updates;

[0147] If the current iteration number is less than the preset iteration number, then the first environmental state information, the second environmental state information, the first drying action, and the first reward value of the agricultural products randomly selected from the target experience pool are executed until the current iteration number meets the preset iteration number.

[0148] Obtain the preset hot air drying model, which includes the target Critic network and the target Actor network.

[0149] Optionally, the training component is further used for:

[0150] Obtain the first environmental state information of the agricultural product;

[0151] The initial Actor network is invoked to select the first drying action corresponding to the first environmental state information;

[0152] The agricultural products are dried according to the first drying action to obtain the first reward value and the second environmental status information;

[0153] The first environmental state information, the first drying action, the first reward value, and the second environmental state information are stored in the initial experience pool.

[0154] Using the second environmental state as the first environmental state information, the process involves calling the initial Actor network to select the first drying action corresponding to the first environmental state information and drying the agricultural product according to the first drying action to obtain the first reward value and the second environmental state information, until the environmental state information of the agricultural product meets the agricultural product drying termination condition, and obtaining the target experience pool.

[0155] Optionally, the training component is specifically used for:

[0156] The first environmental state information, the second environmental state information, the first drying action, and the first reward value are input into the initial Critic network to obtain the first value information;

[0157] The first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action are input into the Critic_Target network to obtain the second value information.

[0158] Optionally, the training component is specifically used for:

[0159] The policy loss of the initial Actor network is calculated based on the first value information;

[0160] The parameters of the initial Actor network are updated according to the policy loss to obtain the target Actor network;

[0161] The value loss of the initial Critic network is calculated based on the second value information and the first value information.

[0162] The parameters of the initial Critic network are updated based on the value loss to obtain the target Critic network.

[0163] Optionally, the device further includes an imaging component 3, the imaging component 3 being used for:

[0164] Acquire an initial image of the agricultural product under the initial drying action; send the initial image of the agricultural product to the control component.

[0165] Optionally, the control component is further configured to:

[0166] Receive the initial image of the agricultural product under the initial drying action; input the initial image of the agricultural product into a preset semantic segmentation model to obtain the target image of the agricultural product.

[0167] Optionally, the preset semantic segmentation model includes an encoder and a decoder, the encoder including a backbone feature extraction network and a spatial pyramid pooling module, and the control component is further used for:

[0168] The initial agricultural product image is input into the backbone feature extraction network in the encoder for feature extraction, resulting in a shallow feature map, a third-layer feature map, and an initial deep feature map.

[0169] The initial deep feature map is input into the spatial pyramid pooling module in the encoder for multi-scale pooling and upsampling to obtain the target deep feature map;

[0170] Based on the decoder, the shallow feature map, the third-layer feature map, and the target deep feature map are stacked, fused, and upsampled to obtain the target agricultural product image.

[0171] Optionally, the control component is further configured to:

[0172] Based on the decoder, the target deep feature map and the third layer feature map are stacked and fused to obtain a first fused feature and a first feature, wherein the first feature is obtained by upsampling the first fused feature;

[0173] Based on the decoder, the first feature and the shallow feature map are stacked and fused to obtain the second fused feature;

[0174] The first fusion feature and the second fusion feature are stacked and fused based on the decoder, and then upsampled to obtain the target agricultural product image.

[0175] Please see Figure 5 , Figure 5 This is a schematic diagram of a hot air dryer provided in an embodiment of the present application. The hot air dryer includes a control component 1, a drying chamber 3, an imaging component 3, and a drying component 4. The drying component 4 includes a heating tube 4-1, a humidification component 4-2, and a wind speed control component 4-3. The control component 1 includes a training component, which includes a preset semantic segmentation model and a preset hot air drying model.

[0176] It should be noted that the import of the preset semantic segmentation model and the preset hot air drying model can be controlled by the real-time detection system for the appearance quality of agricultural products. The software development of this real-time detection system for the appearance quality of agricultural products is based on PyQt5, and its operating environment is the LINUX operating system. The main function of the software is to use the preset semantic segmentation model to identify and segment agricultural product images in real time, and automatically acquire information such as shrinkage rate, roundness and color of agricultural products during the drying process in real time. This information is then used as environmental state information to input into the preset hot air drying model. Then, reinforcement learning is used to automatically adjust the drying action conditions of the device according to the collected environmental state information.

[0177] Process 1: Connect the external power supply and turn on the power switch of control component 1. After the system is successfully loaded, import the trained agricultural product deep learning neural network model and reinforcement learning model into control component 1; then open the agricultural product appearance quality real-time detection system software and set the save path for agricultural product data and image data; then turn on the lens and data acquisition through the agricultural product appearance quality real-time detection system software and turn on the automatic control button.

[0178] In some implementations, the preset semantic segmentation model can be an improved DeepLabV3+ semantic segmentation model; the control component 1 can be deployed on a terminal or a development board with a graphics card. Specifically, the control component 1 can be a Raspberry Pi microcomputer. Compared with ordinary microcontrollers, the Raspberry Pi microcomputer has stronger computing power and better performance, which can better support the operation and calculation of the model.

[0179] Process 2: Imaging component 3 begins acquiring image data and transmits it to control component 1 in real time via a data cable. After receiving the data, control component 1 imports it into the inference module of the preset semantic segmentation model for inference calculation. Specifically, the image of the agricultural product is imported into the model, and then features are extracted through the backbone feature extraction network to obtain shallow features, third-layer features, and deep features. The deep feature map extracted by the backbone feature extraction network is then subjected to spatial pyramid pooling, and then upsampled and stacked with the third-layer features in the backbone extraction network to obtain fused feature 1. Fusion feature 1 is then upsampled to obtain feature 1. Feature 1 is stacked and fused with shallow features to obtain fused feature 2. After fused feature 2 is stacked and fused with fused feature 1, it is upsampled and the semantically segmented image is output. At the same time, the drying time is calculated.

[0180] Process 3: Control component 1 performs semantic segmentation on each frame of the inferred image and displays it on the interface in real time along with the original acquired image. Based on the semantically segmented image frames, control component 1 calculates the appearance quality information of agricultural products, such as roundness, shrinkage rate, and color difference value, using the following formulas (1)-(5), and prints the change curves on the interface in real time. At the same time, the real-time quality of the agricultural products is transmitted to control component 1, and the quality is converted into information such as moisture content and drying rate through the algorithm in control component 1.

[0181]

[0182]

[0183]

[0184]

[0185]

[0186] In the above formula, A t A represents the projected area of ​​the agricultural product after drying to t min; A0 is the projected area of ​​the fresh agricultural product; P t ΔE represents the projected perimeter of the agricultural product when dried to t min; ΔE is the color difference between fresh and dried materials. Color factors for fresh materials; The color factor of the dried material; MC represents the wet basis moisture content of the material; m W The mass of water contained in a material is expressed in grams (g); m D The dry matter content of the material is expressed in grams (g); DR represents the drying rate; M t1 and M t2 The dry basis moisture content of the material is given by drying times t1 and t2.

[0187] Process 4: Control component 1 adjusts the drying parameters in real time using a preset hot air drying model based on the collected appearance quality information.

[0188] Thus, the hot air dryer provided in this application embodiment can be used to train the real-time appearance quality information and drying process parameters of agricultural products, thereby obtaining the optimal process parameters for different drying stages of agricultural products, and further enabling real-time control of temperature, humidity, and wind speed within the drying chamber. Furthermore, the gas within the drying chamber can be recycled to a certain extent, achieving waste heat recovery and thus avoiding heat waste.

[0189] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0190] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are merely illustrative. Modules described as separate components may or may not be physically separate. Components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the objectives of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0191] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A hot air drying method for controlling the drying of agricultural products, characterized in that, The method includes: Acquire the target agricultural product image; The initial environmental state information of the agricultural product under the initial drying action is obtained from the target agricultural product image. The initial environmental state information is used to characterize the appearance information of the agricultural product under the initial drying action. The initial environmental state information is input into a preset hot air drying model to determine the target drying action. The preset hot air drying model is generated by training based on a deep deterministic strategy gradient algorithm. The agricultural products are dried according to the target drying action; The method further includes: The first environmental state information, the second environmental state information, the first drying action, and the first reward value of an agricultural product are randomly selected from the target experience pool. The target experience pool is used to store the environmental state information, reward value, and value information of the agricultural product. The first reward value is used to represent the reward for performing the first drying action on the agricultural product. An initial hot air drying model is obtained based on the first environmental state information. The initial hot air drying model is constructed based on the deep determination strategy gradient algorithm, which includes an initial Actor policy network, an initial Critic value network, an Actor_Target network, and a Critic_Target network. Based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action, first value information of the first drying action and second value information of the second drying action are obtained; the second drying action is obtained by inputting the second environmental state information into the Actor_Target network; the first value information is used to characterize the cumulative reward for performing the first drying action on the agricultural product, and the second value information is used to characterize the cumulative reward for performing the second drying action on the agricultural product. Based on the first value information and the second value information, the parameters of the initial Actor policy network and the initial Critic value network are updated to obtain the target Actor policy network and the target Critic value network. Get the current iteration number for parameter updates; If the current iteration number is less than the preset iteration number, then the first environmental state information, the second environmental state information, the first drying action, and the first reward value of the agricultural products randomly selected from the target experience pool are executed until the current iteration number meets the preset iteration number. Obtain the preset hot air drying model, which includes the target Critic value network and the target Actor policy network.

2. The method according to claim 1, characterized in that, Before randomly selecting the first environmental state information, second environmental state information, first drying action, and first reward value of agricultural products from the target experience pool, the method further includes: Obtain the first environmental state information of the agricultural product; The initial Actor policy network is invoked to select the first drying action corresponding to the first environmental state information; The agricultural products are dried according to the first drying action to obtain the first reward value and the second environmental status information; The first environmental state information, the first drying action, the first reward value, and the second environmental state information are stored in the initial experience pool. Using the second environmental state information as the first environmental state information, the system executes the call to the initial Actor strategy network to select the first drying action corresponding to the first environmental state information and performs the drying of the agricultural product according to the first drying action, thereby obtaining the first reward value and the second environmental state information, until the environmental state information of the agricultural product meets the agricultural product drying termination condition, and obtains the target experience pool.

3. The method according to claim 1, characterized in that, The step of obtaining first value information of the first drying action and second value information of the second drying action based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action includes: The first environmental state information, the second environmental state information, the first drying action, and the first reward value are input into the initial Critic value network to obtain the first value information. The first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action are input into the Critic_Target network to obtain the second value information.

4. The method according to claim 1, characterized in that, The step of updating the parameters of the initial Actor policy network and the initial Critic value network based on the first value information and the second value information to obtain the target Actor policy network and the target Critic value network includes: Calculate the policy loss of the initial Actor policy network based on the first value information; The parameters of the initial Actor policy network are updated based on the policy loss to obtain the target Actor policy network; Calculate the value loss of the initial Critic value network based on the second value information and the first value information; The parameters of the initial Critic value network are updated based on the value loss to obtain the target Critic value network.

5. The method according to claim 1, characterized in that, The method further includes: Obtain an initial image of the agricultural product under the initial drying action; The initial agricultural product image is input into a preset semantic segmentation model to obtain the target agricultural product image.

6. The method according to claim 5, characterized in that, The preset semantic segmentation model includes an encoder and a decoder. The encoder includes a backbone feature extraction network and a spatial pyramid pooling module. The step of inputting the initial agricultural product image into the preset semantic segmentation model to obtain the target agricultural product image includes: The initial agricultural product image is input into the backbone feature extraction network in the encoder for feature extraction, resulting in a shallow feature map, a third-layer feature map, and an initial deep feature map. The initial deep feature map is input into the spatial pyramid pooling module in the encoder for multi-scale pooling and upsampling to obtain the target deep feature map; Based on the decoder, the shallow feature map, the third-layer feature map, and the target deep feature map are stacked, fused, and upsampled to obtain the target agricultural product image.

7. The method according to claim 6, characterized in that, The step of stacking, fusing, and upsampling the shallow feature map, the third-layer feature map, and the target deep feature map based on the decoder to obtain the target agricultural product image includes: Based on the decoder, the target deep feature map and the third layer feature map are stacked and fused to obtain a first fused feature and a first feature, wherein the first feature is obtained by upsampling the first fused feature; Based on the decoder, the first feature and the shallow feature map are stacked and fused to obtain the second fused feature; The first fusion feature and the second fusion feature are stacked and fused based on the decoder, and then upsampled to obtain the target agricultural product image.

8. A hot air drying device for controlling the drying of agricultural products, characterized in that, The device includes a control component, a drying chamber, a drying component, and a training component, wherein: The control component is used to acquire a target agricultural product image; acquire initial environmental state information of the agricultural product under the initial drying action based on the target agricultural product image, the initial environmental state information being used to characterize the appearance information of the agricultural product under the initial drying action; input the initial environmental state information into a preset hot air drying model to determine the target drying action, the preset hot air drying model being generated by training based on a depth-determining strategy gradient algorithm; The drying assembly is used to dry the agricultural product in the drying chamber according to the target drying action; The training component is used for: The first environmental state information, second environmental state information, first drying action, and first reward value of an agricultural product are randomly selected from the target experience pool. The target experience pool is used to store the environmental state information, reward value, and value information of the agricultural product. The first reward value is used to represent the reward for performing the first drying action on the agricultural product. An initial hot air drying model is obtained based on the first environmental state information. The initial hot air drying model is constructed based on the deep deterministic policy gradient algorithm, which includes an initial Actor policy network, an initial Critic value network, an Actor_Target network, and a Critic_Target network. Based on the first environmental state information, the second environmental state information, the first drying action, the first reward value, and the second drying action, first value information of the first drying action and second value information of the second drying action are obtained; the second drying action is obtained by inputting the second environmental state information into the Actor_Target network; the first value information is used to characterize the cumulative reward for performing the first drying action on the agricultural product, and the second value information is used to characterize the cumulative reward for performing the second drying action on the agricultural product. Based on the first value information and the second value information, the parameters of the initial Actor policy network and the initial Critic value network are updated to obtain the target Actor policy network and the target Critic value network. Get the current iteration number for parameter updates; If the current iteration number is less than the preset iteration number, then the first environmental state information, the second environmental state information, the first drying action, and the first reward value of the agricultural products randomly selected from the target experience pool are executed until the current iteration number meets the preset iteration number. Obtain the preset hot air drying model, which includes the target Critic value network and the target Actor policy network.

9. The apparatus according to claim 8, characterized in that, The control component is further configured to: receive an initial image of the agricultural product under the initial drying action; input the initial image of the agricultural product into a preset semantic segmentation model to obtain the target image of the agricultural product.