AI vision-based functional food production control method and system

By using an AI-based vision-based drying control method to identify and adjust drying parameters in real time, the problem of uneven drying in large-scale production of functional foods has been solved, resulting in a stable improvement in food quality and safety.

CN121209633AInactive Publication Date: 2025-12-26SOUTHWEST FORESTRY UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511608569.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2025-12-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing drying processes cannot effectively solve the problem of insufficient drying uniformity in functional foods during multi-batch, large-scale production, resulting in localized under-drying or over-drying, which affects food quality and safety.

Method used

Using an AI vision-based approach, real-time image sequences of food surfaces and environmental data are collected. Feature extraction and mapping models are used to identify under-dried or over-dried areas, generate drying uniformity indices, and adjust drying parameters to achieve uniformity control.

Benefits of technology

It enables precise control over localized drying conditions, improves drying uniformity, reduces the risk of localized quality deterioration, ensures the preservation of food color, texture, and nutrition, and adapts to fluctuations in different batches and raw material characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121209633A_ABST
    Figure CN121209633A_ABST
Patent Text Reader

Abstract

The invention discloses a functional food production control method and system based on AI vision, particularly relates to the field of image processing, and is used for solving the problem of identifying, regulating and controlling uneven moisture in the drying process of existing functional food. The method comprises the following steps: acquiring a food surface image sequence and cavity environment temperature and humidity data in a drying process in real time, performing feature extraction on an image, calculating surface gray dispersion, texture roughness entropy and color distribution offset, generating a drying feature sequence, and establishing a mapping model with a moisture content reference; lossless estimation of sample moisture content distribution is realized, so that a dry abnormal sample is identified; and extracting a drying rate deviation block, calculating a drying deviation amplitude, generating a drying uniformity index, and dynamically adjusting the air speed, the heat flow, the conveying speed and other parameters of the drying cavity according to the index until the drying uniformity index returns to a set range, thereby realizing accurate control and homogenization of the functional food drying process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to a method and system for controlling the production of functional foods based on AI vision. Background Technology

[0002] With the continuous advancement of food processing technology, drying has become a crucial process for ensuring food quality stability and extending shelf life. Drying not only affects the appearance, color, and texture of food but also directly determines storage safety and transportability. Especially in the functional food sector, many raw materials contain active ingredients, micronutrients, and sensitive structures; even slight deviations in the drying process can lead to the deactivation of active substances or nutrient loss, thereby weakening product efficacy. Therefore, the industry urgently needs to achieve refined and controllable drying processes while ensuring production capacity to meet consumer demand for high-quality, healthy foods.

[0003] However, existing drying processes largely rely on macroscopic conditions such as overall temperature, humidity, and wind speed, neglecting the regional differences in food surface across space and time. In actual production, influenced by food geometry, raw material density, and the distribution of drying airflow, food surfaces are prone to localized under-drying and over-drying, resulting in uneven moisture content distribution. This unevenness not only disrupts appearance consistency but may also introduce localized microbial risks and shorten shelf life. For functional foods, over-drying can damage active ingredients or degrade heat-sensitive substances, while under-drying can lead to flavor deterioration and storage risks. Although traditional drying methods have continuously introduced diverse technologies such as hot air, microwaves, infrared radiation, and vacuum freezing, these methods mostly remain at the energy supply level, lacking precise control over surface areas and failing to effectively address the problem of insufficient drying uniformity in multi-batch, large-scale production. Especially in high-value-added food processing, process disturbances and formulation differences further amplify the unevenness effect, directly impacting industrialization levels and food safety.

[0004] Therefore, there is an urgent need for an innovative drying method that can combine the spatial distribution characteristics of food surface moisture content for real-time monitoring and dynamic feedback control, so as to achieve optimized control of drying uniformity and thus ensure the overall stability of the product in terms of quality, safety and retention of functional components. Summary of the Invention

[0005] In order to overcome the above-mentioned defects of the prior art, embodiments of the present invention provide a functional food production control method and system based on AI vision to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for controlling the production of functional foods based on AI vision includes the following steps: S1. Real-time acquisition of surface image sequences of functional food products passing through the drying process, as well as environmental temperature and humidity data inside the drying chamber; S2. Perform feature extraction on the surface image sequence of functional food, calculate the surface grayscale dispersion, texture roughness entropy and color distribution offset, and extract the surface drying feature sequence. S3. Establish a mapping model between surface drying characteristic sequences and moisture content benchmarks; S4. Perform non-destructive estimation of the moisture content distribution of each food sample to identify samples that are locally under-dried or over-dried. S5. In the surface image of the sample with uneven drying, extract the drying rate offset block, calculate the drying deviation amplitude of each offset block and generate the drying uniformity index. S6. Generate local control commands based on the drying uniformity index, adjust the drying parameters of the drying chamber until the drying uniformity index returns to the set range.

[0007] In a preferred embodiment, step S2 involves performing feature extraction on the functional food surface image sequence, calculating the surface grayscale dispersion, texture roughness entropy, and color distribution offset, and specifically extracting the surface drying feature sequence: The acquired food surface images are divided into equal-sized pixel blocks according to a spatial grid. Extract the average coordinates of pixels within a pixel block in the Lab color space and monitor the color distribution shift of the pixel block over time. The food surface image is converted to grayscale and arranged according to the row and column order of pixels within the pixel block to obtain a two-dimensional matrix of grayscale values ​​corresponding to the pixel block. Calculate the gray-level difference variance between adjacent pixels within each pixel block in the gray-level two-dimensional matrix, and extract the gray-level dispersion of each pixel block; Perform a two-dimensional Fourier transform on the gray-level two-dimensional matrix of each pixel block in the frequency domain, and calculate the energy distribution entropy by statistically analyzing the energy proportion of different frequency bands in the spectrum, which is used as the texture roughness entropy value of the corresponding pixel block. The grayscale dispersion, texture roughness entropy, and color distribution offset of the time series are integrated as feature values ​​into a surface drying feature sequence.

