Deep reinforcement learning based color and glossiness adaptive control method for fried poultry products

CN122902392APending Publication Date: 2026-10-13LUOYANG HUB CHAIN EQUIPMENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611406254.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]针对现有技术的不足,本发明提供了基于深度强化学习的油炸禽肉制品色泽自适应控制方法,解决现有基于固定工艺参数、出料端色泽检测或简单反馈调节的方式,难以同时处理色泽评价滞后、过深风险不可逆、多个在槽批次受同一控制动作影响以及食品安全约束不能突破等问题

Benefits of technology

1、本发明以批次单元作为连续油炸过程中的控制归因对象,并记录批次单元的过程轨迹数据,使出料后的色泽评价结果能够对应到该批次实际经历的油炸温区、输送速度、投料节拍、油脂状态和实际执行动作。由此,可以减少将当前出料色泽直接归因于当前控制动作所造成的偏差,使深度强化学习策略的状态输入和奖励更新更符合连续油炸过程中的时间滞后特征。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902392A_ABST
    Figure CN122902392A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of food processing process control, and discloses a fried poultry product color and luster self-adaptive control method based on deep reinforcement learning, which divides fried poultry products continuously entering a frying device into batch units, and records process trajectory data of the batch units; carries out double-time-point batch-level color and luster collection on the batch units after frying, determines color and luster evaluation results and color and luster margins; determines predicted color and luster margins according to the process trajectory data of the in-tank batch, inputs state data including at least the predicted color and luster margins into a deep reinforcement learning strategy, and generates candidate residual actions; determines an action influence window according to a device response range corresponding to the candidate residual actions and a batch unit position, and carries out color and luster margin conflict arbitration based on the predicted color and luster margins of the batch units in the action influence window; generates an actual execution action after safety constraint judgment, and updates the deep reinforcement learning strategy through delayed reward reverse assembly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food processing control technology, specifically to an adaptive color control method for fried poultry products based on deep reinforcement learning. Background Technology

[0002] Fried poultry products are a common type of product in the deep processing of poultry meat, typically including breaded chicken nuggets, chicken cutlets, chicken wings, popcorn chicken, and chicken strips. Existing continuous frying production lines generally use process parameters such as oil temperature in the frying zone, conveyor speed, feeding cycle time, and frying time to ensure that poultry products are cooked and achieve the desired appearance and color during frying. In actual production, companies usually set a baseline process formula based on product specifications and process validation results, and maintain production stability through oil temperature sensors, conveyor belt controllers, feeding devices, and PLC control systems. Regarding the appearance quality of the finished product, existing technologies can also install industrial cameras or manual inspection stations at the discharge end to detect the surface color of the fried product, determining whether the color is too light, too dark, or uneven.

[0003] In existing production processes, poultry meat raw materials are typically cut, marinated, coated with starch, or pre-treated before entering continuous frying equipment. The product passes through one or more frying temperature zones sequentially via a conveyor. During frying, surface moisture migration, browning of the starch or coating layer due to heat, changes in oil state, and cumulative heating time all affect the product's surface color. Existing control methods primarily maintain oil temperature, conveyor speed, and feeding cycle within preset ranges to achieve a relatively stable degree of cooking and appearance. Visual inspection methods are mainly used for color evaluation, grading, alarm functions, or to provide a reference for manual parameter adjustment after the product is discharged. Some production lines also adjust subsequent oil temperature or conveyor speed based on the color detection results at the discharge end to reduce batch-to-batch appearance fluctuations.

[0004] However, color formation in continuous frying exhibits significant process lag and irreversibility. The color result detected at the discharge end typically corresponds to products that entered the frying equipment several control cycles ago, rather than products that have just entered the frying equipment or are currently being heated in a certain temperature zone. Directly adjusting the current oil temperature or conveyor speed based on the current discharge image can easily lead to misattributing color deviations of already discharged batches to the control status of the currently in-tank batch. Furthermore, once the surface color of fried poultry products becomes too dark, subsequent reductions in heat load usually only reduce the tendency to deepen further, not restore the already excessively dark color to the target state. The discharge image is also affected by surface oil film, highlights, local occlusion, product turning, and changes in oil draining conditions; a single point-in-time image cannot stably reflect the final appearance color. In addition, the same candidate control action in continuous frying equipment may simultaneously affect multiple batches in different temperature zones or different heating stages; while some batches require reduced heat load, other batches may still be at risk of being too light. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an adaptive color control method for fried poultry products based on deep reinforcement learning. This method solves the problems that existing methods based on fixed process parameters, color detection at the discharge end, or simple feedback adjustment cannot simultaneously handle issues such as lagging color evaluation, irreversible risks of excessive color depth, multiple batches in the tank being affected by the same control action, and the inability to overcome food safety constraints.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a deep reinforcement learning-based adaptive color control method for fried poultry products, comprising: The fried poultry products that continuously enter the frying equipment are divided into batch units, and the process trajectory data of the batch units are recorded. The batch unit after frying is subjected to batch-level color collection at two time points, and the color evaluation result of the batch unit is determined based on the batch-level color collection results at two time points. The color margin of the batch unit that has completed the color evaluation is determined based on the process trajectory data and the color evaluation results, and the predicted color margin of the batch in the tank is determined based on the process trajectory data of the batch unit that has not completed the color evaluation and is located in the frying equipment. The state data, including at least the predicted color margin, is input into the deep reinforcement learning strategy to generate candidate residual actions. The action influence window of the candidate residual action is determined based on the device response range and batch unit position corresponding to the candidate residual action; Based on the predicted color margin of the batch unit within the action influence window, the candidate residual actions are arbitrated for color margin conflict to obtain the arbitrated residual actions. The residual actions after arbitration are subject to safety constraint judgment, and actual execution actions are generated. The frying equipment is then controlled based on the actual execution actions. Based on the color evaluation results, process trajectory data, and actual actions performed on the batch units that have completed the color evaluation, the delayed reward back-assembly is performed, and the deep reinforcement learning strategy is updated based on the delayed reward back-assembly results.

[0007] Preferably, the step of dividing the continuously entering fried poultry products into batch units and recording the process trajectory data of the batch units includes: Fried poultry products continuously entering the frying equipment are divided into batch units according to time windows, conveying distance windows, or feeding trigger windows; The time when the batch unit enters the frying equipment is determined based on the feed detection signal and the conveying speed. The position range of the batch unit in the conveying direction is determined based on the time when the batch unit enters the frying equipment and the conveying speed. Based on the correspondence between the location interval and the location range of each frying temperature zone, the dwell time of the batch unit in each frying temperature zone is determined; The time, location range, dwell time, oil temperature of each frying zone, conveying speed, feeding cycle, loading density, oil state, incoming material state, and actual actions of the batch unit entering the frying equipment are recorded as the process trajectory data.

[0008] Preferably, the process trajectory data includes the temperature zone process exposure, which is determined by the following method: Based on the dwell time of the batch unit in each frying temperature zone, the oil temperature, conveying speed, loading density, oil state, product size or weight characteristics, and incoming material state experienced by the batch unit in the corresponding frying temperature zone are obtained. The process exposure value of the batch unit in the corresponding frying temperature zone is determined based on oil temperature, conveying speed, loading density, oil state, product size or weight characteristics, and incoming material state. The process exposure values ​​of the batch units within the same frying temperature zone are accumulated to obtain the temperature zone process exposure amount of the batch unit within that frying temperature zone. The temperature zone contribution coefficient is determined based on the temperature zone process exposure of the batch unit in each frying temperature zone. The temperature zone contribution coefficient is used to determine the degree of contribution of each frying temperature zone to the color evaluation result of the batch unit during delayed reward reverse assembly.

