Method for oil temperature subsection control in termitomyces albuminosus frying process
By using a dual-layer adaptive feature recognition model and real-time temperature monitoring technology, combined with fuzzy logic control, personalized segmented oil temperature control during the deep-frying process of Termitomyces mushrooms was achieved. This solved the problems of unstable quality and poor energy consumption caused by individual differences in traditional processes, and enabled precise temperature regulation and energy consumption optimization.
Patent Information
- Application Number
- CN202511555274.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-06
AI Technical Summary
Traditional deep-frying processes for termite mushrooms ignore individual differences, resulting in uneven heating and unstable quality during frying. They also fail to achieve precise segmented control and have poor energy consumption control.
A dual-layer adaptive feature recognition model is adopted, combined with real-time temperature monitoring and fuzzy logic control technology. High-resolution image acquisition and three-dimensional laser scanning are used to obtain characteristic data of Termitomyces albuminosus, establish a personalized oil temperature control sequence, use a Kalman filter processor to eliminate noise, and a dual-layer game optimization solver to achieve quality and energy consumption optimization.
It enables precise segmented oil temperature control based on individual differences in termite mushrooms, ensuring stable frying quality and optimized energy consumption, and solving the problem that traditional fixed temperature control cannot adapt to individual differences.
Smart Images

Figure CN121478024A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of food production, and in particular relates to a method for oil temperature segmented control in the oil frying process of Grifola frondosa. BACKGROUND
[0002] Grifola frondosa is a valuable edible fungus, and its oil frying processing is widely used in the food industry and catering industry. The traditional oil frying process mainly relies on experience control and fixed temperature setting to realize the processing process. Different specifications of Grifola frondosa are processed in batches by presetting a unified oil temperature parameter. This standardized operation mode is widely used in large-scale industrial production and chain catering enterprises. However, the traditional technology ignores the important influence of individual differences of Grifola frondosa on the oil frying quality. The fixed temperature control parameter cannot adapt to Grifola frondosa samples with different water content, size and density, resulting in uneven heating and unstable quality in the oil frying process. Some samples may appear overcooked or excessive dehydration. At the same time, there is a lack of real-time monitoring and self-adaptive adjustment ability for the dynamic change of temperature in the oil frying process. In the prior art, due to the influence of individual difference factors such as water content, size and density of Grifola frondosa on the optimal oil frying temperature curve, the traditional fixed temperature control strategy cannot dynamically adapt, and cannot adjust the temperature curve according to the specific characteristics of each Grifola frondosa sample. This results in uneven oil frying quality, poor energy control effect, and low temperature segmented control precision. That is, in the prior art, due to the influence of individual difference factors such as water content, size and density of Grifola frondosa on the optimal oil frying temperature curve, the traditional fixed temperature control strategy cannot dynamically adapt, which causes the technical problem that precise segmented control cannot be realized. SUMMARY
[0003] Therefore, the present application provides a method for oil temperature segmented control in the oil frying process of Grifola frondosa, which can solve the technical problem that individual difference factors such as density affect the optimal oil frying temperature curve, and the traditional fixed temperature control strategy cannot dynamically adapt, resulting in the inability to realize precise segmented control.
[0004] This invention is implemented as follows: A method for segmented oil temperature control during the frying of termite mushrooms includes: acquiring frying detection data of termite mushrooms and inputting it into a dual-layer adaptive feature recognition model for processing; the first layer of the dual-layer adaptive feature recognition model performs coarse classification processing on the surface texture image and outputs a coarse classification label for the frying state of the termite mushrooms; the second layer model performs fine classification processing based on the coarse classification label and physical parameters of the frying state of the termite mushrooms and outputs a fine classification label and feature weight coefficients for the frying state of the termite mushrooms; based on the fine classification label and feature weight coefficients of the frying state of the termite mushrooms, corresponding temperature control parameters are selected from a preset oil temperature control strategy library to establish a personalized oil temperature control sequence; during the frying process, multi-point temperature measurements are collected in real time through a distributed temperature sensor array; noise is filtered out from the multi-point temperature measurements using a Kalman filter processor to obtain filtered temperature values; based on a dual-layer game optimization solver, the upper-layer quality optimization objective function and the lower-layer energy consumption optimization objective function are jointly solved to obtain the optimal combination of oil temperature control parameters; and the optimal combination of oil temperature control parameters is transmitted to a temperature actuator to achieve precise segmented oil temperature control.
[0005] Specifically, the step of acquiring fried test data for termite mushrooms involves acquiring surface texture images of the termite mushrooms to be fried using a high-resolution image acquisition device, measuring the length, width, thickness, and volume parameters of the termite mushrooms using a three-dimensional laser scanner, and detecting the water content and density distribution data of the termite mushrooms using a near-infrared spectrometer. The surface texture image, length, width, thickness, volume parameters, water content, and density distribution data are then used as the fried test data for termite mushrooms.
[0006] The dual-layer adaptive feature recognition model is a dual-layer cascaded recognition network based on a visual transformer architecture. The first layer model includes an image preprocessing module, a coarse feature extraction module, and a coarse classification output module. The image preprocessing module performs size normalization and contrast enhancement processing on the input surface texture image. The coarse feature extraction module uses a convolutional neural network structure to extract the basic morphological features of Termitomyces albuminosus. The coarse classification output module maps the basic morphological features to three types of coarse classification labels for the fried state of Termitomyces albuminosus, including pre-fried state type, semi-fried state type, and deep-fried state type.
[0007] The second layer of the dual-layer adaptive feature recognition model contains multiple parallel fine recognition sub-networks. Each fine recognition sub-network corresponds to a coarse classification label for the fried state of Termitomyces mushroom. The fine recognition sub-network uses an attention mechanism to fuse morphological and physical features. The feature fusion weights of the attention mechanism are dynamically adjusted according to the ratio of the length to the width of the Termitomyces mushroom.
[0008] Specifically, the dynamic adjustment of the feature fusion weight is as follows: when the ratio of the length to the width is less than 1.2, the feature fusion weight is set to 0.6; when the ratio is between 1.2 and 2.0, the feature fusion weight is set to 0.8; and when the ratio is greater than 2.0, the feature fusion weight is set to 1.0.
[0009] The dual-layer adaptive feature recognition model optimizes the correlation parameters between the first-layer model and the second-layer model through an inter-layer parameter sharing mechanism. The inter-layer parameter sharing mechanism includes a shared convolutional kernel weight matrix, a shared bias vector, a shared batch normalization parameter, and independent classifier weight coefficients. The gradient backpropagation algorithm is used to update the shared convolutional kernel weight matrix, the shared bias vector, the shared batch normalization parameter, and the independent classifier weight coefficients of the two-layer model simultaneously.
[0010] The inter-layer parameter sharing mechanism dynamically balances the learning rates of shared parameters and independent parameters through a parameter sharing adjustment function. The parameter sharing adjustment function adjusts the update magnitude of shared parameters according to the convergence state of the two-layer game optimization solver. When the convergence error of the game optimization objective function is greater than 0.01, the learning rate of shared parameters is increased to 1.5 times that of independent parameters. When the convergence error is less than 0.01, the learning rate of shared parameters is decreased to 0.8 times that of independent parameters.
[0011] After the frying process is started, the process also includes calculating the temperature gradient change rate and heat transfer efficiency coefficient based on the filtered temperature value. The filtered temperature value, temperature gradient change rate, heat transfer efficiency coefficient and feature weight coefficient are input into the fuzzy logic controller. The fuzzy logic controller calculates and outputs the heating power adjustment amount and temperature setpoint correction amount through membership function mapping and fuzzy inference rules.
[0012] The process of deep-frying includes continuously acquiring images of color changes on the surface of the termite mushroom through a real-time image monitoring device, converting the color change images into standard color values using a color space conversion processor, and triggering a temperature control command generator to generate a temperature adjustment command when the standard color value reaches a preset color threshold.
[0013] The temperature actuator is an electric heating device based on pulse width modulation control, which includes a power adjustment module, a temperature feedback module and a safety protection module. The power adjustment module controls the on-time ratio of the heating element according to the heating power adjustment amount. The temperature feedback module monitors the temperature of the heating element in real time and feeds back the temperature status to the control system. The safety protection module automatically cuts off the power supply to prevent overheating when the temperature exceeds the set safety threshold.
[0014] Specifically, the steps for establishing the termite mushroom feature parameter database of the dual-layer adaptive feature recognition model involve collecting a total of 8,000 termite mushroom samples from different origins, harvest times, and storage conditions. For each termite mushroom sample, five high-resolution images are taken from three angles (front, side, and bottom) using a standardized imaging device. The accurate length, width, thickness, volume parameters, moisture content, and density distribution data of each sample are recorded using measuring equipment. At the same time, experienced sorting personnel manually classify and label each sample, establishing a complete database containing 24,000 labeled images and corresponding physical parameters.
[0015] The training steps of the dual-layer adaptive feature recognition model specifically involve dividing the Termitomyces mushroom feature parameter database into a training set, a validation set, and a test set in a 7:2:1 ratio. A stochastic gradient descent optimizer is used with an initial learning rate of 0.001, a batch size of 64, a maximum training epoch of 300 epochs, and a weighted combination of cross-entropy loss and mean squared error loss with a weight ratio of 0.7 to 0.3. During training, a learning rate decay strategy is adopted, multiplying the learning rate by 0.9 every 50 epochs.
[0016] The two-layer game optimization solver is used to solve a multi-objective optimization problem of quality and energy consumption. The inputs include the surface color evaluation value of Termitomyces albuminosus, the internal moisture retention rate, the texture hardness measurement value, the oil absorption rate value, and the heating energy consumption coefficient. The output is the optimal combination of oil temperature control parameters.
[0017] The Kalman filter processor is used to eliminate measurement noise from the temperature sensor. Its inputs include the original multi-point temperature measurements, the system state transition matrix, the measurement noise covariance matrix, and the process noise covariance matrix. Its output is a high-precision filtered temperature value.
[0018] The fuzzy logic controller is used to achieve adaptive adjustment of oil temperature. Its inputs include the current filtered temperature value, the target temperature setpoint, the temperature deviation, the temperature change rate, and the feature weight coefficient. Its output is a precise heating power adjustment.
[0019] The color space conversion processor is used to quantify the degree of color change on the surface of Termitomyces albuminosus. The inputs include the original color change image, white balance correction parameters, illumination compensation coefficient and color normalization matrix, and the output is an objective standard color value.
[0020] This invention constructs a two-layer adaptive feature recognition model to intelligently identify and classify the surface texture, size parameters, moisture content, and density distribution of Termitomyces albuminosus (chicken mushroom), establishing a personalized oil temperature control sequence. Combined with real-time temperature monitoring and fuzzy logic control technology, it achieves dynamic adjustment, solving the problem that traditional fixed temperature control cannot adapt to individual differences in Termitomyces albuminosus. This invention employs a two-layer game-theoretic optimization solver to jointly solve the objective functions of quality optimization and energy consumption optimization. Through parameter sharing mechanisms and adaptive weight adjustment, it achieves collaborative optimization of the model, overcoming the shortcomings of traditional methods that easily get trapped in local optima in multi-objective optimization. Simultaneously, real-time image monitoring and color space conversion technology enable precise monitoring of the frying process, ensuring that Termitomyces albuminosus with different characteristics can obtain the most suitable temperature control strategy. In summary, this invention solves the technical problem that traditional fixed temperature control strategies cannot dynamically adapt to the influence of individual differences in Termitomyces albuminosus's moisture content, size, density, and other factors on the optimal frying temperature curve, thus failing to achieve precise segmented control. Attached Figure Description
[0021] Figure 1 This is a flowchart of the method of the present invention.
[0022] Figure 2 A schematic diagram of the hardware components for segmented oil temperature control during the deep-frying process of Termitomyces albuminosus.
[0023] Figure 3 This is a schematic diagram of the components of a temperature actuator. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0025] like Figure 1 The diagram shown is a flowchart of a method for segmented oil temperature control during the frying of termite mushrooms provided by the present invention. This method includes the following steps:
[0026] S01. Obtain the surface texture image of the termite mushroom to be fried using a high-resolution image acquisition device. Measure the length, width, thickness, and volume parameters of the termite mushroom using a three-dimensional laser scanner. Detect the water content and density distribution data of the termite mushroom using a near-infrared spectrometer. Input the surface texture image, length, width, thickness, volume parameters, water content, and density distribution data into a dual-layer adaptive feature recognition model for processing.
[0027] S02. The first layer of the dual-layer adaptive feature recognition model performs coarse classification processing on the surface texture image and outputs a coarse classification identifier for the fried state of the termite mushroom. The second layer of the dual-layer adaptive feature recognition model performs fine classification processing based on the coarse classification identifier for the fried state of the termite mushroom and the length, width, thickness, volume parameters, water content, and density distribution data, and outputs a fine classification identifier for the fried state of the termite mushroom and feature weight coefficients.
[0028] S03. Based on the fine classification identifier and feature weight coefficient of the fried state of the termite mushroom, select the corresponding initial oil temperature setting value, heating rate parameter, heat preservation time parameter, cooling gradient parameter and termination oil temperature value from the preset oil temperature control strategy library, and establish a personalized oil temperature control sequence for the current termite mushroom.
[0029] S04. After the frying process is started, the temperature measurement values at multiple points in the frying container are collected in real time by a distributed temperature sensor array. The Kalman filter processor is used to filter out noise from the multi-point temperature measurement values to obtain the filtered temperature values. The temperature gradient change rate and heat transfer efficiency coefficient are calculated based on the filtered temperature values.
[0030] S05. Input the filtered temperature value, temperature gradient change rate, heat conduction efficiency coefficient and the feature weight coefficient into the fuzzy logic controller. The fuzzy logic controller calculates and outputs the heating power adjustment amount and the temperature setpoint correction amount through membership function mapping and fuzzy inference rules.
[0031] S06. The color change images of the surface of Termitomyces albuminosus are continuously acquired by the real-time image monitoring device, and the color space conversion processor is used to convert the color change images into standard color values. When the standard color value reaches the preset color threshold, the temperature control command generator is triggered to generate a temperature adjustment command.
[0032] S07. Based on the two-layer game optimization solver, the upper-layer quality optimization objective function and the lower-layer energy consumption optimization objective function are jointly solved to obtain the optimal oil temperature control parameter combination. The optimal oil temperature control parameter combination is then transmitted to the temperature actuator to achieve precise segmented oil temperature control.
[0033] The dual-layer adaptive feature recognition model is a dual-layer cascaded recognition network based on a visual transformer architecture. The first layer of the dual-layer adaptive feature recognition model includes an image preprocessing module, a coarse feature extraction module, and a coarse classification output module. The image preprocessing module performs size normalization and contrast enhancement on the input surface texture image. The coarse feature extraction module uses a convolutional neural network structure to extract the basic morphological features of Termitomyces albuminosus. The coarse classification output module maps the basic morphological features into three coarse classification labels for the fried state of Termitomyces albuminosus: pre-fried state type, semi-fried state type, and deep-fried state type. The second layer of the dual-layer adaptive feature recognition model contains multiple parallel fine-grained recognition sub-networks. Each fine-grained recognition sub-network corresponds to a coarse classification label for the fried state of *Termitomyces albuminosus*. The fine-grained recognition sub-networks employ an attention mechanism to fuse morphological and physical features. The feature fusion weights of the attention mechanism are dynamically adjusted based on the ratio of the length to the width of the *Termitomyces albuminosus*. When the ratio is less than 1.2, the feature fusion weight is set to 0.6; when the ratio is between 1.2 and 2.0, the feature fusion weight is set to 0.8; and when the ratio is greater than 2.0, the feature fusion weight is set to 1.0. The layer-adaptive feature recognition model optimizes the correlation parameters between the first and second layer models through an inter-layer parameter sharing mechanism. This mechanism includes sharing convolutional kernel weight matrices, bias vectors, batch normalization parameters, and independent classifier weight coefficients. The mechanism uses a gradient backpropagation algorithm to simultaneously update these parameters in both layers. A parameter sharing adjustment function dynamically balances the learning rates of the shared and independent parameters, improving the coarse classification accuracy of the first layer model for the fried state of *Termitomyces albuminosus* and the second layer model. The two-layer model achieves optimal accuracy in fine classification of the fried state of Termitomyces albuminosus. The parameter sharing adjustment function adjusts the update magnitude of the shared parameters according to the convergence state of the two-layer game optimization solver. When the convergence error of the game optimization objective function is greater than 0.01, the learning rate of the shared parameters is increased to 1.5 times that of the independent parameters. When the convergence error is less than 0.01, the learning rate of the shared parameters is decreased to 0.8 times that of the independent parameters. The parameter sharing adjustment function forms a positive feedback constraint on the two-layer game optimization solver, prompting the upper-layer quality optimization objective function and the lower-layer energy consumption optimization objective function to converge quickly to the Nash equilibrium solution.
[0034] The steps for establishing the termite mushroom feature parameter database of the dual-layer adaptive feature recognition model specifically include collecting a total of 8,000 termite mushroom samples from different origins, harvesting times, and storage conditions. For each termite mushroom sample, five high-resolution images are taken from three angles (front, side, and bottom) using a standardized imaging device. The accurate length, width, thickness, volume parameters, moisture content, and density distribution data of each sample are recorded using measuring equipment. At the same time, experienced sorting personnel manually classify and label each sample, establishing a complete database containing 24,000 labeled images and corresponding physical parameters.
[0035] The training steps of the dual-layer adaptive feature recognition model specifically include dividing the termite mushroom feature parameter database into training, validation, and test sets in a 7:2:1 ratio; using a stochastic gradient descent optimizer with an initial learning rate of 0.001, a batch size of 64, and a maximum training epoch of 300; employing a weighted combination of cross-entropy loss and mean squared error loss with a weight ratio of 0.7:0.3; using a learning rate decay strategy during training, multiplying the learning rate by 0.9 every 50 epochs; and using data augmentation techniques including random rotation, horizontal flipping, brightness adjustment, and noise addition to expand the training samples. When the overall accuracy on the validation set shows no improvement for 15 consecutive epochs, an early stopping mechanism is triggered to terminate training. Ultimately, the model achieves a coarse classification accuracy of 98.2% and a fine classification accuracy of 95.7% for the fried state of termite mushrooms on the test set.
[0036] The two-layer game optimization solver function is used to solve a multi-objective optimization problem of quality and energy consumption. The inputs include the surface color evaluation value of Termitomyces albuminosus, the internal moisture retention rate, the texture hardness measurement value, the oil absorption rate value, and the heating energy consumption coefficient. The output is the optimal combination of oil temperature control parameters.
[0037] The Kalman filter processor function is used to eliminate measurement noise from the temperature sensor. The inputs include the original multi-point temperature measurements, the system state transition matrix, the measurement noise covariance matrix, and the process noise covariance matrix. The output is a high-precision filtered temperature value.
[0038] The fuzzy logic controller function is used to achieve adaptive adjustment of oil temperature. The inputs include the current filtered temperature value, the target temperature setpoint, the temperature deviation, the temperature change rate, and the feature weight coefficient. The output is the precise heating power adjustment amount.
[0039] The color space conversion processor function is used to quantify the degree of color change on the surface of Termitomyces albuminosus. The inputs include the original color change image, white balance correction parameters, illumination compensation coefficient and color normalization matrix, and the output is an objective standard color value.
[0040] The feature fusion weight adjustment function is used to adjust the feature fusion weights of the attention mechanism in the two-layer adaptive feature recognition model. The function calculates the fusion adaptability evaluation value based on the ratio of the length to the width of the Termitomyces mushroom, the thickness uniformity index, and the density variation coefficient. When the fusion adaptability evaluation value is in the range of 0 to 0.4, a linearly increasing weight adjustment function is used to adjust the feature fusion weight parameters. When the fusion adaptability evaluation value is in the range of 0.4 to 0.8, an exponentially increasing weight adjustment function is used to adjust the feature fusion weight parameters. When the fusion adaptability evaluation value is in the range of 0.8 to 1.0, a logarithmically increasing weight adjustment function is used to adjust the feature fusion weight parameters.
[0041] The temperature actuator is an electric heating device based on pulse width modulation control, which includes a power adjustment module, a temperature feedback module, and a safety protection module. The power adjustment module controls the on-time ratio of the heating element according to the heating power adjustment amount. The temperature feedback module monitors the temperature of the heating element in real time and feeds back the temperature status to the control system. The safety protection module automatically cuts off the power supply to prevent overheating when the temperature exceeds a set safety threshold.
[0042] The oil temperature control strategy library is a pre-established multi-dimensional parameter lookup table containing temperature control parameter combinations that are finely categorized and identified for different fried states of Termitomyces mushrooms. Each parameter combination includes an initial oil temperature setpoint ranging from 120°C to 180°C, a heating rate parameter ranging from 2°C per minute to 8°C per minute, a holding time parameter ranging from 3 minutes to 12 minutes, a cooling gradient parameter ranging from 1°C per minute to 5°C per minute, and a termination oil temperature value ranging from 80°C to 120°C. The oil temperature control strategy library was established through statistical analysis of a large amount of experimental data to ensure that different types of Termitomyces mushrooms obtain the best fried quality.
[0043] The parameter sharing adjustment function is a dynamic learning rate adjustment algorithm used to balance the update speed of shared and independent parameters in the two-layer adaptive feature recognition model. The parameter sharing adjustment function monitors the convergence status of the objective function of the two-layer game optimization solver. By adjusting the learning rate multiples of the shared convolution kernel weight matrix, shared bias vector, and shared batch normalized parameters, the model training process and the game optimization process form a synergistic feedback. When the convergence speed of the game model is too fast, the learning rate of the shared parameters is reduced to avoid overfitting. When the convergence speed of the game model is too slow, the learning rate of the shared parameters is increased to accelerate convergence, thereby forming an adaptive constraint adjustment effect on the two-layer game optimization solver.
[0044] The specific implementation methods of the above steps are described in detail below.
[0045] The specific implementation of step S01 involves accurately acquiring the characteristic parameters of *Termitomyces albuminosus* through multi-dimensional data acquisition. First, a high-resolution image acquisition device uses an industrial camera with a resolution of at least 1920×1080 pixels to capture images of the surface texture of the *Termitomyces albuminosus* under standardized lighting conditions. The light intensity is set to 1200 lumens, and the exposure time is controlled between 1 / 60 and 1 / 30 of a second. A 3D laser scanner uses the principle of structured light projection, reconstructing the 3D morphology of the *Termitomyces albuminosus* by projecting coded stripe patterns and calculating the phase difference. The scanning accuracy reaches 0.1 mm, and the measurement range covers a length of 10 mm to 80 mm, a width of 5 mm to 60 mm, and a thickness of 2 mm to 25 mm. A near-infrared spectrometer operates in the wavelength range of 900 nm to 1700 nm, using diffuse reflectance measurement mode to detect the internal water content of the *Termitomyces albuminosus*. The spectral resolution is set to 2 nm, the integration time is 100 milliseconds, and a quantitative relationship model between spectral data and water content is established using a partial least squares regression algorithm. Density distribution data were obtained using X-ray computed tomography (CT) with a slice thickness of 0.5 mm and a reconstruction matrix size of 512×512 pixels. Image segmentation algorithms were used to extract the distribution features of different density regions.
[0046] The specific implementation of step S02 is to achieve progressive classification of the fried state of Termitomyces albuminosus based on a hierarchical recognition architecture. The first layer of the two-layer adaptive feature recognition model uses a convolutional neural network for coarse classification. The network structure includes four convolutional layers and two fully connected layers, with convolutional kernel sizes of 7×7, 5×5, 3×3, and 3×3, and strides of 2, 1, 1, and 1. The activation function is a modified linear unit function. The image preprocessing module first scales the input image size to 224×224 pixels, and then uses histogram equalization to enhance image contrast, with a contrast enhancement factor set to 1.5. The coarse feature extraction module extracts the morphological features of Termitomyces albuminosus through multi-scale feature fusion, including geometric features such as edge sharpness, texture roughness, and surface smoothness. The second-layer model uses an attention mechanism to fuse morphological and physical features. The attention weight calculation is based on feature importance scoring, and the scoring function combines feature variance, mutual information, and correlation coefficient. The dynamic adjustment of feature fusion weights is based on the piecewise function of the aspect ratio of Termitomyces albuminosus. When the aspect ratio is less than 1.2, the weight of morphological features is set to 0.6 and the weight of physical features is 0.4. When the aspect ratio is between 1.2 and 2.0, the weights are adjusted to 0.8 and 0.2. When the aspect ratio is greater than 2.0, the weights are set to 1.0 and 0.0.
[0047] The specific implementation of step S03 is to select the optimal control parameters from a preset strategy library based on a decision tree matching algorithm. The oil temperature control strategy library adopts a multi-dimensional index structure, using the fine classification identifier of the fried state of *Termitomyces albuminosus* as the primary key and feature weight coefficients as auxiliary keys to establish a lookup table. For the pre-fried state type, the initial oil temperature is set to 120℃ to 140℃, with a heating rate of 2℃ to 4℃ per minute; for the semi-fried state type, the initial oil temperature is set to 140℃ to 160℃, with a heating rate of 4℃ to 6℃ per minute; for the deep-fried state type, the initial oil temperature is set to 160℃ to 180℃, with a heating rate of 6℃ to 8℃ per minute. The holding time parameter is dynamically adjusted according to the volume of the *Termitomyces albuminosus*, with a volume smaller than 5... Keep warm for 3 to 5 minutes, with a volume between 5 Up to 15 Keep warm for 5 to 8 minutes, with a volume greater than 15. Keep warm for 8 to 12 minutes. The personalized oil temperature control sequence is generated through a time-series programming algorithm, which optimizes the temperature change trajectory throughout the frying process based on dynamic programming principles.
[0048] The specific implementation of step S04 involves using a distributed sensor network to accurately measure the temperature field inside the frying container. The distributed temperature sensor array comprises nine platinum resistance temperature sensors, arranged in a 3×3 matrix on the bottom and sidewalls of the frying container. The sensor accuracy is ±0.1℃, and the response time is less than 1 second. A Kalman filter processor uses a linear Kalman filter algorithm to eliminate measurement noise. The state vector includes the temperature value and the rate of temperature change. The state transition matrix is a 2×2 identity matrix. The measurement noise covariance is set to 0.01, and the process noise covariance is set to 0.001. The rate of temperature gradient change is calculated using the finite difference method, employing a central difference scheme to improve calculation accuracy. The time step is set to 0.5 seconds. The thermal conductivity coefficient is calculated based on Fourier's law of heat conduction, considering the combined effects of oil thermal conductivity, the heat capacity of the mushroom, and the heat transfer area. The reference value for thermal conductivity is 0.2 W / m Kelvin, and the reference value for heat capacity is 2500 J / kg Kelvin.
[0049] The specific implementation of step S05 involves using fuzzy logic reasoning to achieve intelligent oil temperature regulation. The fuzzy logic controller comprises three main modules: fuzzification, inference, and defuzzification. The input variables are temperature deviation and temperature change rate, and the output variable is the heating power adjustment amount. The fuzzification module uses a triangular membership function, dividing the temperature deviation into five fuzzy sets: negative large, negative small, zero, positive small, and positive large. The membership function parameters are set based on empirical data: negative large range is -10℃ to -5℃, negative small range is -5℃ to -1℃, zero range is -1℃ to 1℃, positive small range is 1℃ to 5℃, and positive large range is 5℃ to 10℃. The inference module uses the Mamdani inference method, establishing 25 fuzzy rules covering all input combinations. The rule format is: if the temperature deviation is negative large and the temperature change rate is negative small, then the heating power adjustment amount is positive large. The defuzzification module uses the centroid method to calculate the precise control output, with a heating power adjustment range of 0 to 100% and a temperature setpoint correction range of -5℃ to 5℃.
[0050] The specific implementation of step S06 involves quantitatively assessing the surface color of the termite mushroom through color space conversion. A real-time image monitoring device uses a high-speed camera with a frame rate set to 30 frames per second to ensure the capture of dynamic color changes during frying. The color space conversion processor converts the RGB color space to the LAB color space, which better reflects the human eye's perception of color differences. The conversion process first performs white balance correction, with correction parameters determined based on the reflectance of a standard white board. Then, illumination compensation is performed, with the compensation coefficient dynamically adjusted based on the scene's illumination intensity. Standard chromaticity value calculation includes luminance (L), red-green hue (a), and yellow-blue hue (b). Preset color thresholds are determined based on the optimal frying effect of the termite mushroom, with L value thresholds ranging from 40 to 60, a value thresholds ranging from 10 to 25, and b value thresholds ranging from 20 to 40. When any chromaticity value reaches its corresponding threshold, a temperature control command generator is triggered to generate a corresponding temperature adjustment command. The command types include four types: heating up, cooling down, heat preservation, and stopping heating.
[0051] The specific implementation of step S07 involves using a two-level game theory to solve the multi-objective optimization problem of quality and energy consumption. The two-level game optimization solver decomposes the problem into two sub-problems: an upper-level quality optimization and a lower-level energy consumption optimization. The upper-level objective function comprehensively considers color evaluation, moisture retention rate, texture hardness, and oil absorption rate, while the lower-level objective function primarily optimizes the heating energy consumption coefficient. The solution process employs a Stackelberg game model, where the upper-level player, acting as the leader, first determines the quality optimization strategy, and the lower-level player, acting as the follower, seeks the optimal energy consumption scheme under the given quality strategy. The Nash equilibrium solution is obtained through an iterative algorithm, with each iteration comprising two stages: upper-level optimization and lower-level response. The convergence criterion is that the difference between the objective function values of two consecutive iterations is less than 0.001. The optimal oil temperature control parameter combination includes segmented temperature setpoints, heating power sequences, and holding time allocations. These parameters are transmitted to the temperature actuator, where pulse width modulation control achieves precise temperature regulation.
[0052] The two-layer adaptive feature recognition model adopts a layered cascaded architecture based on deep learning. The overall network structure consists of seven core parts: an input layer, a data preprocessing layer, a first-layer coarse classification network, a feature fusion layer, a second-layer fine classification network, a decision fusion layer, and an output layer. The input layer receives multimodal data input, including high-resolution surface texture images, three-dimensional geometric parameter vectors, water content scalar values, and density distribution tensors. The data formats are 224×224×3 RGB image matrices, 1×6 geometric parameter vectors, 1×1 water content scalars, and 32×32 density distribution matrices, respectively. The data preprocessing layer employs a multi-channel parallel processing architecture. The image channel uses BatchNorm batch normalization and ReLU activation function for standardization. The geometric parameter channel uses minimum-maximum normalization to scale the numerical range to between 0 and 1. The water content channel uses z-score normalization to eliminate the influence of dimensions. The density distribution channel uses Gaussian filtering and edge detection algorithms to extract texture features. The first coarse classification layer is built on an improved ResNet-101 backbone architecture, containing five residual block groups. Each residual block group contains three convolutional layers and one skip connection, with convolutional kernel sizes of 1×1, 3×3, and 1×1, and the number of channels increasing from 64 to 1024. The network uses global average pooling instead of traditional fully connected layers to reduce the number of parameters. The pooled feature vector has a dimension of 1024, and the Softmax activation function outputs three coarse classification probability distributions, corresponding to pre-fried, semi-fried, and deeply fried states, respectively. The feature fusion layer uses a multi-head attention mechanism to adaptively fuse morphological and physical features. The attention mechanism contains eight parallel attention heads, each with a query matrix, key matrix, and value matrix of 128×64 dimensions. Attention weights are calculated by scaling the dot product attention. The fusion strategy uses a weighted summation method, with weight coefficients dynamically adjusted based on feature importance scores. The scoring function combines feature variance, information entropy, and Pearson correlation coefficient. The second-layer fine-grained classification network comprises three parallel Transformer encoder subnetworks. Each subnetwork corresponds to a coarse classification result from the first layer. The subnetwork structure uses a stacked design of six encoder blocks. Each encoder block contains a multi-head self-attention sublayer and a position feedforward sublayer. The number of heads in the multi-head attention mechanism is set to 16. The hidden layer dimension is 768, and the intermediate layer dimension of the feedforward network is 3072. The position encoding uses a sine-cosine encoding method, with the encoding dimension consistent with the hidden layer dimension. The output layer of each subnetwork uses a two-layer fully connected network. The first layer has 256 neurons, and the second layer output corresponds to the number of categories in the fine-grained classification: 5 categories for the pre-fried state, 7 categories for the semi-fried state, and 4 categories for the deep-fried state.The decision fusion layer employs an ensemble learning method to combine the prediction results of the first and second layers. The fusion strategy is based on confidence-weighted voting, with confidence calculation considering the entropy value of the predicted probability and a consistency index. The output layer generates the final refined classification label and corresponding feature weight coefficients, which are used to guide the subsequent selection of oil temperature control strategies.
[0053] The training dataset creation process encompasses six key stages: sample planning, data collection, quality assessment, annotation and processing, data validation, and storage management. In the sample planning stage, a sampling strategy was developed based on the biological characteristics and market distribution of Termitomyces albuminosus (chicken mushroom), employing stratified sampling design along four dimensions: variety type, origin distribution, harvesting season, and storage method. Variety types included four main types: white, yellow, black, and spotted. Each variety was collected in three size grades (large, medium, and small) to ensure representativeness and diversity. Origin distribution covered 12 prefectures and cities in Yunnan Province, 8 regions in Sichuan Province, 6 counties in Guizhou Province, and 4 production areas in Guangxi Zhuang Autonomous Region, with at least 200 samples collected from each area to fully reflect regional differences. Harvesting seasons were conducted across four periods: early rainy season, mid-rainy season, late rainy season, and dry season, spanning a continuous 18 months to ensure comprehensive coverage of the impact of seasonal changes on the quality of Termitomyces albuminosus. Storage methods include four conditions: immediate processing, room temperature storage, low-temperature refrigeration, and ultra-low temperature freezing, with storage times of 0 days, 1 day, 3 days, 7 days, and 15 days, respectively. Storage temperatures are 25℃, 4℃, and -18℃, with relative humidity of 60% and 85% respectively. Humidity is not considered under freezing conditions. The data acquisition phase employs a standardized multi-device collaborative acquisition process. Image acquisition utilizes a fixed multi-angle shooting system, consisting of five industrial cameras positioned directly above, at 45 degrees to the left, 45 degrees to the right, directly in front, and directly behind. The camera model is AVTManta G-895B, with a resolution of 4008×2672 pixels, a lens focal length of 25mm, and a fixed aperture of f / 5.6. The lighting system combines a ring LED array and a top parallel light source. The ring LED has a power of 200 watts and a color temperature of 6500K, while the top parallel light source has a power of 150 watts and a color temperature of 5000K, achieving a light uniformity of over 95%. The background panel uses a neutral gray matte material with a grayscale value of 128 and a reflectance of 18%, ensuring image background consistency. 3D measurement employs a combination of a structured light scanner and a laser rangefinder. The structured light scanner is an ATOS Triple Scan with a scanning accuracy of 0.02 mm, a measurement range of 150 × 110 × 100 mm, and a scanning speed of 2 million measurement points per second. Moisture content detection uses a dual verification mechanism combining near-infrared spectroscopy and gravimetric analysis. The near-infrared spectroscopy instrument is a NIRSystems 6500 with a wavelength range of 400 nm to 2500 nm, a resolution of 2 nm, and an integration time of 32 ms. Gravimetric analysis uses a precision electronic balance, a Sartorius BSA224S, with an accuracy of 0.1 mg. Sample processing includes fresh weight measurement and dry weight measurement after drying at 105°C for 24 hours.Density distribution measurements were performed using a SkyScan 1272 X-ray microcomputed tomography (CT) scanner with a spatial resolution of 0.5 micrometers, a scanning voltage of 100 kV, and a scanning current of 100 microamps. Each sample generated 800 tomographic images. A multi-level quality control system was established for the quality assessment phase. Image quality assessment used three indicators: blurriness detection, exposure detection, and color shift detection. The blurriness threshold was set at 0.02, the exposure threshold ranged from 20 to 235, and the color shift threshold was 10%. Geometric measurement quality assessment employed repeatability and cross-validation methods, with each sample measured three times, and the measurement error controlled within 1%. Moisture content determination quality assessment used standard sample calibration and parallel sample determination, with the standard deviation controlled within 2%. Density distribution measurement quality assessment used image reconstruction quality indicators and artifact detection algorithms; only data with a reconstruction quality score higher than 85 were included in the database.
[0054] The model training process employs a phased iterative cross-training strategy, comprising four main stages: first-layer pre-training, second-layer classification training, cross-feedback training, and global optimization training. In the first-layer pre-training stage, the coarse classification network is trained independently using all 24,000 images and their corresponding coarse classification labels, divided into training, validation, and test sets in an 8:1:1 ratio. Network initialization utilizes the Kaiming normal distribution initialization method with a learning rate of 0.01, a batch size of 32, and a stochastic gradient descent optimizer with a momentum parameter of 0.9 and a weight decay coefficient of 0.0001. Cross-entropy loss is used as the loss function, and cosine annealing is employed for learning rate scheduling, with a minimum learning rate of 0.001 and a 50-epoch duration. Data augmentation strategies include random cropping, random rotation, random flipping, color dithering, and Gaussian noise addition, with augmentation probabilities of 0.8, 0.6, 0.5, 0.4, and 0.3, respectively. The first layer pre-training ran for 150 epochs. An early stopping mechanism was triggered when the validation set accuracy showed no improvement for 10 consecutive epochs, ultimately achieving a coarse classification accuracy of 98.2%. In the second layer classification training phase, the training data was divided into three subsets based on the first layer's coarse classification results, and corresponding fine classification sub-networks were trained for each subset. The pre-fried state sub-network was trained using 7200 images, with training labels containing 5 fine categories: excellent fried state, good fried state, average fried state, poor fried state, and unsuitable fried state. The semi-fried state sub-network was trained using 10800 images, with training labels containing 7 fine categories, covering different levels of semi-fried state. The deep fried state sub-network was trained using 6000 images, with training labels containing 4 fine categories, corresponding to different levels of deep fried state. The training parameters for each sub-network were set to a learning rate of 0.005, a batch size of 16, 100 training epochs, and the AdamW optimizer with a learning rate decay factor of 0.95 and a weight decay coefficient of 0.01. The initial values of the feature fusion weights are set based on the feature importance scores, with morphological feature weights initially set at 0.7 and physical feature weights at 0.3. These weights are dynamically adjusted during training. A feedback mechanism is established between the first and second layers during the cross-feedback training phase. The feedback threshold is calculated using the confidence and accuracy of the second-layer fine-classification. The confidence threshold is calculated based on the entropy value of the predicted probability: an entropy value less than 0.5 indicates high confidence, greater than 1.5 indicates low confidence, and values between 0.5 and 1.5 indicate moderate confidence. The accuracy threshold is determined based on the classification accuracy on the validation set. When the fine-classification accuracy falls below 90%, the first-layer parameter adjustment mechanism is triggered.The feedback adjustment strategy includes three aspects: learning rate adjustment, weight decay adjustment, and network structure fine-tuning. The learning rate is adjusted by 0.1 to 0.5 times the original learning rate, the weight decay is adjusted by 0.5 to 2.0 times the original value, and the network structure fine-tuning includes adding or deleting residual connections and adjusting the number of channels. Feedback training lasts for 50 epochs, with feedback evaluation and parameter adjustment every 10 epochs. The feedback threshold is dynamically updated, initially at 0.8 and eventually stabilized at 0.92. In the global optimization training phase, the entire two-layer network is jointly trained end-to-end, employing a multi-task learning strategy to simultaneously optimize both coarse and fine classification losses. The loss function uses a weighted combination, with a coarse classification loss weight of 0.3 and a fine classification loss weight of 0.7. The weight ratio is dynamically adjusted based on the loss convergence during training. The joint training learning rate was set to 0.002, the batch size to 24, and the training epochs to 80 epochs. A cyclic learning rate strategy was employed, with a maximum learning rate of 0.005, a minimum learning rate of 0.0005, and a cycle time of 20 epochs. Dropout regularization was used with a dropout probability of 0.2, and label smoothing was employed with a smoothing parameter of 0.1. After training, the overall accuracy of the two-layer model on the test set reached 96.8%, with a coarse classification accuracy of 98.5% and a fine classification accuracy of 95.7%. The model inference speed was 25 frames per second, meeting the requirements for real-time applications.
[0055] The key technical ideas of this invention are mainly reflected in the following three aspects. The first key technical idea is a hierarchical recognition architecture of a two-layer adaptive feature recognition model. This architecture effectively solves the recognition problem caused by the morphological diversity and feature complexity of *Termitomyces albuminosus* through a two-layer processing mechanism of coarse classification and fine classification. Compared with traditional single-layer recognition methods, the two-layer architecture can significantly improve processing efficiency while ensuring recognition accuracy. The first layer of rapid coarse classification reduces computational complexity, while the second layer of fine classification ensures recognition accuracy. The inter-layer parameter sharing mechanism avoids parameter redundancy and improves the model's generalization ability by sharing the convolution kernel weight matrix and bias vector. The dynamic feature fusion weight adjustment mechanism adaptively adjusts the fusion ratio of morphological and physical features according to the geometric features of *Termitomyces albuminosus*, which can more accurately capture the feature differences of different morphologies of *Termitomyces albuminosus* compared to fixed-weight fusion methods. The second key technical idea is a comprehensive feature extraction method based on multimodal data fusion. This method organically integrates surface texture images, three-dimensional geometric parameters, water content data, and density distribution information to construct a comprehensive feature description system for *Termitomyces albuminosus*. Compared to traditional methods relying solely on visual features, multimodal fusion provides richer and more accurate feature information. In particular, near-infrared spectroscopy-based moisture content data reflects the intrinsic quality state of *Termitomyces albuminosus*, three-dimensional geometric parameters accurately describe morphological characteristics, and density distribution data reveals internal structural features. This multi-dimensional feature fusion significantly improves the model's ability to distinguish between *Termitomyces albuminosus* of different qualities. The third key technical approach is a quality and energy consumption co-optimization mechanism implemented through a two-layer game optimization solver. This mechanism models the frying process as a two-layer game problem involving upper-layer quality optimization and lower-layer energy consumption optimization, seeking a Nash equilibrium solution through Stackelberg game theory. Compared to traditional single-objective optimization methods, the two-layer game mechanism minimizes energy consumption while ensuring frying quality, achieving a balance between quality and efficiency. The game model considers the interrelationship between quality and energy consumption objectives, finding the optimal oil temperature control strategy through an iterative optimization process, avoiding the problem of balancing quality and energy consumption in traditional methods.
[0056] The synergistic effect of these three key technological approaches forms a complete intelligent oil temperature control system, significantly improving the automation level and control precision of the frying process of Termitomyces mushrooms. The dual-layer recognition model provides accurate feature identification of Termitomyces mushrooms, offering a reliable basis for subsequent control strategy selection; multimodal feature fusion enhances the robustness and adaptability of the model, enabling the system to handle various types of Termitomyces mushrooms; and dual-layer game optimization ensures the optimality and practicality of the control strategy. These three elements work together to form a complete technological chain from feature identification to strategy optimization to precise control. Compared to traditional experience-driven frying control methods, the technical solution of this invention achieves scientific, precise, and intelligent oil temperature control, providing crucial technical support for the technological upgrading of the Termitomyces mushroom processing industry.
[0057] Specifically, the principle of this invention is as follows: The fundamental principle behind the technical solution of this invention in solving the aforementioned core technical problems lies in establishing a complete closed-loop system from feature recognition to control execution, achieving personalized temperature control through multi-dimensional perception and intelligent decision-making. The dual-layer adaptive feature recognition model adopts a cascaded network structure with a visual transformer architecture. The first-layer model performs coarse classification of the surface texture of the termite mushroom, while the second-layer model performs fine classification by combining morphological and physical features. Through an attention mechanism, the feature fusion weights are dynamically adjusted, accurately identifying the feature differences between different termite mushroom samples and outputting corresponding classification labels and weight coefficients. Based on the classification results, matching control parameters such as initial oil temperature, heating rate, and holding time are selected from a preset strategy library to establish a targeted temperature control sequence, solving the problem that traditional unified control strategies cannot adapt to individual differences. During the frying process, multi-point temperature acquisition is performed through a distributed temperature sensor array. A Kalman filter processor is used to eliminate measurement noise and obtain high-precision temperature data, calculating the temperature gradient change rate and heat transfer efficiency coefficient, providing accurate state information for subsequent control decisions. The fuzzy logic controller receives filtered temperature data and feature weight coefficients, and calculates the output power adjustment and temperature correction through membership function mapping and fuzzy inference rules, achieving adaptive temperature control. The two-layer game optimization solver simultaneously considers two objective functions: quality optimization and energy consumption optimization. It obtains the optimal control parameter combination through Nash equilibrium, avoiding local optima problems that may arise from single-objective optimization and ensuring the global optimality of the control strategy. The entire system achieves coordinated feedback between model training and game optimization through inter-layer parameter sharing and parameter adjustment functions. When the game convergence state changes, the learning rate of the shared parameters is automatically adjusted, forming an adaptive constraint adjustment effect, ensuring the system's stability and convergence.
[0058] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0059] The specific implementation of step S01 involves obtaining the characteristic parameters of Termitomyces albuminosus through multi-dimensional data acquisition and standardization processing. The surface texture image acquired by the high-resolution image acquisition device, after preprocessing, is standardized using the following formula: In the formula, These are the standardized pixel values; For the original image in coordinates Pixel value at; The mean of the original image; This represents the standard deviation of the original image. The geometric parameters measured by the 3D laser scanner are normalized using the following formula: In the formula, These are the normalized geometric parameters; These are the original measured values; and These represent the minimum and maximum values of the parameter, respectively. The water content value detected by the near-infrared spectrometer is calculated using the spectral absorption coefficient, and the calculation formula is: In the formula, This represents the percentage of water content. , , The spectral absorption values are at wavelengths of 1450 nm, 1940 nm, and 1200 nm, respectively. , , These are regression coefficients, with values ranging from 0.15 to 0.25, 0.35 to 0.45, and 0.05 to 0.15, respectively. This is the intercept term, with a value range of 5 to 15.
[0060] The specific implementation of step S02 is based on feature extraction and classification using a two-layer adaptive feature recognition model. The dynamic adjustment formula for feature fusion weights is as follows: In the formula, For feature fusion weights; Aspect ratio; It is the thickness uniformity index; The density variation coefficient; This is an adaptive adjustment function. The aspect ratio calculation formula is: In the formula, This represents the maximum length dimension of Termitomyces albuminosus; This represents the maximum width dimension. The formula for calculating the thickness uniformity index is: In the formula, The standard deviation of the thickness measurement values; This represents the average of the thickness measurements. The formula for calculating the density coefficient of variation is: In the formula, The standard deviation of the density distribution; This represents the mean of the density distribution. The formula for calculating the fusion adaptability assessment value is: In the formula, This is the integration adaptability assessment value; The normalized aspect ratio is calculated using the following formula: ,in This represents the maximum aspect ratio in the dataset, with a value of 5.0.
[0061] The specific implementation of step S03 involves selecting control parameters based on the refined classification identifier and feature weight coefficients. The time-series planning of the personalized oil temperature control sequence employs a dynamic programming algorithm, with the state transition equation as follows: In the formula, For a moment State value function; This is the current state; For control input; For instant reward functions; This is a discount factor, ranging from 0.9 to 0.95. The formula for calculating the initial oil temperature setpoint is: In the formula, This is the initial oil temperature setpoint; The base temperature is set at 130℃. For classification coding values; These are the feature weight coefficients; , These are adjustment coefficients, with values ranging from 10 to 20 and from 5 to 15, respectively. This is a temperature correction term, with a value range of -5℃ to 5℃.
[0062] The specific implementation of step S04 involves processing the temperature measurement data using a Kalman filter algorithm. The state equation for the Kalman filter is: In the formula, This is a state vector containing the temperature value and the rate of temperature change. This is the state transition matrix; To control the input matrix; For control input; This represents process noise. The observation equation is: In the formula, For observation vectors; The observation matrix; For observation noise. The state transition matrix is represented as: In the formula, The sampling time interval is set to 0.5 seconds. The state estimation formula for the prediction step is: The predicted covariance matrix is: In the formula, Let be the process noise covariance matrix. The Kalman gain for the update step is: In the formula, The noise covariance matrix is observed. The rate of change of the temperature gradient is calculated using the central difference scheme of the finite difference method: In the formula, This is the filtered temperature value. The thermal conductivity coefficient is calculated based on Fourier's law of heat conduction. In the formula, Heat flux density; The effective thermal conductivity is calculated using the following formula: ; The thermal conductivity of the grease is taken as 0.17 to 0.22 Kelvin per meter; The thermal conductivity of *Termitomyces albuminosus* is taken as 0.5 to 0.8 Kelvin per meter. The mathematical expression of the parameter-sharing adjustment function is: In the formula, For shared parameter learning rate; Base learning rate; For adjustment functions; To optimize the convergence error in the game, the adjustment function is defined as: .
[0063] The specific implementation of step S05 involves using a fuzzy logic controller to calculate the heating power adjustment. During the fuzzification process, the membership function of the temperature deviation adopts a triangular function: In the formula, Temperature deviation Membership degree; The central value of the membership function; The width parameter of the membership function ranges from 2 to 5. Fuzzy inference employs the min-max composition method, and the rule strength calculation formula is as follows: In the formula, For the first The activation strength of the rule; and These are the membership degrees of temperature deviation and temperature change rate, respectively. The rate of change of temperature deviation is calculated using the following formula: ,in To control the cycle, it is set to 1 second. Deblurring uses the centroid method, and the output calculation formula is: In the formula, For the output of the fuzzy controller; For the first The centroid of the output membership function; This represents the total number of activated rules. The formula for calculating the heating power adjustment is: In the formula, This refers to the adjustment amount of heating power; This is the power proportionality coefficient, with a value ranging from 0.8 to 1.2; This is the weighting coefficient, with a value ranging from 0.1 to 0.3.
[0064] The specific implementation of step S06 is to achieve quantitative color assessment through color space conversion. The white balance correction formula is: , , In the formula, , , These are the RGB values after white balance correction; , , The original RGB values; , , The RGB reflectance values are those of a standard whiteboard. The reference white point value is set to 255. The illumination compensation formula is: In the formula, These are the pixel values after illumination compensation; These are the pixel values after white balance correction; The standard illuminance is set to 1200 lumens. To measure actual light intensity, the conversion from RGB to LAB color space first involves converting to XYZ color space. The conversion formula is as follows: In the formula, , , This is the normalized RGB value after illumination compensation, with a value range of 0 to 1; , , These are the XYZ color space coordinate values. The conversion formula from XYZ to LAB is: ; ; In the formula, This refers to the brightness value. The value represents the red-green hue. The value represents the yellow-blue tint. , , The tristimulus values of the standard illuminator; Let be the transformation function, where The normalized ratio of the tristimulus values, when hour, ,when hour, ,in The standard chromaticity threshold discrimination function is: In the formula, This is the color difference value; , , The target chromaticity value.
[0065] The specific implementation of step S07 involves using a two-layer game optimization solver for multi-objective optimization. The objective function for the upper-layer quality optimization is: In the formula, The value of the quality objective function; This is the color saturation evaluation value; Internal moisture retention rate; This is a measurement of texture hardness; This represents the oil absorption rate. , , , These are weighting coefficients, with values ranging from 0.3 to 0.4, 0.2 to 0.3, 0.2 to 0.3, and 0.1 to 0.2, respectively. The objective function for lower-level energy consumption optimization is: In the formula, The value of the energy consumption objective function; For a moment Power consumption; Total frying time; For the first Secondary temperature change; This refers to the number of temperature adjustments; The penalty coefficient ranges from 0.05 to 0.15. The Nash equilibrium condition for the Stackelberg game is: and In the formula, For upper-level decision variables; These are the lower-level decision variables. The optimal oil temperature control parameters are calculated using the Lagrange multiplier method, and the Lagrange function is: In the formula, As a game equilibrium factor; For the first One constraint condition; It is a Lagrange multiplier; This represents the total number of constraints.
[0066] It should be noted that, in this embodiment,
[0067] The moisture content calculation formula is based on a multi-wavelength linear regression model of near-infrared spectroscopy. It establishes a quantitative relationship by selecting the characteristic absorption wavelengths of water molecules. Compared to traditional drying methods, this spectroscopic method enables non-destructive and rapid detection, providing timely and accurate moisture information for real-time frying control. The feature fusion weight dynamic adjustment formula considers the comprehensive influence of the geometric morphology and physical properties of Termitomyces albuminosus. The optimal fusion strategy is determined through multi-parameter weighted evaluation. Compared to fixed-weight fusion methods, this adaptive strategy can select the most suitable feature combination for different morphologies of Termitomyces albuminosus, significantly improving classification accuracy and model generalization ability. The Kalman filter algorithm effectively filters out random noise in temperature measurements through a recursive process of state prediction and observation updates. Compared to simple moving average filtering, this algorithm can suppress measurement noise while maintaining sensitivity to temperature changes, laying the foundation for precise temperature control.
[0068] The temperature gradient calculation formula of the central difference scheme estimates the rate of temperature change by dividing the temperature difference between two consecutive time points by the time interval. Compared with forward difference or backward difference, the central difference scheme has higher numerical accuracy and better stability, and can more accurately reflect the temperature change trend, providing reliable derivative information for dynamic temperature control.
[0069] Fourier's law of heat conduction describes the fundamental laws of heat transfer. By calculating the effective thermal conductivity, it takes into account the heat conduction characteristics between oils and food. Compared with simplified models that ignore material properties, this formula can more accurately predict temperature distribution and heat transfer efficiency, providing a theoretical basis for optimizing heating strategies.
[0070] The parameter sharing adjustment function dynamically adjusts the learning rate of the shared parameters according to the convergence state of the game optimization. When the convergence error is large, the learning rate is increased to accelerate convergence, and when the convergence error is small, the learning rate is decreased to ensure stability. Compared with the training method with a fixed learning rate, this adaptive strategy can avoid overfitting while ensuring the convergence speed, thus improving the efficiency and stability of model training.
[0071] The fuzzy logic controller formula realizes the nonlinear mapping of temperature deviation through membership function and fuzzy inference rule. Compared with traditional PID control, this method can handle the nonlinearity and uncertainty of the system, the control response is smoother, and the stability of the frying process is improved.
[0072] The white balance correction formula eliminates the influence of light source color temperature on color measurement by utilizing the reflective properties of a standard white board. Compared to the original image without white balance correction, this processing method can restore the true color of the object, improving the accuracy and consistency of color measurement.
[0073] The illumination compensation formula corrects the impact of illumination changes on image brightness by using the ratio of standard illumination intensity to measured illumination intensity. Compared with image acquisition with fixed exposure parameters, this compensation method can adapt to different lighting environments, ensure the consistency of image brightness, and provide a basis for accurate color assessment.
[0074] The color space conversion formula converts the device-dependent RGB color space into the perceptually uniform LAB color space, eliminating the influence of lighting conditions and device differences on color measurement. Compared with directly using RGB values for color evaluation, the color difference calculation in LAB space can more accurately reflect the human eye's perception of color differences, providing a reliable basis for judging the frying endpoint.
[0075] The two-layer game optimization formula unifies the two mutually constraining objectives of quality and energy consumption into the framework of game theory for solution. By using the Stackelberg game model to find the Nash equilibrium solution, compared with traditional single-objective optimization or simple weighted multi-objective optimization, this method can minimize energy consumption while ensuring the quality of frying, and achieve the best balance between quality and efficiency.
[0076] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2: The technical team first established a complete data acquisition system, and the entire data acquisition and processing is as follows: Figure 2As shown, a high-resolution industrial camera array was installed upstream of the production line. The cameras are Basler acA2040-120um models with a resolution of 2048×2048 pixels, equipped with 25mm fixed-focus lenses, and an aperture of f / 5.6. The lighting system uses an LED ring light source array, with each light source having a power of 180 watts, a color temperature of 6200K, and an illumination intensity controlled at 1180 lumens to ensure consistent image acquisition.
[0077] The technical team conducted multi-dimensional data acquisition according to the requirements of step S01, using FAROFocus 3D laser scanning equipment. The DX 330 model boasts a scanning accuracy of 0.08 mm, covering a measurement range of 8 mm to 95 mm in length, 4 mm to 72 mm in width, and 1.5 mm to 28 mm in thickness. The near-infrared spectrometer selected is the ASD FieldSpec 4 model, with a working wavelength range of 350 nm to 2500 nm, a spectral resolution of 1.4 nm, and an integration time set to 150 ms. Through the established spectral-water content calibration model, regression coefficients... It is 0.21. It is 0.38. The intercept term is 0.12. The value was 8.7. Density distribution data were acquired using a high-precision X-ray CT scanner, model YXLON FF35 CT, with a scanning voltage of 90 kV, a current of 88 μA, and a slice thickness of 0.3 mm.
[0078] In step S02, the feature recognition stage, the technical team used 8,000 collected *Termitomyces albuminosus* samples to build a training dataset. After 180 epochs of training, the first layer of the two-layer adaptive feature recognition model achieved a coarse classification accuracy of 98.4%. The dynamic adjustment of feature fusion weights was optimized based on actual measurement data, taking into account the aspect ratio... When the aspect ratio is 1.15, the feature fusion weight is set to 0.6; when the aspect ratio is 1.68, the weight is adjusted to 0.8; when the aspect ratio is 2.35, the weight is set to 1.0. Thickness uniformity index The calculation is based on the standard deviation of 10 measurement points, with typical values ranging from 0.75 to 0.92. Density coefficient of variation. The normal range was calculated to be 0.08 to 0.15 based on the analysis of CT scan images.
[0079] The oil temperature control strategy selection in step S03 is based on a preset multidimensional parameter lookup table, as shown in Table 1:
[0080] Table 1. Oil temperature control parameters for different types of Termitomyces mushrooms
[0081]
[0082] Based on the precise classification and feature weighting coefficients of *Termitomyces albuminosus*, the technical team generated personalized control sequences using a dynamic programming algorithm. The discount factor for the state-value function... Set to 0.92, instant reward function Both temperature control accuracy and energy efficiency were taken into account.
[0083] The temperature measurement system in step S04 uses nine Pt100 platinum resistance temperature sensors, installed in a 3×3 matrix layout inside the frying container. The sensor accuracy is ±0.08℃, and the response time is 0.8 seconds. The Kalman filter processor parameters are set to process noise covariance. The observation noise covariance is 0.008. The sampling time interval is 0.012. The time is 0.5 seconds. The rate of change of the temperature gradient is calculated using a central difference scheme, and the effective thermal conductivity is... Based on the thermal conductivity of oil (0.19 W / m Kelvin) and Termitomyces albuminosus (0.62 W / m Kelvin), the result is calculated to be 0.29 W / m Kelvin.
[0084] The fuzzy logic controller in step S05 uses a 5×5 rule base, and the membership function width parameter of the temperature deviation is... Set to 3.2, center value The temperatures are -8℃, -3℃, 0℃, 3℃, and 8℃, respectively. The control period for the rate of temperature change. For a time of 1 second, fuzzy inference employs a minimum-maximum synthesis method. Power ratio coefficient. Set to 1.05, weighting coefficient The value is 0.18. During the deblurring process, the activation strength of the 25 rules was optimized using actual test data, with typical heating power adjustment values. The range is from 15% to 85%.
[0085] In the color monitoring stage of step S06, the real-time image monitoring device uses a Basler acA1920-40gm high-speed camera, with a frame rate set to 25 frames per second. White balance correction uses a standard white board, and RGB reflectance values are used. For 248, For 251, The value is 253, referring to the white point value. The value is 255. The illumination compensation coefficient is dynamically adjusted based on the measured illumination intensity, with a standard illumination intensity of 255. The brightness is 1200 lumens. The preset thresholds after color space conversion are L value 45 to 62, a value 12 to 28, and b* value 18 to 42, as shown in Table 2:
[0086] Table 2 Color threshold parameters at different frying stages
[0087]
[0088] The two-layer game optimization solver in step S07 performs collaborative optimization of the upper-layer quality objective and the lower-layer energy consumption objective. The weighting coefficients of the quality objective function... to The values were set to 0.35, 0.25, 0.25, and 0.15 respectively. (Color saturation evaluation value) The color difference was calculated using LAB and ranged from 0.8 to 9.2. Internal moisture retention rate. Determined by gravimetric method, the target range is 65% to 78%. Texture hardness. The compressive stress ranged from 2.8 Newtons to 8.6 Newtons, as determined using a texture analyzer. Oil absorption rate... Determined by Soxhlet extraction, the control range was 12% to 18%. Penalty coefficient in the energy consumption objective function. Set to 0.08, number of temperature adjustments. The average is 15 times per batch.
[0089] The convergence criterion for game optimization is set as follows: the difference between the objective function values of two consecutive iterations is less than 0.0008, and the game balance factor... The optimal value was determined to be 0.62 through experiments. After 38 iterations, the system reached a Nash equilibrium solution, and the optimal combination of oil temperature control parameters was transmitted to the temperature actuator, the structure of which is as follows: Figure 3 As shown. The temperature actuator uses pulse width modulation control, the heating element power is 15 kW, the control accuracy is ±0.5℃, and the response time is 3 seconds.
[0090] During a 30-day continuous production trial, the technical team systematically processed 96,000 samples of Termitomyces mushrooms of different specifications. The first-layer coarse classification model achieved recognition accuracies of 98.7%, 97.9%, and 98.3% for pre-fried, semi-fried, and deep-fried states, respectively. The second-layer fine classification model achieved a comprehensive accuracy of 96.2%, and the adaptive adjustment mechanism of feature fusion weights improved the classification accuracy of different Termitomyces mushroom morphologies by 8.3%. In terms of temperature control accuracy, the standard deviation of temperature measurement after Kalman filtering was reduced to 0.12℃, and the overshoot of the fuzzy logic controller was controlled within 2.1%.
[0091] The color monitoring system achieved millisecond-level color difference calculation during frying, with LAB color space conversion accuracy reaching ±0.8 chromaticity units. The two-layer game-theoretic optimization algorithm reduced average energy consumption by 11.6% and significantly improved temperature regulation stability while ensuring product quality. Product quality testing results showed that the color consistency of fried termite mushrooms improved by 85%, the coefficient of variation of textural properties decreased to 0.07, and the moisture retention rate remained stable within the range of 71% ± 3%.
[0092] The system exhibits excellent real-time performance, with an average processing time of 180 milliseconds for image acquisition and feature extraction, and a response latency of 0.6 seconds for temperature control commands, meeting the real-time requirements of industrial production. The system's adaptive capability was validated through a continuous learning mechanism, reducing the adaptation time to new batches of Termitomyces mushrooms to 15 minutes, demonstrating good generalization performance.
[0093] This invention represents a significant technological advancement over traditional experience-based frying control methods. Traditional methods rely heavily on operator experience and fixed temperature control patterns, failing to provide personalized adjustments for different qualities and forms of Termitomyces albuminosus, leading to unstable product quality. This invention achieves accurate identification and classification of Termitomyces albuminosus features through a dual-layer adaptive feature recognition model, overcoming the limitations of traditional visual inspection methods that are susceptible to lighting and angle variations. Multimodal data fusion technology organically combines information such as surface texture, geometric parameters, moisture content, and density distribution to construct a comprehensive feature description system, exhibiting stronger robustness and accuracy compared to single-feature recognition methods. The Kalman filter algorithm effectively eliminates random noise in temperature measurement, improving measurement accuracy while maintaining response speed compared to simple digital filtering methods. The fuzzy logic controller handles system uncertainties through nonlinear mapping, demonstrating better adaptability and stability under complex operating conditions compared to traditional PID control. The dual-layer game-theoretic optimization mechanism considers quality and energy consumption in a unified manner, achieving multi-objective collaborative optimization through Nash equilibrium solutions, avoiding the limitations of traditional single-objective optimization or simple weighted methods. Color space conversion technology eliminates the impact of equipment differences and environmental variations on color assessment, offering better perceptual consistency compared to direct RGB analysis. The overall system's intelligence is significantly improved, achieving a shift from passive control to proactive prediction, providing crucial technical support for the automation upgrade of the termite mushroom processing industry.
[0094] It should be noted that the variables involved in this invention are explained in detail in Tables 3 and 4 below.
[0095] Table 3. Variable Explanation Table (Part 1)
[0096]
[0097] Table 4. Variable Explanation Table (Part Two)
[0098]
[0099] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for segmented temperature control during the deep-frying of termite mushrooms, characterized in that, include: The data obtained from the frying of termite mushrooms is input into a dual-layer adaptive feature recognition model for processing. The first layer of the dual-layer adaptive feature recognition model performs coarse classification processing on the surface texture image and outputs a coarse classification label for the frying state of the termite mushrooms. The second layer of the model performs fine classification processing based on the coarse classification label and physical parameters of the frying state of the termite mushrooms and outputs a fine classification label and feature weight coefficients for the frying state of the termite mushrooms. Based on the fine classification label and feature weight coefficients of the frying state of the termite mushrooms, the corresponding temperature control parameters are selected from the preset oil temperature control strategy library to establish a personalized oil temperature control sequence. During the frying process, the temperature measurement values of multiple points in the frying container are collected in real time through a distributed temperature sensor array. The Kalman filter processor is used to filter the noise of the multi-point temperature measurement values to obtain the filtered temperature values. Based on a dual-layer game optimization solver, the upper-layer quality optimization objective function and the lower-layer energy consumption optimization objective function are jointly solved to obtain the optimal combination of oil temperature control parameters. The optimal combination of oil temperature control parameters is transmitted to the temperature actuator to achieve precise segmented oil temperature control.
2. The method for segmented temperature control during the deep-frying of termite mushrooms according to claim 1, characterized in that, The steps for acquiring data for fried termite mushrooms specifically involve acquiring surface texture images of the termite mushrooms to be fried using a high-resolution image acquisition device, measuring the length, width, thickness, and volume parameters of the termite mushrooms using a 3D laser scanner, and detecting the water content and density distribution data of the termite mushrooms using a near-infrared spectrometer. The surface texture image, length, width, thickness, volume parameters, water content, and density distribution data are then used as the fried termite mushroom detection data.
3. The method for segmented temperature control during the deep-frying of termite mushrooms according to claim 2, characterized in that, The dual-layer adaptive feature recognition model is a dual-layer cascaded recognition network based on a visual transformer architecture. The first layer model includes an image preprocessing module, a coarse feature extraction module, and a coarse classification output module. The image preprocessing module performs size normalization and contrast enhancement processing on the input surface texture image. The coarse feature extraction module uses a convolutional neural network structure to extract the basic morphological features of Termitomyces albuminosus. The coarse classification output module maps the basic morphological features to three types of coarse classification labels for the fried state of Termitomyces albuminosus, including pre-fried state type, semi-fried state type, and deep-fried state type.
4. The method for segmented temperature control during the deep-frying of Termitomyces mushrooms according to claim 3, characterized in that, The second layer of the dual-layer adaptive feature recognition model contains multiple parallel fine recognition sub-networks. Each fine recognition sub-network corresponds to a coarse classification label for the fried state of Termitomyces mushroom. The fine recognition sub-network uses an attention mechanism to fuse morphological and physical features. The feature fusion weights of the attention mechanism are dynamically adjusted according to the ratio of the length to the width of the Termitomyces mushroom.
5. The method for segmented temperature control during the deep-frying of Termitomyces mushrooms according to claim 4, characterized in that, The dynamic adjustment of the feature fusion weight is specifically as follows: when the ratio of the length dimension to the width dimension is less than 1.2, the feature fusion weight is set to 0.6; when the ratio is between 1.2 and 2.0, the feature fusion weight is set to 0.8; and when the ratio is greater than 2.0, the feature fusion weight is set to 1.
0.
6. The method for segmented oil temperature control during the deep-frying of termite mushrooms according to claim 5, characterized in that, The two-layer adaptive feature recognition model optimizes the correlation parameters between the first-layer model and the second-layer model through an inter-layer parameter sharing mechanism. The inter-layer parameter sharing mechanism includes a shared convolutional kernel weight matrix, a shared bias vector, a shared batch normalization parameter, and independent classifier weight coefficients. The gradient backpropagation algorithm is used to update the shared convolutional kernel weight matrix, the shared bias vector, the shared batch normalization parameter, and the independent classifier weight coefficients of the two-layer model simultaneously.
7. The method for segmented temperature control during the deep-frying of Termitomyces mushrooms according to claim 6, characterized in that, The inter-layer parameter sharing mechanism dynamically balances the learning rates of shared parameters and independent parameters through a parameter sharing adjustment function. The parameter sharing adjustment function adjusts the update magnitude of shared parameters according to the convergence state of the two-layer game optimization solver. When the convergence error of the game optimization objective function is greater than 0.01, the learning rate of shared parameters is increased to 1.5 times that of independent parameters. When the convergence error is less than 0.01, the learning rate of shared parameters is decreased to 0.8 times that of independent parameters.
8. The method for segmented temperature control during the deep-frying of termite mushrooms according to claim 7, characterized in that, After the frying process is started, the temperature gradient change rate and heat transfer efficiency coefficient are calculated based on the filtered temperature value. The filtered temperature value, temperature gradient change rate, heat transfer efficiency coefficient and feature weight coefficient are input into the fuzzy logic controller. The fuzzy logic controller calculates and outputs the heating power adjustment amount and temperature setpoint correction amount through membership function mapping and fuzzy inference rules.
9. The method for segmented oil temperature control during the deep-frying of Termitomyces mushrooms according to claim 8, characterized in that, During the frying process, the color change images of the surface of the termite mushroom are continuously collected by a real-time image monitoring device. The color space conversion processor converts the color change images into standard color values. When the standard color value reaches the preset color threshold, the temperature control command generator is triggered to generate a temperature adjustment command.
10. The method for segmented temperature control during the deep-frying of Termitomyces albuminosus according to claim 9, characterized in that, The temperature actuator is an electric heating device based on pulse width modulation control, which includes a power adjustment module, a temperature feedback module, and a safety protection module. The power adjustment module controls the on-time ratio of the heating element according to the heating power adjustment amount. The temperature feedback module monitors the temperature of the heating element in real time and feeds back the temperature status to the control system. The safety protection module automatically cuts off the power supply to prevent overheating when the temperature exceeds the set safety threshold.