[0008] In a preferred embodiment, step S3, establishing a mapping model between the surface drying characteristic sequence and the moisture content benchmark, specifically includes: A two-dimensional Cartesian coordinate plane is established based on the spatial grid corresponding to the pixel blocks of the food surface image; Standard food samples with different degrees of dryness were collected with data evenly distributed, and the actual moisture content was measured at each pixel location in a two-dimensional rectangular coordinate plane to establish the correspondence between surface dryness feature sequence and moisture content; Construct a training set with grayscale dispersion, texture roughness entropy and color distribution offset as input variables and measured moisture content as output; A multivariate regression model was used to fit the nonlinear relationship between input and output, and a moisture content mapping model was established.

[0009] In a preferred embodiment, step S4, which involves non-destructively estimating the moisture content distribution of each food sample and identifying samples with localized under-drying and over-drying conditions, specifically includes: The real-time extracted food surface drying feature sequence is input into the moisture content mapping model, and the output moisture content estimate is used. Spatial interpolation is used to make the moisture content estimate points continuous, and a smooth moisture content distribution map covering the entire food surface is generated. By using the moisture content distribution map, areas with moisture content higher than the preset upper limit and lower than the preset lower limit are screened out to identify food samples that are locally under-dried or over-dried.

[0010] In a preferred embodiment, step S5, which involves extracting drying rate offset blocks from the identified unevenly dried sample surface image, calculating the drying deviation amplitude of each offset block, and generating a drying uniformity index, specifically includes: The moisture content distribution map of locally under-dried or over-dried food samples is refined by dividing the grid into smaller segments. Specifically, the spatial grid of the original pixel blocks is redefined in a two-dimensional rectangular coordinate plane according to a preset reduction scale. Perform moisture content difference calculations in chronological order to calculate the drying rate variation curves for each refined grid. In the drying rate change curve, when the absolute value of the local rate change is continuously higher than the set drying rate offset threshold, the corresponding time period is marked as the offset sub-segment. Check the differential jump amplitude between adjacent offset segments. When the jump amplitude is less than the preset rate continuity threshold, merge the adjacent offset segments into an offset block. The drying rate deviation within the offset block is accumulated to the total drying deviation value, and the corresponding drying rate deviation area is mapped back to the two-dimensional rectangular coordinate plane to form a drying deviation distribution map. The drying uniformity index is calculated based on the drying deviation distribution map.

[0011] In a preferred embodiment, the calculation of the drying uniformity index based on the drying deviation distribution map specifically includes: Summarize the deviation values ​​of all drying offset blocks in the drying deviation distribution map, and calculate the total drying deviation for each food sample. Within the scope of batch production, statistical processing is performed on the total drying deviation of all samples, and the root mean square deviation is calculated as the batch drying dispersion. Temperature and humidity data from the drying chamber are incorporated to perform a weighted correction on the batch drying dispersion.

[0012] In a preferred embodiment, step S6, generating a local control command based on the drying uniformity index to adjust the drying parameters of the drying chamber until the drying uniformity index returns to the set range, specifically includes: The corrected drying dispersion is defined as the drying uniformity index and compared with the preset uniformity index threshold. When the drying uniformity index exceeds the preset threshold, a local control command is generated. Map the drying rate deviation region in the drying deviation distribution map to the spatial location within the drying chamber to locate the control region; For control areas identified as under-dried, the drying parameter adjustment direction is set to increase; for control areas identified as over-dried, the drying parameter adjustment direction is set to decrease. The drying parameters of the drying chamber are adjusted in stages according to the preset parameter adjustment step size; After each adjustment, the drying uniformity index is monitored in real time. If the index does not return to the set normal range, the adjustment continues in the same direction until the drying uniformity index returns to the set range.

[0013] On the other hand, the present invention provides a functional food production control system based on AI vision, comprising: The data acquisition module is used to collect surface image sequences of functional foods during the drying process and simultaneously acquire ambient temperature and humidity data inside the drying chamber. The moisture content estimation module is used to construct a nonlinear mapping model between grayscale dispersion, texture roughness entropy, color distribution offset and moisture content. By inputting the real-time extracted drying feature sequence into the mapping model, the corresponding moisture content estimation result is generated to produce a continuous moisture content distribution map covering the food surface, and to non-destructively identify local under-dried and over-dried areas. The drying uniformity assessment module is used to extract drying rate offset blocks based on the moisture content distribution map, and calculate the drying rate deviation amplitude to generate a drying deviation distribution map. By statistically summarizing the deviation values ​​in the drying deviation distribution map, the total drying deviation of each food sample is calculated, and the drying dispersion is formed within the batch range, which is then corrected in combination with temperature and humidity environmental parameters. The local parameter control module is used to generate local control commands based on the drying uniformity index and to control the drying parameters of the drying chamber in different levels. The drying parameters include wind speed, heat flow rate and conveying speed.

[0014] The technical effects and advantages of the functional food production control method and system based on AI vision of the present invention are as follows: This invention introduces a dynamic monitoring and control mechanism for surface moisture content distribution during food drying, achieving refined management of localized drying conditions. Compared to traditional methods relying on overall environmental parameters, it effectively solves the problem of insufficient uniformity caused by localized under-drying and over-drying. By extracting feature indicators such as color shift, grayscale dispersion, and texture roughness at the pixel block level, and combining them with a moisture content mapping model to output a spatial distribution map, the system can accurately identify differences in moisture content on the food surface and construct a drying deviation distribution map in real time. Based on this, the system adjusts the direction of parameters such as wind speed, heat flow, and conveyor belt speed according to the deviation areas, and performs graded adjustments through preset step sizes, achieving simultaneous optimization of targeted and controllable performance. This method significantly improves drying uniformity, reduces the risk of localized quality deterioration, and ensures the stability of food in terms of color, texture, and nutritional value.