[0009] Preferably, the dual-time-point batch-level color acquisition includes: When the batch unit reaches the first imaging point after being unloaded from the pot, the first time point image of the batch unit is acquired. When the same batch of units reaches the second imaging point after oil draining or cooling, the second time point image of the batch of units is acquired. Effective surface pixel extraction, background removal, color space conversion, and highlight region identification are performed on the first time point image and the second time point image, respectively. The oil film interference coefficient is determined based on the average color change and highlight area change between the first time point image and the second time point image. The equivalent stable color is determined based on the average color corresponding to the second time point image and the oil film interference coefficient, and the equivalent stable color is used to determine the color evaluation result. In this context, both the first time point image and the second time point image are bound to the batch unit.

[0010] Preferably, the color evaluation result includes color maturity, and the color margin includes target color difference margin, local over-darkness risk margin, and color unevenness margin; The color maturity is determined in the following way: The target color difference is determined based on the equivalent stable color and the target standard color; The proportion of dark risk pixels is determined based on the number of dark risk pixels in the effective surface pixels; Color non-uniformity is determined based on the color difference between different sub-regions in the effective surface pixels; The color maturity is composed of the target color difference, the proportion of dark risk pixels, and the color unevenness. The color allowance is determined in the following way: The target color difference margin is determined based on the target color difference allowance boundary and the target color difference; The local over-darkness risk margin is determined based on the allowable boundary of the dark risk pixel ratio and the dark risk pixel ratio. The color unevenness margin is determined based on the allowable boundary of color unevenness and the color unevenness. The target standard color, the target color difference allowable boundary, the dark risk pixel ratio allowable boundary, and the color unevenness allowable boundary are determined by product quality standards, enterprise appearance inspection standards, customer standard samples, historical qualified batch statistics, or standard sample calibration results.

[0011] Preferably, determining the predicted color margin in the batch includes: Establish a historical attribution sample, which includes process trajectory data of historical batch units, incoming material status, oil status, loading density, product size or weight characteristics, actual execution action sequence, color evaluation results and color margin. Using the process trajectory data, incoming material status, oil status, loading density, product size or weight characteristics, and actual execution action sequence of the historical batch unit as input, and the color evaluation results obtained after the historical batch unit completes dual-time point batch-level color collection as labels, a color evaluation prediction relationship is obtained. Based on the color evaluation prediction relationship, the predicted color evaluation result of the batch in the tank is determined; Based on the predicted color evaluation results and the corresponding allowable boundaries, the predicted color margin of the batch in the tank is determined; The predicted color margin is used for candidate residual action evaluation and color margin conflict arbitration, but is not used to replace the actual color evaluation after discharge.

[0012] Preferably, the action of generating candidate residuals includes: The status data consists of equipment status, incoming material status, the predicted color balance of the batch in the tank, and the color evaluation results of the batch unit that has completed color evaluation. The deep reinforcement learning strategy outputs the original residual action based on the state data; A candidate action set is generated based on the original residual action of the reinforcement learning, and the candidate action set includes the baseline recipe residual action, the action actually executed in the previous control cycle, the original residual action of the reinforcement learning, and alternative candidate actions. The alternative candidate actions are derived from the original residual actions of the reinforcement learning, including reducing the amplitude of the original residual actions of the reinforcement learning, retaining only a portion of the frying temperature zone adjustment, retaining only the conveying speed adjustment, retaining only the feeding cycle adjustment, or combining multiple adjustment amounts into candidate actions that meet the process boundaries. Each candidate residual action in the candidate action set is entered into the action influence window for determination and color margin conflict arbitration.

[0013] Preferably, determining the action influence window of the candidate residual action and arbitrating the color margin conflict of the candidate residual action includes: The action influence window corresponding to the candidate residual action is determined based on the frying temperature zone involved in the candidate residual action, the response duration of the frying temperature zone, the conveying speed, and the position range of the batch unit. When the candidate residual action involves conveyor speed adjustment or feeding cycle adjustment, the action impact window is extended to the batch units located in the frying equipment during the response period and the batch units expected to enter the frying equipment. For each batch of units within the action influence window, predict the predicted color margin after the candidate residual action is executed; When the candidate residual action causes the local over-depth risk margin of any batch of units within the action's influence window to fail to meet the safety boundary, the candidate residual action is excluded. When the candidate residual action causes different batches of units within the action influence window to have opposite trends in target color difference margin, local over-darkness risk margin, or color unevenness margin, it is determined that there is a color margin conflict. Calculate the arbitration cost for the remaining candidate residual actions after elimination, and determine the arbitration residual action based on the arbitration cost; The arbitration costs include color evaluation items, movement range items, movement jump items, and color margin conflict items.

[0014] Preferably, the security constraint determination and the delayed reward reverse assembly include: Determine whether the process parameters corresponding to the residual action after arbitration simultaneously meet the hard constraints of food safety, equipment capability constraints, and process verification constraints. When the process parameters corresponding to the arbitrated residual action simultaneously satisfy the food safety hard constraint, the equipment capability constraint, and the process verification constraint, the arbitrated residual action is taken as the actual action to be executed. When the process parameters corresponding to the arbitration residual action do not meet the food safety hard constraint, the equipment capability constraint, or the process verification constraint, the arbitration residual action is subjected to boundary truncation, rate of change truncation, or rollback to obtain the actual executed action. Batch rewards are determined based on the target color difference, proportion of dark risk pixels, color unevenness, actual actions performed, color margin conflict arbitration triggering, and safety constraint triggering of the batch units that have completed color evaluation. Based on the temperature zone process exposure and action influence window of the batch unit, the batch reward is reverse-allocated to the corresponding control moment to obtain the reverse assembly reward. The deep reinforcement learning policy is updated based on the state data, the actual executed action, and the reverse assembly reward. Specifically, when the image quality does not meet the preset conditions, batch image binding fails, the grease status exceeds the set range, the incoming material status exceeds the preset operating range, the PLC feedback is abnormal, or communication is interrupted, the candidate residual action output by the deep reinforcement learning strategy is stopped, and the process is reverted to the baseline process formula or the preset safety action.

[0015] A deep reinforcement learning-based adaptive control system for the color of fried poultry products includes: The production process data acquisition module is used to collect data such as the time when batches enter the frying equipment, conveying speed, oil temperature in each frying zone, feeding cycle time, loading density, oil state, incoming material state, and actual actions performed. The dual-time-point image acquisition module is used to acquire a first-time-point image at a first imaging point after the food is removed from the pan, and to acquire a second-time-point image at a second imaging point after the oil is drained or cooled. The industrial control computing equipment is used to perform batch unit division, process trajectory data recording, equivalent stable color determination, color evaluation result determination, color margin determination, predicted color margin determination, state data construction, candidate residual action generation, action influence window determination, color margin conflict arbitration, safety constraint judgment, and delayed reward reverse assembly based on the data provided by the production process data acquisition module and the dual time point image acquisition module. The PLC control execution module is used to receive the process parameters corresponding to the actual execution actions output by the industrial control computing device, and to control the heating mechanism, conveying mechanism and feeding mechanism of the frying temperature zone of the frying equipment. The data storage module is used to store batch unit data, production process data, image data or image features, color evaluation results, color margin, predicted color margin, candidate residual actions, arbitration residual actions, actual executed actions, safety constraint trigger records, and training samples. The human-machine interaction module is used to set the baseline process formula, target standard color, allowable boundary, residual action boundary, safety constraint parameters and operating mode, and to display the batch status, color evaluation results, color margin conflict arbitration results, abnormal alarms and rollback status.

[0016] This invention provides an adaptive color control method for fried poultry products based on deep reinforcement learning. It has the following beneficial effects: 1. This invention uses batch units as the control attribution objects in the continuous frying process and records the process trajectory data of the batch units. This allows the color evaluation results after discharge to correspond to the actual frying temperature zone, conveying speed, feeding cycle time, oil state, and actual actions performed by that batch. Therefore, it reduces the bias caused by directly attributing the current discharge color to the current control action, making the state input and reward updates of the deep reinforcement learning strategy more consistent with the time lag characteristics of the continuous frying process.

