A method and system for optimizing processing technology of traditional Chinese medicine decoction pieces
Patent Information
- Application Number
- CN202611176928.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]本发明通过提供一种中药饮片炮制工艺优化方法及系统,以解决现有技术中中药饮片炮制过程中受人工经验影响较大,难以准确确定炒制终点及适应不同批次药材受热特性差异,导致炮制质量稳定性不足的技术问题
通过采集炒制过程中的药材表面图像、锅体温度及挥发物浓度等多源过程数据,实现对药材炭化状态和受热过程的实时感知,避免仅依赖人工经验进行终点判断;通过构建炭化响应模型,结合累积热负荷和当前批次药材热导率预测表面炭化速率,能够表征不同批次药材因受热特性差异产生的炭化变化;通过基于实际炭化速率与预测炭化速率偏差的出锅阈值优化机制,动态确定适用于当前批次药材的最优出锅阈值,提高炒制终点判定准确性;同时结合挥发物浓度变化趋势进行二次判定,实现对药材炭化程度的综合评价,从而提高中药饮片炮制过程的自动化水平和批次质量稳定性。
Smart Images

Figure CN123010404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traditional Chinese medicine decoction piece preparation technology, specifically to a method and system for optimizing the processing technology of traditional Chinese medicine decoction pieces. Background Technology
[0002] Processing of Chinese medicinal herbs is a crucial step in the preparation of traditional Chinese medicine, directly impacting the content of active ingredients, changes in medicinal properties, and clinical efficacy. Charred medicinal herbs, in particular, require controlled heating to induce structural and component changes at appropriate levels, aiming to reduce irritation, enhance hemostatic effects, or alter medicinal properties. Due to differences in tissue structure, water content, and composition among various medicinal herbs, the changes occurring after heating during actual processing are highly complex and uncertain.
[0003] Currently, the charring process of traditional Chinese medicine decoction pieces still relies heavily on operators' experience to make comprehensive judgments regarding charring time, heat, and changes in the appearance of the herbs. Because different operators have varying levels of experience, and even the same person may struggle to maintain consistent judgment across different batches, inconsistency in process control can easily arise. Insufficient charring may result in the herbs not reaching the desired processing state, affecting the quality of the decoction pieces; conversely, excessive charring may cause over-carbonization, altering the active ingredients and reducing medicinal value.
[0004] Furthermore, in actual production, different batches of medicinal materials exhibit varying internal characteristics due to factors such as origin, harvesting time, storage conditions, and initial state. This makes it difficult to guarantee consistent processing results for each batch when using fixed processing parameters. Additionally, traditional processing methods typically rely on the final appearance or manual experience for judgment, which fails to reflect dynamic changes during the processing and results in a certain lag in determining the processing endpoint.
[0005] Therefore, the existing processing methods for Chinese herbal medicine slices suffer from insufficient consistency in quality control, limited adaptability to different batches, and the need to improve the accuracy of determining the processing endpoint. There is an urgent need to provide a process optimization method that can improve the stability and quality consistency of the processing process. Summary of the Invention
[0006] This invention provides a method and system for optimizing the processing of traditional Chinese medicine decoction pieces, thereby addressing the technical problem in the prior art where the processing of traditional Chinese medicine decoction pieces is greatly influenced by human experience, making it difficult to accurately determine the frying endpoint and adapt to the differences in the heating characteristics of different batches of medicinal materials, resulting in insufficient stability of the processing quality.
[0007] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: In a first aspect, the present invention provides a method for optimizing the processing technology of traditional Chinese medicine decoction pieces, including: Acquire image sequences of the surface of medicinal materials, time-series data of pot temperature, and time-series signals of volatile concentration during the stir-frying process; The actual value of the surface carbonization rate is extracted from the image sequence, and the cumulative heat load is calculated based on the time series data of the pot body temperature. Using the cumulative heat load and the thermal conductivity of the current batch of medicinal materials as input, the carbonization response model is invoked to calculate the expected value of the surface carbonization rate at the current moment; Based on the deviation between the actual value of the surface carbonization rate and the expected value of the surface carbonization rate, a single-variable optimization problem is constructed with the final discharge threshold as the decision variable and the minimization of the square of the deviation as the objective function. The benchmark discharge threshold corresponding to the medicinal material variety is used as the initial solution for iterative optimization, and the optimal discharge threshold that minimizes the deviation is output. When the cumulative heat load reaches the optimal discharge threshold and the rising slope of the volatile concentration time series signal is within a preset range, a discharge control signal is output.
[0008] Secondly, the present invention provides a system for optimizing the processing technology of traditional Chinese medicine decoction pieces, comprising: The image and process data acquisition module is used to acquire image sequences of the surface of medicinal materials, time-series data of pot temperature, and time-series signals of volatile concentration during the stir-frying process; The carbonization state analysis module is used to extract the actual value of the surface carbonization rate from the image sequence and calculate the cumulative heat load based on the pot body temperature time series data. The carbonization response prediction module is used to take the cumulative heat load and the thermal conductivity of the current batch of medicinal materials as inputs, call the carbonization response model, and estimate the expected value of the surface carbonization rate at the current moment. The unloading threshold optimization module is used to construct a single-variable optimization problem based on the deviation between the actual value of the surface carbonization rate and the expected value of the surface carbonization rate. The problem is to take the final unloading threshold as the decision variable and the minimization of the square of the deviation as the objective function. The module then iteratively optimizes the solution using the benchmark unloading threshold corresponding to the medicinal herb variety as the initial solution and outputs the optimal unloading threshold that minimizes the deviation. The boiler discharge control module is used to determine whether the cumulative heat load has reached the optimal boiler discharge threshold and whether the rising slope of the volatile concentration time series signal is within a preset range. When the conditions are met, the boiler discharge control signal is output.
[0009] One or more technical solutions provided in this invention have at least the following technical effects or advantages: By collecting multi-source process data such as images of the medicinal materials' surface, pot temperature, and volatile concentration during the roasting process, real-time perception of the carbonization state and heating process of the medicinal materials is achieved, avoiding reliance solely on human experience for endpoint judgment. By constructing a carbonization response model and combining cumulative heat load and the thermal conductivity of the current batch of medicinal materials to predict the surface carbonization rate, the carbonization changes caused by differences in heating characteristics among different batches of medicinal materials can be characterized. Through an optimization mechanism for the discharge threshold based on the deviation between the actual carbonization rate and the predicted carbonization rate, the optimal discharge threshold applicable to the current batch of medicinal materials is dynamically determined, improving the accuracy of roasting endpoint judgment. At the same time, a secondary judgment is made by combining the trend of volatile concentration changes, realizing a comprehensive evaluation of the degree of carbonization of medicinal materials, thereby improving the automation level and batch quality stability of the traditional Chinese medicine processing process. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of a method for optimizing the processing technology of traditional Chinese medicine decoction pieces provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the golden section optimization process for the unloading threshold provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a system for optimizing the processing technology of traditional Chinese medicine decoction pieces, provided in an embodiment of the present invention.
[0011] In the attached diagram, the components represented by each number are as follows: Image and process data acquisition module 11, carbonization state analysis module 12, carbonization response prediction module 13, pot discharge threshold optimization module 14, pot discharge control module 15. Detailed Implementation
[0012] This invention provides a method and system for optimizing the processing of traditional Chinese medicine decoction pieces, which specifically solves the technical problem in the prior art that the processing of traditional Chinese medicine decoction pieces is greatly affected by human experience, making it difficult to accurately determine the frying endpoint and adapt to the differences in the heating characteristics of different batches of medicinal materials, resulting in insufficient stability of the processing quality.
[0013] It should be noted that the terms "comprising" and "having" are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0014] Example 1, as Figure 1 As shown, this invention provides an optimized method for processing traditional Chinese medicine decoction pieces, comprising: S100: Acquire image sequences of the surface of medicinal materials, time-series data of pot temperature, and time-series signals of volatile concentration during the stir-frying process; Step S100 in the method provided in this embodiment of the invention includes: A multispectral camera was used to synchronously acquire reflectance images of the surface of medicinal materials in the visible and near-infrared bands at a fixed frame rate, which were recorded as a set of original image sequences. In traditional charring processes, operators typically rely on observing color changes in the medicinal materials to determine the charring endpoint. However, due to differences in moisture content, tissue structure, and heating uniformity among different batches of medicinal materials, the degree of charring can vary even with the same charring time, easily leading to undercharring or overcharging. Therefore, this embodiment utilizes multispectral imaging to continuously monitor the surface state of the medicinal materials during the charring process, providing image-based information for intelligent determination of the charring endpoint.
[0015] Specifically, a multispectral camera is installed above the stir-frying pan, facing the area where the medicinal materials are stir-fried, and acquires images of surface changes of the medicinal materials in real time during the stir-frying process. The multispectral camera includes a visible light imaging unit and a near-infrared imaging unit.
[0016] The visible light imaging unit is used to acquire information about the color changes on the surface of medicinal materials. During the charring process, as the degree of carbonization on the surface of the medicinal materials increases, the color of the materials usually changes from the original color to dark brown or blackish-brown. Visible light images can reflect this process of color change in the appearance of the medicinal materials.
[0017] The near-infrared imaging unit is used to acquire information on changes in the internal structure and moisture content of medicinal materials. As the internal moisture content of the medicinal materials continuously decreases during the charring process, accompanied by the pyrolysis of organic matter, the reflectivity of the medicinal materials to different wavelengths of light changes under near-infrared light. Therefore, near-infrared images can help distinguish between color changes caused by variations in illumination and actual charring changes.
[0018] Furthermore, to ensure the continuity of image data during the determination of the charcoal frying endpoint, this embodiment adopts a fixed frame rate synchronous acquisition method.
[0019] Specifically, the sampling frequency of the multispectral camera is determined based on historical charring experimental data. During the charring process of multiple batches of medicinal materials, data on changes in the surface state of the materials are continuously collected. The duration of the rapid change phase from the pre-charring state to the target charring state is statistically analyzed, and the average duration of the rapid charring phase is found to be at least 0.5 seconds. Simultaneously, based on the subsequent requirements for detecting changes in the charred area, at least 10 sets of continuous images need to be acquired during the rapid charring phase to ensure the ability to calculate the trend of charred area changes per unit time. Therefore, the image sampling period is set to no more than 0.05 seconds, corresponding to a sampling frequency of no less than 20 Hz. In this embodiment, 20 Hz is preferably used as the synchronous acquisition frequency of the multispectral camera.
[0020] Therefore, at the current charcoal frying time, the following images were acquired: visible light and near-infrared images at time 1, visible light and near-infrared images at time 2, ..., and visible light and near-infrared images at time N. The visible light and near-infrared images at the same timestamp were matched to form a multispectral raw image sequence for charcoal frying state analysis.
[0021] Furthermore, since the inside of the charcoal frying pan is usually exposed to high-temperature radiation, oil fumes, water vapor, and medicinal dust during the charcoal frying process, it can easily cause the camera temperature to rise and the lens to become contaminated. Therefore, this embodiment sets a high-temperature resistant protective structure for the multispectral camera.
[0022] Specifically, a high-temperature resistant protective housing is installed on the outside of the multispectral camera.
[0023] Based on the actual operation status test results of the charcoal frying equipment, the ambient temperature near the frying area is usually in the range of 120℃ to 250℃. Therefore, the high-temperature resistant protective shell is made of heat-insulating material that can withstand temperatures of not less than 300℃ in order to reduce the impact of high-temperature radiation on the internal photosensitive element of the camera.
[0024] Furthermore, heat-insulating glass is installed at the front of the multispectral camera lens. The heat-insulating glass is placed between the lens and the cooking area to reduce the entry of high-temperature airflow and infrared heat radiation into the lens, while ensuring that visible light and near-infrared light can pass through normally.
[0025] Furthermore, a compressed air purging port is installed on the outside of the heat-insulating glass.
[0026] Specifically, during the charcoal roasting process, compressed air is continuously output to the surface of the heat-insulating glass through the compressed air blowing port, so that an airflow protective layer is formed at the front end of the lens, thereby reducing the adhesion of oil fume particles, water vapor and medicinal dust.
[0027] The compressed air purging flow rate is determined based on historical charcoal frying operation data.
[0028] Specifically, images were acquired under different purging flow rates, and the corresponding image quality evaluation indicators were calculated: Image quality evaluation index = mean reflectance of effective medicinal material area ÷ standard deviation of reflectance fluctuation of background area.
[0029] Through multiple batches of testing, it was found that when the compressed air flow rate is 15L / min, the image quality evaluation index reaches its maximum, while not significantly affecting the internal thermal environment of the wok. Therefore, in this embodiment, the compressed air purging flow rate is set to 15L / min.
[0030] Furthermore, after obtaining the original multispectral image sequence, the visible light image and the near-infrared image are fused to obtain a fused image that can characterize the degree of charring.
[0031] Specifically, for any pixel location, the visible light reflectance and near-infrared reflectance are weighted and fused: Fusion reflectivity = visible light reflectivity × visible light weight + near-infrared reflectivity × near-infrared weight.
[0032] The visible light weight and near-infrared weight were obtained by calibration using historical charcoal samples.
[0033] Specifically, samples of medicinal materials at different stages of charring were collected, including the uncharred stage, the initial charred stage, the target charred stage, and the over-charred stage, and the corresponding charred grade was determined by professional processing personnel according to the standard characteristics requirements.
[0034] Subsequently, the visible light weights and near-infrared weights are searched in stages. First, a coarse-grained search is performed, adjusting the visible light weights within a preset range according to the first step length. Then, the corresponding near-infrared weights are determined based on the constraint that the sum of the visible light weights and near-infrared weights is 1. The fused image is generated using the combination of each weight, and the range of optimal weights is determined using the accuracy of carbonization level recognition as the evaluation index.
[0035] Furthermore, a fine-grained search is performed near the optimal weights obtained from the coarse-grained search, and the weights are further adjusted according to a second step length that is smaller than the first step length to improve the weight calibration accuracy. The weight combination with the highest carbonization level identification accuracy is selected as the final fusion weight.
[0036] In this embodiment, 100 batches of historical charcoal samples were used for calibration. After coarse-grained search and fine-grained search, the visible light weight was determined to be 0.38 and the near-infrared weight to be 0.62. At this time, the charcoal grade recognition accuracy of the fused image was the highest. Therefore, the visible light weight was set to 0.38 and the near-infrared weight to 0.62.
[0037] In summary, this step utilizes a multispectral camera with a high-temperature resistant protective structure to continuously acquire visible and near-infrared reflectance images of the medicinal materials during the charring process under high temperature and oil fume conditions. By calibrating historical samples to determine spectral fusion parameters, the acquired multispectral images accurately reflect the changes in the charring process of the medicinal materials. This provides a reliable data foundation for subsequent analysis based on changes in charring regions, calculation of charring rates, and intelligent determination of the charring endpoint, thereby improving the accuracy and consistency of the charring process control for traditional Chinese medicine decoction pieces.
[0038] S200: Extract the actual value of surface carbonization rate from the image sequence and calculate the cumulative heat load based on the time series data of the pot body temperature; Step S200 in the method provided in this embodiment of the invention includes: The pixel gray values of three adjacent frames in the original image sequence are subjected to temporal difference operation to obtain the pixel gray values of the difference image. The pixel gray values of the difference image are then thresholded to separate the carbonized and non-carbonized regions. The percentage of carbonized region pixels in the total number of pixels in the medicinal material image is calculated. The difference between the current percentage of carbonized region and the previous percentage is combined with a fixed frame rate to obtain the actual value of the surface carbonization rate. The cumulative heat load is obtained by collecting temperature data at multiple points on the boiler wall using a thermocouple array, weighting the multi-point temperature data, and integrating it over time. The gas sensor array collects the time-series signal of volatile concentration in the space above the boiler cavity, and uses the response value of a specific sensitive channel in the volatile concentration time-series signal as the input to determine the slope of the rising segment.
[0039] Furthermore, after acquiring the original image sequence of the surface of the medicinal materials, the time-series data of the pot temperature, and the time-series signal of the volatile concentration during the frying process, this embodiment further extracts features from the multi-source time-series data to obtain the actual value of the surface carbonization rate, the cumulative heat load, and the volatile change characteristics used to characterize the state of the charring process.
[0040] Specifically, for the image sequence of the medicinal material surface, carbonization region identification processing is performed on continuous image frames to determine the range of carbonization region at each time point.
[0041] Furthermore, based on the carbonization region identification results at each time point, the number of pixels corresponding to the carbonization region on the surface of the medicinal material at the current time is counted, and the proportion of the number of pixels in the carbonization region to the number of pixels in the effective imaging region of the medicinal material is calculated.
[0042] The proportion of carbonized area is calculated as follows: Percentage of carbonized area = Number of pixels in carbonized area ÷ Total number of pixels in the image of medicinal material.
[0043] The total number of pixels in the medicinal material imaging is the number of pixels in the effective medicinal material area after removing the pot area, background area, and invalid occlusion area.
[0044] Furthermore, the difference between the current carbonized region percentage and the previous carbonized region percentage is calculated, and combined with a fixed frame rate for image acquisition, the actual value of the surface carbonization rate, which characterizes the rate of carbonization expansion on the surface of the medicinal material, is obtained. Specifically: Actual value of surface carbonization rate = (percentage of carbonized area at the current moment - percentage of carbonized area at the previous moment) ÷ sampling time interval.
[0045] Wherein, the sampling time interval = 1 ÷ fixed frame rate.
[0046] For example, in this embodiment, the multispectral camera is set to a fixed frame rate of 20Hz, and the sampling time interval is 0.05s. If the carbonized area accounts for 52% at the current moment and 48% at the previous moment, then the actual value of the surface carbonization rate is (52%-48%)÷0.05, which means that the growth rate of the carbonized area on the surface of the medicinal material at the current stage is 80% / s.
[0047] The above calculations can convert the changes in the degree of carbonization on the surface of medicinal materials at different stages of processing into a quantitative rate over a continuous time scale.
[0048] Furthermore, in order to reduce the impact of uneven heating at different locations in the wok on the heat load evaluation results, this embodiment constructs a fusion temperature sequence characterizing the heating state of the entire frying area based on multi-point temperature data of the wok wall collected by a thermocouple array, and obtains the weighted cumulative heat load based on the fusion temperature sequence.
[0049] Specifically, the thermocouple array collects temperature data corresponding to different positions on the pot wall according to a preset temperature sampling period, and configures a corresponding timestamp for each temperature sampling data. Each temperature sampling point corresponds to the local heating state of different areas of the pot body.
[0050] Based on the heat transfer path and actual heating characteristics of the wok, the wok is divided into multiple temperature sensing zones.
[0051] For example, in this embodiment, the wok is divided into a central heating area at the bottom of the wok, a diffusion area at the edge of the bottom of the wok, a heating area on the first side wall, and a heating area on the second side wall, and a corresponding thermocouple temperature acquisition unit is set for each of them.
[0052] Among them, the central heating area of the pot bottom is used to reflect the main heat input state under the direct action of the heating source; the diffusion area at the edge of the pot bottom is used to reflect the temperature change after the heat diffuses along the direction of the pot bottom; the heating area of the first side wall and the heating area of the second side wall are used to reflect the influence of lateral heat transfer from the pot wall on the heating process of the medicinal materials.
[0053] Because the heat transfer paths and efficiencies between different areas of the wok and the medicinal materials vary, the contribution of temperature changes in different areas to the carbonization process of the medicinal materials differs. Therefore, in this embodiment, spatial weighted fusion of temperature data corresponding to each temperature collection area is performed at the same sampling time. Specifically, the fused temperature value at the current sampling time is calculated as follows: Fusion temperature value = Temperature data of the heated area at the center of the pot bottom × Temperature weight of the central area of the pot bottom + Temperature data of the diffused area at the edge of the pot bottom × Temperature weight of the edge area of the pot bottom + Temperature data of the heated area of the first side wall × Temperature weight of the first side wall + Temperature data of the heated area of the second side wall × Temperature weight of the second side wall.
[0054] Each temperature weight is used to characterize the contribution of the corresponding detection location to the overall heating process of the medicinal material, and the sum of all temperature weights is 1.
[0055] The temperature weights for each region were obtained through offline calibration using historical charcoal frying experimental data.
[0056] Specifically, temperature data was first collected during the charring process of multiple batches of medicinal materials. Simultaneously, after each batch was charred, professional processing personnel evaluated the final charring state of the medicinal materials according to preset charring grade standards and converted the charring grade into corresponding numerical labels.
[0057] For example, the following are coded as 1, 2, and 3, respectively: not reaching the target carbonization level, reaching the target carbonization level, and exceeding the target carbonization level.
[0058] Subsequently, for each temperature zone, the temperature change characteristics during the frying process were extracted. These temperature change characteristics included at least one of the average temperature, maximum temperature, and rate of temperature increase during the frying process in that zone.
[0059] For example, for the j-th temperature region, its temperature change characteristics = (average temperature, maximum temperature, rate of temperature rise).
[0060] Furthermore, the correlation between the temperature variation characteristics of each temperature region and the final carbonization grade label is calculated. Specifically, this embodiment uses the Pearson correlation coefficient as an evaluation index for the degree of regional correlation.
[0061] The correlation degree corresponding to the j-th temperature region is calculated as follows: Regional correlation degree = absolute value of the correlation coefficient between the temperature change characteristics of this temperature region and the carbonization grade label.
[0062] The larger the absolute value of the correlation coefficient, the stronger the correlation between temperature changes in the region and the final degree of carbonization of the medicinal materials, and the higher its contribution to the overall evaluation of the heating state.
[0063] Furthermore, the correlation levels obtained from each region are normalized to obtain the temperature weights for the corresponding regions. Specifically: Regional temperature weight = Correlation degree of this region ÷ Sum of correlation degrees of all regions.
[0064] For example, after collecting 100 batches of historical charcoal frying experimental data, the correlation degree of the heated area at the center of the pot bottom was calculated to be 0.82, the correlation degree of the diffused area at the edge of the pot bottom was 0.38, the correlation degree of the heated area on the first sidewall was 0.27, and the correlation degree of the heated area on the second sidewall was 0.23. Therefore, the sum of the correlation degrees of all areas = 0.82 + 0.38 + 0.27 + 0.23 = 1.70. Thus, the temperature weight of the heated area at the center of the pot bottom = 0.82 ÷ 1.70 ≈ 0.48, the temperature weight of the diffused area at the edge of the pot bottom = 0.38 ÷ 1.70 ≈ 0.22, the temperature weight of the heated area on the first sidewall = 0.27 ÷ 1.70 ≈ 0.16, and the temperature weight of the heated area on the second sidewall = 0.23 ÷ 1.70 ≈ 0.14.
[0065] Furthermore, the fusion temperature values corresponding to each sampling time are arranged in chronological order to form fusion temperature time-series data that reflects the overall thermal state changes of the pot during the frying process.
[0066] Among them, the fused temperature time series data comprehensively reflects the temperature changes at different spatial locations during the frying process. Compared with the temperature sequence formed by a single temperature acquisition point, it can reduce the deviation in thermal state evaluation caused by local heating anomalies or local temperature fluctuations.
[0067] Subsequently, based on the time-series data of the fusion temperature, a time-cumulative calculation was performed to obtain the cumulative heat load after multi-point temperature-weighted fusion. Specifically: Multi-point fusion cumulative heat load = cumulative heat effect of fusion temperature time series data within the range from the start of frying to the current time.
[0068] Since each temperature value in the fused temperature time series data is obtained by weighting temperature data from multiple spatial locations, the multi-point temperature weighted fused cumulative heat load simultaneously includes information on the spatial heat distribution of the pot body and information on the time changes during the frying process.
[0069] For example, at a certain sampling moment, the temperatures collected for the central heating area of the pot bottom, the diffusion area at the edge of the pot bottom, the heating area of the first sidewall, and the heating area of the second sidewall are 180℃, 170℃, 168℃, and 172℃, respectively. The temperature weights obtained from the historical data are 0.48, 0.22, 0.16, and 0.14, respectively. Therefore, the fusion temperature value corresponding to the current sampling moment is approximately 180×0.48 + 170×0.22 + 168×0.16 + 172×0.14 ≈ 175.2℃. Subsequently, the fusion temperature values corresponding to each sampling moment are accumulated according to the order of cooking time to obtain the multi-point temperature-weighted cumulative heat load corresponding to the current batch of medicinal materials.
[0070] Furthermore, in order to obtain the characteristics of volatile release changes during the charcoal roasting process, this embodiment uses a gas sensor array to collect the time-series signal of volatile concentration in the space above the pot cavity.
[0071] Since the release of volatiles lags behind the changes in the carbonized area on the surface of the medicinal material, the gas sensor array uses an independent sampling period to collect concentration data and records the sampling time corresponding to each concentration response value through a timestamp.
[0072] The gas sensor array is a metal-oxide-semiconductor (MODS) gas sensor array. MODS gas sensors utilize the property that the sensitive material adsorbs volatile gas molecules, resulting in a change in resistance, to detect changes in the concentration of volatiles.
[0073] Specifically, multiple metal oxide semiconductor gas sensing units are arranged in the exhaust area above the cooking pot cavity. Each sensing unit uses different sensitive materials to form multiple sensitive channels to improve the response capability to changes in different volatile substances.
[0074] Each sensitive channel outputs a corresponding response value, which is then arranged in chronological order to form a time-series signal of volatile concentration.
[0075] Furthermore, based on the endpoint sample data from historical charcoal frying processes, the sensitive channels with the highest correlation to changes in the target carbonization state were identified.
[0076] For example, analysis of 100 batches of historical charcoal frying data revealed that the second sensitive channel showed a continuous upward trend near the target charcoal frying endpoint, and its response change was most consistent with the manually determined endpoint time. Therefore, the response value of the second sensitive channel was selected as the input for judging the slope of the rising volatile concentration.
[0077] Step S200 in the method provided in this embodiment of the invention further includes: For the (t-1)th, tth, and (t+1)th frames in the original image sequence, calculate the pixel grayscale value difference between the (t+1)th and (t-1)th frames, where t is a positive integer; Calculate the difference in pixel grayscale values between frame t and frame t-1 pixel by pixel. Take the absolute value of the two sets of difference images at the corresponding pixel positions and then calculate the average value as the pixel grayscale value of the three difference images. The median and interquartile range of all pixel gray values in the three-frame differential images are calculated, and the dynamic segmentation threshold is determined. In the three-frame difference images, pixels with a gray value greater than the dynamic segmentation threshold are marked as carbonized regions, and those without are marked as non-carbonized regions. A morphological closing operation of dilation followed by erosion is performed on the labeled binary image to fill the pores inside the carbonized region, resulting in the separated carbonized and non-carbonized regions.
[0078] Specifically, the (t-1)th, tth, and t+1th frames are obtained from the original image sequence, where t is a positive integer.
[0079] For any pixel position, obtain the pixel grayscale value of the corresponding position in the three frames of the above images.
[0080] First, the difference between the (t+1)th frame and the (t-1)th frame is calculated to obtain the first difference image. The grayscale value corresponding to any pixel position in the first difference image is calculated as follows: First differential gray value = gray value of the corresponding pixel in frame t+1 - absolute value of gray value of the corresponding pixel in frame t-1.
[0081] By using a differential method across time intervals, the response level in continuously changing regions can be enhanced, while reducing the impact of random noise in a single frame.
[0082] Furthermore, a difference calculation is performed between the t-th frame image and the (t-1)-th frame image to obtain a second difference image. The grayscale value corresponding to any pixel position in the second difference image is calculated as follows: Second differential gray value = gray value of the corresponding pixel in frame t - absolute value of the gray value of the corresponding pixel in frame (t-1).
[0083] Subsequently, the first and second difference grayscale values are fused at the corresponding pixel locations to obtain the corresponding pixel grayscale values of the three difference images. Specifically: Three-frame differential grayscale value = (first differential grayscale value + second differential grayscale value) ÷ 2.
[0084] By using the above method, the response capability to areas of continuous carbonization change can be improved by simultaneously utilizing the change trends over a longer time interval and the change trends of adjacent frames.
[0085] Furthermore, in order to adapt to the differences in grayscale changes caused by different batches of medicinal materials, different frying temperatures, and different lighting environments, this embodiment does not use a fixed threshold, but dynamically determines the segmentation threshold based on the grayscale distribution of the current three-frame differential images.
[0086] Specifically, the gray values of all pixels in the three-frame differential images are counted, and their corresponding median and interquartile range are calculated.
[0087] The median represents the overall pixel change level within the current time window, while the interquartile range (ICM) represents the dispersion of pixel changes. The ICM is calculated as follows: Interquartile range = third quartile - first quartile.
[0088] Subsequently, a dynamic segmentation threshold is constructed based on the median and interquartile range: Dynamic segmentation threshold = median of pixel grayscale values in the difference image + adjustment coefficient × interquartile range.
[0089] The adjustment coefficient is used to adjust the sensitivity to areas of abnormal change, and it is obtained by calibration based on historical charcoal frying image samples.
[0090] Specifically, historical image data of different stages of charcoal frying were collected, including the uncharred stage, initial charred stage, target charred stage, and over-charred stage, and the corresponding charred regions were obtained through manual annotation. Subsequently, the consistency between the segmentation results and the manually annotated results under different adjustment coefficients was tested, and the region intersection-union ratio (IUU) was used as the evaluation index. Among them: Region intersection-union ratio = Intersection area of automatically segmented region and manually labeled region ÷ Union area of automatically segmented region and manually labeled region.
[0091] After testing multiple batches of historical charcoal smelting data, the regional crossover ratio was highest when the adjustment coefficient was 2. Therefore, the adjustment coefficient was determined to be 2.
[0092] Furthermore, the three-frame difference images are binarized based on a dynamic segmentation threshold.
[0093] Specifically, when the difference in grayscale value between three frames corresponding to a certain pixel position is greater than the dynamic segmentation threshold, the pixel position is marked as a carbonization candidate region; when the difference in grayscale value between three frames corresponding to a certain pixel position is less than or equal to the dynamic segmentation threshold, the pixel position is marked as a non-carbonization region.
[0094] For example, during a charcoal frying process, the grayscale values of a certain pixel location in three consecutive frames are as follows: frame t-1 has a grayscale value of 100, frame t has a grayscale value of 130, and frame t+1 has a grayscale value of 160. Then, the first difference grayscale value = |160-100| = 60, the second difference grayscale value = |130-100| = 30, and the three-frame difference grayscale value = (60+30)÷2 = 45. If the dynamic segmentation threshold calculated for the current time window is 35, then the grayscale value of 45 corresponding to this pixel location is greater than the dynamic segmentation threshold, and therefore it is marked as a charcoal candidate region.
[0095] Furthermore, after obtaining the binary image based on dynamic threshold segmentation, morphological optimization processing is performed on the binary image to reduce the problems of fracture and internal voids in the carbonized area caused by the surface texture of the medicinal material, local occlusion, and grayscale fluctuations.
[0096] Step S200 in the method provided in this embodiment of the invention further includes: Connected component labeling is performed on the labeled binary image, and each connected component of the non-carbonized pores contained within the carbonized region is extracted; Calculate the pixel area of each connected component and determine the maximum pixel area; The maximum pixel area is converted into the equivalent circle diameter, and the equivalent circle diameter is rounded up to be used as the diameter of the structuring element. A circular structuring element with a diameter equal to the diameter of the structuring element is used to perform a dilation operation on the labeled binary image, and the same circular structuring element is used to perform an erosion operation on the dilated binary image. The newly added pixel regions in the eroded binary image compared to the labeled binary image are classified as carbonized regions, and the remaining regions are classified as non-carbonized regions. The separated carbonized and non-carbonized regions are then output.
[0097] Furthermore, after obtaining the labeled binary image, this embodiment further performs morphological optimization processing on the binary image to eliminate non-carbonized voids in the carbonized area caused by the texture of the medicinal material, local reflection, and image noise, so that the carbonized area remains continuous and intact.
[0098] Specifically, firstly, connected component analysis is performed on the labeled binary image to identify non-carbonized pore regions contained within the carbonized regions.
[0099] Specifically, the set of continuous pixels in the binary image that are marked as non-carbonized regions and surrounded by carbonized regions is determined as the candidate hole connected region.
[0100] Specifically, a connected component labeling algorithm is used to number the non-carbonized pixel regions in the binary image, and based on the positional relationship between each connected component and the boundary of the carbonized region, non-carbonized connected components located inside the carbonized region are selected as the regions to be filled with holes.
[0101] Furthermore, the area of each non-carbonized hole connected region obtained from the screening is statistically analyzed. The pixel area corresponding to each hole connected region is calculated as follows: The pixel area of a hole in a connected region equals the number of pixels contained in that connected region.
[0102] Subsequently, the maximum pixel area is determined in all connected regions of the holes: Maximum hole area = the maximum value among the pixel areas of the connected regions of each hole.
[0103] The maximum pore area is used to characterize the size of the largest missing area inside the current carbonized region, and serves as the basis for determining the size of subsequent structural elements.
[0104] Furthermore, the area of the largest hole is converted into an equivalent circle diameter so that the structural element size can cover the area of the largest hole. The equivalent circle diameter is calculated as follows: .
[0105] Then, the calculated equivalent circle diameter is rounded up to obtain the diameter of the structuring element: By using the above method, the size of the structuring element can cover the largest carbonized area's internal pores in the current image, avoiding the situation where the structuring element is too small and the pores cannot be filled, while also avoiding the situation where the structuring element is too large and the carbonized area's boundary expands excessively.
[0106] Furthermore, a circular structuring element is generated based on the determined structuring element diameter, and the circular structuring element is used to perform a morphological closing operation on the labeled binary image.
[0107] Specifically, the binary image is first dilated using a circular structuring element.
[0108] The expansion operation is used to expand the carbonization area, fill the small pores inside the carbonization area, and connect the discontinuous boundaries of the carbonization area.
[0109] Subsequently, a circular structuring element of the same size as the dilation operation is used to perform an erosion operation on the dilated binary image.
[0110] The corrosion process is used to restore the original boundary of the carbonized area and reduce the additional expansion area generated during the expansion process.
[0111] By performing a closed-loop operation that involves expansion followed by corrosion, the internal pores can be filled while maintaining the overall outline of the carbonized area.
[0112] Furthermore, the binary image after the closing operation is compared with the labeled binary image before the closing operation.
[0113] Specifically, newly added pixel regions after the closing operation are identified as missing regions within the original carbonized region and reclassified as part of the carbonized region. Regions that remain unchanged retain their original classification results. This yields a separation result between carbonized and non-carbonized regions that have continuous boundaries and intact interiors.
[0114] Furthermore, to avoid performing invalid morphological processing when there are no hole areas, this embodiment adds a hole existence determination.
[0115] Specifically, when there are no non-carbonized pore connected regions located inside the carbonized region in the connected region analysis results, that is, when the number of connected regions is zero, it indicates that there are no missing internal regions in the carbonized region of the current binary image that need to be repaired.
[0116] At this point, the structuring element calculation and closing operation are skipped, and the labeled binary image is directly used as the final output.
[0117] Furthermore, when there is at least one non-carbonized pore connected domain, the diameter of the structural element is calculated based on the maximum pore area, and the above-mentioned closing operation is performed.
[0118] For example, during the charring process of a certain batch of medicinal materials, after binary segmentation, it was found that there were three non-charred pore connected regions inside the charred area, with pixel areas of 36 pixels, 64 pixels, and 49 pixels, respectively. The largest pore area is 64 pixels. The calculated equivalent circle diameter is approximately 9.03 pixels. After rounding up, the structuring element diameter is determined to be 10 pixels. Subsequently, a circular structuring element with a diameter of 10 pixels is used to perform a closing operation, filling the largest hole corresponding to 64 pixels inside the carbonized area while maintaining the overall stability of the carbonized area's boundary.
[0119] Step S200 in the method provided in this embodiment of the invention further includes: The timestamps of each frame in the image sequence are matched with the temperature values at each sampling time in the pot body temperature time series data to determine the pot body temperature time series data that has the same time axis as the actual value of the surface carbonization rate, and this data is used as the synchronous temperature time series data. Extract all temperature values from the start of frying to the current time from the synchronous temperature time series data to form a temperature value sequence; The temperature value sequence is divided into adjacent temperature value pairs in chronological order. Each temperature value pair contains the temperature value at the i-th sampling time and the temperature value at the (i+1)-th sampling time, where i is a positive integer from 1 to N-1 and N is the total number of temperature values in the temperature value sequence. For each temperature value pair, calculate the arithmetic mean of the temperature value at the i-th sampling time and the temperature value at the (i+1)-th sampling time to obtain the interval average temperature within the time interval corresponding to the current temperature value pair; Based on the average temperature of the interval and combined with the ambient temperature reference value, the effective temperature rise of the interval is obtained, and multiplied by the equal time interval to obtain the interval heat load of the current time interval; The cumulative heat load from the start of the cooking process to the current time is obtained by summing up the heat load of all time intervals.
[0120] Furthermore, after obtaining the actual value of the carbonization rate of the medicinal material surface and the time series data of the pot temperature, this embodiment further synchronizes the image acquisition time axis and the temperature acquisition time axis to obtain the synchronous temperature time series data corresponding to the surface carbonization change process, and calculates the cumulative heat load during the frying process based on the synchronous temperature time series data.
[0121] Specifically, since the multispectral camera and the temperature acquisition device each use independent sampling periods for data acquisition, there may be a time offset between the timestamps of each frame in the image sequence and the temperature sampling time in the pot body temperature time series data. Therefore, time axis matching is required first.
[0122] Specifically, the acquisition timestamps corresponding to each frame of the image sequence are read, and the sampling times corresponding to each temperature sampling point in the pot body temperature time series data are read.
[0123] Subsequently, based on the time distance between timestamps, each image frame is matched with a temperature sampling point to determine the temperature sampling value closest to the acquisition time of each image frame. The time matching relationship is determined as follows: Time difference = image acquisition timestamp - absolute value of temperature sampling timestamp.
[0124] When the time difference corresponding to a certain temperature sampling moment is the smallest, the temperature sampling value is determined as the synchronous temperature value of the corresponding image moment.
[0125] By using the above method, the temperature time series data and the actual value of surface carbonization rate are placed on the same time axis, providing a synchronous data basis for subsequent heat load calculation.
[0126] Furthermore, all temperature data from the start of frying to the current time are extracted from the synchronized temperature time series data to form a temperature value sequence within the corresponding time range. Specifically, assuming the synchronized temperature time series data contains N temperature sample values, then the following sequence is formed: Temperature value sequence = (temperature value at the first sampling time, temperature value at the second sampling time, ..., temperature value at the Nth sampling time).
[0127] Where N is the number of temperature samples within the current frying time range.
[0128] Furthermore, to improve the continuity of heat load calculation, this embodiment divides the temperature value sequence into multiple adjacent temperature value pairs according to time order. Specifically, the i-th temperature value pair includes the temperature value at the i-th sampling time and the temperature value at the (i+1)-th sampling time.
[0129] Where i is a positive integer between 1 and N-1.
[0130] For example, when the temperature value sequence contains 5 sampled temperature values, it forms 4 temperature value pairs. The first temperature value pair consists of the temperature value at the first sampling time and the temperature value at the second sampling time; the second temperature value pair consists of the temperature value at the second sampling time and the temperature value at the third sampling time, and so on.
[0131] Furthermore, for each temperature value pair, the average temperature within the corresponding time interval is calculated to characterize the actual heating state of the pot body within that time interval. Specifically, the average temperature corresponding to the i-th time interval is calculated as follows: The average temperature of the interval is calculated as (temperature value at the i-th sampling time + temperature value at the (i+1)-th sampling time) ÷ 2.
[0132] By using the above method, compared to directly using the temperature of a single sampling point for calculation, the impact of instantaneous temperature fluctuations on the heat load calculation results can be reduced.
[0133] Furthermore, to eliminate the influence of ambient temperature before the start of frying on the heat load calculation, this embodiment introduces an ambient temperature reference value.
[0134] The ambient temperature reference value refers to the initial equilibrium temperature of the environment in which the heating container is located before the frying begins, that is, the temperature value when the pot is in thermal equilibrium with the surrounding air before it is heated. Temperature is collected by an array of thermocouples placed on the outer surface of the pot before the medicinal materials are added.
[0135] Specifically, the thermocouple array continuously collects the initial temperature data of the pot body at multiple sampling times according to a preset time interval.
[0136] Subsequently, the stability of multiple temperature values collected continuously was assessed to determine the initial temperature at which the pot and the surrounding environment reached thermal equilibrium before the start of frying.
[0137] Specifically, the range of multiple continuously collected temperature samples is calculated. Among them: Temperature fluctuation = Maximum temperature value minus minimum temperature value in continuous sampling temperature values.
[0138] When the temperature fluctuation is less than or equal to the preset temperature tolerance, the current pot body temperature is considered to be in a stable state, and the average temperature under this stable state is used as the ambient temperature reference value.
[0139] The preset temperature tolerance is determined based on the temperature measurement accuracy of the thermocouple array and the natural temperature fluctuation range of the pot body.
[0140] Specifically, under no-load conditions (i.e., when no medicinal materials are added and the heating process is not initiated), multiple sets of pot wall temperature data are continuously collected using a thermocouple array, and the temperature fluctuation range under stable conditions is statistically analyzed. Based on multiple batches of no-load test results, when the pot is in environmental thermal equilibrium, the continuously sampled temperature fluctuation range is less than the sum of the thermocouple measurement accuracy and the temperature change caused by environmental disturbances. Therefore, this embodiment uses the upper limit of stable fluctuation obtained from historical tests as the temperature tolerance.
[0141] For example, in 100 sets of no-load test data, the maximum fluctuation range of the pot wall temperature under steady state was found to be 0.26℃. Considering the sensor measurement error margin, the preset temperature tolerance was set to 0.3℃.
[0142] Furthermore, the ambient temperature reference value is calculated as follows: Ambient temperature reference value = arithmetic mean of multiple consecutive temperature samples under steady-state conditions.
[0143] For example, before adding the medicinal herbs, the thermocouple array continuously collected the pot wall temperature data 10 times, which were 24.8℃, 24.9℃, 24.9℃, 25.0℃, 25.0℃, 25.1℃, 25.0℃, 24.9℃, 25.0℃, and 25.0℃ respectively. The maximum temperature value was 25.1℃, and the minimum temperature value was 24.8℃. Therefore, the temperature fluctuation was 25.1 - 24.8 = 0.3℃. Since the temperature fluctuation was equal to the preset temperature tolerance of 0.3℃, the stability judgment condition was met, and the pot was considered to have reached the initial thermal equilibrium state. The ambient temperature reference value was (24.8 + 24.9 + 24.9 + 25.0 + 25.0 + 25.1 + 25.0 + 24.9 + 25.0 + 25.0) ÷ 10 ≈ 24.96℃. Since the thermocouple display accuracy is 0.1℃, the ambient temperature reference value after rounding according to the measurement accuracy is 25.0℃.
[0144] Furthermore, the effective temperature rise within the corresponding time interval is obtained based on the difference between the average temperature of the interval and the ambient temperature reference value. Specifically: Effective temperature rise in interval = Average temperature in interval - Reference value of ambient temperature.
[0145] When the average temperature of the interval is higher than the ambient temperature reference value, it indicates that the pot provides effective heat input to the medicinal materials; when the two are close, it indicates that no significant heat input has been formed.
[0146] Furthermore, the effective temperature rise within the interval is multiplied by the length of the corresponding time interval to obtain the heat load of the current time interval. Specifically: Interval heat load = effective temperature rise in the interval × length of the time interval.
[0147] The length of the time interval is determined by the time interval between two adjacent temperature sampling times.
[0148] Furthermore, the heat load of all time intervals from the start of cooking to the current time is summed to obtain the cumulative heat load at the current time. Specifically: Cumulative heat load = heat load of the first time interval + heat load of the second time interval + ... + heat load of the N-1th time interval.
[0149] For example, during the charring process of a batch of medicinal herbs, the ambient temperature reference value is 25℃, and the temperature sampling interval is 10s. The temperature values corresponding to two consecutive sampling times are 125℃ at time i and 135℃ at time i+1. Then the average temperature of the interval = (125 + 135) ÷ 2 = 130℃, and the effective temperature rise of the interval = 130 - 25 = 105℃. The heat load of the interval = 105 × 10 = 1050℃·s. By summing the heat loads corresponding to all sampling time intervals, the cumulative heat load from the start of charring to the current time can be obtained.
[0150] In summary, this step extracts multi-dimensional features from changes in the surface image of medicinal materials, changes in the temperature of the pot, and changes in the release of volatiles. It also achieves unified characterization of data from different sampling frequencies through time axis matching. This results in multi-source state parameters that can reflect the carbonization process, heat input process, and volatile release state during the charcoal roasting process, providing a data foundation for subsequent carbonization response model prediction and pot-out threshold optimization.
[0151] S300: Using the cumulative heat load and the thermal conductivity of the current batch of medicinal materials as input, the carbonization response model is invoked to calculate the expected value of the surface carbonization rate at the current moment; Step S300 in the method provided in this embodiment of the invention includes: The cumulative heat load of the target medicinal material was calculated from the start of the stir-frying process to each sampling time in multiple historical batches. The measured values of the thermal conductivity of the medicinal material at each sampling time and the measured values of the surface carbonization rate at each sampling time were collected. After data cleaning and outlier removal, historical sample data containing multiple sets of cumulative heat load, thermal conductivity and surface carbonization rate were obtained. The corresponding measured value of surface carbonization rate was labeled for each set of samples as a supervision label. A network architecture for a carbonization response model is constructed, wherein the carbonization response model is configured as a regression mapping structure with cumulative heat load and thermal conductivity as input variables and surface carbonization rate as output variable; The cumulative heat load and thermal conductivity from historical sample data are used as model inputs, and the corresponding measured surface carbonization rate is used as a supervision signal to supervise the training of the carbonization response model until the determination coefficient between the expected surface carbonization rate output by the model and the measured surface carbonization rate is greater than the first preset threshold and the mean absolute error is less than the second preset threshold, thus completing the construction of the carbonization response model.
[0152] Furthermore, in order to predict the surface carbonization rate based on the heating state of the medicinal material, this embodiment constructs a carbonization response model to establish a nonlinear mapping relationship between cumulative heat load, thermal conductivity of the medicinal material, and surface carbonization rate.
[0153] Specifically, the process data of the target medicinal material variety in multiple historical processing batches were first obtained.
[0154] Each historical processing batch includes the calculated cumulative heat load from the start of the stir-frying process to each sampling time, the measured thermal conductivity of the medicinal material, and the measured surface carbonization rate.
[0155] Considering that the internal thermal conductivity of different batches of medicinal materials varies due to differences in initial moisture content, this embodiment dynamically determines the thermal conductivity of the medicinal materials input into the carbonization response model.
[0156] First, establish the relationship between moisture content and thermal conductivity for the target medicinal material varieties.
[0157] Specifically, multiple samples of the target medicinal material were selected, and samples with different moisture contents were prepared by artificial adjustment.
[0158] For example, multiple groups of medicinal material samples with moisture contents of 5%, 10%, 15%, 20%, 25% and 30% were prepared.
[0159] Subsequently, the thermal conductivity values of samples with different moisture contents were measured using the transient hot wire method to obtain the changes in the internal heat conduction capacity of the medicinal materials under different moisture contents.
[0160] Using the moisture content of each group of samples as an index parameter and the corresponding measured thermal conductivity value as the mapping result, a reference mapping table of "moisture content-thermal conductivity" corresponding to the target medicinal material variety is established.
[0161] For example, after offline calibration, the corresponding thermal conductivity is 0.12 W / (m·K) when the water content is 5%, 0.15 W / (m·K) when the water content is 10%, and 0.19 W / (m·K) when the water content is 20%.
[0162] The above method allows the relationship between the changes in the thermal conductivity of medicinal materials under different moisture contents to be stored in advance, providing a data basis for online thermal conductivity correction.
[0163] Furthermore, during the actual processing, the moisture content of the current batch of medicinal materials is obtained in real time.
[0164] Specifically, a capacitive moisture sensor or a near-infrared spectral sensor is installed inside the heating container to collect data on changes in the moisture content of the medicinal materials during the stir-frying process at a preset sampling period.
[0165] Once the current moisture content of the medicinal material is obtained, the corresponding thermal conductivity value is queried from the pre-established moisture content-thermal conductivity reference mapping table, using the current moisture content as an index.
[0166] Specifically, when the measured moisture content does not perfectly match the discrete moisture content nodes in the mapping table, the current thermal conductivity is obtained by linear interpolation using the thermal conductivity values corresponding to two adjacent moisture content nodes. Current thermal conductivity = first reference thermal conductivity + (current moisture content - first reference moisture content) × (second reference thermal conductivity - first reference thermal conductivity) ÷ (second reference moisture content - first reference moisture content).
[0167] For example, when the online detection shows that the current moisture content of the medicinal material is 15%, the corresponding thermal conductivity can be directly obtained by querying; when the current moisture content is 17%, the thermal conductivity value corresponding to the current moment is obtained by interpolation based on the thermal conductivity corresponding to the two adjacent calibration points of 15% and 20%.
[0168] The collected historical process data is cleaned, including deleting abnormal sensor jump data, missing data, and data that deviates significantly from the normal range of change.
[0169] Subsequently, the cumulative heat load, thermal conductivity of the medicinal material, and surface carbonization rate corresponding to each sampling time are constructed into a set of historical sample data, where the input sample = (cumulative heat load, thermal conductivity of the medicinal material) and the supervision label = the measured value of the surface carbonization rate at the corresponding time.
[0170] Furthermore, to avoid the influence of data with different dimensions on the model training process, the input samples are normalized. Specifically: Normalized data = (original data - minimum data value) ÷ (maximum data value - minimum data value).
[0171] After normalization, the cumulative heat load and thermal conductivity are mapped to the same numerical range, improving the stability of model training.
[0172] Furthermore, a carbonization response model is constructed. Specifically, the carbonization response model in this embodiment adopts a multi-layer feedforward neural network structure, including an input layer, a hidden layer, and an output layer.
[0173] The input layer includes two input nodes, which are used to input the normalized cumulative heat load and the thermal conductivity of the medicinal material, respectively; the hidden layer includes a first hidden layer and a second hidden layer, which are used to extract the nonlinear correlation features between the cumulative heat load change and the thermal conductivity of the medicinal material; the output layer includes an output node, which is used to output the expected value of the surface carbonization rate at the current moment.
[0174] For example, this embodiment adopts the following network structure: the number of input layer nodes is 2, the number of first hidden layer nodes is 16, the number of second hidden layer nodes is 8, and the number of output layer nodes is 1.
[0175] The hidden layer employs a nonlinear activation function to enhance the model's ability to fit complex carbonization processes.
[0176] Furthermore, historical sample data was used to supervise the training of the carbonization response model.
[0177] Specifically, the cumulative heat load and thermal conductivity of medicinal materials from historical samples are input into the carbonization response model to obtain the expected value of the surface carbonization rate output by the model, and the expected value of the surface carbonization rate is compared with the corresponding measured value of the surface carbonization rate.
[0178] During model training, prediction error is used as the optimization objective.
[0179] The training loss function uses the mean absolute error: Mean absolute error = the average of the absolute values of the difference between the predicted surface carbonization rate and the actual surface carbonization rate.
[0180] By adjusting the connection weights and bias parameters in the network through backpropagation, the model output gradually approaches the actual measurement results.
[0181] Furthermore, the conditions for completing model training are determined based on historical validation samples.
[0182] Specifically, the coefficient of determination and mean absolute error are used as performance evaluation metrics for the model. Wherein: Coefficient of determination = 1 - sum of squared prediction errors ÷ sum of squared deviations of actual values from the mean.
[0183] When the coefficient of determination reaches or exceeds the first preset threshold and the mean absolute error is less than the second preset threshold, the model is considered to meet the prediction accuracy requirements.
[0184] The first and second preset thresholds are determined through cross-validation of historical processing samples.
[0185] For example, 100 batches of historical charcoal frying experimental data were used for training and validation, with 80 batches randomly selected as training samples and 20 batches as validation samples. After multiple rounds of parameter adjustments, when the coefficient of determination reached above 0.95 and the mean absolute error was less than 0.02% / s, the charcoalization response model was considered to meet the prediction requirements.
[0186] Finally, a carbonization response model was obtained with cumulative heat load and thermal conductivity of medicinal materials as inputs and surface carbonization rate as output.
[0187] In summary, this step establishes a nonlinear response relationship between cumulative heat load, the thermal conductivity of medicinal materials, and the surface carbonization rate. This allows the model to predict the surface carbonization rate at the current moment by combining the heat input state during the current frying process with the differences in heat transfer of the medicinal materials themselves. This provides a dynamic carbonization state characterization result that differs from simply relying on temperature thresholds, and provides data basis for subsequent adjustment of the deviation between the actual carbonization state and the expected carbonization state.
[0188] S400: Based on the deviation between the actual value and the expected value of the surface carbonization rate, construct a single-variable optimization problem with the endpoint discharge threshold as the decision variable and the minimization of the square of the deviation as the objective function. Iteratively optimize the solution using the benchmark discharge threshold corresponding to the medicinal material variety as the initial solution and output the optimal discharge threshold that minimizes the deviation. Step S400 in the method provided in this embodiment of the invention includes: Set the current cumulative heat load value as the lower bound of the search, and set the value of the benchmark discharge threshold corresponding to the medicinal material variety as the upper bound of the search. Within the search interval formed by the lower bound and the upper bound of the search. The golden ratio point of the search interval is used as the first trial point and the second trial point, wherein the first trial point is located on the side of the search interval closer to the upper limit of the search, and the second trial point is located on the side of the search interval closer to the lower limit of the search. Using the thermal conductivity of the first test point and the current batch of medicinal materials as input, the carbonization response model is invoked to obtain the expected value of the carbonization rate of the first candidate surface, and the corresponding first objective function value is calculated. Using the thermal conductivity of the second test point and the current batch of medicinal materials as input, the carbonization response model is invoked to obtain the expected value of the carbonization rate of the second candidate surface, and the corresponding second objective function value is calculated. Compare the values of the first objective function and the second objective function, and update the first and second trial points; Repeat the comparison and search interval update operation. When the length of the updated search interval is less than the precision of the discharge threshold, output the midpoint of the updated search interval as the optimal discharge threshold.
[0189] like Figure 2 As shown, further, in order to reduce the problem that the fixed discharge threshold cannot adapt to the differences in the heating state of different batches of medicinal materials, this embodiment dynamically optimizes the discharge threshold based on the golden section search method.
[0190] Specifically, the unloading threshold is used as a continuous optimization variable, and the deviation between the actual value of the surface carbonization rate and the predicted value of the carbonization response model is used as the basis for optimization evaluation.
[0191] First, construct the search range for the cooking threshold based on the current cooking state.
[0192] Specifically, the cumulative heat load at the current moment is used as the lower bound of the search, and the benchmark discharge threshold corresponding to the target medicinal material variety is used as the upper bound of the search.
[0193] The benchmark discharge threshold was obtained through statistics of historical qualified charcoal batches.
[0194] Specifically, data from multiple historical batches that meet the processing quality requirements are collected, and the cumulative heat load corresponding to each batch when it reaches the target carbonization level is calculated. The average value of these loads is used as the benchmark unloading threshold for the medicinal material.
[0195] For example, in 100 batches of historical qualified charring data for a certain medicinal material, the average cumulative heat load when reaching the target carbonization level is 5000 kJ. Therefore, the baseline discharge threshold is set to 5000 kJ. When the cumulative heat load at the current moment is 4000 kJ, a search lower bound of 4000 kJ and a search upper bound of 5000 kJ are constructed.
[0196] Furthermore, a first test point and a second test point are set within the search interval to evaluate the carbonization response state under different unloading threshold conditions.
[0197] Specifically, within the search interval, two trial points are set according to the golden ratio. The first trial point is located on the side of the search interval closer to the upper bound, and the second trial point is located on the side of the search interval closer to the lower bound.
[0198] The calculation method for the first trial point is: First trial point = lower bound of search + (upper bound of search - lower bound of search) × 0.618.
[0199] The second trial point is calculated as follows: Second trial point = lower bound of search + (upper bound of search - lower bound of search) × 0.382.
[0200] Among them, 0.618 and 0.382 are the interval division coefficients corresponding to the golden ratio.
[0201] Furthermore, using the cumulative heat load values corresponding to the first and second test points, and the thermal conductivity of the current batch of medicinal materials, as inputs to the carbonization response model, the predicted surface carbonization rate under the corresponding test conditions is obtained. Specifically: The first test point corresponds to the input (first test point, thermal conductivity of the current batch of medicinal materials), and the expected value of the carbonization rate of the first candidate surface is output through the carbonization response model; the second test point corresponds to the input (second test point, thermal conductivity of the current batch of medicinal materials), and the expected value of the carbonization rate of the second candidate surface is output through the carbonization response model.
[0202] Furthermore, objective function values are constructed based on the prediction results corresponding to the two trial points.
[0203] The objective function characterizes the degree of deviation between the predicted carbonization rate and the actual carbonization rate. Specifically: Objective function value = (expected surface carbonization rate - actual surface carbonization rate)².
[0204] Among them, the squaring operation is used to amplify the impact of larger deviations on the optimization results, so that the optimization process prioritizes reducing the candidate thresholds that deviate significantly from the target state.
[0205] Furthermore, based on the objective function values corresponding to the first and second trial points, the search interval is gradually narrowed and continuously approaches the discharge threshold that minimizes the prediction deviation of the carbonization rate.
[0206] The smaller the objective function value, the closer the corresponding test point's discharge threshold is to the actual carbonization state of the current batch of medicinal materials.
[0207] When the length of the search interval is less than the preset discharge threshold accuracy, the iteration stops, and the midpoint of the final search interval is taken as the optimal discharge threshold.
[0208] In this embodiment, the accuracy of the outlet threshold is set based on the measurement accuracy of the temperature acquisition unit. Since the cumulative heat load is obtained by accumulating the time-series data of the pot body temperature collected by the thermocouple, the search accuracy of the outlet threshold is limited by the accuracy of the thermocouple temperature measurement.
[0209] This embodiment uses a thermocouple array with a display accuracy of 0.1℃ to acquire the pot wall temperature. When the temperature change corresponding to adjacent candidate pot-ejection thresholds is less than 0.1℃ during the search process, this temperature change is below the effective resolution of the thermocouples, making it impossible for the temperature acquisition unit to effectively distinguish the search range, thus limiting the improvement in control accuracy during the actual cooking process. Therefore, 0.1℃, which matches the thermocouple temperature measurement accuracy, is used as the equivalent temperature accuracy for the pot-ejection threshold optimization process.
[0210] Furthermore, based on the temperature sampling cycle during the current frying process, the temperature equivalent accuracy is converted into the corresponding cumulative heat load accuracy, which is then used as the stopping condition for the golden section search.
[0211] Specifically, since the cumulative heat load is used to characterize the cumulative degree of heating of medicinal materials during the stir-frying process, its calculation comprehensively considers the temperature change of the pan, the heating mass of the medicinal materials, and the heat transfer characteristics. Therefore, the minimum resolvable heat load change corresponding to the temperature detection accuracy is determined as follows: Minimum heat load resolution = heat load coefficient per unit temperature change × thermocouple temperature resolution.
[0212] Among them, the heat load coefficient corresponding to the unit temperature change is used to represent the change in heat absorbed by the medicinal materials when the temperature of the pot changes by 1℃.
[0213] Furthermore, the heat load coefficient corresponding to a unit temperature change was obtained based on the structural parameters of the wok and historical heat balance experiments.
[0214] Specifically, under stable heating conditions, the pot body temperature is induced to undergo a preset temperature rise, and the corresponding change in input heat during the heating process is recorded. Based on the ratio between the change in input heat and the pot body temperature rise, the heat load coefficient corresponding to a unit temperature change is determined. The calculation method is as follows: The heat load coefficient corresponding to a unit temperature change = the cumulative heat change during the temperature rise process ÷ the corresponding change in pot body temperature.
[0215] For example, through historical thermal calibration experiments, it was found that when the temperature of the pot changes by 1℃, the cumulative heat absorbed by the corresponding medicinal material area changes by approximately 50kJ. Therefore, the heat load coefficient corresponding to a unit temperature change is 50kJ / ℃. Since the thermocouple display accuracy is 0.1℃, the corresponding minimum resolvable heat load change is 50kJ / ℃ × 0.1℃ = 5kJ.
[0216] Therefore, when the cumulative heat load change corresponding to the updated search interval during the golden section search process is less than 5kJ, it is considered that the change is below the effective heat load change range that the temperature acquisition unit can reflect. Continuing the iteration will not yield an optimization result with engineering significance, so the search is stopped, and the midpoint of the current search interval is taken as the optimal outlet threshold.
[0217] For example, suppose the cumulative heat load during the current batch of medicinal herbs roasting process is 4000 kJ, and the benchmark discharge threshold obtained based on historical qualified roasting batches is 5000 kJ. Then, the initial search interval is constructed with a lower bound of 4000 kJ and an upper bound of 5000 kJ. According to the golden ratio, a first trial point and a second trial point are set within the search interval. The first trial point = 4000 + (5000 - 4000) × 0.618 = 4618 kJ, and the second trial point = 4000 + (5000 - 4000) × 0.382 = 4382 kJ. Subsequently, the first trial point of 4618 kJ, the second trial point of 4382 kJ, and the thermal conductivity of the current batch of medicinal herbs are input into the carbonization response model.
[0218] When the thermal conductivity of the current batch of medicinal materials is 0.18 W / (m·K), using the first trial point of 4618 kJ as input, the model outputs the expected value of the first candidate surface carbonization rate as 0.065% / s. Using the second trial point of 4382 kJ as input, the model outputs the expected value of the second candidate surface carbonization rate as 0.061% / s. If the actual surface carbonization rate at the current moment is 0.060% / s, then the first objective function value = (0.065 - 0.060)² = 0.000025, and the second objective function value = (0.061 - 0.060)² = 0.000001. Therefore, the objective function value corresponding to the second trial point is smaller, indicating that the discharge threshold corresponding to 4382 kJ is closer to the actual carbonization state of the current batch of medicinal materials, and the search range should shrink towards this region in subsequent iterations. Further, after multiple rounds of golden ratio search, the current search interval shrinks to a lower bound of 4620 kJ and an upper bound of 4628 kJ. The length of the search interval at this point is 4628 - 4620 = 8 kJ. Since this search interval length is still greater than the minimum heat load resolution of 5 kJ, one more iteration is performed. After further searching, the current search interval shrinks to a lower bound of 4622 kJ and an upper bound of 4626 kJ. The length of the search interval at this point is 4626 - 4622 = 4 kJ. Since the current search interval length of 4 kJ is less than 5 kJ, it indicates that further narrowing of the search range cannot exceed the effective resolution corresponding to the thermocouple temperature detection accuracy, so the search stops. Finally, the optimal discharge threshold is (4622 + 4626) ÷ 2 = 4624 kJ. Subsequently, the obtained optimal discharge threshold is used as the basis for determining the endpoint of charring the current batch of medicinal materials. When the subsequent cumulative heat load reaches 4624 kJ and the volatile matter concentration change condition is met, a discharge control signal is output.
[0219] Step S400 in the method provided in this embodiment of the invention further includes: Compare the values of the first objective function with the values of the second objective function; If the value of the first objective function is greater than the value of the second objective function, then the upper bound of the search interval is updated to the first trial point, the first trial point is updated to the second trial point, and the golden ratio point is recalculated within the updated search interval as the new second trial point. If the value of the first objective function is less than or equal to the value of the second objective function, then the lower bound of the search interval is updated to the second trial point, the second trial point is updated to the first trial point, and the golden ratio point is recalculated within the updated search interval as the new first trial point. The updated first trial point, the updated second trial point, and the updated search range are used as inputs for the next iteration.
[0220] Furthermore, after obtaining the first objective function value corresponding to the first trial point and the second objective function value corresponding to the second trial point, this embodiment adaptively shrinks the current search interval according to the relationship between the two objective function values, so as to exclude the region with a larger objective function value and retain the candidate region that is closer to the optimal cooking threshold.
[0221] Specifically, since the optimization objective of this embodiment is to minimize the prediction deviation of the surface carbonization rate, the smaller the objective function value, the closer the cumulative heat load threshold corresponding to the test point is to the actual carbonization state of the current batch of medicinal materials.
[0222] When the value of the first objective function is greater than the value of the second objective function, it indicates that the carbonization rate prediction deviation generated by the discharge threshold corresponding to the first trial point is greater than that of the second trial point, suggesting that the optimal discharge threshold is more likely to be located on the side of the second trial point closer to the search lower bound.
[0223] Therefore, the region to the right of the first trial point is discarded, the upper bound of the search interval is updated to the first trial point, and the second trial point is retained as the new search boundary point. The specific update process is as follows: The updated upper bound of the search equals the first test point; the updated first test point equals the second test point.
[0224] Subsequently, the golden ratio point is recalculated based on the updated search interval, and this ratio point is used as a new second trial point for the next round of objective function evaluation.
[0225] The new second trial point is calculated as follows: The new second test point = updated search lower bound + (updated search upper bound - updated search lower bound) × 0.382.
[0226] When the value of the first objective function is less than or equal to the value of the second objective function, it indicates that the threshold for leaving the pot corresponding to the first trial point has a smaller prediction bias, and the current optimal region is more likely to be located on the side of the first trial point closer to the upper limit of the search.
[0227] Therefore, the region to the left of the second trial point is discarded, and the lower bound of the search interval is updated to the second trial point, while the first trial point is retained as the new search boundary point. The specific update process is as follows: The updated lower bound of the search equals the second test point; the updated second test point equals the first test point.
[0228] Subsequently, the golden ratio point was recalculated based on the updated search range, and this ratio point was used as the new first trial point.
[0229] The new first trial point is calculated as follows: The new first test point = updated search lower bound + (updated search upper bound - updated search lower bound) × 0.618.
[0230] Furthermore, the updated search interval, the updated first trial point, and the updated second trial point are used as inputs for the next round of golden section search. The objective function calculation, function value comparison, and search interval update process are repeated until the length of the search interval meets the preset threshold accuracy requirements.
[0231] For example, the current search interval has a lower bound of 4000 kJ, an upper bound of 5000 kJ, a first trial point of 4618 kJ, and a second trial point of 4382 kJ. The carbonization response model calculates the first objective function value to be 0.000025 and the second objective function value to be 0.000001. Since 0.000025 > 0.000001, the prediction deviation corresponding to the second trial point is smaller, and the actual carbonization state of the current batch of medicinal materials is closer to the heat load state corresponding to 4382 kJ. Therefore, the upper bound of the search is updated to the first trial point, with the updated upper bound being 4618 kJ, and the second trial point is retained as the new search boundary point, i.e., the new first trial point is 4382 kJ. Subsequently, within the updated search interval, the new second trial point is recalculated according to the golden ratio, and the objective function calculation and comparison process continues. After multiple iterations, the search range gradually narrowed to near the optimal discharge threshold, achieving dynamic threshold optimization for different batches of medicinal materials under heating conditions.
[0232] In summary, this step establishes a one-dimensional dynamic optimization model with the cumulative heat load-type discharge threshold as the optimization variable and the minimum carbonization response prediction deviation as the optimization objective. Combined with the golden section search algorithm, the optimal discharge heat load for different batches of medicinal materials is adaptively adjusted. This transforms the discharge judgment from a fixed empirical threshold-based approach to a dynamic decision-making approach based on the current heat conduction characteristics and real-time carbonization state of the medicinal materials, thereby improving the consistency of the carbonization endpoint control for different batches of medicinal materials.
[0233] S500: When the cumulative heat load reaches the optimal discharge threshold and the rising slope of the volatile concentration time sequence signal is within the preset range, the discharge control signal is output.
[0234] Step S500 in the method provided in this embodiment of the invention includes: Obtain the cumulative heat load and optimal outlet threshold at the current moment, and obtain the concentration values of M consecutive sampling points collected before the current moment for the volatile concentration time series signal, forming a signal segment, where M is a positive integer; The cumulative heat load value is compared with the optimal outlet threshold value. When the cumulative heat load value is greater than or equal to the optimal outlet threshold value, the concentration value of each sampling point in the signal segment is linearly fitted to obtain the slope of the fitted line, which is used as the slope of the rising segment. Obtain the lower and upper threshold values of the slope of the volatile concentration rise segment corresponding to the current medicinal herb variety, and form a preset interval; The slope of the rising segment is compared with the lower and upper thresholds of the slope, respectively. When the slope of the rising segment is greater than the lower threshold and less than the upper threshold, a control command is generated to instruct the heating device to stop heating and a control command is generated to instruct the exhaust device to start. The control command is then output as the unloading control signal.
[0235] Furthermore, to avoid the problem of premature or delayed removal from the pot based solely on the cumulative heat load reaching the threshold, this embodiment combines the release pattern of volatile components during the charring process to further determine the carbonization state of the medicinal materials after reaching the heat load condition.
[0236] Specifically, at the current stir-frying moment, the current cumulative heat load calculated in the aforementioned steps is obtained, along with the optimal removal threshold obtained based on the golden ratio. Simultaneously, a metal oxide semiconductor gas sensor array positioned above the wok continuously collects data on changes in volatile concentration above the wok cavity during the stir-frying process.
[0237] The metal oxide semiconductor gas sensor array includes multiple sensitive channels that respond to different volatile substances, and each sensitive channel outputs a corresponding volatile substance concentration response value.
[0238] Since image acquisition, temperature acquisition, and volatile concentration acquisition use different sampling periods, there are time scale differences between various types of sensor data. Therefore, this embodiment performs time alignment processing on multi-source time series data based on a unified timestamp.
[0239] Different medicinal materials produce different types of volatile substances and release patterns during the charring process. In this embodiment, a sensitive channel for endpoint determination is pre-determined based on the target medicinal material.
[0240] Specifically, during the historical processing experiment, multi-channel volatile response signals of the target medicinal material were collected from the start of frying to the completion of carbonization, and the target carbonization level determined by professionals was recorded simultaneously.
[0241] Subsequently, the correlation between the response curves of each sensitive channel and the target carbonization level was calculated, and the sensitive channel with the highest correlation was selected as the characteristic volatile matter detection channel for the current medicinal material variety.
[0242] For example, for a certain medicinal herb variety, analysis of 100 batches of historical charring data revealed that the volatile response curve corresponding to the second sensitive channel had the highest correlation with the target charring level. Therefore, the concentration response value output by the second sensitive channel was selected as the endpoint determination input signal.
[0243] Furthermore, after obtaining the time-series signal of characteristic volatile concentrations, the concentration values corresponding to the M consecutive sampling points collected before the current time are obtained to form a signal segment used to analyze the current volatile release trend.
[0244] Where M represents the number of historical sampling points involved in the slope calculation. The value of M is determined based on the timescale of the volatile release process.
[0245] Specifically, the impact of different sampling window lengths on the stability of endpoint determination was analyzed through historical charcoal frying experiments. When the sampling window is too small, the slope calculation is easily affected by instantaneous airflow disturbances; when the sampling window is too large, it cannot reflect the rapid release stage of volatiles in a timely manner.
[0246] For example, when the gas sensor sampling period is 2s, it was found through testing with 100 batches of historical data that using 20 consecutive sampling points for trend analysis can reduce the impact of random fluctuations and maintain the response speed to changes in volatile release. With M=20, the slope of the current volatile concentration rise segment actually represents the trend of volatile release changes within the previous 40s.
[0247] Furthermore, the current cumulative heat load is compared with the optimal outlet threshold.
[0248] When the current cumulative heat load is greater than or equal to the optimal discharge threshold, it indicates that the medicinal materials have reached the theoretical thermal endpoint. At this point, a second confirmation is made based on the release trend of volatiles.
[0249] Specifically, linear fitting is performed on the M volatile concentration samples in the signal segment to obtain the trend of volatile release changes within the current time window.
[0250] Let the time value corresponding to the j-th sampling point be the time sequence number, and the volatile concentration response value be the corresponding concentration value. Then the fitted straight line can be expressed as: Volatile concentration = slope × time sequence + intercept.
[0251] The slope of the fitted straight line is used as the slope of the rising segment of volatile concentration. The slope of the rising segment is used to characterize the release rate of volatile components during the current roasting stage.
[0252] Specifically, the least squares method is used to calculate the fitting slope: The slope of the rising segment = the sum of the products of time number and concentration response value minus the product of the average time number and the average concentration response value, and then divided by the difference between the sum of the squares of the time numbers and the squares of the average time number.
[0253] The above calculations can reduce the impact of fluctuations at a single sampling point on the judgment of volatile release trends.
[0254] Furthermore, to accommodate the differences in the volatile release characteristics of different medicinal materials, this embodiment sets a preset range for the slope of the volatile concentration rise segment for different medicinal materials.
[0255] Specifically, the lower slope threshold and the upper slope threshold are obtained by calibration using historical qualified batch data.
[0256] Specifically, data from multiple historical batches that reached the target carbonization level were collected, and the slope of the volatile matter concentration increase segment corresponding to the time when each batch reached the unloading stage was calculated.
[0257] Subsequently, the effective slope range was determined based on the statistical results. Among them: The lower limit threshold of the slope = the lower quantile statistical value of the slope data of historical qualified batches; The upper limit threshold for slope is the upper quantile statistical value of the slope data of historical qualified batches.
[0258] For example, through the analysis of 100 batches of qualified charred data, the slope range of the volatile matter concentration increase when the target medicinal material reaches the qualified charring state is found to be 0.015–0.045 mg / (L·s). Therefore, a lower limit threshold of slope is set to 0.015 mg / (L·s), and an upper limit threshold of slope is set to 0.045 mg / (L·s).
[0259] Furthermore, the calculated slope of the rising segment is compared with the lower slope threshold and the upper slope threshold, respectively.
[0260] When the lower limit of the slope threshold is less than the slope of the rising segment and less than the upper limit of the slope threshold, it means that the current medicinal material has not only reached the target heat load state, but also that the volatile release process meets the characteristics of the target carbonization stage. At this time, the unloading control signal is generated.
[0261] Specifically, the unloading control signals include a stop heating command to control the heating device to stop working and a smoke exhaust start command to control the smoke exhaust device to start. After receiving the above control commands, the control system stops supplying heat to the wok and starts the smoke exhaust equipment to complete the final control process of charcoal roasting.
[0262] Furthermore, considering that there may be uneven heating of medicinal materials and delayed release of volatiles during the actual frying process, when the cumulative heat load has reached the optimal discharge threshold, but the slope of the volatile concentration rise does not meet the preset interval conditions, this embodiment does not immediately perform the discharge operation, but instead enters the delayed judgment process.
[0263] Specifically, a waiting timer is triggered, and the volatile concentration time sequence signal is continuously collected to recalculate the slope of the rising segment.
[0264] The waiting time is determined based on the time required for historical batches to reach the stable evaporation stage.
[0265] For example, statistical analysis of 100 batches of historical experiments revealed that the volatile release state typically stabilizes within 60 seconds after reaching the target heat load. Therefore, a preset waiting time of 60 seconds was set. If the slope of the rising section enters the preset range within the 60-second waiting time, a discharge control signal is immediately output. If the slope of the rising section still does not meet the preset range condition after 60 seconds, it is considered that the medicinal materials have reached the permissible discharge conditions, and the discharge operation is forcibly executed. A prompt signal is sent to the operator to indicate that the volatile release state of the current batch has deviated.
[0266] In summary, this step achieves a secondary verification of the charring endpoint by jointly judging the cumulative heat load level and the dynamic characteristics of volatile release. Compared to methods that rely solely on a single heat load threshold for control of the charring process, this embodiment uses the cumulative heat load to characterize the overall heating degree of the medicinal materials, while simultaneously using the slope of the volatile concentration rise segment to characterize the release state of volatile components during charring. This ensures that the charring determination simultaneously meets both thermal action and material change conditions, thereby reducing misjudgments caused by differences in the initial moisture content of the medicinal materials, uneven local heating, and delayed volatile release.
[0267] Example 2, as Figure 3 As shown, this invention provides a system for optimizing the processing of traditional Chinese medicine decoction pieces, comprising: Image and process data acquisition module 11 is used to acquire image sequences of the surface of medicinal materials, time-series data of pot temperature, and time-series signals of volatile concentration during the stir-frying process; The carbonization state analysis module 12 is used to extract the actual value of the surface carbonization rate from the image sequence and calculate the cumulative heat load based on the time series data of the pot body temperature. The carbonization response prediction module 13 is used to call the carbonization response model with the cumulative heat load and the thermal conductivity of the current batch of medicinal materials as inputs, and to estimate the expected value of the surface carbonization rate at the current moment. The discharge threshold optimization module 14 is used to construct a single-variable optimization problem with the endpoint discharge threshold as the decision variable and the objective function of minimizing the square of the deviation, based on the deviation between the actual value and the expected value of the surface carbonization rate. It iterative optimization is performed with the benchmark discharge threshold corresponding to the medicinal material variety as the initial solution, and the optimal discharge threshold that minimizes the deviation is output. The boiler discharge control module 15 is used to determine whether the cumulative heat load has reached the optimal boiler discharge threshold and whether the rising slope of the volatile concentration time sequence signal is within the preset range. When the conditions are met, the boiler discharge control signal is output.
[0268] In this embodiment of the invention, the image and process data acquisition module 11 is further configured to: A multispectral camera was used to synchronously acquire reflectance images of the surface of medicinal materials in the visible and near-infrared bands at a fixed frame rate, which were recorded as a set of original image sequences. In this embodiment of the invention, the carbonization state analysis module 12 is further used for: The pixel gray values of three adjacent frames in the original image sequence are subjected to temporal difference operation to obtain the pixel gray values of the difference image. The pixel gray values of the difference image are then thresholded to separate the carbonized and non-carbonized regions. The percentage of carbonized region pixels in the total number of pixels in the medicinal material image is calculated. The difference between the current percentage of carbonized region and the previous percentage is combined with a fixed frame rate to obtain the actual value of the surface carbonization rate. The cumulative heat load is obtained by collecting temperature data at multiple points on the boiler wall using a thermocouple array, weighting the multi-point temperature data, and integrating it over time. The gas sensor array collects the time-series signal of volatile concentration in the space above the boiler cavity, and uses the response value of a specific sensitive channel in the volatile concentration time-series signal as the input to determine the slope of the rising segment.
[0269] Specifically, the pixel grayscale values of three adjacent frames in the original image sequence are subjected to temporal difference operation to obtain the pixel grayscale values of the difference image. Thresholding is then applied to the pixel grayscale values of the difference image to separate carbonized and non-carbonized regions, including: For the (t-1)th, tth, and (t+1)th frames in the original image sequence, calculate the pixel grayscale value difference between the (t+1)th and (t-1)th frames, where t is a positive integer; Calculate the difference in pixel grayscale values between frame t and frame t-1 pixel by pixel. Take the absolute value of the two sets of difference images at the corresponding pixel positions and then calculate the average value as the pixel grayscale value of the three difference images. The median and interquartile range of all pixel gray values in the three-frame differential images are calculated, and the dynamic segmentation threshold is determined. In the three-frame difference images, pixels with a gray value greater than the dynamic segmentation threshold are marked as carbonized regions, and those without are marked as non-carbonized regions. A morphological closing operation of dilation followed by erosion is performed on the labeled binary image to fill the pores inside the carbonized region, resulting in the separated carbonized and non-carbonized regions.
[0270] Specifically, a morphological closing operation of dilation followed by erosion is performed on the labeled binary image to fill the pores inside the carbonized regions, resulting in the separated carbonized and non-carbonized regions, including: Connected component labeling is performed on the labeled binary image, and each connected component of the non-carbonized pores contained within the carbonized region is extracted; Calculate the pixel area of each connected component and determine the maximum pixel area; The maximum pixel area is converted into the equivalent circle diameter, and the equivalent circle diameter is rounded up to be used as the diameter of the structuring element. A circular structuring element with a diameter equal to the diameter of the structuring element is used to perform a dilation operation on the labeled binary image, and the same circular structuring element is used to perform an erosion operation on the dilated binary image. The newly added pixel regions in the eroded binary image compared to the labeled binary image are classified as carbonized regions, and the remaining regions are classified as non-carbonized regions. The separated carbonized and non-carbonized regions are then output.
[0271] This includes extracting the actual surface carbonization rate from the image sequence and calculating the cumulative heat load based on the time-series data of the pot body temperature, including: The timestamps of each frame in the image sequence are matched with the temperature values at each sampling time in the pot body temperature time series data to determine the pot body temperature time series data that has the same time axis as the actual value of the surface carbonization rate, and this data is used as the synchronous temperature time series data. Extract all temperature values from the start of frying to the current time from the synchronous temperature time series data to form a temperature value sequence; The temperature value sequence is divided into adjacent temperature value pairs in chronological order. Each temperature value pair contains the temperature value at the i-th sampling time and the temperature value at the (i+1)-th sampling time, where i is a positive integer from 1 to N-1 and N is the total number of temperature values in the temperature value sequence. For each temperature value pair, calculate the arithmetic mean of the temperature value at the i-th sampling time and the temperature value at the (i+1)-th sampling time to obtain the interval average temperature within the time interval corresponding to the current temperature value pair; Based on the average temperature of the interval and combined with the ambient temperature reference value, the effective temperature rise of the interval is obtained, and multiplied by the equal time interval to obtain the interval heat load of the current time interval; The cumulative heat load from the start of the cooking process to the current time is obtained by summing up the heat load of all time intervals.
[0272] In this embodiment of the invention, the carbonization response prediction module 13 is further used for: The cumulative heat load of the target medicinal material was calculated from the start of the stir-frying process to each sampling time in multiple historical batches. The measured values of the thermal conductivity of the medicinal material at each sampling time and the measured values of the surface carbonization rate at each sampling time were collected. After data cleaning and outlier removal, historical sample data containing multiple sets of cumulative heat load, thermal conductivity and surface carbonization rate were obtained. The corresponding measured value of surface carbonization rate was labeled for each set of samples as a supervision label. A network architecture for a carbonization response model is constructed, wherein the carbonization response model is configured as a regression mapping structure with cumulative heat load and thermal conductivity as input variables and surface carbonization rate as output variable; The cumulative heat load and thermal conductivity from historical sample data are used as model inputs, and the corresponding measured surface carbonization rate is used as a supervision signal to supervise the training of the carbonization response model until the determination coefficient between the expected surface carbonization rate output by the model and the measured surface carbonization rate is greater than the first preset threshold and the mean absolute error is less than the second preset threshold, thus completing the construction of the carbonization response model.
[0273] In this embodiment of the invention, the discharge threshold optimization module 14 is further used for: Set the current cumulative heat load value as the lower bound of the search, and set the value of the benchmark discharge threshold corresponding to the medicinal material variety as the upper bound of the search. Within the search interval formed by the lower bound and the upper bound of the search. The golden ratio point of the search interval is used as the first trial point and the second trial point, wherein the first trial point is located on the side of the search interval closer to the upper limit of the search, and the second trial point is located on the side of the search interval closer to the lower limit of the search. Using the thermal conductivity of the first test point and the current batch of medicinal materials as input, the carbonization response model is invoked to obtain the expected value of the carbonization rate of the first candidate surface, and the corresponding first objective function value is calculated. Using the thermal conductivity of the second test point and the current batch of medicinal materials as input, the carbonization response model is invoked to obtain the expected value of the carbonization rate of the second candidate surface, and the corresponding second objective function value is calculated. Compare the values of the first objective function and the second objective function, and update the first and second trial points; Repeat the comparison and search interval update operation. When the length of the updated search interval is less than the precision of the discharge threshold, output the midpoint of the updated search interval as the optimal discharge threshold.
[0274] The process of comparing the first objective function value with the second objective function value and updating the first and second trial points includes: Compare the values of the first objective function with the values of the second objective function; If the value of the first objective function is greater than the value of the second objective function, then the upper bound of the search interval is updated to the first trial point, the first trial point is updated to the second trial point, and the golden ratio point is recalculated within the updated search interval as the new second trial point. If the value of the first objective function is less than or equal to the value of the second objective function, then the lower bound of the search interval is updated to the second trial point, the second trial point is updated to the first trial point, and the golden ratio point is recalculated within the updated search interval as the new first trial point. The updated first trial point, the updated second trial point, and the updated search range are used as inputs for the next iteration.
[0275] In this embodiment of the invention, the unloading control module 15 is further configured to: Obtain the cumulative heat load and optimal outlet threshold at the current moment, and obtain the concentration values of M consecutive sampling points collected before the current moment for the volatile concentration time series signal, forming a signal segment, where M is a positive integer; The cumulative heat load value is compared with the optimal outlet threshold value. When the cumulative heat load value is greater than or equal to the optimal outlet threshold value, the concentration value of each sampling point in the signal segment is linearly fitted to obtain the slope of the fitted line, which is used as the slope of the rising segment. Obtain the lower and upper threshold values of the slope of the volatile concentration rise segment corresponding to the current medicinal herb variety, and form a preset interval; The slope of the rising segment is compared with the lower and upper thresholds of the slope, respectively. When the slope of the rising segment is greater than the lower threshold and less than the upper threshold, a control command is generated to instruct the heating device to stop heating and a control command is generated to instruct the exhaust device to start. The control command is then output as the unloading control signal.
[0276] In summary, the traditional Chinese medicine decoction piece processing optimization system provided in this embodiment of the invention collects real-time images of the medicinal material surface, pot temperature data, and volatile matter concentration signals during the frying process through an image and process data acquisition module. A carbonization state analysis module comprehensively analyzes the changes in the carbonization area of the medicinal material surface, the cumulative heat load, and the volatile matter release state. Furthermore, a carbonization response prediction module establishes a mapping relationship between the cumulative heat load, the thermal conductivity of the medicinal material, and the surface carbonization rate, enabling prediction of the current carbonization trend. An outlet threshold optimization module dynamically adjusts the outlet threshold using an iterative optimization method, considering the deviation between the actual and predicted carbonization rates, allowing the outlet timing to adapt to changes in the heating characteristics of different batches of medicinal materials. Simultaneously, an outlet control module performs a secondary judgment based on the cumulative heat load conditions and the volatile matter concentration change trend, outputting an outlet control signal when preset conditions are met, thus achieving automated endpoint control of the charring process. The above methods improve the accuracy of judging the carbonization state and the adaptability of the unloading control during the processing of Chinese herbal medicine pieces, and reduce the fluctuations in processing quality caused by batch differences of medicinal materials, uneven heating and human experience judgment.
[0277] It should be noted that the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some implementations, multitasking and parallel processing are possible or may be advantageous.
[0278] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0279] This specification and accompanying drawings are merely illustrative examples of the invention and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its scope. Therefore, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is intended to include these modifications and modifications.
Claims
1. An optimized method for processing traditional Chinese medicine decoction pieces, characterized in that, The method includes: Acquire image sequences of the surface of medicinal materials, time-series data of pot temperature, and time-series signals of volatile concentration during the stir-frying process; The actual value of the surface carbonization rate is extracted from the image sequence, and the cumulative heat load is calculated based on the time series data of the pot body temperature. Using the cumulative heat load and the thermal conductivity of the current batch of medicinal materials as input, the carbonization response model is invoked to calculate the expected value of the surface carbonization rate at the current moment; Based on the deviation between the actual value of the surface carbonization rate and the expected value of the surface carbonization rate, a single-variable optimization problem is constructed with the final discharge threshold as the decision variable and the minimization of the square of the deviation as the objective function. The benchmark discharge threshold corresponding to the medicinal material variety is used as the initial solution for iterative optimization, and the optimal discharge threshold that minimizes the deviation is output. When the cumulative heat load reaches the optimal discharge threshold and the rising slope of the volatile concentration time series signal is within a preset range, a discharge control signal is output.
2. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 1, characterized in that, Acquire image sequences of the medicinal herb surface, time-series data of the pan temperature, and time-series signals of volatile concentrations during the stir-frying process, including: A multispectral camera was used to synchronously acquire reflectance images of the surface of medicinal materials in the visible and near-infrared bands at a fixed frame rate, which were recorded as a set of original image sequences. The pixel gray values of three adjacent frames in the original image sequence are subjected to temporal difference operation to obtain the pixel gray values of the difference image. The pixel gray values of the difference image are then thresholded to separate the carbonized region and the non-carbonized region. The percentage of carbonized region pixels in the total number of pixels in the medicinal material image is calculated. The difference between the current percentage of carbonized region and the previous percentage is combined with the fixed frame rate to obtain the actual value of the surface carbonization rate. Temperature data at multiple points on the boiler wall are collected by a thermocouple array. The cumulative heat load is obtained by weighted averaging of the multi-point temperature data and integrating it over time. The gas sensor array collects the time-series signal of volatile concentration in the space above the boiler cavity, and uses the response value of a specific sensitive channel in the volatile concentration time-series signal as the input to determine the slope of the rising segment.
3. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 2, characterized in that, The pixel grayscale values of three adjacent frames in the original image sequence are subjected to temporal difference operation to obtain the pixel grayscale values of the difference image. Threshold segmentation is then performed on the pixel grayscale values of the difference image to separate carbonized and non-carbonized regions, including: For the (t-1), t, and (t+1)th frames of the original image sequence, calculate the pixel grayscale value difference between the (t+1)th and (t-1)th frames, where t is a positive integer; Calculate the difference in pixel grayscale values between frame t and frame t-1 pixel by pixel. Take the absolute value of the two sets of difference images at the corresponding pixel positions and then calculate the average value as the pixel grayscale value of the three difference images. The median and interquartile range of all pixel grayscale values in the three-frame differential images are calculated, and the dynamic segmentation threshold is determined. In the three-frame differential images, pixels with a grayscale value greater than the dynamic segmentation threshold are marked as carbonized regions, and those without are marked as non-carbonized regions. A morphological closing operation of dilation followed by erosion is performed on the labeled binary image to fill the pores inside the carbonized region, resulting in the separated carbonized and non-carbonized regions.
4. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 3, characterized in that, A morphological closing operation, consisting of dilation followed by erosion, is performed on the labeled binary image to fill the pores inside the carbonized regions, resulting in separated carbonized and non-carbonized regions, including: Connected component labeling is performed on the labeled binary image, and each connected component of the non-carbonized pores contained within the carbonized region is extracted; Calculate the pixel area of each connected component and determine the maximum pixel area; The maximum pixel area is converted into the equivalent circle diameter, and the equivalent circle diameter is rounded up to obtain the diameter of the structural element. A circular structural element with a diameter equal to that of the structural element is used to perform a dilation operation on the marked binary image, and the same circular structural element is used to perform an erosion operation on the dilated binary image. The newly added pixel regions in the eroded binary image compared to the labeled binary image are classified as carbonized regions, and the remaining regions are classified as non-carbonized regions. The separated carbonized and non-carbonized regions are then output.
5. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 1, characterized in that, Extracting the actual surface carbonization rate from the image sequence and calculating the cumulative heat load based on the pot body temperature time-series data includes: The timestamps of each frame in the image sequence are matched with the temperature values at each sampling time in the pot body temperature time series data to determine the pot body temperature time series data that has the same time axis as the actual value of the surface carbonization rate, and this data is used as the synchronous temperature time series data. Extract all temperature values from the start of frying to the current time from the synchronous temperature time series data to form a temperature value sequence; The temperature value sequence is divided into adjacent temperature value pairs in chronological order. Each temperature value pair contains the temperature value at the i-th sampling time and the temperature value at the (i+1)-th sampling time, where i is a positive integer from 1 to N-1 and N is the total number of temperature values in the temperature value sequence. For each temperature value pair, calculate the arithmetic mean of the temperature value at the i-th sampling time and the temperature value at the (i+1)-th sampling time to obtain the interval average temperature within the time interval corresponding to the current temperature value pair; Based on the average temperature of the interval and combined with the ambient temperature reference value, the effective temperature rise of the interval is obtained, and multiplied by the equal time interval to obtain the interval heat load of the current time interval. The cumulative heat load from the start of the cooking process to the current time is obtained by summing up the heat load of all time intervals.
6. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 1, characterized in that, The steps for constructing the carbonization response model include: The cumulative heat load of the target medicinal material was calculated from the start of the stir-frying process to each sampling time in multiple historical batches. The measured values of the thermal conductivity of the medicinal material at each sampling time and the measured values of the surface carbonization rate at each sampling time were collected. After data cleaning and outlier removal, historical sample data containing multiple sets of cumulative heat load, thermal conductivity and surface carbonization rate were obtained. The corresponding measured value of surface carbonization rate was labeled for each set of samples as a supervision label. The network architecture of the carbonization response model is constructed, wherein the carbonization response model is configured as a regression mapping structure with cumulative heat load and thermal conductivity as input variables and surface carbonization rate as output variable; The cumulative heat load and thermal conductivity in the historical sample data are used as model inputs, and the corresponding measured values of surface carbonization rate are used as supervision signals to supervise the training of the carbonization response model until the determination coefficient between the expected value of surface carbonization rate output by the model and the measured value of surface carbonization rate is greater than a first preset threshold and the mean absolute error is less than a second preset threshold, thus completing the construction of the carbonization response model.
7. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 1, characterized in that, Based on the deviation between the actual and expected values of the surface carbonization rate, a univariate optimization problem is constructed with the final discharge threshold as the decision variable and minimizing the square of the deviation as the objective function. Iterative optimization is then performed using the benchmark discharge threshold corresponding to the medicinal herb variety as the initial solution, outputting the optimal discharge threshold that minimizes the deviation, including: Set the current cumulative heat load value as the lower limit of the search, set the value of the benchmark discharge threshold corresponding to the medicinal material variety as the upper limit of the search, and within the search interval formed by the lower limit of the search and the upper limit of the search, take the value of the benchmark discharge threshold as the first trial point. The golden ratio point of the search interval is used as the second trial point, wherein the second trial point is located on the side of the search interval closer to the lower bound of the search. Using the thermal conductivity of the first test point and the current batch of medicinal materials as input, the carbonization response model is invoked to obtain the expected value of the carbonization rate of the first candidate surface, and the corresponding first objective function value is calculated. Using the thermal conductivity of the second test point and the current batch of medicinal materials as input, the carbonization response model is invoked to obtain the expected value of the carbonization rate of the second candidate surface, and the corresponding second objective function value is calculated. Compare the first objective function value with the second objective function value, and update the first trial point and the second trial point; Repeat the comparison and search interval update operation. When the length of the updated search interval is less than the accuracy of the discharge threshold, output the midpoint of the updated search interval as the optimal discharge threshold.
8. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 7, characterized in that, Comparing the first objective function value with the second objective function value, and updating the first trial point and the second trial point, includes: Compare the first objective function value with the second objective function value; If the value of the first objective function is greater than the value of the second objective function, then the upper bound of the search interval is updated to the first trial point, the first trial point is updated to the second trial point, and the golden ratio point is recalculated within the updated search interval as the new second trial point. If the value of the first objective function is less than or equal to the value of the second objective function, then the lower bound of the search interval is updated to the second trial point, the second trial point is updated to the first trial point, and the golden ratio point is recalculated within the updated search interval as the new first trial point. The updated first trial point, the updated second trial point, and the updated search interval are used as inputs for the next iteration.
9. The method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to claim 1, characterized in that, When the accumulated heat load reaches the optimal discharge threshold and the rising slope of the volatile concentration time-series signal is within a preset range, a discharge control signal is output, including: The cumulative heat load and optimal outlet threshold at the current moment are obtained, and the concentration values of the M sampling points continuously collected before the current moment are obtained to form a signal segment, where M is a positive integer; The cumulative heat load value is compared with the optimal outlet threshold value. When the cumulative heat load value is greater than or equal to the optimal outlet threshold value, the concentration values of each sampling point in the signal segment are linearly fitted to obtain the slope of the fitted line, which is used as the rising segment slope. Obtain the lower and upper threshold values of the slope of the volatile concentration rise segment corresponding to the current medicinal herb variety, and form a preset interval; The slope of the rising segment is compared with the lower threshold and the upper threshold respectively. When the slope of the rising segment is greater than the lower threshold and less than the upper threshold, a control command is generated to instruct the heating device to stop heating and a control command is generated to instruct the exhaust device to start. The control command is then output as a cooking control signal.
10. A system for optimizing the processing technology of traditional Chinese medicine decoction pieces, characterized in that, A method for optimizing the processing technology of traditional Chinese medicine decoction pieces according to any one of claims 1 to 9 includes: The image and process data acquisition module is used to acquire image sequences of the surface of medicinal materials, time-series data of pot temperature, and time-series signals of volatile concentration during the stir-frying process; The carbonization state analysis module is used to extract the actual value of the surface carbonization rate from the image sequence and calculate the cumulative heat load based on the pot body temperature time series data. The carbonization response prediction module is used to take the cumulative heat load and the thermal conductivity of the current batch of medicinal materials as inputs, call the carbonization response model, and estimate the expected value of the surface carbonization rate at the current moment. The unloading threshold optimization module is used to construct a single-variable optimization problem based on the deviation between the actual value of the surface carbonization rate and the expected value of the surface carbonization rate. The problem is to take the final unloading threshold as the decision variable and the minimization of the square of the deviation as the objective function. The module then iteratively optimizes the solution using the benchmark unloading threshold corresponding to the medicinal herb variety as the initial solution and outputs the optimal unloading threshold that minimizes the deviation. The boiler discharge control module is used to determine whether the cumulative heat load has reached the optimal boiler discharge threshold and whether the rising slope of the volatile concentration time series signal is within a preset range. When the conditions are met, the boiler discharge control signal is output.