[0015] In the processing of functional foods, this method can effectively avoid the destruction of heat-sensitive active ingredients, thereby enhancing the functional efficacy and commercial value of the final product. Furthermore, due to the adoption of a dynamic feedback control strategy, the entire process is adaptive, capable of adapting to fluctuations in the characteristics of different batches and diverse raw materials, thus possessing significant industrial promotion value and large-scale application potential. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of a functional food production control method based on AI vision according to the present invention; Figure 2 This is a schematic diagram of the structure of a functional food production control system based on AI vision according to the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1, Figure 1 This invention discloses a method for controlling the production of functional foods based on AI vision, which includes the following steps: S1. Real-time acquisition of surface image sequences of functional food products passing through the drying process, as well as environmental temperature and humidity data inside the drying chamber; S2. Perform feature extraction on the surface image sequence of functional food, calculate the surface grayscale dispersion, texture roughness entropy and color distribution offset, and extract the surface drying feature sequence. S3. Establish a mapping model between surface drying characteristic sequences and moisture content benchmarks; S4. Perform non-destructive estimation of the moisture content distribution of each food sample to identify samples that are locally under-dried or over-dried. S5. In the surface image of the sample with uneven drying, extract the drying rate offset block, calculate the drying deviation amplitude of each offset block and generate the drying uniformity index. S6. Generate local control commands based on the drying uniformity index, adjust the drying parameters of the drying chamber until the drying uniformity index returns to the set range.

[0019] In S1, a sequence of images of the surface of the functional food undergoing the drying process and environmental temperature and humidity data inside the drying chamber are collected in real time.

[0020] A stable data acquisition system is established during the food drying process to acquire real-time image sequences of the food surface at different drying stages, while simultaneously collecting environmental parameters inside the drying chamber, including dynamic changes in temperature and humidity. In practice, for functional foods undergoing the drying process, a specific station along the transport path is selected as the observation point. This station is located in the middle or end area of ​​the drying chamber to ensure that the acquired data reflects the true surface and environmental conditions of the food during the drying process. A high-resolution industrial camera is deployed at this station as the image acquisition device. The camera is fixed to the outside of the observation window of the drying chamber, with the lens focal length set to the standard focal length range. A fixed aperture and stable shutter speed ensure stable image brightness. To avoid interference from heat flow and steam within the chamber on image clarity, an anti-fog layer and auxiliary light source are installed outside the observation window. The color temperature of the light source is maintained between 5000K and 6000K to provide illumination conditions close to natural light and avoid color casts. The camera performs shooting at a fixed frame rate, for example, set to acquire 10 frames per second, to ensure the formation of a continuous sequence of surface images. The acquired images are color images with a resolution of 1920×1080 pixels or higher, ensuring that key texture details on the surface of individual food items can be fully recorded.

[0021] Meanwhile, ambient temperature and humidity sensors are installed inside the drying chamber. The sensors are positioned approximately 5 to 10 centimeters above the food surface to accurately reflect the airflow environment around the food. The temperature sensors use digital thermocouples or platinum resistance elements with a response time of less than 100 milliseconds, covering the common food drying temperature range (30℃ to 120℃). The humidity sensors employ a capacitive structure, providing accurate sampling within a relative humidity range of 0% to 100%. To avoid data bias caused by single-point measurements, multiple sensing nodes are arranged within the chamber space. For example, two sets of temperature and humidity sensors are placed at the inlet, middle, and outlet. The collected data are synchronized using timestamps and labeled with corresponding spatial location numbers.

[0022] In step S2, feature extraction is performed on the surface image sequence of functional food, and the surface grayscale dispersion, texture roughness entropy value and color distribution offset are calculated to extract the surface drying feature sequence.

[0023] After the food surface image is acquired, the complete image is spatially divided. Specifically, the acquired color food surface image is input into the processing flow and divided into several equally sized pixel blocks according to a preset, fixed grid method. The division method uses a uniform row and column division; for example, a 1920×1080 pixel image is divided into a 32-row × 32-column grid, totaling 1024 pixel blocks, each approximately 60×33 pixels in size. This ensures sufficient pixels in each region for statistical analysis while maintaining high spatial resolution to reflect subtle differences in different parts of the food surface. The division process must ensure equal size, i.e., dividing along the same pixel span in the row and column directions to avoid regional analysis bias caused by uneven size. In practical applications, the granularity of the division can be set according to the complexity of the food surface texture and the significance of uneven drying. For example, a smoother food surface can use larger pixel blocks, while foods with fine textures or irregular surfaces use smaller pixel blocks to facilitate monitoring dynamic changes in details. After the division is completed, each pixel block is treated as an independent analysis unit with a unique row and column number.

[0024] After dividing the image into pixel blocks, color features are extracted for each block. The original color image is converted from RGB color space to Lab color space. Here, L represents luminance, a represents the component from green to red, and b represents the component from blue to yellow. Within each pixel block, the coordinates of all pixels in Lab space are statistically analyzed, and their average coordinates are calculated to obtain the representative color value of that pixel block at that moment. The average Lab values ​​of the same pixel block in consecutive time frames are compiled into a time series, and the changes in this series over time are monitored. When moisture evaporation or browning occurs on the food surface during the drying process, the Lab values ​​show a stable shift trend. For example, in the under-dried state, the L component remains high, while the a and b components do not change significantly; while in the over-dried state, the L component gradually decreases, and the a and b components shift towards red and yellow. By continuously monitoring these temporal shifts, the color distribution shift characteristics of each pixel block during the drying process can be obtained.