[0017] 2. This invention determines the equivalent stable color through batch-level color acquisition at two time points, and further calculates the color maturity, color margin, and predicted color margin for the batch in the oil tank. This processing method does not rely on direct color measurement in the oil tank, nor does it require individual registration of each product. It can obtain color evaluation results for control judgment under existing continuous frying production line conditions, and makes the evaluation of candidate residual actions not only based on a single image result at the discharge end, but also combining the batch process trajectory and predicted color margin for judgment.

[0018] 3. After generating candidate residual actions using a deep reinforcement learning strategy, this invention further determines the action influence window of the candidate residual actions and performs color margin conflict arbitration based on the predicted color margin of multiple batch units within the action influence window. Then, after safety constraint judgment, the actual execution action is generated. Therefore, even when the same control action may affect multiple batches in the fryer, a unified judgment can be made on the risk of local over-deep frying, changes in action amplitude, and process safety boundaries, making the control action more suitable for the actual operating conditions of continuous frying equipment. Attached Figure Description

[0019] Figure 1 This is the overall logic diagram of the control method of the present invention; Figure 2 This is a schematic flowchart of the control method of the present invention; Figure 3 This is a schematic diagram of the control system structure of the present invention. Detailed Implementation

[0020] See attached document Figure 1 , Figure 1 This is an overall logic diagram of an adaptive color control method for fried poultry products according to an embodiment of the present invention. This embodiment is applicable to a continuous fried poultry product production line. The poultry products can be breaded chicken pieces, chicken cutlets, chicken wings, popcorn chicken, chicken strips, or other poultry products that have been coated with batter and flour before frying. The continuous frying production line may include multiple frying temperature zones, a conveying mechanism, a feeding mechanism, a discharge conveying section, and an oil draining or cooling conveying section.

[0021] This embodiment does not require changes to the main structure of the frying equipment, does not require direct sampling of the product surface color in the oil tank, and does not require precise location tracking of individual poultry products in the oil tank.

[0022] The surface color of fried poultry products is mainly affected by surface moisture content, the composition of the coating or batter, oil temperature, heating time, oil state, and loading density. During continuous frying, the surface color of the product typically deepens gradually with accumulated heat exposure. When an excessively dark color has already formed on a localized surface, reducing the heat load can usually only slow down the trend of further deepening, but cannot restore the already formed excessively dark color to the target state. Therefore, this embodiment treats the risk of localized excessive darkening as a constraint condition before execution, rather than simply performing quality judgment after discharge.

[0023] In this embodiment, the continuous flow of products entering the frying equipment is divided into multiple batch units according to time windows, conveying distance windows, or feeding trigger windows. Each batch unit represents a group of products entering the frying equipment within adjacent time periods or adjacent conveying distances. This batch unit serves as a common object for color evaluation, temperature zone experience recording, candidate action impact judgment, and delayed reward attribution. Since the products are in an environment of oil, air bubbles, and inter-product obstruction during continuous frying, using batch units for attribution can avoid tracking instability caused by changes in the posture of individual products, slight drift, or obstruction within the oil tank.

[0024] In this embodiment, color control does not directly adjust the current oil temperature based on the current outlet image. Instead, it retrospectively evaluates the stable color after discharge by considering the actual temperature range, conveying speed, feeding status, and historical actions experienced by the batch unit. For batch units in the tank that have not yet discharged, the current surface color is not directly measured. Instead, the color margin is estimated and predicted based on the temperature range exposure, incoming material status, oil status, loading density, and actual action sequence. The deep reinforcement learning strategy outputs candidate residual actions relative to the baseline process formulation. These candidate residual actions are allowed to enter the safety constraint judgment only after entering the action influence window judgment and color margin conflict arbitration. Through this process, the evaluation object of the candidate action is no longer a single discharge batch, but multiple batch units actually affected by the action during the equipment response period.

[0025] In this embodiment, the baseline process formulation refers to the combination of frying parameters validated by the manufacturing enterprise, including the baseline oil temperature, baseline conveyor speed, and baseline feeding cycle time for each frying zone. Residual actions refer to adjustments made based on the baseline process formulation. The deep reinforcement learning strategy only generates candidate residual actions; it does not replace the baseline process formulation, nor does it exceed the boundaries of food safety, equipment capability, and process validation. Food safety-related hard constraints may include minimum heating intensity, permissible oil temperature range, conveyor speed range, feeding cycle time range, and other control boundaries determined by the enterprise based on product specifications. For food safety requirements such as center cooking and sterilization validation of poultry products, those skilled in the art can determine them based on existing food processing specifications and enterprise validation data; these are conventional control contents in the field and will not be elaborated upon here.

[0026] See attached document Figure 2 , Figure 2 This is a flowchart of a color adaptive control method for fried poultry products according to an embodiment of the present invention. The method may include the following sub-steps.

[0027] S101, determine the production process data and color evaluation data. Production process data includes the time of batch entry into the frying equipment, conveying speed, oil temperature in each temperature zone, feeding cycle time, loading density, oil condition, incoming material condition, and actual actions performed. Color evaluation data includes images at the first time point after discharge, images at the second time point after draining or cooling, and batch-level color characteristics obtained from the images. Oil condition can be represented by oil usage time, cumulative feeding amount, filtration records, oil replenishment records, oil surface image color, or existing oil testing results from the company. Incoming material condition can be represented by incoming material temperature, single-piece size distribution, weight distribution, breading batch, battering batch, or raw material batch identification.

[0028] The above production process data is recorded according to batch unit number and timestamp. For the status of oil or incoming materials that cannot be continuously collected, the most recent test value, the current production batch identifier, or the status code obtained from the company's production records can be used as input.

[0029] For the sake of uniform description, let the set of batch units be: in, Represents the set of all batch units. Indicates the first Each batch unit Indicates the number of units in the batch.

[0030] S102, Establish the location range of the batch unit. Let the batch unit be... The time when it enters the frying equipment is The conveyor belt speed is Then batch unit The central location is: in, Batch unit At any moment The central location, Representing historical moments The conveying speed Batch unit The moment of entry.

[0031] Considering that the batch unit has a window length in the conveying direction, let... Batch unit The window length, then the batch of units at time [time value missing] The position range is: in, Batch unit The delivery position range. This position range is used to determine whether the batch unit is within a certain frying temperature zone, has reached the image acquisition position, or is within the influence range of a candidate action. The window length of the batch unit. It can be determined by the window duration and conveying speed, or by the conveying distance between adjacent feeding trigger signals.

[0032] Assume the continuous frying equipment is divided into sections along the conveying direction. The temperature zone, the first The location range of each temperature zone is ,in and They represent the first The starting and ending points of each temperature zone. When the location range of a batch unit intersects with the temperature zone range, it is determined that the batch unit is subjected to the frying effect of that temperature zone at that moment. This determines the batch unit. In the Set of dwell times within each temperature zone: in, Batch unit With the The formula uses the time set of each temperature zone. Represents historical moments within the set, avoiding overlap with the current control moment. Mixed use.

[0033] S103, calculate the temperature range process exposure for the batch cell. For the batch cell... In the The process exposure function within a temperature range is defined as: in, Batch unit In the Each temperature zone at time Process exposure values; This indicates the preset process exposure evaluation function; Indicates the first Each temperature zone at time The oil temperature; Batch unit Loading density; Indicates time The oil state vector; Batch unit Product size or weight characteristics; Batch unit The characteristics of the incoming material status.

