Fruit drying adjusting and optimizing method and system based on distribution data
By constructing a CNN-based recognition model and Sobel operator analysis, combining the moisture distribution data of the fruit appearance and internal image, the drying equipment parameters are adjusted in real time, and the problem of uneven moisture distribution in traditional drying processes is solved, and the uniformity and quality of fruit drying are improved.
Patent Information
- Application Number
- CN202510416873.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-08
AI Technical Summary
Traditional fruit drying processes are difficult to adapt to the differences in internal and external moisture distribution of different fruits, resulting in problems such as uneven drying, degradation of quality and high energy consumption, and lack of accurate evaluation and comprehensive optimization of internal and external moisture distribution of fruits.
The fruit drying tuning method based on distribution data is constructed, and the color characteristics of the appearance image and the internal image are combined with the moisture distribution data for correlation learning. The Sobel operator is used for gradient analysis to generate comprehensive moisture distribution characteristics, and the drying equipment parameters are adjusted in real time.
It improves the uniformity and quality of the fruit drying process, reduces energy consumption, realizes real-time optimization of the fruit drying process and equipment tuning feedback, and is suitable for the drying and processing of a variety of fruits.
Smart Images

Figure CN120266894A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of drying equipment, and more specifically, to a method and system for optimizing fruit drying based on distribution data. Background Art
[0002] Fruit drying is an important processing method for extending the shelf life and facilitating storage and transportation. Traditional drying processes usually adopt fixed temperature, humidity, and time parameters, which are difficult to adapt to the differences in the internal and external moisture distributions of different fruits, resulting in problems such as uneven drying, reduced quality, and high energy consumption. Moreover, in the prior art, there is a lack of accurate assessment of the internal and external moisture distributions of fruits, a lack of graphical moisture distribution analysis of fruits, and it is difficult to comprehensively evaluate and optimize the drying process. Therefore, there is an urgent need for a method for optimizing fruit drying control to solve the above problems. Summary of the Invention
[0003] The present invention overcomes the deficiencies of the prior art and provides a method and system for optimizing fruit drying based on distribution data.
[0004] In a first aspect of the present invention, a method for optimizing fruit drying based on distribution data is provided, including: S102: Based on the target fruit, obtain appearance images, internal images at different moisture levels, and corresponding measured moisture distribution data; S104: Construct a recognition model based on CNN, use the appearance image and the internal image as model inputs, set the three RGB color channels, extract color features from the inputs through convolutional layers, pooling layers, and fully connected layers, and perform correlation learning between color features and moisture distribution in combination with the measured moisture distribution data; S106: In each drying process, real-time obtain the test appearance image and the test internal image of the test fruit and import them into the recognition model for color feature extraction and moisture distribution analysis to generate a first moisture distribution feature; S108: Through the Sobel operator, perform gradient analysis on the pixel points of the test appearance image and the test internal image, screen out the edge points, introduce multi-threshold segment settings, group the edge points, and generate multiple continuous contours. Use the features of the multiple continuous contours as moisture stratification features to obtain a second moisture distribution feature; S110: Perform distribution information fusion on the first moisture distribution feature and the second moisture distribution feature to obtain a comprehensive moisture distribution feature. Compare the comprehensive moisture distribution feature with the target moisture distribution feature, and adjust the drying equipment parameters to generate an equipment optimization plan.
[0005] In this solution, the S102 includes: Obtain the appearance image and the internal image of the fruit at different moisture levels from the system database; Perform image denoising, enhancement, and normalization preprocessing on the appearance image and the internal image.
[0006] In this solution, the S104 includes: Obtain the preprocessed appearance image and internal image; Construct a recognition model based on CNN. In the recognition model, set the convolution kernel size to 12×12, the pooling layer size to 3×3, and the number of channels to 3; Import the appearance image and the internal image as inputs into the recognition model respectively. The RGB color channels of the images correspond to the three channels of the model input; Perform convolution operations on the input images through the convolutional layer to extract the initial feature maps; Perform non-linear transformation on the initial feature maps based on a preset activation function, and input the transformed results into the pooling layer for data dimensionality reduction to generate intermediate feature maps; Through the fully connected layer, flatten the intermediate feature maps into one-dimensional vectors and input them into the fully connected layer. The fully connected layer maps the one-dimensional vectors to the target output space through a preset weight matrix and bias vector to obtain the color distribution features; Obtain the measured moisture distribution data corresponding to the appearance image and internal image data; In the recognition model, perform color semantic analysis based on the color distribution features, and perform associated learning of color distribution and moisture distribution in combination with the measured moisture distribution data.
[0007] In this solution, the S106 and the S108 include: After each drying process is completed, select test fruits and obtain the test appearance image and test internal image; Perform image preprocessing on the test appearance image and test internal image and import them into the recognition model for color feature extraction and color distribution recognition. Through color distribution semantic analysis, generate the first moisture distribution feature; Based on the Sobel operator, use the test appearance image and test internal image as input images respectively for contour feature extraction; The contour feature extraction is specifically as follows: perform grayscale conversion on the input image, calculate the gradients in the horizontal and vertical directions based on each pixel through a preset matrix, and label them as GX and GY; Calculate the gradient magnitude of each pixel point through GX and GY, screen out the edge points from the pixel points based on the minimum threshold, introduce multi-threshold segment settings, and divide multiple groups of edge points by judging the threshold segment to which the gradient magnitude of the edge points belongs; Connect each group of edge points to form multiple continuous contours, analyze the stratification situation of the image through the features of the multiple continuous contours, and map the stratification situation to the stratification features of moisture to obtain the second moisture distribution feature.
[0008] In this solution, S110 includes: Using the first distribution feature as the moisture area distribution information and the second distribution feature as the moisture stratification distribution information, fusing the two distribution features to generate a comprehensive moisture distribution feature; Comparing the comprehensive moisture distribution feature with the target moisture distribution feature, analyzing the differences between the moisture area distribution and the moisture stratification distribution and the expectations, and adjusting the drying equipment parameters by analyzing the difference situation to generate an equipment optimization plan; Adjusting the drying equipment parameters includes wind speed, temperature, running time, and running power.
[0009] In this solution, the drying process includes at least 2.
[0010] In this solution, for the test fruits, specifically in each drying process, a certain number of fruits are randomly selected and marked.
[0011] In this solution, the equipment optimization plan further includes: Based on the equipment optimization plan, the drying equipment is adjusted and run in real time. Based on each adjusted and optimized drying process, the equipment optimization plan is evaluated in real time based on the corresponding comprehensive moisture distribution feature and the drying situation is fed back.
[0012] The second aspect of the present invention also provides a fruit drying optimization system based on distribution data. The system includes: a memory and a processor. The memory includes a fruit drying optimization program based on distribution data. When the fruit drying optimization program based on distribution data is executed by the processor, the following steps are implemented: S102: Based on the target fruits, obtain appearance images, internal images with different moisture levels and corresponding measured moisture distribution data; S104: Build a recognition model based on CNN. Use the appearance images and internal images as model inputs, set the three RGB color channels, extract color features from the inputs through convolutional layers, pooling layers and fully connected layers, and perform associated learning of color features and moisture distribution in combination with the measured moisture distribution data; S106: In each drying process, obtain the test appearance image and test internal image of the test fruits in real time and import them into the recognition model for color feature extraction and moisture distribution analysis to generate a first moisture distribution feature; S108: Through the Sobel operator, perform gradient analysis on the pixel points of the test appearance image and test internal image, screen out the edge points, introduce multi-threshold segment settings, group the edge points and generate multiple continuous contours, and use the features of the multiple continuous contours as the moisture stratification features to obtain a second moisture distribution feature; S110: Perform distribution information fusion on the first moisture distribution feature and the second moisture distribution feature to obtain a comprehensive moisture distribution feature, compare the comprehensive moisture distribution feature with the target moisture distribution feature, and adjust the drying equipment parameters to generate an equipment optimization plan.
[0013] In a third aspect of the present invention, there is also provided a computer-readable storage medium, which includes a fruit drying optimization program based on distribution data. When the fruit drying optimization program based on distribution data is executed by a processor, the steps of the fruit drying optimization method based on distribution data as described in any one of the above are implemented.
[0014] The present invention discloses a fruit drying optimization method and system based on distribution data. By acquiring the appearance and internal images of fruits with different moisture levels and their corresponding moisture distribution data, a recognition model based on CNN is constructed for color feature and moisture distribution correlation learning. During the drying process, a test image is acquired in real time and imported into the model for analysis to generate a first moisture distribution feature; at the same time, the Sobel operator is used for gradient analysis to screen edge points and group them to generate multiple continuous contours to obtain a second moisture distribution feature. The two distribution features are fused into a comprehensive moisture distribution feature, and after comparing with the target feature, the drying equipment parameters are adjusted to generate an optimization plan. This method improves the accuracy of fruit moisture detection and realizes real-time optimization of the fruit drying process and equipment optimization feedback. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Shows a flowchart of a fruit drying optimization method based on distribution data according to the present invention; Figure 2 Shows a block diagram of a fruit drying optimization system based on distribution data according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be further described in detail below with reference to the drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0017] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0018] Figure 1 Shows a flowchart of a fruit drying optimization method based on distribution data according to the present invention.
[0019] As Figure 1As shown in the figure, the first aspect of the present invention provides a method for optimizing the drying of fruits based on distributed data, including: S102: Based on the target fruit, obtain appearance images, internal images with different moisture levels and the corresponding measured moisture distribution data; S104: Construct a recognition model based on CNN. Take the appearance image and the internal image as the model inputs, set the three RGB color channels, and perform color feature extraction on the inputs through convolutional layers, pooling layers and fully connected layers, and conduct correlation learning between color features and moisture distribution in combination with the measured moisture distribution data; S106: In each drying process, obtain the test appearance image and the test internal image of the test fruit in real time and import them into the recognition model for color feature extraction and moisture distribution analysis to generate the first moisture distribution feature; S108: Through the Sobel operator, perform gradient analysis on the pixel points of the test appearance image and the test internal image, screen out the edge points, introduce multi-threshold segment settings, group the edge points and generate multiple continuous contours, and use the features of the multiple continuous contours as the moisture stratification features to obtain the second moisture distribution feature; S110: Perform distribution information fusion on the first moisture distribution feature and the second moisture distribution feature to obtain the comprehensive moisture distribution feature, compare the comprehensive moisture distribution feature with the target moisture distribution feature, and adjust the parameters of the drying equipment to generate the equipment optimization plan.
[0020] According to the embodiments of the present invention, the S102 includes: Obtain the appearance images and internal images of the fruit at different moisture levels from the system database; Perform image noise reduction, enhancement and normalization preprocessing on the appearance images and internal images.
[0021] It should be noted that the internal image is specifically the cross-sectional slice image of the fruit, which is used to analyze the correlation between the color features of the internal image of the fruit and the moisture distribution under different moisture levels.
[0022] According to the embodiments of the present invention, the S104 includes: Obtain the preprocessed appearance images and internal images; Construct a recognition model based on CNN. In the recognition model, set the convolutional kernel size to 12×12, the pooling layer size to 3×3, and the number of channels to 3; Take the appearance image and the internal image as inputs and import them into the recognition model respectively. The RGB color channels of the images correspond to the three channels of the model input; Perform convolution operations on the input images through the convolutional layer to extract the initial feature maps; Perform a non - linear transformation on the initial feature map based on a preset activation function, and input the transformed result into a pooling layer for data dimensionality reduction to generate an intermediate feature map; Flatten the intermediate feature map into a one - dimensional vector through a fully - connected layer and input it into the fully - connected layer. The fully - connected layer maps the one - dimensional vector to the target output space through a preset weight matrix and bias vector to obtain the color distribution feature; Obtain the measured moisture distribution data corresponding to the appearance image and the internal image data; In the recognition model, perform color semantic analysis based on the color distribution feature, and combine the measured moisture distribution data for the associated learning of color distribution and moisture distribution.
[0023] It should be noted that the recognition model is used for color feature analysis and image semantic analysis to learn the color features corresponding to different moisture distributions in the fruit image. The preset activation function can adopt activation functions such as Sigmoid and ReLU. In the measured moisture distribution data, it includes the actually measured moisture distribution data in the appearance and internal images corresponding to the fruit. Through moisture distribution analysis, it is possible to judge the drying conditions of the exterior and interior of the fruit. However, the actual measurement process based on the fruit is time - consuming and laborious. Therefore, the present invention extracts and semantically associates color features through the measurement of the target fruit and in combination with the recognition model, so as to be able to learn and train a recognition model that can evaluate the moisture distribution from the perspective of color features.
[0024] In the recognition model based on CNN, it extracts color features from the input image, extracts color distribution features in the form of convolution operations. Further, it combines the measured moisture distribution data for color semantic analysis and associated classification learning, and performs semantic analysis and classification based on different color features, so as to be able to perform recognition and analysis of the moisture distribution of subsequent images.
[0025] According to an embodiment of the present invention, the S106 and the S108 include: After each drying process is completed, select test fruits and obtain test appearance images and test internal images; Perform image pre - processing on the test appearance images and test internal images and import them into the recognition model for color feature extraction and color distribution recognition. Through color distribution semantic analysis, generate the first moisture distribution feature; Based on the Sobel operator, use the test appearance image and the test internal image as input images respectively for contour feature extraction; The contour feature extraction is specifically to perform gray - scale conversion on the input image, calculate the gradients in the horizontal and vertical directions based on each pixel through a preset matrix, and mark them as GX and GY; Calculate the gradient magnitude of each pixel point through GX and GY, screen out edge points from the pixel points based on the minimum threshold, introduce multi-threshold segment setting, and divide multiple groups of edge points by judging the threshold segment to which the gradient magnitude of the edge points belongs; Connect each group of edge points to form multiple continuous contours, analyze the layering situation of the image through the features of the multiple continuous contours, and map to the layering features of moisture based on the layering situation to obtain the second moisture distribution feature.
[0026] It should be noted that the preset matrix includes the x-direction matrix (matrix 1) and the y-direction matrix (matrix 2), which are expressed as follows: Matrix 1: [-1 0 1] [-2 0 2] [-1 0 1].
[0027] Matrix 2: [-1 -2 -1] [0 0 0] [1 2 1].
[0028] The gradient magnitude calculation formula is as follows: , where G is the gradient magnitude, and GX and GY are two gradients.
[0029] It should be noted that in the cross-sectional image of the fruit interior, based on the different moisture distributions, it can specifically be reflected in the gray-scale layering of the fruit image. Different gray layers have different moisture contents, and generally the outer layer has less moisture than the inner layer. Based on this, the present invention uses the sobel operator to calculate the gradient of the gray-scale features and extract multiple-layer contours, and sets corresponding moisture distribution data through the multiple-layer contours. Here, it can be understood that by performing distribution analysis based on the gray-scale features, it is possible to make a relatively accurate judgment on the internal and external layering state of the moisture. And based on the moisture distribution in different regions, the present invention uses a CNN recognition model to extract color features and perform semantic analysis of color distribution, so as to obtain regional moisture distribution data. Further, by fusing the distribution features in two dimensions, it is possible to generate precise moisture distribution information. This method is applicable to the moisture analysis of various fruits and fruits, and through the change of moisture distribution, the operation of the drying equipment can be optimized.
[0030] Here, it can be understood that the moisture distribution inside the fruit often has certain internal and external layering characteristics. Therefore, after the present invention analyzes the gray-scale contour features through the sobel operator, it introduces multi-threshold segments to segment the interval of edge points, and stratifies the edge points at different levels to suit the analysis process of the moisture layering requirement features, improving the original form of determining contour features based on a single threshold to better capture the layering feature data.
[0031] In the present invention, the analysis of the moisture distribution characteristics of fruits mainly focuses on the internal images of the fruits. Since the moisture distribution inside the fruits is relatively complex while the moisture distribution on the surface is relatively simple, the analysis result of fruit moisture for the appearance image is relatively simple and the moisture distribution is single. Therefore, simple recognition analysis can be performed on the appearance image or drying recognition analysis can be omitted to streamline the analysis process.
[0032] The minimum threshold can be set to 10 and can be adjusted based on actual applications.
[0033] According to an embodiment of the present invention, the S110 includes: Using the first distribution feature as the moisture area distribution information and the second distribution feature as the moisture layer distribution information, fusing the two distribution features to generate a comprehensive moisture distribution feature; Comparing the comprehensive moisture distribution feature with the target moisture distribution feature, analyzing the differences between the moisture area distribution and the moisture layer distribution and the expectations, and adjusting the parameters of the drying equipment based on the analysis of the differences to generate an equipment optimization plan; Adjusting the parameters of the drying equipment includes wind speed, temperature, running time, and running power.
[0034] It should be noted that different operating parameters can affect different moisture distribution states. For example, for the internal area distribution characteristics of moisture, the control of the temperature curve and the magnitude of the wind speed of the drying equipment have a greater impact on it. For the moisture layer state, the setting of the running time and the running power of the equipment have a greater impact on it. Therefore, based on different distribution characteristics, different parameter optimizations are required to perform real-time drying control, thereby improving the drying efficiency.
[0035] According to an embodiment of the present invention, the drying process includes at least 2.
[0036] It should be noted that during the fruit drying process, generally multiple drying processes are included. For example, in the core drying process, drying processes with different temperatures and different equipment powers need to be set to achieve the purpose of drying the fruits both inside and outside.
[0037] According to an embodiment of the present invention, for the tested fruits, specifically in each drying process, a certain number of fruits are randomly selected and marked.
[0038] According to an embodiment of the present invention, in the equipment optimization plan, it further includes: Based on the equipment optimization plan, perform real-time adjustment and operation of the drying equipment. Based on each adjusted and optimized drying process, perform real-time evaluation of the equipment optimization plan and feedback on the drying situation based on the corresponding comprehensive moisture distribution feature.
[0039] It should be noted that for each optimized drying process, the corresponding comprehensive moisture distribution characteristics need to be recorded and stored, which can realize the drying process evaluation of the whole process and conduct the feedback analysis of the equipment optimization plan. The method of the present invention not only improves the uniformity and quality of fruit drying, but also reduces the consumption of human and material resources. It is applicable to the drying process of various fruits and has significant economic benefits and application prospects.
[0040] According to an embodiment of the present invention, it further includes: During a drying operation time period, collect the first moisture distribution characteristics and the second moisture distribution characteristics of the first N drying processes; Obtain the first target moisture distribution characteristics and the second target moisture distribution characteristics; Select the first drying process as the analysis object from the first N drying processes, vectorize the first moisture distribution characteristics and the first target moisture distribution characteristics to obtain two feature vectors, and calculate the difference degree D1 between the two feature vectors based on the standard Euclidean distance; Calculate the difference degree D2 based on the second moisture distribution characteristics and the second target moisture distribution characteristics; Perform weighted averaging on D1 and D2 to obtain the average difference value; Based on the N drying processes, obtain N difference values, perform linear variation fitting on the N difference values, and obtain the change rate. If the change rate shows a linear increase, it is determined that the drying equipment is in an abnormal state, and equipment warning information is set.
[0041] It should be noted that the change rate is the slope obtained by fitting. If this value is positive, it represents a linear increase. The first target moisture distribution characteristics and the second target moisture distribution characteristics are respectively the target distribution characteristic data corresponding to the (N + 1)-th drying process. The first target moisture distribution characteristics represent the regional moisture distribution characteristic data, and the second target moisture distribution characteristics represent the moisture stratification characteristic data. Both are the expected target distribution characteristics and are used to analyze whether the change trend meets the expectations.
[0042] It is worth mentioning here that in the process of multi - process drying optimization of fruit moisture, traditional technologies often lack the overall analysis of moisture changes and the trend analysis of distribution status, resulting in difficulties in overall equipment operation analysis and anomaly assessment. If there are redundant or ineffective drying steps, it is difficult to judge and adjust. Therefore, based on the first and second moisture distribution characteristic data, the present invention uses their distribution characteristics for calculation. Through the vectorization of the characteristic data, the first and second moisture distribution characteristics and the target distribution characteristics of the first N drying processes in the current time period are vectorized and compared, and an average difference value is generated. The larger the average difference value, the greater the deviation from the target distribution. Further, the change trend is judged through linear fitting. This method can achieve simple and efficient analysis of the moisture distribution change trend, and realize accurate anomaly warning of the equipment, timely adjust the equipment parameters, reduce redundant or ineffective drying operations, reduce the consumption of human and material resources in the drying process, and realize an intelligent and automated drying operation process.
[0043] The standard Euclidean distance calculation formula is: , where D is the standard Euclidean distance, M is the dimension number of the feature vector, respectively represent the value of the i - th dimension of the first feature vector and the value of the i - th dimension of the second feature vector.
[0044] It should be noted that the linear change fitting can adopt linear regression fitting and obtain the change rate.
[0045] According to the embodiment of the present invention, the introduction of multi - threshold segment setting further includes: Obtain the amplitude threshold of each pixel point and use each amplitude threshold as a data point; Based on the DBSCAN clustering algorithm, set the clustering space of the data points, and cluster the data points in the form of density clustering to form multiple clustering groups; In each clustering group, extract the maximum value and the minimum value of the data points, and set a threshold segment based on the maximum value and the minimum value; Based on multiple clustering groups, set multiple threshold segments, eliminate the overlapping segments between the threshold segments, and obtain multiple preferred threshold segments for threshold judgment.
[0046] It should be noted that the threshold segment can be set by the user. Based on the complex moisture distribution situation, the threshold segment can be divided through the form of data point clustering to better judge the fruit moisture stratification. The threshold segment is the threshold interval, and the overlapping segment is the cross - segment between two threshold segments.
[0047] Figure 2 Fig. shows the block diagram of a fruit drying optimization system based on distribution data according to the present invention.
[0048] In the second aspect of the present invention, a fruit drying optimization system 2 based on distributed data is further provided. The system includes: a memory 21 and a processor 22. The memory 21 includes a fruit drying optimization program based on distributed data. When the fruit drying optimization program based on distributed data is executed by the processor 22, the following steps are implemented: S102: Based on the target fruit, obtain appearance images, internal images with different moisture levels, and corresponding measured moisture distribution data; S104: Construct a recognition model based on CNN. Use the appearance image and the internal image as model inputs. Set the three RGB color channels. Extract color features from the inputs through convolutional layers, pooling layers, and fully connected layers, and perform associated learning of color features and moisture distribution in combination with the measured moisture distribution data; S106: In each drying process, obtain the test appearance image and the test internal image of the test fruit in real time and import them into the recognition model for color feature extraction and moisture distribution analysis to generate the first moisture distribution feature; S108: Through the Sobel operator, perform gradient analysis on the pixel points of the test appearance image and the test internal image, screen out the edge points, introduce multi-threshold segment settings, group the edge points and generate multiple continuous contours, and use the features of the multiple continuous contours as moisture stratification features to obtain the second moisture distribution feature; S110: Perform distribution information fusion on the first moisture distribution feature and the second moisture distribution feature to obtain a comprehensive moisture distribution feature. Compare the comprehensive moisture distribution feature with the target moisture distribution feature, and adjust the parameters of the drying equipment to generate an equipment optimization plan.
[0049] According to an embodiment of the present invention, the S102 includes: Obtain the appearance image and the internal image of the fruit with different moisture levels from the system database; Perform image noise reduction, enhancement, and normalization preprocessing on the appearance image and the internal image.
[0050] It should be noted that the internal image is specifically the cross-sectional slice image of the fruit, which is used to analyze the association between the color features and the moisture distribution in the internal image of the fruit under different moisture levels.
[0051] According to an embodiment of the present invention, the S104 includes: Obtain the preprocessed appearance image and internal image; Construct a recognition model based on CNN. In the recognition model, set the convolutional kernel size to 12×12, the pooling layer size to 3×3, and the number of channels to 3; Import the appearance image and the internal image as inputs into the recognition model respectively. The RGB color channels of the image correspond to the three channels of the model input; Perform a convolution operation on the input image through a convolutional layer to extract an initial feature map; Perform a non-linear transformation on the initial feature map based on a preset activation function, and input the transformed result into a pooling layer for data dimensionality reduction to generate an intermediate feature map; Through a fully connected layer, flatten the intermediate feature map into a one-dimensional vector and input it into the fully connected layer. The fully connected layer maps the one-dimensional vector to the target output space through a preset weight matrix and bias vector to obtain the color distribution feature; Obtain the measured moisture distribution data corresponding to the appearance image and the internal image data; In the recognition model, perform color semantic analysis based on the color distribution feature, and combine the measured moisture distribution data to perform correlation learning between the color distribution and the moisture distribution.
[0052] It should be noted that the recognition model is used for color feature analysis and image semantic analysis, and learns the color features corresponding to different moisture distributions in the fruit image. The preset activation function can adopt activation functions such as Sigmoid and ReLU. In the measured moisture distribution data, it includes the actually measured moisture distribution data in the appearance and internal images corresponding to the fruit. Through moisture distribution analysis, it is possible to judge the external and internal drying conditions of the fruit. However, the actual measurement process based on the fruit is time-consuming and laborious. Therefore, in the present invention, through the measurement of the target fruit and in combination with the recognition model, the color features are extracted and semantically associated, so as to be able to learn and train a recognition model that can evaluate the moisture distribution from the perspective of color features.
[0053] In the recognition model based on CNN, it extracts color features from the input image, extracts the color distribution feature in the form of a convolution operation. Further, it combines the measured moisture distribution data to perform color semantic analysis and correlation classification learning, and performs semantic analysis and classification based on different color features, so as to be able to perform recognition analysis of the moisture distribution of subsequent images.
[0054] According to the embodiment of the present invention, the S106 and the S108 include: After each drying process is completed, select a test fruit and obtain a test appearance image and a test internal image; Perform image preprocessing on the test appearance image and the test internal image and import them into the recognition model for color feature extraction and color distribution recognition. Through color distribution semantic analysis, generate a first moisture distribution feature; Based on the Sobel operator, use the test appearance image and the test internal image as input images respectively for contour feature extraction; The contour feature extraction specifically is to perform grayscale conversion on the input image, and calculate the gradients in the horizontal and vertical directions based on each pixel through a preset matrix, and mark them as GX and GY; Calculate the gradient magnitude of each pixel point through GX and GY, screen out edge points from the pixel points based on the minimum threshold, introduce multi-threshold segment setting, and divide multiple groups of edge points by judging the threshold segment to which the gradient magnitude of the edge points belongs; Connect each group of edge points to form multiple continuous contours, analyze the layering of the image through the features of the multiple continuous contours, and map to the layering features of water based on the layering situation to obtain the second water distribution feature.
[0055] It should be noted that the preset matrix includes the x-direction matrix (matrix 1) and the y-direction matrix (matrix 2), which are expressed as follows: Matrix 1: [-1 0 1] [-2 0 2] [-1 0 1].
[0056] Matrix 2: [-1 -2 -1] [0 0 0] [1 2 1].
[0057] The formula for calculating the gradient magnitude is as follows: , where G is the gradient magnitude, and GX and GY are two gradients.
[0058] It should be noted that in the cross-sectional image inside the fruit, based on the different water distributions, it can specifically be reflected in the gray layering of the fruit image. Different gray layers have different water contents, and generally, the water content in the outer layer is lower than that in the inner layer. Based on this, the present invention uses the sobel operator to calculate the gradient of the gray features and extract multiple layers of contours, and sets the corresponding water distribution data through the multiple layers of contours. Here, it can be understood that based on the distribution analysis of the gray features, it is possible to accurately judge the internal and external layering state of the water. And based on the water distribution in different regions, the present invention uses a CNN recognition model to extract color features and perform semantic analysis of color distribution, so as to obtain the regional distribution data of water. Further, by fusing the distribution features in two dimensions, accurate water distribution information can be generated. This method is applicable to the water analysis of various fruits and fruits, and through the change of water distribution, the operation of the drying equipment can be optimized.
[0059] It can be understood here that the moisture distribution inside the fruit often has certain internal and external stratification characteristics. Therefore, after analyzing the grayscale contour features through the Sobel operator in the present invention, multiple threshold segments are introduced to segment the interval of edge points, and the edge points at different levels are stratified to be applicable to the analysis process of the moisture stratification requirement characteristics, improving the original form of determining contour features based on a single threshold to better capture stratified feature data.
[0060] In the present invention, the analysis of the moisture distribution characteristics of the fruit mainly focuses on the internal image of the fruit, and the moisture distribution is relatively complex, while the external moisture distribution is relatively simple. Therefore, for the fruit moisture analysis of the appearance image, the analysis result is relatively simple and the moisture distribution is single. Therefore, for the appearance image, simple recognition analysis can be carried out or drying recognition analysis can be not carried out to streamline the analysis process.
[0061] The minimum threshold can be set to 10 and can be adjusted based on actual applications.
[0062] According to an embodiment of the present invention, the S110 includes: Taking the first distribution feature as the moisture area distribution information and the second distribution feature as the moisture stratification distribution information, fusing the two distribution features to generate a comprehensive moisture distribution feature; Comparing the comprehensive moisture distribution feature with the target moisture distribution feature, analyzing the differences between the moisture area distribution and the moisture stratification distribution and the expectation, and adjusting the parameters of the drying equipment by analyzing the difference situation to generate an equipment optimization plan; Adjusting the parameters of the drying equipment includes wind speed, temperature, running time, and running power.
[0063] It should be noted that different operating parameters can affect different moisture distribution states. For example, for the internal area distribution characteristics of moisture, the control of the temperature curve and the magnitude of the wind speed of the drying equipment have a greater impact on it. For the moisture stratification state, the setting of the running time and the running power of the equipment have a greater impact on it. Therefore, based on different distribution characteristics, different parameter optimizations are required to perform real-time drying control, thereby improving the drying efficiency.
[0064] According to an embodiment of the present invention, the drying process includes at least 2.
[0065] It should be noted that during the fruit drying process, generally multiple drying processes are included. For example, in the core drying process, drying processes with different temperatures and different equipment powers need to be set to achieve the purpose of drying the fruit both inside and outside.
[0066] According to an embodiment of the present invention, for the test fruits, specifically in each drying process, a certain number of fruits are randomly selected and marked.
[0067] In the device optimization solution according to an embodiment of the present invention, it further includes: Based on the device optimization solution, the drying device is adjusted and operated in real time. In the drying process optimized by each adjustment, based on the corresponding comprehensive moisture distribution characteristics, the device optimization solution is evaluated in real time and the drying situation is fed back.
[0068] It should be noted that for each optimized drying process, the corresponding comprehensive moisture distribution characteristics need to be recorded and stored, which can realize the drying process evaluation of the whole process and conduct the feedback analysis of the device optimization solution. The method of the present invention not only improves the uniformity and quality of fruit drying, but also reduces the consumption of manpower and material resources, is applicable to the drying process of various fruits, and has significant economic benefits and application prospects.
[0069] The third aspect of the present invention further provides a computer-readable storage medium, which includes a fruit drying optimization program based on distribution data. When the fruit drying optimization program based on distribution data is executed by a processor, the steps of the fruit drying optimization method based on distribution data as described in any one of the above are realized.
[0070] The present invention discloses a fruit drying optimization method and system based on distribution data. By obtaining the appearance and internal images of fruits with different moisture levels and their corresponding moisture distribution data, a recognition model based on CNN is constructed for color feature and moisture distribution correlation learning. In the drying process, a test image is obtained in real time and imported into the model for analysis to generate a first moisture distribution feature. At the same time, the Sobel operator is used for gradient analysis to screen edge points and group them to generate multiple continuous contours, obtaining a second moisture distribution feature. The two distribution features are fused into a comprehensive moisture distribution feature, and after comparing with the target feature, the parameters of the drying device are adjusted to generate an optimization solution. This method improves the accuracy of fruit moisture detection and realizes the real-time optimization of the fruit drying process and the feedback of device optimization.
[0071] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed with each other can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical, or other forms.
[0072] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units; they may be located in one place or distributed over multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0073] In addition, in each embodiment of the present invention, each functional unit may be all integrated in a processing unit, or each unit may be separately taken as a unit alone, or two or more units may be integrated in one unit; the above-mentioned integrated units may be implemented in the form of hardware, or in the form of hardware plus software functional units.
[0074] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: removable storage devices, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other various media that can store program codes.
[0075] Alternatively, if the above-mentioned integrated units of the present invention are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. And the foregoing storage medium includes: removable storage devices, ROM, RAM, magnetic disks or optical disks and other various media that can store program codes.
[0076] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention.
Claims
1. A method for optimizing fruit drying based on distributed data, characterized in that Including: S102: Based on the target fruit, obtain appearance images, internal images with different moisture levels, and corresponding measured moisture distribution data; S104: Construct a recognition model based on CNN. Take the appearance image and internal image as model inputs, set the three RGB color channels, and perform color feature extraction on the inputs through convolutional layers, pooling layers, and fully connected layers. Combine the measured moisture distribution data to conduct correlation learning between color features and moisture distribution; S106: In each drying process, obtain the test appearance image and test internal image of the test fruit in real time and import them into the recognition model for color feature extraction and moisture distribution analysis to generate the first moisture distribution feature; S108: Through the Sobel operator, perform gradient analysis on the pixel points of the test appearance image and test internal image, screen out the edge points, introduce multi-threshold segment settings, group the edge points, and generate multiple continuous contours. Take the features of the multiple continuous contours as moisture stratification features to obtain the second moisture distribution feature; S110: Perform distribution information fusion on the first moisture distribution feature and the second moisture distribution feature to obtain the comprehensive moisture distribution feature. Compare the comprehensive moisture distribution feature with the target moisture distribution feature, and adjust the parameters of the drying equipment to generate an equipment optimization plan.
2. The fruit drying optimization method based on distributed data according to claim 1, wherein The S102 includes: Obtain the appearance images and internal images of the fruit at different moisture levels from the system database; Perform image noise reduction, enhancement, and normalization preprocessing on the appearance images and internal images.
3. A method for optimizing the drying of fruits based on distributed data according to claim 1, characterized in that The S104 includes: Obtain the preprocessed appearance images and internal images; Construct a recognition model based on CNN. In the recognition model, set the convolutional kernel size to 12×12, the pooling layer size to 3×3, and the number of channels to 3; Take the appearance image and internal image as inputs and import them into the recognition model respectively. The RGB color channels of the images correspond to the three channels of the model input; Perform convolution operations on the input images through the convolutional layer to extract the initial feature maps; Perform non-linear transformation on the initial feature maps based on a preset activation function, and input the transformed results into the pooling layer for data dimensionality reduction to generate intermediate feature maps; Through the fully connected layer, flatten the intermediate feature maps into one-dimensional vectors and input them into the fully connected layer. The fully connected layer maps the one-dimensional vectors to the target output space through a preset weight matrix and bias vector to obtain the color distribution feature; Obtain the measured moisture distribution data corresponding to the appearance image and internal image data; In the recognition model, perform color semantic analysis based on the color distribution feature, and combine the measured moisture distribution data to conduct correlation learning between color distribution and moisture distribution.
4. A method for optimizing the drying of fruits based on distributed data according to claim 1, characterized in that The S106 and the S108 include: After each drying process ends, select the test fruit and obtain the test appearance image and test internal image; Perform image preprocessing on the test appearance image and test internal image and import them into the recognition model for color feature extraction and color distribution recognition. Through color distribution semantic analysis, generate the first moisture distribution feature; Based on the Sobel operator, take the test appearance image and test internal image as input images respectively for contour feature extraction; The contour feature extraction specifically includes converting the input image to grayscale, calculating the gradients in the horizontal and vertical directions respectively for each pixel based on a preset matrix, and marking them as GX and GY; Calculate the gradient magnitude of each pixel point through GX and GY, screen out the edge points from the pixel points based on a minimum threshold, introduce a multi-threshold segment setting, and divide multiple groups of edge points by judging the threshold segment to which the gradient magnitude of the edge points belongs; Connect each group of edge points to form multiple continuous contours, analyze the layering situation of the image through the features of the multiple continuous contours, and map to the layering features of water based on the layering situation to obtain the second water distribution feature.
5. A method for optimizing the drying of fruits based on distributed data according to claim 1, characterized in that, The S110 includes: Use the first distribution feature as the water area distribution information and the second distribution feature as the water layering distribution information, fuse the two distribution features to generate a comprehensive water distribution feature; Compare the comprehensive water distribution feature with the target water distribution feature, analyze the differences between the water area distribution and the water layering distribution and the expectations, and adjust the drying equipment parameters by analyzing the difference situation to generate an equipment optimization plan; Adjusting the drying equipment parameters includes wind speed, temperature, running time, and running power.
6. A method for optimizing the drying of fruits based on distributed data according to claim 1, characterized in that, The drying process includes at least 2.
7. A method for optimizing the drying of fruits based on distributed data according to claim 1, characterized in that, For the test fruits, specifically in each drying process, a certain number of fruits are randomly selected and marked.
8. A method for optimizing the drying of fruits based on distributed data according to claim 1, characterized in that In the equipment optimization plan, it also includes: Based on the equipment optimization plan, perform real-time adjustment and operation of the drying equipment. In each drying process after adjustment and optimization, perform real-time evaluation and drying situation feedback on the equipment optimization plan based on the corresponding comprehensive water distribution feature.
9. A fruit drying optimization system based on distributed data, characterized in that The system includes: a memory and a processor. The memory includes a fruit drying optimization program based on distribution data. When the fruit drying optimization program based on distribution data is executed by the processor, the following steps are implemented: S102: Based on the target fruit, obtain the appearance images, internal images with different moisture levels and the corresponding measured moisture distribution data; S104: Construct a recognition model based on CNN, use the appearance image and the internal image as the model input, set the three RGB color channels, extract color features from the input through the convolutional layer, pooling layer and fully connected layer, and perform associated learning of color features and moisture distribution in combination with the measured moisture distribution data; S106: In each drying process, obtain the test appearance image and test internal image of the test fruit in real time and import them into the recognition model for color feature extraction and moisture distribution analysis to generate the first moisture distribution feature; S108: Through the Sobel operator, perform gradient analysis on the pixel points of the test appearance image and the test internal image, screen out the edge points, introduce a multi-threshold segment setting, group the edge points and generate multiple continuous contours, and use the features of the multiple continuous contours as the moisture layering features to obtain the second moisture distribution feature; S110: Fuse the distribution information of the first moisture distribution feature and the second moisture distribution feature to obtain a comprehensive moisture distribution feature, compare the comprehensive moisture distribution feature with the target moisture distribution feature, and adjust the drying equipment parameters to generate an equipment optimization plan.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a fruit drying optimization program based on distribution data. When the fruit drying optimization program based on distribution data is executed by a processor, the steps of the fruit drying optimization method based on distribution data as described in any one of claims 1 to 8 are implemented.