[0025] After color feature extraction, the food surface image is converted to grayscale to extract two-dimensional structural information reflecting surface texture and brightness distribution. Specifically, the color image is converted to grayscale using a weighted average, with fixed weights (e.g., 0.3 for red, 0.59 for green, and 0.11 for blue). After conversion, the grayscale image is divided into the same grid as the color image, with grayscale values ​​within each pixel block arranged in row and column order to generate a corresponding two-dimensional matrix. For example, a 60×33 pixel block would have 60 rows and 33 columns, with each matrix cell representing the grayscale intensity at that location. The matrix reflects the overall brightness distribution within the pixel block; uneven drying on the food surface will result in noticeable gradients or local anomalies in the matrix. The matrix construction process maintains a sequential order, strictly arranging pixels from left to right and top to bottom to avoid losing local structural information due to random sampling.

[0026] In the two-dimensional brightness matrix, the brightness variation within each pixel block is quantified to reflect the distribution of brightness differences in local areas. Specifically, the two-dimensional grayscale matrix within each pixel block is traversed row by row and column by column, calculating the grayscale difference between adjacent pixels. Horizontally, the difference is calculated between the grayscale values ​​of two adjacent pixels in the same row; vertically, the difference is calculated between the grayscale values ​​of adjacent pixels in the same column. This obtains the brightness variation amplitude of the pixel block in both horizontal and vertical directions. Then, the variance of all differences within the entire pixel block is calculated and used as an indicator of the dispersion of grayscale variation within that pixel block. To ensure this indicator reflects the non-uniformity of the texture during the drying process, the variance is standardized to eliminate the offset caused by overall brightness variations. A min-max normalization method is used to map the variance values ​​to between 0 and 1. A value closer to 1 indicates a more drastic brightness variation and higher dispersion in the pixel block; a value closer to 0 indicates a more uniform brightness in the area. To ensure the stability of the calculation results, a local neighborhood of 5×5 or 7×7 is selected for calculation in actual implementation.

[0027] Surface texture features are analyzed from a frequency domain perspective. Specifically, the two-dimensional grayscale matrix corresponding to each pixel block is used as input, and a two-dimensional Fourier transform is applied to convert it from the spatial domain to the frequency domain. The resulting spectrum contains the energy distribution of different frequency components, with the low-frequency portion reflecting overall brightness changes and the high-frequency portion reflecting local details and texture features. The energy distribution in the spectrum is divided into several frequency bands, and the proportion of energy in each band to the total energy is statistically analyzed. Then, the entropy value of the energy distribution is calculated using these proportions, serving as a texture roughness index for the pixel block. The entropy value is calculated using the Shannon entropy calculation method based on frequency band energy distribution. Specifically, the proportion of energy in the Fourier-transformed spectral energy intervals to the total energy is used as a probability distribution. Then, each energy proportion is multiplied by its logarithm, the negative is taken, and the results are summed to obtain the energy distribution entropy value of the pixel block. A high entropy value indicates a more dispersed energy distribution and complex texture details; a low entropy value indicates that energy is concentrated in the low-frequency portion, resulting in a smoother surface.

[0028] After obtaining the grayscale dispersion, texture roughness entropy, and color distribution offset, the three types of features are integrated to construct a complete surface drying feature sequence. In practice, these three indicators are extracted frame by frame in chronological order and combined at the level of each pixel block. That is, within the same time frame, each pixel block corresponds to a three-dimensional feature vector composed of grayscale dispersion, texture roughness entropy, and color distribution offset. Stacking these feature vectors in chronological order forms the surface drying feature sequence for that pixel block.

[0029] In step S3, a mapping model is established between the surface drying characteristic sequence and the moisture content benchmark.

[0030] A two-dimensional Cartesian coordinate plane is established based on the row and column indices of pixel blocks, with each pixel block corresponding to a unique coordinate point on this plane. After establishing the coordinate plane, standard food samples with different degrees of dryness are acquired as training data sources. Specifically, food samples from the same batch and made from the same raw materials are selected and dried for different time periods and intensities to cover the entire range from high to low moisture content. For each processed sample, its surface image is acquired, and the pixel block positions are located according to the aforementioned grid division method. Simultaneously, the corresponding moisture content value at the actual physical location of each pixel block is measured using a standard moisture content determination method. For example, if the measured moisture content at a certain pixel block location is 35%, this value is bound and stored with the image features of that pixel block. In this way, the correspondence between image surface features and actual moisture content can be established point by point. To ensure the coverage of training samples, at least 50 samples with different degrees of dryness are typically selected, each containing more than 10 pixel block data, thus ensuring the diversity and representativeness of the data during model training.

[0031] After mapping surface image features to moisture content, a training set is constructed. Specifically, the grayscale dispersion, texture roughness entropy, and color distribution offset of each pixel block are extracted from the aforementioned images, and these three are integrated into a feature vector. Each feature vector corresponds to a measured moisture content value, constituting a record of the training sample. By collecting feature-moisture content pairs for all pixel blocks, a complete training set is formed. A multivariate regression model is selected, and considering the nonlinear relationship between input and output during food drying, nonlinear fitting methods such as multinomial regression or support vector regression are preferred. During training, the training set is divided into training data and validation data to ensure that the model can learn the relationship between features and moisture content while avoiding overfitting. The final output moisture content mapping model can quickly predict the moisture content at the corresponding location after inputting three surface features of any pixel block. The key to establishing this model lies in binding visual features with physical moisture content through statistical regularities, thereby achieving non-destructive moisture detection based on images.