[0034] The process exposure evaluation function can be a linear weighted function, a piecewise function, or a function calibrated from historical batch data. Its purpose is to unify the effects of oil temperature, speed, oil condition, loading density, and product size on color formation into attributable process quantities. For existing frying process experience parameters from different manufacturers, those skilled in the art can use them as inputs or calibration bases for φ(·). For example, φ(·) can increase with increasing oil temperature, decrease with increasing conveying speed, and be corrected according to oil condition or loading density. This function does not need to be expressed in a unique form, as long as its inputs and outputs can record the relative thermal intensity experienced by the batch unit in each temperature zone.

[0035] Batch Unit In the The cumulative process exposure within each temperature zone is: in, Batch unit In the The cumulative process exposure within each temperature zone. (Formula omitted for brevity) This represents the integral variable.

[0036] Batch Unit The total process exposure across all temperature ranges is: in, Batch unit Total process exposure.

[0037] No. Each temperature zone corresponds to a batch unit. The process exposure contribution coefficient is: in, Indicates the first Each temperature zone corresponds to a batch unit. Contribution coefficient, A positive number set to avoid a denominator of zero. It can be taken as a positive number less than the minimum non-zero total process exposure under normal production conditions, or it can be preset according to the calculation accuracy requirements. This contribution coefficient is used to subsequently back-allocate the stable color evaluation after discharge to the corresponding temperature zone and corresponding control time.

[0038] S104 performs batch-level color acquisition at two time points. Let the position of the first imaging point after exiting the furnace be... The location of the second imaging point after oil draining or cooling is To avoid confusion between two imaging moments, a batch unit is defined. The time of arrival at the first imaging point is The time when the second imaging point is .

[0039] When batch unit When the location range needs to cover the location of the first imaging point, the image acquired at that moment is bound as the first time point image of that batch of units: The corresponding image is denoted as When the location range of the same batch of cells overlaps with the location of the second imaging point, the image acquired at that moment is bound as the second time-point image of that batch of cells. The corresponding image is denoted as .

[0040] This binding relationship is based on batch units and does not require individual product registration in the first and second time point images. If a batch unit undergoes local flipping, overlapping, or arrangement changes between two imaging points, the stable color evaluation of that batch unit can still be obtained through batch-level color uniformity.

[0041] For background segmentation, effective surface extraction, color space conversion, and highlight region recognition of images, those skilled in the art can use threshold segmentation, edge segmentation, color space-based segmentation, pre-trained image segmentation models, or combinations thereof. The specific image preprocessing is a well-known technique in the field and will not be elaborated here.

[0042] Set batch unit The set of effective surface pixels in the image at the first time point is The set of effective surface pixels in the image at the second time point is Pixels The color vector is represented as: in, Represents pixels color vector, , , These represent the three color components in the CIELAB color space. Unless otherwise specified, the color maturity calculation uses... The effective surface pixels are taken from the second time point image, or the effective surface color after oil film compensation.

[0043] The average color of the first batch at the first time point was: The average color of the second batch at the second time point was: in, Batch unit Average color at the first point in time. Batch unit Average color at the second time point.

[0044] Let the proportion of the highlight region in the image at the first time point be... The proportion of highlight areas in the second time point image is Highlight areas can be determined based on luminance components, local saturation levels, reflective area, or a combination thereof.

[0045] The oil film interference coefficient is defined as: in, Batch unit The oil film interference coefficient; This represents the function for calculating color difference; , , This refers to the weighting factor. The weighting factor can be determined based on standard samples or historical qualified batch data. When... When normalized, its value can be restricted to a range of 1 / 2. When no normalization is performed, its range of values ​​is... , Color difference function The dimensions are jointly determined. Preferably, , , Take non-negative values, and normalize them so that their sum is 1.

[0046] Batch Unit The equivalent stable color is: in, Batch unit The equivalent stable color, This represents the oil film compensation coefficient or compensation matrix. When scalar compensation is used... It can be a scalar; when compensating the three components of CIELAB separately. It can be A matrix or a three-dimensional diagonal matrix. Its value can be determined by the fitting relationship between the two-time-point images of the same batch and the standard color of the steady state.

[0047] S105, calculate the color maturity and color margin of the output batch. Let the target standard color be: in, Indicates the target standard color. , , This represents the three components of the target standard color in the CIELAB color space. The target standard color can be determined by the target appearance color specified in the company's qualified samples, customer standard samples, or process documents.

[0048] Batch Unit The target color difference is: in, Batch unit The target color difference. Color difference function. CIELAB Euclidean color difference, CIEDE2000 color difference, or the company's existing color difference evaluation function can be used. If other color difference evaluation functions are used, their output should be kept within the acceptable boundary of the target color difference. correspond.

[0049] For effective surface pixels Define the dark risk indicator function: in, Represents pixels Does it belong to the category of dark-colored risk pixels? This represents the dark-colored risk assessment function; This indicates the threshold for determining dark color risk. The dark color risk assessment function can be determined based on the luminance component, hue component, fading index, or target color difference. If... After normalization, It is possible If selected from within; If not normalized, then It can be determined by the boundary statistical value between qualified samples and excessively deep samples, the enterprise's appearance standard, or the historical batch percentile value.

[0050] Batch Unit The proportion of dark-risk pixels is: in, Batch unit The proportion of dark risk pixels, This represents the effective set of surface pixels used for stable color evaluation. In one embodiment, The set of effective surface pixels at the second time point can be taken. In another implementation, It is possible to take the set of effective surface pixels at the second time point after removing the highlight areas.

[0051] The effective surface pixel set is divided into Sub-regions: in, Indicates the first The effective surface pixel set of each sub-region Indicates the number of sub-regions. Sub-regions can be divided according to the image spatial grid, the product edge and center regions, or the effective surface connectivity regions of the product.

[0052] No. The average color of each sub-region is: Batch Unit The color unevenness is: in, Batch unit Unevenness of color.

[0053] The color maturity vector is composed of target color difference, the proportion of dark risk pixels, and color unevenness: in, Batch unit The color maturity vector.

[0054] Let the allowable boundary of the target color difference be... The dark risk pixel ratio allows for a boundary of 0. The allowable boundary for color unevenness is .in, It is a positive number. The range of values ​​is , The value is non-negative. The above allowable boundaries can be determined by product quality standards, enterprise appearance inspection standards, historical statistical results of qualified batches, or standard sample calibration results.

[0055] Batch Unit The chromaticity margin vector is: in: ; ; ; in, Indicates the target color difference allowance. This indicates the margin of risk for areas that are too deep. This indicates the allowance for color uniformity. This allowance is used for judging the impact on subsequent actions and for action arbitration, not just for judging finished product quality. When a certain allowance is negative, it indicates that the corresponding color index has exceeded the allowable boundary; when the allowance is close to the safety boundary, it indicates that the corresponding batch should not continue to undergo candidate actions that would worsen the index.

[0056] S106, Estimate the predicted color margin in the oil tank batch. For batch units that have not yet reached the second imaging point, this method does not directly measure the color of their inner surface in the oil tank, but estimates the predicted color maturity based on the already experienced process trajectory and historical attribution samples.

[0057] Batch Unit At any moment The process state can be represented as: in, Batch unit Deadline The process trajectory characteristics, Indicates the end time Batch Unit In the The cumulative process exposure within each temperature zone.

[0058] Set batch unit Deadline The actual residual action sequence that has been received is The predicted color maturity of the batch is: in, Indicates the batch unit in the slot. Predicted color maturity This represents the prediction function obtained by training or calibrating from historical attribution samples.

[0059] Prediction function The training samples can consist of historical batches that have already completed the second color evaluation.

[0060] For historical batches Using its process trajectory characteristics, incoming material state, oil state, and actual residual action sequence as input, the final stable color maturity of this batch is used as the input. As a supervisory label, the training objective can be expressed as reducing the error between the predicted color maturity and the stable color maturity, for example, using squared error, absolute error, or enterprise quality evaluation error as the training objective. Therefore, the prediction function... It has clear input data, output data, and training labels, which can be obtained from historical production data. Instead, it is a predictive relationship obtained from the correspondence between historical production data and stable color evaluation.

[0061] The predicted color maturity is expanded as follows: in, Indicates the predicted target color difference. This indicates the predicted proportion of pixels at risk of dark colors. This indicates the predicted color unevenness.

[0062] The corresponding predicted color margin is: in: ; ; ; in, Batch unit At any moment The predicted color allowance. The color allowance for the discharge batch is calculated using the actual stable color, while the predicted color allowance is used for the tank batch. Both use the same color allowance definition.

[0063] S107, Construct deep reinforcement learning state vectors and generate candidate difference actions. At the control time... The equipment status, incoming material status, predicted color balance of the batch in the tank, and recent outgoing material color status are constructed into a state vector: ; in, Indicates control time The state vector.

[0064] The device state vector is: ; in, This indicates the feeding cycle or the amount of material fed per unit time.

[0065] The incoming material state vector is: ; in, This indicates the current status of incoming materials. Indicates the current product size or weight characteristics. This indicates the current loading density. If the current incoming material status is represented by a batch unit, then... , and You can retrieve the corresponding value of the batch unit currently entering the frying equipment.

[0066] The state vector for the slot batch is: ; in, Indicates time Batch unit located inside the frying equipment.

[0067] The recent output color state vector is: ; in, This indicates the batch of materials that has recently completed the evaluation of stable color.

[0068] Deep reinforcement learning strategies output candidate residual actions based on the state vector: ; in, This indicates a deep reinforcement learning strategy. Indicates the strategy parameters, This represents the candidate residual action of the reinforcement learning output.

[0069] The baseline process formulation is defined as: ; in, This indicates the baseline process formulation.

[0070] The residual action is defined as: ; in, Indicates the first Adjustment amount of residual oil temperature in each temperature zone This indicates the residual adjustment amount for the conveying speed. This indicates the adjustment amount for the residual error of the feeding cycle.

[0071] To avoid ambiguity regarding the meaning of the rollback action, the baseline recipe residual action is defined as a zero vector: ; And define the residual action that maintains the current safe action as: ; Control Time The candidate action set is as follows: ; in, Represents the set of candidate actions. This indicates a return to the baseline formula. This indicates that the actual actions performed at the previous control moment will be maintained. This represents the output action of reinforcement learning; the other candidate actions can be determined by... It is obtained through amplitude reduction, local temperature zone adjustment, conveying speed substitution adjustment, or feeding cycle substitution adjustment.

[0072] S108, determine the action impact window of the candidate action. After the candidate action is executed, it does not affect all batches of units, but only those batches of units that are in or about to enter the relevant temperature zone during the equipment response period. Let the set of temperature zones involved in candidate action a be:

[0073] in, This represents the set of temperature zones involved in candidate action a.

[0074] Let the duration of the response of the z-th temperature zone to candidate action a be . The influence time interval of the candidate action in the z-th temperature zone is then:

[0075] in, This represents the time interval during which candidate action 'a' affects the z-th temperature zone at control time 't'. The response duration can be determined from equipment calibration data, historical oil temperature response curves, or enterprise equipment parameters.

[0076] The action influence window of candidate action a is defined as follows:

[0077] in, This represents the action influence window of candidate action a at control time t, which is the set of batch units that the candidate action may actually affect.

[0078] When the candidate action involves adjustments to conveyor speed or feeding cycle time, the action impact window extends to batch units located within the frying equipment during the response period and batch units expected to enter the frying equipment:

[0079] in, Indicates time Batch collection located inside the frying equipment, This represents the set of batches expected to enter the frying equipment during the candidate action response period. It can be determined based on the feed detection signal, conveying speed, inlet position, and response time of candidate actions.

[0080] S109, predict the color margin change under candidate actions. For candidate actions and batch units within the action-affected window The impact of the candidate action on the color margin is predicted based on historical attribution samples.

[0081] Historical attribution samples can be represented as:

[0082] in, Batch unit Historical attribution samples; Represents the characteristics of the process trajectory; This indicates the frying status record for this batch; Indicates loading density; Indicates product size or weight characteristics; This represents the residual action sequence experienced by this batch; Indicates stable color maturity; This indicates the amount of stable color balance.

[0083] The local residual response function is obtained from the historical sample factors:

[0084] in, This represents the estimation function of the candidate action on the predicted change in color balance. This function can be obtained using sliding window regression, recursive least squares, tree models, shallow neural networks, or existing quality prediction models. The specific training method of the model is not a necessary limitation of this invention; its purpose is to provide the predicted change in batch color balance within the action influence window.

[0085] In one implementation, The training objective can be obtained from the difference between the intermediate prediction margin and the final stable margin of the historical batches. For the historical batches... At a certain control moment in its production process Calculate intermediate forecast margin Then, based on the final stable color balance of this batch... The difference between the forecast margin and the intermediate prediction margin is used as a label for the margin change after the action is affected. This allows... Learn the possible direction and degree of change in color margin under given process state and candidate action conditions.

[0086] Candidate Action The predicted color margin after execution is:

[0087] in, Indicates candidate actions Batch Units After Execution The predicted color margin.

[0088] In one alternative implementation, a local linear approximation is used to represent the impact of candidate actions:

[0089] in, Batch unit At any moment The local response matrix. This matrix is ​​obtained by updating historical sample data and is updated as product specifications, oil condition, loading density, or incoming material condition change. Because... It is a three-dimensional residual vector, and It is a motion vector composed of oil temperature in each temperature zone, conveying speed, and feeding cycle time difference. The number of rows is 3, and the number of columns is the same as the dimension of the action vector.

[0090] The change in color margin caused by the candidate action is:

[0091] in, Indicates candidate actions For batch units The predicted change in color margin can be expanded as follows:

[0092] in, This indicates the change in the target color difference allowance. This indicates the change in the remaining risk margin due to excessive local depth. This indicates the amount of change in the margin of color unevenness.

[0093] S110, perform action arbitration based on color balance conflict. Since the same candidate action may act on multiple batches in the fryer simultaneously, and the remaining frying path, loading density, and predicted color balance are different for different batches, the candidate action may affect different batches. To avoid the risk of improving only some batches while causing other batches to enter irreversible over-frying, this method performs color balance conflict judgment before executing the action.

[0094] If there are two batch units And in any dimension of color balance The above satisfies:

[0095] Then determine the candidate action There is a color balance conflict within the window affected by the action. This indicates the dimension of the target color difference margin. This indicates the dimension of residual risk due to excessive local depth. This indicates the dimension of uneven color.

[0096] Define the conflict indicator function:

[0097] in, Indicates candidate actions During control time Are there any color balance conflicts? When In this case, it can be determined that the candidate action does not produce significant margin changes in this batch and dimension, and does not constitute a conflict in the opposite direction on its own.

[0098] Priority constraints are set for excessively deep risk margins in certain areas. If any batch of units exists... satisfy:

[0099] Then the candidate action is excluded. Among them, This represents the safety boundary for mitigating localized excessive risk. This safety boundary can be determined by company quality standards, product appearance standards, or statistical analysis of historical qualified samples. Typically, a suitable value can be used. .

[0100] Similarly, target color difference margin safety boundary It can satisfy Uneven color, allowance, safety boundary It can satisfy .

[0101] The set of candidate actions that can be included in the action genre is as follows:

[0102] in, Represents the set of valid candidate actions; , , These represent the safety boundaries for target color difference margin, local over-darkening risk margin, and color unevenness margin, respectively.

[0103] For each valid candidate action, calculate the arbitration cost:

[0104] in, Indicates candidate actions During control time The cost of arbitration; Batch unit For candidate actions Arbitration weight; , , Representing candidate actions The predicted target color difference, the predicted proportion of dark-colored risk pigments, and the predicted color unevenness after execution; , , , , These are the weighting coefficients; This represents the residual action actually performed at the previous control moment. The weighting coefficients mentioned above can be set according to the company's control requirements for average color difference, risk of local over-darkening, color uniformity, and smoothness of action, with non-negative values ​​preferred.