[0032] In step S4, the moisture content distribution of each food sample is non-destructively estimated to identify samples that are locally under-dried or over-dried.

[0033] The aforementioned method has yielded a drying feature sequence including grayscale dispersion, texture roughness entropy, and color distribution offset. This drying feature sequence is then input one by one into a pre-trained moisture content mapping model. The mapping model directly outputs the estimated moisture content of the corresponding pixel block region based on the input feature values. During the operation, the feature sequence is input in batches according to the pixel block coordinates. The model calculates the feature vector of each pixel block sequentially and outputs a corresponding moisture content value. This output data is spatially discrete and distributed as points, with each pixel block representing only a local location in the image. To obtain a continuous overall moisture content distribution, spatial interpolation is performed on these discrete estimation points. The interpolation method uses bilinear interpolation, which smoothly transitions the estimated values ​​between adjacent pixel blocks, thereby generating a continuously distributed numerical grid on the two-dimensional Cartesian coordinate plane. The core of this process is to ensure that there are no abrupt breaks in the estimated moisture content of different regions, but rather a gradual trend. For example, if the estimated moisture content of the central pixel in a certain region is 40%, and the surrounding adjacent pixels are 38% and 42%, the interpolation calculation transforms it into a smooth, sloping distribution, rather than abrupt numerical differences. The final output is a smooth moisture content distribution map covering the entire food surface, which displays the moisture content at any location on the food surface in the form of a two-dimensional matrix.

[0034] After obtaining a smooth moisture content distribution map, the moisture content data in the image is regionally filtered to identify local problems in the food drying process. Specifically, reasonable upper and lower moisture content thresholds are set. The thresholds can be set based on the processing standards and product quality requirements of the food type. For example, if the acceptable moisture content range for a certain type of dried food is 8% to 12%, then the upper limit can be set to 12% and the lower limit to 8%. Data outside this range are considered abnormal areas. The filtering process is performed point-by-point on the two-dimensional distribution map, that is, scanning the estimated moisture content value corresponding to each pixel block one by one and comparing it with the upper and lower thresholds. If the moisture content of a region exceeds the upper limit, the region is marked as an over-dried region; if the moisture content of a region is below the lower limit, the region is marked as an under-dried region. To avoid misjudgment caused by a single outlier, regional aggregation is performed based on spatial adjacency, that is, multiple adjacent outliers are merged into one region to ensure that the filtering results reflect the true drying state. For example, if a dozen or so consecutive pixels at the edge of a food item have a moisture content below 8%, it indicates a significant area of ​​under-drying. Conversely, if a large area in the center of the food item has a moisture content exceeding 12%, it indicates over-drying. After screening, two types of marked areas will be generated on the distribution map: one representing localized under-drying and the other representing localized over-drying.

[0035] In step S5, the drying rate offset blocks are extracted from the surface image of the identified unevenly dried sample, the drying deviation amplitude of each offset block is calculated, and a drying uniformity index is generated.

[0036] After detecting under-dried or over-dried areas on the food surface, a more refined dynamic analysis of moisture content is performed on these areas. In this embodiment, the pixel block division scale in the original two-dimensional Cartesian coordinate plane is reduced. Specifically, each original pixel block is further subdivided into smaller grid units according to a preset reduction ratio. This reduction ratio, as a preset scale, can be set according to the surface texture complexity of the food sample or the precision requirements of the drying process. The refined grid can capture higher-resolution moisture content changes in the smoothed moisture content distribution map in space. Next, in each newly defined refined grid, moisture content data points are extracted according to the time series of the drying process, and difference operations are performed between consecutive time points to calculate the drying rate of each refined grid in each time period. Finally, all refined grids obtain a time series drying rate change curve. These curves record the dynamic drying process of different regions.

[0037] After obtaining the drying rate curve corresponding to the refined grid, abnormal rate fluctuations are identified. In this embodiment, the absolute value of the differential rate change is determined by calculating whether it continuously exceeds a preset drying rate offset threshold. This threshold is set based on the rate statistics under normal food drying processes; for example, it can be selected as the offset threshold by increasing or decreasing the average drying rate of the sample by 20%. If the absolute value of the rate change continuously exceeds this threshold and the duration reaches a preset interval (e.g., 5 time sampling points), it indicates that the drying rate of the refined grid is significantly abnormal during that time period, and thus that time period is marked as an offset segment. For example, if the rate differential change of a refined grid in the early stage of drying is 0.8%, 1.1%, 1.3%, and 1.0%, and the preset offset threshold is 0.7%, then that time period will be marked as an offset segment. This method can distinguish between fluctuations at a single time point and persistent deviations.

[0038] When multiple offset segments (two or more) occur adjacently in time, it is determined whether these segments belong to the same abnormal process. In this embodiment, a rate continuity threshold is designed for this determination. This threshold is set based on the normal rate fluctuation range in the drying process. For example, under normal circumstances, the rate difference jump is usually no more than 0.5%, so the rate continuity threshold can be set to 0.5%. During analysis, the rate difference jump between adjacent offset segments is compared one by one. If this value is less than the threshold, it indicates that the change between adjacent segments is continuous, and two or more segments are merged into a larger offset block. For example, if the final rate change of two adjacent segments is 1.2%, and the starting rate of the next segment is 1.3%, the jump between them is 0.1%, which is less than the 0.5% threshold, so they will be merged into the same offset block. This method avoids the over-segmentation of anomalies, allowing continuous abnormal behavior during the drying process to be identified and tracked holistically.