[0105] The intercropping weight can be defined as:

[0106] in, Batch unit Location-related weights Indicates candidate actions For batch units The intensity of action, , , These are the weighting coefficients. It can be determined based on the remaining frying path of the batch unit, its temperature zone, or its distance from the exit. It can be determined based on the degree of overlap between the temperature range and the batch location range involved in the candidate action, the degree of overlap in response time, or the local response delay.

[0107] The planting action is determined as follows:

[0108] in, This indicates the residual action after arbitration.

[0109] If the set of valid candidate actions is empty:

[0110] Then execute the rollback action:

[0111] In another implementation, when maintaining the current action still satisfies food safety and equipment constraints, it is also possible to... As a backtracking action.

[0112] S111 generates execution actions based on hard constraints related to food safety. The arbitration results of these actions must still meet the boundaries of food safety, equipment capability, and process validation. The set of hard constraints related to food safety is defined as follows: The set of equipment capability constraints is The process verification constraint set is The set of executable process parameters is as follows:

[0113] in, This represents the set of process parameters that the PLC is allowed to execute. Only when the process parameters corresponding to a candidate action simultaneously meet the hard constraints of food safety, equipment capability constraints, and process verification constraints are they allowed to be executed as process parameters.

[0114] The set of executable process parameters can be further represented by the following constraints:

[0115]

[0116]

[0117]

[0118]

[0119] in, and They represent the first Each temperature zone allows for a lower and upper limit of oil temperature; and These represent the lower and upper limits of the permissible conveying speed, respectively. and These represent the lower and upper limits of the allowed feeding cycle time, respectively; Indicates the first Boundary of residual motion rate of change in each temperature zone; This represents the boundary of the rate of change of the residual motion at the conveying speed. This boundary is determined by equipment capacity, product specifications, food safety validation scope, and company process documentation.

[0120] If the process parameters corresponding to the arbitration action meet the following requirements:

[0121] The actual action performed is as follows:

[0122] The corresponding PLC execution parameters are:

[0123] in, This indicates the actual process parameters sent to the PLC.

[0124] If the process parameters corresponding to the arbitration action do not meet the set of executable process parameters, then the arbitration action will be projected onto the set of executable process parameters.

[0125] in, This indicates that candidate actions are mapped to executable actions that satisfy safety constraints. Projection can be achieved by truncating by variable boundaries, truncating by action rate of change, or selecting the residual action with the smallest distance from the arbitration action within the set of executable actions. If a projected action that satisfies the conditions cannot be obtained, the actual executed action is rolled back to a rollback action.

[0126] When the image confidence is insufficient, batch image binding fails, oil film status exceeds the enterprise's set range, incoming material status exceeds the historical reliable range, PLC is abnormal, or communication is interrupted, reinforcement learning candidate actions are not adopted, and the actual action is rolled back to the baseline formula action or the preset safety action.

[0127] S111. Implement delayed reward and reverse reward. Due to the time lag in the frying process, the color evaluation of the current batch does not correspond to the action at the current control moment. This method, after the batch unit completes the color evaluation of the second batch, reversely assigns the color evaluation to the temperature range and control moment it actually experienced.

[0128] Batch Unit The quality cost is:

[0129] in, Batch unit The quality cost; , , These are weighting coefficients. The aforementioned weighting coefficients can be set according to the importance of target color difference, the proportion of dark color risk exposure, and color unevenness in the quality evaluation, with non-negative values ​​being preferred.

[0130] Batch Unit The corresponding action cost is:

[0131] in, Indicates the cost of an action; Indicates batch unit The set of control moments that have an impact; Indicates control time The execution action for batch units The intensity of the effect; , These are the weighting coefficients.

[0132] The constraint cost is:

[0133] in, Indicates the cost of constraints; This indicates the safety constraint trigger indicator. Indicates the amount of color balance conflict arbitration triggered; , This is the weighting coefficient. When the batch unit... When food safety, equipment capability, or process validation constraints are triggered during the execution of the corresponding action, Set to 1 if the batch unit is empty, otherwise set to 0; When a color margin conflict occurs within the window affected by the action, causing the candidate action to be excluded, shrunk, replaced, or rolled back, Select 1 if the value is 1, otherwise select 0.

[0134] Batch Unit The reinforcement learning reward is:

[0135] in, Batch unit The corresponding batch of rewards.

[0136] The rewards will be allocated to each temperature zone based on the temperature process exposure coefficient:

[0137] in, Batch unit In the The reward amount corresponding to each temperature zone.

[0138] The intensity of the effect of the action on the batch unit is defined as follows:

[0139] in, This indicates an indicator function; it takes the value 1 when the condition inside the parentheses is true, and 0 otherwise. It can be satisfied The control timing consists of...

[0140] Control Time The reverse assembly reward is:

[0141] in, Indicates control time The corresponding reverse assembly reward.

[0142] Therefore, reinforcement learning training samples are constructed:

[0143] in, Indicates control time The state vector, Indicates control time The actual residual action performed. This indicates a reverse assembly reward. This represents the state vector at the next control moment.

[0144] The reinforcement learning objective function can be expressed as:

[0145] in, This represents the reinforcement learning objective function. This represents the discount factor.

[0146] The strategy parameter update can be represented as:

[0147] in, The learning rate is represented by the value. Specific deep reinforcement learning algorithms can employ existing algorithms suitable for continuous action control; this invention does not necessarily limit the application to a particular network structure or algorithm name.

[0148] When the number of batch units in the tank changes, the predicted color margin can be aggregated according to the temperature zone. For example, the minimum value of the predicted local over-darkness risk margin, the average value of the target color difference margin, and the average value of the color unevenness margin can be taken in each temperature zone. Alternatively, a preset number of batch units can be selected according to the order of batches from the exit, with the insufficient part being supplemented by the preset value and the excess part represented by statistics. This yields a state vector that meets the input requirements of the reinforcement learning strategy.

[0149] See attached document Figure 3 , Figure 3 This is a schematic diagram of a color adaptive control system for fried poultry products according to an embodiment of the present invention. The system can be deployed in a continuous frying production line and includes a production process data acquisition module, a dual-time-point image acquisition module, an industrial control computing device, a PLC control execution module, a data storage module, and a human-machine interaction module. This system embodiment is used to illustrate the hardware and functional configuration and does not limit the specific calculation methods described in the foregoing method embodiments.

[0150] The production process data acquisition module is used to acquire basic process data during continuous frying. It may include an oil temperature acquisition unit, a conveyor speed acquisition unit, a feeding detection unit, a feeding status acquisition unit, an oil status data interface, an incoming material status data interface, and a PLC status reading interface. The oil temperature acquisition unit can read the measured oil temperature values ​​of each frying zone; the conveyor speed acquisition unit can read the conveyor belt encoder signal; the feeding detection unit can use photoelectric detection, weighing detection, or inlet image detection; the feeding status acquisition unit can record the feeding cycle time or the amount of material fed per unit time. For oil status and incoming material status, existing enterprise detection data can be directly read, or data collected on-site can be read.

[0151] The dual-time-point image acquisition module includes a first imaging station and a second imaging station. The first imaging station is located at the conveyor position after the product leaves the fryer and is used to acquire batch images immediately after leaving the frying equipment. The second imaging station is located after the oil draining or cooling conveyor section and is used to acquire batch images after the surface oil film has weakened. Each imaging station may include an industrial camera, a fixed light source, a lens, a triggering device, an oil-proof protective structure, and an image transmission interface. To ensure stable color acquisition, the imaging area can be equipped with a light-shielding structure, a fixed illumination angle, a lens protection window, and protective components for easy cleaning. The specific camera model, light source type, and communication interface can be selected according to the on-site production line conditions.