[0039] After obtaining the offset block, the drying rate deviation within it is quantified. In this embodiment, the drying rate deviation amplitudes for all time periods within the offset block are accumulated one by one to obtain a total drying deviation value. This total value represents the degree of abnormal accumulation in that area throughout the entire drying process. Subsequently, the spatial location corresponding to the offset block needs to be remapped back to the original two-dimensional Cartesian coordinate plane. During the mapping process, according to the refined grid positions involved in the offset block, it is marked as an abnormal region, and the corresponding total drying deviation value is assigned to that region. Finally, the results of all regions are merged to form a drying deviation distribution map covering the food surface. In this distribution map, each region not only reflects whether there is an abnormality in the drying process, but also visually presents the severity of the abnormality through the magnitude of the total deviation value.

[0040] After the drying deviation distribution map is generated, the overall drying anomaly degree of a single food sample is summarized and calculated. In this embodiment, for each marked offset block in the distribution map, the cumulative drying rate deviation value within it is extracted. This deviation value is the total deviation obtained in the previous processing. Then, at the level of a single food sample, the deviation values ​​of all offset blocks are summed item by item to obtain the total drying deviation of that food sample. To ensure the stability and comparability of the calculation results, the grid refinement scale and the sampling interval of the drying process for each food sample are unified to ensure that the total drying deviation of different samples is obtained under the same statistical dimension. When there are multiple food samples in batch production, the total drying deviation of all samples is analyzed as a whole using statistical methods to measure the drying consistency of the entire batch. In this embodiment, the total drying deviation of all food samples in the current production batch is recorded sequentially to form a drying deviation numerical sequence. Then, using this numerical sequence as input, its mean and root mean square deviation are calculated. The root mean square deviation, as an indicator of dispersion, can reflect the degree of difference in drying anomalies among samples within the batch. To avoid the impact of sample size differences on the results, this embodiment requires that the sample size of each batch be no less than 30 to meet statistical stability requirements. In the specific calculation, the average value of the total drying deviation is first determined, then the squared difference between each sample and the average value is calculated, and the average of these squared differences is obtained to obtain the root mean square deviation. A smaller root mean square deviation indicates higher drying consistency among food samples within the batch, while a larger root mean square deviation indicates greater variation.

[0041] During the drying process, the chamber environment conditions have a significant impact on the uniformity of sample drying. Therefore, it is necessary to correct the calculated batch drying dispersion by combining temperature and humidity parameters. In this embodiment, the chamber temperature and humidity curves throughout the entire drying cycle are first obtained through an environmental monitoring device and correlated with the time distribution of the total sample drying deviation. The correction method adopts a weighted correction model, the basic principle of which is to assign corresponding correction weights to different environmental conditions. For example, when the average chamber temperature deviates from the standard process temperature by more than ±2℃, the corresponding dispersion needs to be increased by a certain proportion of weighting factors to reflect the impact of high or low temperatures on drying consistency; similarly, when the humidity fluctuation exceeds 5%, another set of weighting factors is added to the dispersion. Specifically, the original dispersion value is multiplied by the environmental weight coefficient to obtain the corrected dispersion. For example, if the original batch dispersion is 25, and the average temperature is 3℃ higher and the humidity fluctuation range is 8% during the drying process of this batch, then the temperature correction factor is set to 1.1, the humidity correction factor is set to 1.2, and the two are multiplied to obtain a comprehensive correction coefficient of 1.32, and the final corrected dispersion is 33. This weighted correction method allows batch drying dispersion to more accurately reflect the differences in drying of food samples under actual environmental conditions, avoiding misjudgments caused by environmental disturbances.

[0042] In step S6, a local control command is generated based on the drying uniformity index to adjust the drying parameters of the drying chamber until the drying uniformity index returns to the set range.

[0043] The calculated corrected drying dispersion is used as the drying uniformity index. This index is essentially dimensionless, ranging from 0 to 1; a larger value indicates a more uneven distribution during the drying process. To ensure a consistent judgment standard, a threshold is established during the process validation phase. The threshold is set as follows: under stable equipment operation, at least three batches of qualified product samples are selected, and the uniformity index of these samples is calculated for each. The data are then statistically analyzed, and the mean plus twice the standard deviation is used as the threshold setting method. For example, if the mean of the index for the three batches of qualified products is 0.08 and the standard deviation is 0.02, the threshold is set to 0.12. Once determined, this threshold will serve as a reference standard for judging subsequent batches. During actual production, the drying uniformity index of the current batch is calculated for each detection cycle. If the value exceeds the threshold, a local control procedure is triggered. After triggering, areas with significant deviations are extracted from the drying deviation distribution map. Then, the centroid and circumscribed rectangle of each area are calculated and used as the target area window. The distribution map coordinates are mapped to the cavity space. During the equipment debugging phase, the camera and cavity coordinate systems are calibrated, and a lookup table is established. During operation, the surface coordinates of the actual food item can be obtained by looking up the table according to the location. Then, combined with the encoder speed and timestamp of the conveyor belt, the surface coordinates are converted into cavity workstation coordinates, obtaining the time point and position index of the target area entering a certain air duct or heating unit. Finally, a local control command is generated, which includes a timestamp, area number, target workstation number, and parameter adjustment object information.

[0044] After spatial positioning, the dryness status of each target area is determined. The determination method involves reading the identification results of under-dry and over-dry areas from the moisture content distribution map and deviation distribution map. After determination, the direction of parameter adjustment is determined: the direction for under-dry areas is to increase, and the direction for over-dry areas is to decrease. The adjustment objects are limited to three variables: local wind speed, local heat flow, and conveying speed. The step-by-step adjustment uses a fixed step size method, and the step size is determined manually through experiments during the process debugging phase. For example: the step size for wind speed is 5% of the nominal value; if the nominal wind speed is 8.0 m / s, the step size is set to 0.4 m / s; the step size for heat flow is set to 3% of the rated power; if the heating power is 10 kW, the step size is adjusted to 0.3 kW each time; the step size for conveying speed is 2% of the belt speed; if the nominal belt speed is 1.0 m / min, the step size is adjusted to 0.02 m / min each time. The strategy for graded adjustments is as follows: when the target area is determined to be under-dry, the airflow or heat flow rate is increased; when it is determined to be over-dry, the airflow or heat flow rate is decreased. The specific target selected depends on the equipment's process configuration. If a region is within the duct coverage area during adjustment, the primary focus is on the airflow and heat flow rate parameters; if it is within the adjustable zone of the conveyor belt, the heating time in that region is extended or shortened by adjusting the belt speed. Only one grade is applied at a time to avoid over-adjustment.

[0045] After each adjustment, a real-time monitoring process is initiated to ensure the adjustment effect is reflected in the uniformity index. The monitoring method involves recalculating the drying uniformity index in the next detection cycle, which can be set to 10 seconds or the equivalent of the time it takes for the food to pass through one main processing station. If the newly calculated uniformity index still does not return to the set normal range, another adjustment is performed along the original adjustment direction. The normal range is defined as a threshold minus a certain margin; for example, if the threshold is 0.12, the normal range is set to 0.10 and below. When the index value exceeds 0.10, the system determines that further adjustment is needed. There is no limit to the number of consecutive adjustments, but to prevent frequent switching of mechanical parts, a maximum number of consecutive adjustments can be set in the process settings. If the index is still not within the normal range after the maximum number of consecutive adjustments has been used up, manual intervention is required for anomaly analysis. Throughout the monitoring process, the calculation of the uniformity index and the threshold comparison are continuous, ensuring clear quantitative feedback after each adjustment. The closed-loop control logic is as follows: calculation—comparison—judgment—execution—monitoring—re-comparison—re-execution, until the drying uniformity index returns to the set normal range. For example, if the initial uniformity index of a batch is 0.16, exceeding the threshold of 0.12, the system performs an adjustment, increasing the air velocity by 0.4 m / s. The calculated index then decreases to 0.13, still exceeding the normal range, so another adjustment is executed, further increasing the air velocity to 8.8 m / s. The recalculated index is 0.10, returning to the normal range. At this point, the adjustment stops, and the system proceeds to the next batch for testing. This closed-loop approach of gradual adjustment and real-time monitoring ensures that the drying process for each batch remains stable and controllable.

[0046] Example 2: The difference between Example 2 and Example 1 is that this example introduces a functional food production control system based on AI vision.

[0047] Figure 2 A schematic diagram of a functional food production control system based on AI vision is provided according to the present invention. The functional food production control system based on AI vision includes: The data acquisition module is used to collect surface image sequences of functional foods during the drying process and simultaneously acquire ambient temperature and humidity data inside the drying chamber. The moisture content estimation module is used to construct a nonlinear mapping model between grayscale dispersion, texture roughness entropy, color distribution offset and moisture content. By inputting the real-time extracted drying feature sequence into the mapping model, the corresponding moisture content estimation result is generated to produce a continuous moisture content distribution map covering the food surface, and to non-destructively identify local under-dried and over-dried areas. The drying uniformity assessment module is used to extract drying rate offset blocks based on the moisture content distribution map, and calculate the drying rate deviation amplitude to generate a drying deviation distribution map. By statistically summarizing the deviation values ​​in the drying deviation distribution map, the total drying deviation of each food sample is calculated, and the drying dispersion is formed within the batch range, which is then corrected in combination with temperature and humidity environmental parameters. The local parameter control module is used to generate local control commands based on the drying uniformity index and to control the drying parameters of the drying chamber in different levels. The drying parameters include wind speed, heat flow rate and conveying speed.

[0048] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters and thresholds in the formulas are set by those skilled in the art according to the actual situation.

[0049] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0050] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0051] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0052] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0053] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0054] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0055] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0056] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0057] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An AI vision-based functional food production control method, characterized by, The method comprises the following steps: S1, real-time acquisition of a functional food surface image sequence passing through a drying process, and environmental temperature and humidity data inside a drying cavity; S2, performing feature extraction on the functional food surface image sequence, calculating surface gray level dispersion, texture roughness entropy value and color distribution offset, and extracting a surface drying feature sequence; S3, establishing a mapping model between the surface drying feature sequence and a moisture content benchmark; S4, non-destructive estimation of the moisture content distribution of each food sample, and identification of samples with local under-drying and over-drying; S5, in the surface image of the identified unevenly dried sample, extracting a drying rate offset block, calculating the drying deviation amplitude of each offset block, and generating a drying uniformity index; S6, generating a local control instruction based on the drying uniformity index, adjusting the drying parameters of the drying cavity, and returning the drying uniformity index to the set range.