[0152] The industrial control computing device receives production process data and image data, and generates candidate control results according to the calculation rules in the method embodiment. This device can be configured to perform functions such as batch data management, image data processing, color feature calculation, in-slot batch state estimation, deep reinforcement learning inference, candidate action management, action arbitration, reward sample generation, and strategy updating. The industrial control computing device can be an industrial computer, an edge computing device, or a control terminal with corresponding computing capabilities. The deep reinforcement learning strategy does not need to be deployed inside the PLC; the PLC can retain its underlying process control and safety control functions.

[0153] The PLC control execution module receives process parameters from the industrial control computing equipment after arbitration and safety judgment, and controls the heating actuators, conveyor belt drive mechanisms, and feeding mechanisms of each frying temperature zone. The PLC control execution module may include heating control interfaces for each temperature zone, conveyor belt speed control interfaces, feeding cycle control interfaces, safety interlock interfaces, manual control interfaces, and retraction control interfaces. The PLC maintains boundaries for food safety, equipment capability, and process validation. When the control parameters output by the industrial control computing equipment do not meet the boundary requirements, the PLC can refuse execution or switch to the baseline process formula.

[0154] The data storage module records production process data, batch unit data, image data or image features, color evaluation data, candidate actions, arbitration actions, actual executed actions, safety constraint trigger records, and training samples. Batch unit data may include batch number, entry time, location trajectory, temperature zone experience, and discharge time. Image data can be saved as original images, compressed images, or image features according to enterprise data management requirements. Control data may include reinforcement learning candidate actions, arbitration-tried actions, PLC actual execution parameters, and rollback records. This data is used for traceability, strategy training, process verification, and anomaly analysis.

[0155] The human-machine interface (HMI) module is used by operators to set and view production control information. Operators can set the baseline process formula, target standard color, color allowable boundaries, residual action boundaries, safety constraint parameters, and operating modes. The HMI module can also display the current batch status, output color evaluation, action arbitration results, abnormal alarms, rollback status, and historical batch query results. In restricted automatic control mode, operators can view the system's suggested actions and whether they have been executed; in manual takeover mode, the PLC executes manually set or baseline process formulas.

[0156] The system can have data acquisition mode, offline training mode, shadow operation mode, restricted automatic control mode, manual takeover mode, and anomaly rollback mode. Data acquisition mode is used to accumulate historical attribution samples; offline training mode is used to train prediction functions and control strategies based on historical data; shadow operation mode is used to verify candidate actions and arbitration results without writing to the PLC; restricted automatic control mode is used to execute control actions that pass arbitration and safety judgments; manual takeover mode is used for operator control of process parameters; and anomaly rollback mode is used to restore the system to the baseline or safety process recipe in case of detected anomalies, action anomalies, or communication anomalies.

[0157] In alternative implementations, the batch unit division method can be adjusted according to the production line cycle time. Batch units can be divided according to a fixed time window, a fixed conveying distance window, or a feeding trigger window based on the feeding detection signal. For production lines with discontinuous feeding or large fluctuations in the amount of material fed in a single batch, a combination of the feeding trigger window and the conveying distance window can be used. Regardless of the window division method used, the batch unit, rather than a single product, is used as the object for temperature zone experience, image binding, and action attribution.

[0158] In alternative implementations, the color space can be the CIELAB color space, or it can be HSV, RGB normalized features, browning index, or a color evaluation index defined internally by the company. If other color spaces are used, the target color difference, the proportion of dark-risk pixels, and color unevenness should be converted into indicators that can be used for margin calculation. That is, the replaced color indicators should still be able to form at least one margin constraint among the target color difference margin, local over-darkness risk margin, and color unevenness margin.

[0159] In alternative implementations, oil film interference compensation can be achieved through dual-time point color differences, highlight area changes, brightness changes, or combinations thereof. For products where the impact of surface oil film after discharge is minimal, the weight of the oil film compensation term can be reduced; for products with significant surface reflectivity, the weight of highlight area changes in the oil film interference coefficient can be increased. These adjustments do not alter the fundamental processing method of dual-time point batch-level color binding.

[0160] In alternative implementations, the prediction function for predicting the color balance of a batch in the oil tank can be implemented using a regression model, tree model, neural network model, recursive least squares model, or an existing quality prediction model of the enterprise. The inputs to the prediction function include at least the batch process trajectory and actual control actions, and preferably also the oil state, incoming material state, product size or weight characteristics, and loading density. Regardless of the prediction model used, its output represents the predicted color maturity or predicted color balance of the batch in the oil tank, without requiring direct color measurement within the oil tank.

[0161] In alternative implementations, the deep reinforcement learning algorithm can employ any existing algorithm suitable for continuous action control. The specific number of network layers, activation function, optimizer, or training parameters of the reinforcement learning algorithm are not essential limitations of this invention. This invention focuses on ensuring that after the reinforcement learning policy outputs candidate residual actions, these actions undergo action influence window judgment, color margin conflict arbitration, and safety hard constraint judgment.

Claims

1. A method for adaptive color control of fried poultry products based on deep reinforcement learning, characterized in that, include: The fried poultry products that continuously enter the frying equipment are divided into batch units, and the process trajectory data of the batch units are recorded. The batch unit after frying is subjected to batch-level color collection at two time points, and the color evaluation result of the batch unit is determined based on the batch-level color collection results at two time points. The color margin of the batch unit that has completed the color evaluation is determined based on the process trajectory data and the color evaluation results, and the predicted color margin of the batch in the tank is determined based on the process trajectory data of the batch unit that has not yet completed the color evaluation and is located in the frying equipment. The state data, including at least the predicted color margin, is input into the deep reinforcement learning strategy to generate candidate residual actions. The action influence window of the candidate residual action is determined based on the device response range and batch unit position corresponding to the candidate residual action; Based on the predicted color margin of the batch unit within the action influence window, the candidate residual actions are arbitrated for color margin conflict to obtain the arbitrated residual actions. The residual actions after arbitration are subject to safety constraint judgment, and actual execution actions are generated. The frying equipment is then controlled based on the actual execution actions. Based on the color evaluation results, process trajectory data, and actual actions performed on the batch units that have completed the color evaluation, the delayed reward back-assembly is performed, and the deep reinforcement learning strategy is updated based on the delayed reward back-assembly results.

2. The adaptive color control method for fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The process of dividing continuously fed poultry products into batch units and recording the process trajectory data of the batch units includes: Fried poultry products continuously entering the frying equipment are divided into batch units according to time windows, conveying distance windows, or feeding trigger windows; The time when the batch unit enters the frying equipment is determined based on the feed detection signal and the conveying speed. The position range of the batch unit in the conveying direction is determined based on the time when the batch unit enters the frying equipment and the conveying speed. Based on the correspondence between the location interval and the location range of each frying temperature zone, the dwell time of the batch unit in each frying temperature zone is determined; The time, location range, dwell time, oil temperature of each frying zone, conveying speed, feeding cycle, loading density, oil state, incoming material state, and actual actions of the batch unit entering the frying equipment are recorded as the process trajectory data.

3. The adaptive color control method for fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The process trajectory data includes the temperature zone process exposure, which is determined in the following way: Based on the dwell time of the batch unit in each frying temperature zone, the oil temperature, conveying speed, loading density, oil state, product size or weight characteristics, and incoming material state experienced by the batch unit in the corresponding frying temperature zone are obtained. The process exposure value of the batch unit in the corresponding frying temperature zone is determined based on oil temperature, conveying speed, loading density, oil state, product size or weight characteristics, and incoming material state. The process exposure values ​​of the batch units within the same frying temperature zone are accumulated to obtain the temperature zone process exposure amount of the batch unit within that frying temperature zone. The temperature zone contribution coefficient is determined based on the temperature zone process exposure of the batch unit in each frying temperature zone. The temperature zone contribution coefficient is used to determine the degree of contribution of each frying temperature zone to the color evaluation result of the batch unit during delayed reward reverse assembly.