2. The AI vision-based functional food production control method of claim 1, wherein, In S2, the feature extraction on the functional food surface image sequence, the calculation of the surface gray level dispersion, the texture roughness entropy value and the color distribution offset, and the extraction of the surface drying feature sequence specifically comprise: The collected food surface image is divided into equal-size pixel blocks according to a spatial grid; The average coordinates of the pixels in the pixel block are extracted in the Lab color space, and the color distribution offset of the pixel block in the time sequence is monitored; The food surface image is subjected to gray scale processing, and a two-dimensional matrix of the gray scale values corresponding to the pixel block is obtained according to the row and column order of the pixels in the pixel block; The gray level dispersion of each pixel block is extracted by calculating the gray level difference variance between adjacent pixels in the two-dimensional gray scale matrix of each pixel block; A two-dimensional Fourier transform is performed on the two-dimensional gray scale matrix of each pixel block in the frequency domain, and the energy distribution entropy is calculated by counting the energy proportion of different frequency bands in the frequency spectrum, which is taken as the texture roughness entropy value of the corresponding pixel block; The gray level dispersion, texture roughness entropy value and color distribution offset in the time sequence are integrated as the surface drying feature sequence. 3.The AI vision-based functional food production control method of claim 1, wherein, In S3, the mapping model between the surface drying feature sequence and the moisture content benchmark specifically comprises: A two-dimensional rectangular coordinate plane is established according to the spatial grid corresponding to the pixel block of the food surface image; Standard food samples with different drying degrees are collected, and the actual moisture content is measured at each pixel block position in the two-dimensional rectangular coordinate plane to establish the corresponding relationship between the surface drying feature sequence and the moisture content; A training set is constructed with the gray level dispersion, texture roughness entropy value and color distribution offset as input variables and the measured moisture content as output; A multivariate regression model is used to fit the nonlinear relationship between the input and output to establish a moisture content mapping model. 4.The AI vision-based functional food production control method of claim 1, wherein, In S4, the non-destructive estimation of the moisture content distribution of each food sample and the identification of samples with local under-drying and over-drying specifically comprise: The real-time extracted food surface drying feature sequence is input into the moisture content mapping model to output the moisture content estimation value, and the moisture content estimation points are continuously processed by spatial interpolation to generate a smooth moisture content distribution map covering the entire food surface. The moisture content distribution map is used to screen out areas with moisture content higher than the preset upper limit and lower than the preset lower limit, and identify food samples with local under-drying and over-drying. 5.The AI vision-based functional food production control method of claim 1, wherein, In S5, in the identified surface image of the uneven drying sample, the drying rate offset block is extracted, the drying deviation amplitude of each offset block is calculated, and the drying uniformity index is generated, which specifically includes: The moisture content distribution map of the local under-drying or over-drying food sample is refined and grid divided, specifically by re-dividing the spatial grid of the original pixel block by a preset scale reduction in the two-dimensional rectangular coordinate plane; The moisture content difference operation is performed in time sequence, and the drying rate change curve of each refined grid is calculated; In the drying rate change curve, when the absolute value of the local rate change is continuously higher than the set drying rate offset threshold, the corresponding time period is marked as an offset sub-period; Check the difference jump amplitude between adjacent offset sub-periods, and merge adjacent offset sub-periods into offset blocks when the jump amplitude is less than the preset rate continuity threshold; The drying rate deviation amplitude in the offset block is accumulated as the total drying deviation value, and the corresponding drying rate deviation region is mapped back to the two-dimensional rectangular coordinate plane to form a drying deviation distribution map; The drying uniformity index is calculated based on the drying deviation distribution map. 6.The AI vision-based functional food production control method of claim 5, wherein, The drying uniformity index is calculated based on the drying deviation distribution map, which specifically includes: In the drying deviation distribution map, the deviation values of all drying offset blocks are summarized, and the total drying deviation of each food sample is calculated; In the batch production range, the total drying deviation of all samples is statistically processed, and the mean square deviation is calculated as the batch drying dispersion; The temperature and humidity data of the drying cavity are introduced to weight and correct the batch drying dispersion. 7.The AI vision-based functional food production control method of claim 1, wherein, In S6, based on the drying uniformity index, a local control instruction is generated to adjust the drying parameters of the drying cavity until the drying uniformity index returns to the set range, which specifically includes: The corrected drying dispersion is defined as the drying uniformity index, and compared with the preset uniformity index threshold. When the drying uniformity index exceeds the preset threshold, a local control instruction is generated; The drying rate deviation region in the drying deviation distribution map is mapped to the spatial position in the drying cavity to locate the control region; For the control region identified as under-drying, the drying parameter adjustment direction is set to improve, and for the control region identified as over-drying, the drying parameter adjustment direction is set to attenuate; The drying parameters of the drying cavity are adjusted in steps according to the preset parameter adjustment step; After each adjustment, the drying uniformity index is monitored in real time. When the index does not return to the set normal range, continue to adjust in the adjustment direction until the drying uniformity index returns to the set range.

8. An AI vision-based functional food production control system for implementing the AI vision-based functional food production control method of any one of claims 1-7, characterized in that, It includes: A data acquisition module is used to collect surface image sequences of functional food during the drying process, and to synchronously acquire environmental temperature and humidity data inside the drying cavity; The moisture content estimation module is configured to construct a nonlinear mapping model between the gray discrete degree, the texture roughness entropy value, the color distribution offset and the moisture content, input the real-time extracted drying feature sequence into the mapping model, generate a corresponding moisture content estimation result, generate a continuous moisture content distribution map covering the food surface, and nondestructively identify local under-drying and over-drying areas. The drying uniformity evaluation module is configured to extract a drying rate offset block on the basis of the moisture content distribution map, calculate a drying rate deviation amplitude to generate a drying deviation distribution map, statistically summarize the deviation values in the drying deviation distribution map, calculate a total drying deviation amount of each food sample, form a drying dispersion degree within a batch range, and correct the drying dispersion degree in combination with the temperature and humidity environment parameters. The local parameter regulation module is configured to generate a local regulation instruction based on the drying uniformity index, and perform graded regulation on drying parameters of a drying cavity, the drying parameters including a wind speed, a heat flow and a conveying speed.

Citation Information

Cited By

  • Temperature and humidity PID (Proportion Integration Differentiation) control system for alum-free wide vermicelli curing process

    CN121957254A