4. The adaptive color control method for fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The dual-timepoint batch-level color acquisition includes: When the batch unit reaches the first imaging point after being unloaded from the pot, the first time point image of the batch unit is acquired. When the same batch of units reaches the second imaging point after oil draining or cooling, the second time point image of the batch of units is acquired. Effective surface pixel extraction, background removal, color space conversion, and highlight region identification are performed on the first time point image and the second time point image, respectively. The oil film interference coefficient is determined based on the average color change and highlight area change between the first time point image and the second time point image. The equivalent stable color is determined based on the average color corresponding to the second time point image and the oil film interference coefficient, and the equivalent stable color is used to determine the color evaluation result. In this context, both the first time point image and the second time point image are bound to the batch unit.

5. The adaptive color control method for fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The color evaluation result includes color maturity, and the color margin includes target color difference margin, local over-darkness risk margin, and color unevenness margin. The color maturity is determined in the following way: The target color difference is determined based on the equivalent stable color and the target standard color; The proportion of dark risk pixels is determined based on the number of dark risk pixels in the effective surface pixels; Color non-uniformity is determined based on the color difference between different sub-regions in the effective surface pixels; The color maturity is composed of the target color difference, the proportion of dark risk pixels, and the color unevenness. The color allowance is determined in the following way: The target color difference margin is determined based on the target color difference allowance boundary and the target color difference; The local over-darkness risk margin is determined based on the allowable boundary of the dark risk pixel ratio and the dark risk pixel ratio. The color unevenness margin is determined based on the allowable boundary of color unevenness and the color unevenness. The target standard color, the target color difference allowable boundary, the dark risk pixel ratio allowable boundary, and the color unevenness allowable boundary are determined by product quality standards, enterprise appearance inspection standards, customer standard samples, historical qualified batch statistics, or standard sample calibration results.

6. The adaptive color control method for fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The determination of the predicted color margin in the batch includes: Establish a historical attribution sample, which includes process trajectory data of historical batch units, incoming material status, oil status, loading density, product size or weight characteristics, actual execution action sequence, color evaluation results and color margin. Using the process trajectory data, incoming material status, oil status, loading density, product size or weight characteristics, and actual execution action sequence of the historical batch unit as input, and the color evaluation results obtained after the historical batch unit completes dual-time point batch-level color collection as labels, a color evaluation prediction relationship is obtained. Based on the color evaluation prediction relationship, the predicted color evaluation result of the batch in the tank is determined; Based on the predicted color evaluation results and the corresponding allowable boundaries, the predicted color margin of the batch in the tank is determined; The predicted color margin is used for candidate residual action evaluation and color margin conflict arbitration, but is not used to replace the actual color evaluation after discharge.

7. The adaptive color control method for fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The action of generating candidate residuals includes: The status data consists of equipment status, incoming material status, the predicted color balance of the batch in the tank, and the color evaluation results of the batch unit that has completed color evaluation. The deep reinforcement learning strategy outputs the original residual action based on the state data; A candidate action set is generated based on the original residual action of the reinforcement learning, and the candidate action set includes the baseline recipe residual action, the action actually executed in the previous control cycle, the original residual action of the reinforcement learning, and alternative candidate actions. The alternative candidate actions are derived from the original residual actions of the reinforcement learning, including reducing the amplitude of the original residual actions of the reinforcement learning, retaining only a portion of the frying temperature zone adjustment, retaining only the conveying speed adjustment, retaining only the feeding cycle adjustment, or combining multiple adjustment amounts into candidate actions that meet the process boundaries. Each candidate residual action in the candidate action set is entered into the action influence window for determination and color margin conflict arbitration.

8. The method for adaptive color control of fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The step of determining the action influence window of the candidate residual action and arbitrating the color margin conflict of the candidate residual action includes: The action influence window corresponding to the candidate residual action is determined based on the frying temperature zone involved in the candidate residual action, the response duration of the frying temperature zone, the conveying speed, and the position range of the batch unit. When the candidate residual action involves conveyor speed adjustment or feeding cycle adjustment, the action impact window is extended to the batch units located in the frying equipment during the response period and the batch units expected to enter the frying equipment. For each batch of units within the action influence window, predict the predicted color margin after the candidate residual action is executed; When the candidate residual action causes the local over-depth risk margin of any batch of units within the action's influence window to fail to meet the safety boundary, the candidate residual action is excluded. When the candidate residual action causes different batches of units within the action influence window to have opposite trends in target color difference margin, local over-darkness risk margin, or color unevenness margin, it is determined that there is a color margin conflict. Calculate the arbitration cost for the remaining candidate residual actions after elimination, and determine the arbitration residual action based on the arbitration cost; The arbitration costs include color evaluation items, movement range items, movement jump items, and color margin conflict items.

9. The adaptive color control method for fried poultry products based on deep reinforcement learning according to claim 1, characterized in that: The security constraint determination and the delayed reward reverse assembly include: Determine whether the process parameters corresponding to the residual action after arbitration simultaneously meet the hard constraints of food safety, equipment capability constraints, and process verification constraints. When the process parameters corresponding to the arbitrated residual action simultaneously satisfy the food safety hard constraint, the equipment capability constraint, and the process verification constraint, the arbitrated residual action is taken as the actual action to be executed. When the process parameters corresponding to the arbitration residual action do not meet the food safety hard constraint, the equipment capability constraint, or the process verification constraint, the arbitration residual action is subjected to boundary truncation, rate of change truncation, or rollback to obtain the actual executed action. Batch rewards are determined based on the target color difference, proportion of dark risk pixels, color unevenness, actual actions performed, color margin conflict arbitration triggering, and safety constraint triggering of the batch units that have completed color evaluation. Based on the temperature zone process exposure and action influence window of the batch unit, the batch reward is reverse-allocated to the corresponding control moment to obtain the reverse assembly reward. The deep reinforcement learning policy is updated based on the state data, the actual executed action, and the reverse assembly reward. Specifically, when the image quality does not meet the preset conditions, batch image binding fails, the grease status exceeds the set range, the incoming material status exceeds the preset operating range, the PLC feedback is abnormal, or communication is interrupted, the candidate residual action output by the deep reinforcement learning strategy is stopped, and the process is reverted to the baseline process formula or the preset safety action.

10. A color adaptive control system for fried poultry products based on deep reinforcement learning as described in any one of claims 1-9, characterized in that, include: The production process data acquisition module is used to collect data such as the time when batches enter the frying equipment, conveying speed, oil temperature in each frying zone, feeding cycle time, loading density, oil state, incoming material state, and actual actions performed. The dual-time-point image acquisition module is used to acquire a first-time-point image at a first imaging point after the food is removed from the pan, and to acquire a second-time-point image at a second imaging point after the oil is drained or cooled. The industrial control computing equipment is used to perform batch unit division, process trajectory data recording, equivalent stable color determination, color evaluation result determination, color margin determination, predicted color margin determination, state data construction, candidate residual action generation, action influence window determination, color margin conflict arbitration, safety constraint judgment, and delayed reward reverse assembly based on the data provided by the production process data acquisition module and the dual time point image acquisition module. The PLC control execution module is used to receive the process parameters corresponding to the actual execution actions output by the industrial control computing device, and to control the heating mechanism, conveying mechanism and feeding mechanism of the frying temperature zone of the frying equipment. The data storage module is used to store batch unit data, production process data, image data or image features, color evaluation results, color margin, predicted color margin, candidate residual actions, arbitration residual actions, actual executed actions, safety constraint trigger records, and training samples. The human-machine interaction module is used to set the baseline process formula, target standard color, allowable boundary, residual action boundary, safety constraint parameters and operating mode, and to display the batch status, color evaluation results, color margin conflict arbitration results, abnormal alarms and rollback status.