Kitchen garbage reduction optimization method and system based on AI feedback mechanism
Patent Information
- Application Number
- CN202511993831.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-12-26
AI Technical Summary
Existing food waste treatment technologies lack precise control over the physical properties of waste and the treatment process, resulting in an inflexible adjustment of treatment strategies and difficulty in achieving optimal waste reduction.
By employing an AI-based feedback mechanism, multimodal perception data collection and reinforcement learning models are used to generate composite state vectors, construct dynamic feedback contexts, and optimize food waste treatment strategies, including particle size, dehydration intensity, and sorting intervention timing, to achieve dynamic adjustments.
It enables precise control over the food waste treatment process, improves the reduction effect, and enhances resource recycling rate and treatment efficiency.
Smart Images

Figure CN122063858B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of environmental protection, food waste treatment and information technology, and in particular to a method and system for optimizing food waste reduction based on an AI feedback mechanism. Background Technology
[0002] In the field of food waste treatment, with increasing environmental awareness and growing demand for waste disposal, efficient reduction of food waste has become an important research direction. Currently, common food waste treatment methods mainly rely on traditional mechanical crushing and dehydration. Traditional mechanical crushing uses fixed blades and crushing chambers to break down food waste, while dehydration often employs simple compression methods. These methods can reduce the volume of food waste to some extent, but they lack precise control over the physical properties of the waste and the treatment process.
[0003] To improve processing efficiency, some existing solutions incorporate sensor technology to adjust the operating parameters of the processing equipment by monitoring changes in the weight and volume of the waste. For example, when an increase in waste weight is detected, the rotation speed of the shredder is appropriately increased or the dehydration time is extended. However, this feedback adjustment method based on single data has significant limitations. Because it does not comprehensively consider the physical properties of kitchen waste, such as its shape, humidity, and temperature, as well as user behavior, the processing strategy cannot be flexibly adjusted according to actual conditions, making it difficult to achieve optimal waste reduction. Summary of the Invention
[0004] The main purpose of this application is to provide a method and system for optimizing the reduction of kitchen waste based on an AI feedback mechanism. This method can comprehensively consider multimodal perception data of kitchen waste, waste container status information, and user operation behavior sequences to achieve precise control and optimization of the kitchen waste treatment process, thereby effectively improving the reduction effect of kitchen waste.
[0005] To achieve the above objectives, embodiments of the present invention provide a method for optimizing the reduction of kitchen waste based on an AI feedback mechanism, the method comprising the following steps: Multimodal sensing data is collected during the process of disposing of kitchen waste, and the status information of the waste container and the sequence of user operation behavior are acquired simultaneously. The multimodal sensing data includes visible light image frames, infrared thermal images and weight change time-series signals. Primary features related to the physical properties of kitchen waste are extracted from the multimodal sensing data, and a composite state vector is generated by fusing the state information of the waste container and the user operation behavior sequence. The primary features include morphological contour parameters, surface humidity distribution and temperature gradient features. The composite state vector is associated with historical depletion execution records in the time dimension, and a dynamic feedback context is constructed through a reinforcement learning model. The dynamic feedback context includes the previous depletion strategy identifier, resource recycling product type and corresponding execution deviation. Based on the dynamic feedback context, the current state of kitchen waste is assessed for adaptability, a set of reduction path candidates is generated and assigned priority, wherein the set of reduction path candidates includes the crushing particle size level, the dewatering intensity level and the sorting intervention time. The optimal waste reduction path is selected based on the priority ranking, and the corresponding equipment control instruction sequence is output. The reinforcement learning model is updated based on the actual execution deviation. The equipment control instruction sequence directly drives the food waste treatment device to perform waste reduction operations to achieve the waste reduction optimization goal.
[0006] In summary, the technical solution of this application, by collecting multimodal sensing data during the food waste disposal process and simultaneously acquiring waste container status information and user operation behavior sequences, can comprehensively understand the physical properties and processing scenarios of food waste. Then, primary features are extracted from the multimodal sensing data to generate a composite state vector; this composite state vector is then mapped and associated with historical reduction execution records to construct a dynamic feedback context, enabling the processing strategy to be dynamically adjusted based on historical experience. Furthermore, based on the dynamic feedback context, the current food waste state is assessed for suitability, generating a candidate set of reduction paths and assigning them priority rankings to ensure that the selected processing path better reflects the actual situation. The optimal reduction path is selected based on the priority ranking, and a sequence of equipment control commands is output. Simultaneously, the reinforcement learning model is updated based on the actual execution deviation, continuously optimizing the processing strategy, improving the food waste reduction effect, and achieving the reduction optimization goal. Attached Figure Description
[0007] Figure 1 This is a schematic diagram of a scenario for the optimization method for reducing kitchen waste based on an AI feedback mechanism in the embodiments of this application; Figure 2 A flowchart of a kitchen waste reduction optimization method based on an AI feedback mechanism provided in an embodiment of this application; Figure 3 This is a schematic diagram of the process for generating composite state vectors provided in an embodiment of this application; Figure 4 A schematic diagram illustrating the process of generating a spatial probability map of surface humidity distribution provided in this application embodiment; Figure 5 This is a flowchart illustrating the dynamic feedback context generation process provided in an embodiment of this application. Figure 6 A flowchart illustrating the priority sorting process provided in this application embodiment; Figure 7A schematic diagram illustrating the process of determining the sorting timing provided in an embodiment of this application; Figure 8 A schematic diagram of the structure of the kitchen waste reduction optimization system based on the AI feedback mechanism provided in the embodiments of this application; Figure 9 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0008] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0009] This application provides a method and system for optimizing the reduction of kitchen waste based on an AI feedback mechanism, which will be described in detail below.
[0010] As shown in Figure 1, a scenario for optimizing the reduction of kitchen waste based on an AI feedback mechanism is provided. This scenario mainly includes a kitchen waste disposal device, a multimodal data acquisition device, a kitchen waste processing device, and an intelligent control platform. The multimodal data acquisition device, the kitchen waste processing device, and the intelligent control platform are connected through a wired network.
[0011] Take a large commercial complex as an example. This complex contains numerous restaurants, supermarkets, and food courts, generating a large amount of food waste every day. To effectively handle this food waste, a dedicated food waste treatment area has been set up on the basement level of the complex.
[0012] Multimodal data acquisition equipment is distributed around the food waste disposal unit, including cameras, infrared thermal imaging sensors, and weighing units. A high-definition visible light camera is installed directly above the disposal opening to continuously image the area. When restaurant staff move the bins containing food waste to the disposal opening and open the door, the camera captures a sequence of image frames at 12 frames per second, showing the stacking pattern of the waste and the disposal action. For example, during the peak lunch period, when large amounts of leftover food, lunch boxes, and other food waste are disposed of, the camera can clearly record the accumulation of waste and the staff's disposal actions. Simultaneously, the image frame sequence is timestamped to the millisecond level and aligned with the container's opening and closing status signals to ensure data accuracy and synchronization.
[0013] An infrared thermal imaging sensor and a visible light camera are activated simultaneously to acquire a thermal radiation distribution map of the waste surface. This sensor can detect minute temperature changes on the waste surface and convert them into a thermal radiation distribution map. For example, in hot summers, some perishable kitchen waste may generate heat due to fermentation; the infrared thermal image can promptly identify these areas of abnormal temperature. The thermal radiation distribution map is then spatially registered with the visible light image frame to generate a registered multispectral fusion frame. In this way, information from visible light and infrared thermal imaging is combined to gain a more comprehensive understanding of the physical properties of the waste.
[0014] A high-precision weighing unit is installed at the bottom of the waste container to monitor changes in waste weight in real time. The output weight signal undergoes sliding window differential processing, with the window size set to 8 seconds, to extract the weight increment curve per unit time. For example, during dinner hours, as restaurants continuously deposit food waste, the weight increment curve will show a significant increase. By analyzing the weight increment curve, the rate and total amount of waste deposited can be determined.
[0015] In addition, an operation event recording device is installed to record user actions that trigger the opening and closing of the disposal door. These operation events are arranged chronologically to form a user operation behavior sequence. By analyzing the user operation behavior sequence, it is possible to understand the disposal habits and behavioral patterns of restaurant staff. For example, some restaurants may concentrate their waste disposal at specific times or have a higher disposal frequency. This helps to optimize waste disposal strategies, such as increasing the operating intensity of processing equipment during peak disposal periods.
[0016] After acquiring synchronous multimodal data packets and user operation behavior sequences uploaded by multimodal data acquisition devices, the intelligent control platform performs in-depth data processing and analysis. It extracts primary features related to the physical properties of kitchen waste from the multimodal sensing data. Edge detection and connected component analysis are performed on visible light image frames to extract the outer contour boundary point set of the waste pile, and the convex hull area and aspect ratio of the boundary point set are calculated as morphological contour parameters. For example, by analyzing the morphological contour parameters, it can be determined whether the waste is loosely or densely packed, thus selecting an appropriate treatment method. Based on the mapping relationship between pixel grayscale values and temperature in infrared thermal imaging, the actual temperature values of each region on the waste surface are inverted, the temperature difference between adjacent regions is calculated, and a temperature gradient feature matrix is constructed. Combining the texture roughness of the visible light image and the local temperature rise rate of the infrared image, the surface moisture evaporation trend is derived, generating a spatial probability map representing the humidity distribution. The current filling rate, sealing status, and remaining capacity information of the waste container are read as container status information. The morphological contour parameters, temperature gradient feature matrix, surface humidity distribution spatial probability map, container status information, and user operation behavior sequence are vectorized and concatenated to generate a composite state vector.
[0017] The composite state vector is mapped to historical waste reduction execution records along the temporal dimension, and a dynamic feedback context is constructed using a reinforcement learning model. Several historical records with a state space distance less than a preset threshold relative to the current composite state vector are retrieved from locally stored historical logs. For example, if the current composite state vector indicates high waste moisture and loose morphology, the system will retrieve processing records under similar historical conditions. The historical records are arranged in reverse chronological order, and the corresponding waste reduction strategy identifier, the type of actual recycled resource output, and the deviation between the execution result and the expected target are extracted for each record. This information is encoded and normalized, then input into the state encoder of the reinforcement learning model, outputting a dynamic feedback context representing historical experience feedback.
[0018] Based on dynamic feedback context, the system assesses the current state of food waste to determine its suitability, generating a candidate set of reduction paths and assigning them priority. The intelligent control platform selects the optimal reduction path according to the priority ranking and outputs the corresponding equipment control command sequence. If the top-ranked reduction path has equipment execution conflicts, the next best path is selected. The generated equipment control command sequence includes parameters for the pulverizing module, dehydration module, sorting intervention timing, and AI optimizer calibration items. The equipment control command sequence is sent to the food waste treatment device to execute the waste reduction operation, and the actual execution parameters and action sequence of each module are recorded simultaneously as an execution log.
[0019] After receiving the equipment control command sequence, the food waste processing unit's modules begin to work collaboratively. The pulverizing module pulverizes the food waste according to the set particle size classification, the dehydration module dehydrates the waste according to the specified dehydration intensity level, and the sorting module sorts the waste at appropriate times. For example, when a high risk of organic matter contamination is predicted, the sorting module will perform pre-treatment sorting before the waste enters the processing chamber, separating unsuitable materials such as plastic bags and bones, thus improving the efficiency and quality of subsequent processing.
[0020] During waste treatment, the intelligent control platform identifies the actual types of recyclable products in real time, collects the actual volume reduction through weighing units, and calculates the actual execution deviation. This deviation is used as a reward signal for the reinforcement learning model, and the model's policy value function is updated through backpropagation to achieve adaptive optimization. For example, if the volume reduction effect is found to be less than expected during actual execution, the parameters of the reinforcement learning model are updated by analyzing the execution deviation, so that a more suitable treatment strategy can be selected in the next treatment.
[0021] Ultimately, the treated food waste was effectively reduced, with some of it being converted into organic fertilizer and other resources for recycling, reducing environmental pollution and improving resource utilization. Through an AI-based feedback mechanism-driven optimization method for food waste reduction, the efficiency of food waste treatment in commercial complexes was significantly improved.
[0022] refer to Figure 2 , Figure 2 This is a flowchart illustrating a method for optimizing food waste reduction based on an AI feedback mechanism, as provided in this application embodiment. The execution entity of this method can be a computer device (such as an intelligent control platform), such as a server. The specific components of the food waste reduction optimization method based on an AI feedback mechanism provided in this application embodiment include:
[0023] S10: Collect multimodal sensing data during the process of disposing of kitchen waste, and simultaneously acquire waste container status information and user operation behavior sequence, wherein the multimodal sensing data includes visible light image frames, infrared thermal images and weight change time sequence signals.
[0024] In this embodiment, multimodal sensing data is a key dataset that comprehensively describes the physical properties and disposal process of kitchen waste. Visible light image frames can intuitively reflect the shape and disposal action of kitchen waste, infrared thermal images can provide information on the temperature distribution of the waste surface, and weight change time-series signals record the change in waste weight over time.
[0025] In one embodiment, step S10, which uses multimodal sensing data, can be implemented in the following way: F1: Perform continuous visible light imaging on the area of the food waste disposal port to capture a sequence of image frames containing the waste stacking pattern and disposal action, and timestamp the image frame sequence and align it with the container opening and closing status signal.
[0026] In this embodiment, the image frame sequence records the form and action of food waste during disposal. A timestamp provides time information for the image frame sequence, facilitating subsequent synchronization with other data. The container opening / closing status signal reflects the opening and closing status of the waste container; aligning it with the image frame sequence ensures data accuracy and consistency.
[0027] In one embodiment, a high-definition visible light camera continuously images the area where the food waste disposal opening is located, at a frame rate of 10 frames per second. The captured image frame sequence is timestamped to the millisecond level. Simultaneously, the open / closed state signal of the waste container is acquired, and the image frame sequence is aligned with this signal. For example, recording the image frame sequence begins when the container is open and stops when the container is closed. This ensures that the image frame sequence accurately reflects the actual situation during waste disposal.
[0028] F2: Simultaneously activate the infrared thermal imaging sensor to acquire the thermal radiation distribution map of the waste surface, spatially register the thermal radiation distribution map with the visible light image frame, and generate a registered multispectral fusion frame.
[0029] In this embodiment, the thermal radiation distribution map reflects the temperature distribution on the surface of the waste. Spatial registration aligns the thermal radiation distribution map with the visible light image frame in space, ensuring they are in the same coordinate system, which facilitates subsequent analysis and processing. The multispectral fusion frame combines information from visible light and infrared thermal imaging, providing a more comprehensive reflection of the physical properties of the waste.
[0030] F3: Real-time monitoring of the weight signal output by the weighing unit at the bottom of the waste container, performing sliding window differential processing on the weight signal, and extracting the weight increment change curve per unit time.
[0031] In this embodiment, the weight signal reflects the weight change of the waste in the waste container. Sliding window differential processing is a method for processing time series data. By calculating the weight increment change curve per unit time, the rate and amount of waste disposal can be understood more clearly.
[0032] In one embodiment, a high-precision weighing unit is used to monitor the weight signal at the bottom of the waste container in real time. The weight signal is processed using a sliding window differential method, with a window size of 10 seconds. For example, within each 10-second window, the difference between the weight in the current window and the weight in the previous window is calculated to obtain the weight increment per unit time. These weight increments are arranged in chronological order to form a weight increment change curve.
[0033] F4: Record user-triggered opening and closing of the delivery door, and arrange these events in chronological order to form a sequence of user actions.
[0034] In this embodiment, the user operation behavior sequence records the user's operation events during the waste disposal process, including the opening and closing times of the disposal door. By analyzing the user operation behavior sequence, the user's disposal habits and behavioral patterns can be understood. The waste container status information includes the container's fill rate, sealing status, and remaining capacity.
[0035] For example, by analyzing user behavior sequences at a community food waste disposal point, it can be discovered that certain residents dispose of their waste at specific times or with higher frequency. This helps optimize waste management strategies, such as increasing the operating intensity of processing equipment during peak disposal periods.
[0036] F5: Encapsulate the registered multispectral fusion frame, weight increment change curve, waste container status information, and user operation behavior sequence into a synchronous multimodal data packet, wherein the synchronous multimodal data packet contains perception and behavior metadata under a unified time reference.
[0037] For example, using the timestamps of the image frame sequence as a reference, the weight increment change curve and the time information in the user operation behavior sequence are aligned with it. Perception and behavior metadata, such as data acquisition time and acquisition device information, are added to the data packet.
[0038] S20: Extract primary features related to the physical properties of kitchen waste from the multimodal sensing data, and fuse the waste container state information and the user operation behavior sequence to generate a composite state vector, wherein the primary features include morphological contour parameters, surface humidity distribution and temperature gradient features.
[0039] In this embodiment, the primary features are key features extracted from multimodal sensing data that reflect the physical properties of kitchen waste. Morphological contour parameters can describe the shape and size of the waste, surface humidity distribution can reflect the moisture content of the waste, and temperature gradient features can reflect the temperature changes inside the waste.
[0040] In this embodiment, the morphological contour parameters are obtained by performing edge detection and connected component analysis on visible light image frames. For example, the morphological contour parameters can be obtained by calculating the convex hull area and aspect ratio of the boundary point set of the outer contour of the waste stack. These parameters can help determine the morphological characteristics of the waste, such as whether it is loose or regular.
[0041] In this embodiment, the surface humidity distribution is derived by combining the texture roughness of a visible light image with the local temperature rise rate of an infrared image. For example, in a humid environment, the texture of a garbage surface may be relatively rough, while the local temperature rise rate in the infrared image may be relatively slow. By analyzing these features, a spatial probability map characterizing the humidity distribution can be generated.
[0042] In this embodiment, the temperature gradient feature is obtained by inverting the mapping relationship between pixel grayscale values and temperature in an infrared thermal image. Calculating the temperature difference between adjacent regions and constructing a temperature gradient feature matrix helps to understand the temperature changes inside the waste, such as whether there is local overheating.
[0043] S30: Associate the composite state vector with the historical reduction execution records in the time dimension, and construct a dynamic feedback context through a reinforcement learning model, wherein the dynamic feedback context includes the previous reduction strategy identifier, the resource recycling product type and the corresponding execution deviation.
[0044] In this embodiment, the dynamic feedback context is constructed based on a composite state vector and historical deceleration execution records, and is used to provide a reference for the current processing strategy. The previous deceleration strategy identifier helps to understand the processing strategy previously adopted, the resource recycling product type can reflect the processing effect, and the corresponding execution deviation can evaluate the effectiveness of the strategy.
[0045] In this embodiment of the application, the historical volume reduction execution record refers to the relevant data records of previous food waste processing, including the processing strategy adopted, the type of resource recovery products, and the execution deviation. For example, in the previous processing, a certain particle size class and dewatering intensity level were used to obtain the corresponding resource recovery products, and the difference between the actual volume reduction and the theoretical maximum volume reduction was recorded as the execution deviation.
[0046] In this embodiment, the reinforcement learning model is a model capable of self-learning and optimization based on environmental feedback. By associating and mapping the composite state vector with historical decrement execution records in the temporal dimension, the reinforcement learning model can learn the optimal processing strategy for different states.
[0047] S40: Based on the dynamic feedback context, determine the adaptability of the current kitchen waste status, generate a reduction path candidate set and assign priority ranking, wherein the reduction path candidate set includes the crushing particle size level, dewatering intensity level and sorting intervention time.
[0048] In this embodiment, the suitability determination is based on an assessment of the current state of kitchen waste according to dynamic feedback context to determine the most suitable treatment strategy. The reduction path candidate set is a series of possible treatment paths generated based on the current waste state and historical experience, including the particle size distribution of the pulverized waste, the dewatering intensity level, and the timing of sorting intervention.
[0049] In this embodiment, the particle size classification refers to the size of the particles pulverized during the pulverization process of kitchen waste. Different physical properties of waste may require different particle size classifications; for example, harder waste may require smaller particle sizes.
[0050] In this embodiment, the dehydration intensity level refers to the degree of dehydration of kitchen waste during the dehydration process. Different dehydration intensity levels can be selected according to the moisture content of the waste; for example, waste with higher moisture content may require a higher dehydration intensity.
[0051] In this embodiment, the sorting intervention timing refers to the point in time during the food waste treatment process when sorting operations are performed. The decision on whether to trigger the sorting intervention timing earlier is determined based on the composition and mixing of the waste.
[0052] S50: Select the optimal reduction path according to the priority sorting and output the corresponding equipment control instruction sequence. Update the reinforcement learning model according to the actual execution deviation. The equipment control instruction sequence directly drives the food waste treatment device to perform waste reduction operation to achieve the waste reduction optimization goal.
[0053] In this embodiment, the optimal reduction path is the processing path most suitable for the current state of food waste, selected according to priority ranking. The equipment control command sequence is a series of commands generated based on the optimal reduction path, used to drive the food waste processing device to perform waste reduction operations.
[0054] In this embodiment, the actual execution deviation refers to the difference between the actual reduction effect and the expected reduction effect during actual execution. By updating the reinforcement learning model based on the actual execution deviation, the processing strategy can be continuously optimized to improve the reduction effect.
[0055] In one embodiment, step S50 can be implemented as follows: Y1: Based on the priority ranking, the first-ranked reduction path is selected as the optimal path. If there is a device execution conflict, the second-best path is selected in order.
[0056] In this embodiment, the priority ranking is based on the expected execution stability of each reduction path. The optimal path is the first-ranked reduction path, but in actual execution, device execution conflicts may occur, in which case the second-best path needs to be selected.
[0057] For example, in a food waste treatment plant, the top-priority reduction path requires the pulverizing module to pulverize waste at a specific particle size and the dewatering module to dewater it at a high intensity. However, if the pulverizing module is currently undergoing maintenance and cannot meet the requirements of this path, then the second-best path, ranked second, is selected instead.
[0058] Y2: Generate a sequence of equipment control commands, which includes parameters for the crushing module, parameters for the dewatering module, parameters for the sorting intervention timing, and calibration items for the AI optimizer.
[0059] In this embodiment, the equipment control command sequence is a set of instructions used to control the operation of each module of the food waste processing device. The parameters of the pulverizing module, the dehydration module, and the sorting intervention timing determine the specific operating mode of each module, and the AI optimizer calibration item is used to calibrate and optimize the reinforcement learning model.
[0060] For example, the selected reduction path requires the pulverizing module to pulverize at particle size level 4, the dewatering module to dewater at intensity level 3, and the sorting intervention to occur during the pre-processing stage. The generated equipment control command sequence will include this parameter information, as well as AI optimizer calibration items, such as adjusting the learning rate to 0.01.
[0061] Y3: Send the sequence of equipment control commands to the food waste treatment device to perform the reduction operation, and simultaneously record the actual execution parameters and action sequence of each module as an execution log.
[0062] In this embodiment, sending a sequence of device control commands to the food waste processing device can drive the device to perform corresponding waste reduction operations. The actual execution parameters and action sequence of each module are recorded synchronously as an execution log, facilitating subsequent analysis and evaluation of the processing process.
[0063] For example, in a large food waste treatment plant, after the equipment control command sequence is sent to the processing unit, the unit starts operating. Information such as the actual rotation speed of the pulverizing module (1500 rpm) and the actual dewatering time of the dewatering module (20 minutes) are recorded during operation, forming an execution log.
[0064] Y4: Identify the actual type of recycled product, collect the actual volume reduction through the weighing unit, and calculate the actual execution deviation.
[0065] In this embodiment, identifying the actual type of recycled product helps understand the actual effectiveness of the processing strategy. By collecting the actual volume reduction using a weighing unit and combining it with the theoretical maximum volume reduction, the actual execution deviation can be calculated.
[0066] For example, after processing a batch of kitchen waste, the product detection module identifies the actual recycled product as organic fertilizer. The weighing unit shows that the waste weighed 100 kg before processing and 30 kg after processing, resulting in an actual volume reduction of 70 kg. Assuming the theoretical maximum volume reduction is 80 kg and the preset benchmark value is 0.8, the actual execution deviation is (70 / 80 - 0.8) = 0.075.
[0067] Y5: The actual execution deviation is used as the reward signal for the reinforcement learning model. The policy value function of the model is updated through backpropagation to achieve adaptive optimization of the model.
[0068] In this embodiment, the actual execution deviation reflects the execution effect of the current processing strategy. Using this deviation as a reward signal for the reinforcement learning model, and updating the model's policy value function through backpropagation, allows the model to continuously learn and optimize, improving the accuracy of the processing strategy.
[0069] In one embodiment, the actual execution deviation is converted into a reward signal, such as assigning a higher reward value to a smaller deviation. The reward signal is input into the reinforcement learning model, and the model's policy value function is updated using the backpropagation algorithm. Through multiple iterations, the model gradually adjusts its policy to achieve better processing results.
[0070] For example, in a reinforcement learning-based food waste treatment system, when the actual execution deviation is 0.075, it is converted into a higher reward value. The model uses this reward signal for backpropagation to adjust its internal parameters and strategies, enabling it to select a more suitable reduction path in subsequent processing and reduce the execution deviation.
[0071] In one embodiment, reference Figure 3 Step S20 may include steps S21-S25, which will be described in detail below: S21: Perform edge detection and connected component analysis on the visible light image frame, extract the outer contour boundary point set of the garbage stack, and calculate the convex hull area and aspect ratio of the boundary point set as morphological contour parameters.
[0072] In this embodiment, edge detection is an image processing technique used to detect the edges of objects in an image. Connected component analysis analyzes interconnected regions in an image. The outer contour boundary point set is the set of external boundary points of the waste stack; the convex hull area and aspect ratio are important parameters describing the morphological characteristics of the waste.
[0073] In one embodiment, the Canny edge detection algorithm is used to perform edge detection on a visible light image frame to obtain edge information in the image. Connectivity analysis is performed on the edge image to identify the outer contour of the garbage pile. The boundary point set of the outer contour is extracted, and the convex hull algorithm is used to calculate the convex hull area of the boundary point set. At the same time, the aspect ratio of the minimum bounding rectangle of the boundary point set is calculated.
[0074] For example, when processing a pile of loose kitchen waste, edge detection and connected component analysis can accurately extract the outer contour of the waste. The calculated convex hull area and aspect ratio can reflect the looseness and shape characteristics of the waste.
[0075] S22: Based on the mapping relationship between pixel grayscale values and temperature in infrared thermal imaging, the actual temperature values of each area on the surface of the waste are retrieved, the temperature difference between adjacent areas is calculated, and a temperature gradient feature matrix is constructed.
[0076] In this embodiment, the mapping relationship between pixel grayscale values and temperature is a calibration parameter of the infrared thermal imaging sensor. This mapping relationship allows the pixel grayscale values in the infrared thermal image to be converted into actual temperature values. The temperature gradient feature matrix reflects the temperature changes on the surface of the waste.
[0077] In one embodiment, the pixel grayscale values in the infrared thermal image are converted into actual temperature values based on the calibration parameters of the infrared thermal imaging sensor. The surface of the waste is divided into regions, and the temperature difference between adjacent regions is calculated. These temperature differences are arranged according to their region locations to construct a temperature gradient feature matrix.
[0078] S23: Combining the texture roughness of the visible light image with the local temperature rise rate of the infrared image, the surface moisture evaporation trend is derived, and a spatial probability map representing the humidity distribution is generated.
[0079] In this embodiment, texture roughness reflects the texture features of an object's surface in a visible light image, while the local temperature rise rate reflects the temperature change of the object's surface in an infrared image. The surface moisture evaporation trend is closely related to both texture roughness and local temperature rise rate; by combining these two features, the surface moisture evaporation trend can be derived. A spatial probability map is a graphic representation of humidity distribution, where the probability value of each pixel represents the likelihood of humidity at that point.
[0080] In one embodiment, reference Figure 4 Step S23 may include steps S231-S235, which will be described in detail below: S231: Calculate the gray-level co-occurrence matrix of local regions in a visible light image, and extract the contrast and entropy values as texture roughness indicators.
[0081] In this embodiment, the gray-level co-occurrence matrix is a matrix used to describe the texture features of an image, and the contrast and entropy values are important texture feature indicators extracted from the gray-level co-occurrence matrix.
[0082] In one embodiment, the visible light image is divided into multiple local regions, and a gray-level co-occurrence matrix is calculated for each local region. Contrast and entropy values are extracted from the gray-level co-occurrence matrix as texture roughness indicators.
[0083] S232: Perform time differentiation processing on the same area in the infrared image to obtain the temperature rise rate field per unit time.
[0084] In this embodiment, time differentiation processing is an operation that calculates the derivative of the infrared image in the time dimension. The temperature rise rate field reflects the temperature change of each region in the infrared image per unit time.
[0085] In one embodiment, the same region in the infrared image as that in the visible light image is subjected to time differentiation processing. The rate of temperature change of each pixel per unit time is calculated to form a temperature rise rate field.
[0086] S233: Align the texture roughness index with the temperature rise rate field at the pixel level and establish a joint response function between the two.
[0087] In this embodiment, pixel-level alignment maps texture roughness indices and temperature rise rate fields at the pixel level. The joint response function describes the relationship between texture roughness indices and temperature rise rate fields.
[0088] In one embodiment, the texture roughness index and the temperature rise rate field are aligned at the pixel level to ensure that the texture roughness index and temperature rise rate field value correspond for each pixel. A joint response function between the two is established, for example, through linear regression or nonlinear fitting.
[0089] S234: Map the output value of the joint response function to the preset humidity level range to generate a preliminary humidity level map.
[0090] In this embodiment, the preset humidity level range is a series of pre-defined humidity ranges used to classify the output values of the joint response function. The preliminary humidity level map is an image generated after mapping the output values of the joint response function to the preset humidity level range, with each pixel corresponding to a humidity level.
[0091] In one embodiment, step S234 can be implemented as follows: G1: Divide the output value of the joint response function into five continuous intervals, corresponding to the five humidity levels of extremely dry, dry, medium humidity, wet, and extremely wet.
[0092] In this embodiment, the output value of the joint response function reflects the humidity-related characteristics of the surface of kitchen waste. Dividing it into five continuous intervals and corresponding to five levels of humidity labels allows for a more detailed classification and description of humidity.
[0093] In one embodiment, based on extensive experimental data and experience, the range of values for the joint response function output is determined. This range is divided into five consecutive intervals; for example, the first interval corresponds to extremely dry, the second to dry, the third to moderately humid, the fourth to humid, and the fifth to extremely humid. A corresponding humidity label is assigned to each interval.
[0094] For example, assuming the output value of the joint response function ranges from 0 to 100, it can be divided into five intervals: 0 to 20, 21 to 40, 41 to 60, 61 to 80, and 81 to 100, which correspond to five humidity levels: extremely dry, dry, medium humid, humid, and extremely humid, respectively.
[0095] G2: Determine the range of each pixel's response value and assign it a corresponding humidity label.
[0096] In one embodiment, the response value of each pixel output by the joint response function is iterated. The response value of each pixel is compared with five pre-divided intervals to determine its corresponding interval. Based on its interval, a humidity label is assigned to the pixel.
[0097] For example, a pixel with a response value of 30 falls within the range of 21-40, so the pixel is assigned a humidity label of "dry".
[0098] G3: Integrates the humidity labels of all pixels into a two-dimensional label matrix.
[0099] The specific method for integrating the humidity labels of all pixels into a two-dimensional label matrix can be as follows: 1. Initialize an empty matrix of the same size as the visible light image at the original image resolution.
[0100] In one embodiment, the raw resolution of the visible light image is obtained, for example, 800 pixels wide and 600 pixels high. Based on this resolution, an empty 800×600 matrix is initialized to store humidity tags.
[0101] For example, when processing an 800×600 resolution visible light image, create an empty matrix of the same size, with each element initialized to 0, indicating that humidity labels have not yet been filled in.
[0102] 2. Write the humidity label of each pixel into the corresponding row and column position of the empty matrix.
[0103] In one embodiment, the corresponding row and column position of a pixel in an empty matrix is determined based on its position in the visible light image. The humidity label of that pixel is then written to the corresponding position in the empty matrix.
[0104] For example, for the pixel in row 100 and column 200 of a visible light image, whose humidity label is "medium humidity", write the label "medium humidity" into the position of row 100 and column 200 of an empty matrix.
[0105] 3. For the positions of missing labels in the matrix, use four-neighbor interpolation to fill in the nearest valid label.
[0106] In one embodiment, each element in the matrix is traversed to check for any missing label positions. For each missing label position, valid labels in its four neighborhoods (top, bottom, left, and right) are searched, and the nearest valid label is selected to fill the missing label position.
[0107] For example, if a humidity label is missing at a certain position in the matrix, the neighboring label above it is "wet", the neighboring label below it is "medium humidity", the neighboring label to its left is "dry", and the neighboring label to its right is "wet". Select the nearest "wet" label to fill the gap.
[0108] 4. Verify whether the number of connected regions in the filled matrix exceeds the preset limit. If it does, perform a region merging operation.
[0109] In this embodiment, verifying the number of connected regions in the padded matrix ensures the matrix's rationality and continuity. If the number of connected regions exceeds a preset upper limit, performing a region merging operation can make the matrix more regular.
[0110] In one embodiment, a connected component analysis algorithm is used to calculate the number of connected components in the filled matrix. The number of connected components is compared with a preset upper limit. If it exceeds the preset upper limit, adjacent connected components are merged until the number of connected components does not exceed the preset upper limit.
[0111] For example, with a preset upper limit of 10 connected regions, the calculated number of connected regions in the filled matrix is 15. Some adjacent connected regions are selected for merging, such as merging two adjacent "wet" regions into a larger "wet" region, until the number of connected regions is reduced to below 10.
[0112] 5. Output a two-dimensional label matrix that has been verified for integrity as the basic data structure for the humidity level map.
[0113] For example, after filling, merging, and validating the matrix, a complete and reasonable two-dimensional label matrix is obtained. This matrix is used as the basic data structure for generating a visual humidity level map.
[0114] G4: Perform color encoding conversion on the two-dimensional label matrix to generate a visual humidity level map.
[0115] In one embodiment, each humidity label is assigned a color, such as white for extremely dry, light yellow for dry, light blue for moderately humid, dark blue for humid, and black for extremely humid. Each element in the two-dimensional label matrix is iterated through, and the corresponding color is filled into the appropriate position based on its humidity label to generate a visual humidity level map.
[0116] For example, in a two-dimensional label matrix, if the humidity label at a certain location is "medium humidity," that location will be filled with light blue. The resulting visualized humidity level map can clearly show the humidity distribution on the surface of food waste.
[0117] G5: Preserves the mapping relationship between the original pixel coordinates and humidity labels to form a structured humidity level dataset.
[0118] In this embodiment, preserving the mapping relationship between the original pixel coordinates and humidity labels facilitates subsequent querying and analysis of humidity data, forming a structured humidity level dataset that is convenient for data management and use.
[0119] In one embodiment, during the generation of the two-dimensional label matrix and the visualized humidity level map, the original coordinates and corresponding humidity label of each pixel are recorded. These mapping relationships are then organized into a structured dataset, such as stored using a table or database.
[0120] For example, the humidity label corresponding to pixel (100, 200) is recorded as "medium humidity". This information is stored in a table to form a structured humidity level dataset. This way, when you need to query the humidity information for a specific location, you can directly retrieve it from the dataset.
[0121] S235: Perform neighborhood smoothing filtering on the preliminary humidity level map to eliminate isolated noise points and output the final spatial probability map of surface humidity distribution.
[0122] In this embodiment, neighborhood smoothing filtering is a method for smoothing images by considering the neighborhood information of pixels to eliminate isolated noise points. The surface humidity distribution spatial probability map is a graphic that more accurately reflects the humidity distribution on the surface of waste after smoothing.
[0123] In one embodiment, a neighborhood smoothing filtering method, such as mean filtering or median filtering, is used to process the preliminary humidity level map.
[0124] For example, there may be some isolated noise points in the preliminary humidity level map, which may be due to interference or errors during the image acquisition process. Neighborhood smoothing filtering can eliminate these noise points, making the final spatial probability map of surface humidity distribution more accurate and reliable.
[0125] S24: Read the current filling rate, sealing status and remaining capacity of the waste container as container status information.
[0126] In this embodiment, the filling rate, sealing status, and remaining capacity of the waste container are important parameters reflecting the current state of the container. The filling rate indicates the degree of waste filling inside the container, the sealing status affects the odor diffusion and decomposition rate of the waste, and the remaining capacity determines how much more waste the container can hold.
[0127] In one embodiment, a level sensor or a weighing sensor is used to read the current fill rate of the waste container. The sealing status of the container is determined by detecting the state of the container's sealing door. Based on the container's total capacity and the current fill rate, remaining capacity information is calculated.
[0128] For example, at a food waste treatment station in a large community, timely information on the filling rate, sealing status, and remaining capacity of waste containers can help to rationally plan the transportation and treatment of waste, avoiding container overflow or waste of resources.
[0129] S25: The morphological contour parameters, temperature gradient feature matrix, surface humidity distribution spatial probability map, container state information and user operation behavior sequence are vectorized and concatenated to generate a composite state vector.
[0130] In this embodiment of the application, vectorized concatenation involves converting each feature into a vector form and concatenating them together in a certain order.
[0131] In one embodiment, the morphological contour parameters, temperature gradient feature matrix, surface humidity distribution spatial probability map, container state information, and user operation behavior sequence are each converted into vector form. These vectors are then concatenated in the order of morphological contour parameters, temperature gradient feature matrix, surface humidity distribution spatial probability map, container state information, and user operation behavior sequence to generate a composite state vector.
[0132] For example, when processing kitchen waste, the composite state vector contains information on various aspects such as the shape of the waste, temperature, humidity, container status, and user operations.
[0133] In one embodiment, reference Figure 5 Step S30 may include steps S31-S35, which will be described in detail below: S31: Retrieve from the locally stored historical logs several historical records whose distance from the current composite state vector in the state space is less than a preset threshold.
[0134] In this embodiment, state space distance is an indicator that measures the similarity between two composite state vectors. The preset threshold is a pre-defined distance value used to filter historical records that have a high similarity to the current composite state vector.
[0135] For example, a community food waste treatment station stores a large number of historical treatment records. By calculating the state space distance, historical records similar to the current waste state can be filtered out to provide a reference for the current treatment strategy.
[0136] S32: Arrange the historical records in reverse chronological order, and extract the reduction strategy identifier, the type of resource recovery product actually produced, and the deviation between the execution result and the expected target for each record.
[0137] In this embodiment of the application, the reduction strategy identifier is a unique identifier for the processing strategy adopted, the resource recovery product type reflects the status of the processed product, and the execution deviation is the difference between the actual execution result and the expected target.
[0138] In one embodiment, step S32 can be implemented as follows: L1: Analyze the operation log in each historical record, identify the combination of crushing, dehydration and sorting parameters used, and abstract it into a unique reduction strategy identifier.
[0139] In this embodiment, the operation log records the specific operating parameters used each time kitchen waste is processed. The combination of crushing, dehydration, and sorting parameters is a key parameter in the processing. Abstracting it into a unique reduction strategy identifier facilitates the differentiation and management of different processing strategies.
[0140] In one embodiment, the operation log in each historical record is analyzed in detail to extract grinding parameters (such as grinding particle size grade), dewatering parameters (such as dewatering intensity level), and sorting parameters (such as sorting intervention timing). These parameters are combined and encoded to form a unique reduction strategy identifier.
[0141] For example, in the historical records of food waste processing, a certain treatment used a parameter combination of a particle size distribution of 3, a dewatering intensity level of 2, and sorting intervention at the pretreatment stage. This parameter combination is coded as "3 - 2 - Pretreatment" as a unique identifier for the waste reduction strategy of that treatment.
[0142] L2: Read the type of resource recycling product reported by the product detection module after the corresponding batch processing is completed.
[0143] In this embodiment, the product detection module is a device used to detect the type of recyclable products generated after food waste treatment. Reading the type of recyclable products allows understanding of the actual effectiveness of the treatment strategy.
[0144] For example, at a food waste treatment station, after a certain treatment is completed, the product detection module reports that the type of resource recovery product is organic fertilizer, which indicates that the treatment strategy has achieved certain results in resource recovery.
[0145] L3: Compare the consistency between the actual product type and the expected target product of the strategy. If they are inconsistent, they are marked as a type deviation event.
[0146] In this embodiment, the expected target product of the strategy is the type of resource recovery product anticipated when formulating the processing strategy. Comparing the actual product type with the expected target product of the strategy can assess the accuracy of the processing strategy.
[0147] For example, if the intended byproduct of a treatment strategy is biofuel, but the actual byproduct is organic fertilizer, this is marked as a type deviation event. This indicates that the treatment strategy may need to be adjusted to achieve the intended resource recovery goals.
[0148] L4: Calculate the ratio of the actual volume reduction to the theoretical maximum volume reduction, and use the difference between this ratio and the preset benchmark value as the execution deviation.
[0149] In this embodiment, the actual volume reduction refers to the actual volume reduction of kitchen waste after treatment, while the theoretical maximum volume reduction is the maximum volume that kitchen waste can be reduced under ideal conditions. The execution deviation reflects the difference between the actual treatment effect and the theoretical expectation.
[0150] In one embodiment, the actual volume reduction is obtained by weighing or measuring volume. Based on the physical properties of the food waste and the treatment strategy, the theoretical maximum volume reduction is calculated. The ratio of the actual volume reduction to the theoretical maximum volume reduction is calculated, and this ratio is compared with a preset benchmark value; the difference is the execution deviation.
[0151] For example, in a certain process, the actual volume reduction is 50 liters, the theoretical maximum volume reduction is 60 liters, and the preset baseline value is 0.8. Then the ratio of the actual volume reduction to the theoretical maximum volume reduction is 50 / 60 ≈ 0.83, and the execution deviation is 0.83 - 0.8 = 0.03.
[0152] L5: Bind the reduction strategy identifier, resource recycling product type, and execution deviation into a structured triple and store it in a temporary buffer queue in reverse chronological order.
[0153] In this embodiment, the structured triple is a data structure that binds the reduction strategy identifier, the resource recycling product type, and the execution deviation. It is stored in a temporary buffer queue in reverse chronological order for easy querying and analysis of historical records.
[0154] In one embodiment, the reduction strategy identifier, resource recovery product type, and execution deviation are combined into a structured triple. These triples are then stored in a temporary buffer queue in reverse chronological order.
[0155] For example, "3 - 2 - Pretreatment", organic fertilizer, and 0.03 can be combined into a structured triple. This triple is then stored in a temporary buffer queue to ensure that the most recent record is placed at the front of the queue.
[0156] S33: Convert the reduction strategy identifier into a discrete code, map the resource recycling product type to a classification label, and normalize the deviation.
[0157] In this embodiment, discrete encoding converts the reduction strategy identifier into discrete numerical codes for easier computer processing. Classification labels convert the types of recycled resources into specific category labels, and normalization converts the deviation into a value within a certain range.
[0158] In one embodiment, one-hot coding is used to convert reduction strategy identifiers into discrete codes. A unique classification label is assigned to each type of resource recovery product. The deviation is normalized, converting it into a value between 0 and 1.
[0159] For example, in a community food waste treatment station, there are various reduction strategies and types of recycled products. Through discrete coding, classification labeling, and normalization, this information can be converted into a form that computers can process.
[0160] S34: Organize the encoded strategy identifier, classification label, and normalized deviation into a time-series feature sequence according to time steps.
[0161] In this embodiment, the temporal feature sequence is a sequence in which the encoded strategy identifier, classification label, and normalized deviation are organized in chronological order.
[0162] In one embodiment, the encoded policy identifier, classification label, and normalized deviation are arranged according to time steps to form a temporal feature sequence. Each time step corresponds to a historical record, which includes the policy identifier, resource recycling product type, and execution deviation of that record.
[0163] S35: Input the temporal feature sequence into the state encoder of the reinforcement learning model and output the dynamic feedback context representing the historical experience feedback.
[0164] In this embodiment, the state encoder is part of a reinforcement learning model used to convert temporal feature sequences into state representations that include historical experience information. The dynamic feedback context is generated based on historical experience and provides a reference for the current processing strategy.
[0165] In one embodiment, step S35 can be implemented as follows: K1: Obtain the state encoder of the long short-term memory network of the reinforcement learning model, whose number of input layer neurons is equal to the dimension of the temporal feature sequence, and is used to map the temporal feature sequence into a state representation vector containing long-term dependencies.
[0166] In this embodiment, the Long Short-Term Memory (LSTM) network is a neural network capable of processing sequential data and having the ability to remember long-term information. The number of neurons in the input layer is equal to the dimension of the temporal feature sequence, ensuring accurate reception of the input data. The state representation vector is a vector containing long-term dependencies output by the LSTM network.
[0167] In one embodiment, a Long Short-Term Memory (LSTM) network is constructed as the state encoder of the reinforcement learning model. The number of neurons in the input layer is set to be equal to the dimension of the temporal feature sequence. The temporal feature sequence is input into the LSTM network, and the network learns the long-term dependencies in the sequence through its internal structure, outputting a state representation vector containing the long-term dependencies.
[0168] For example, when processing historical data on food waste, LSTM networks can learn the long-term dependencies between processing strategies and their effects at different points in time, providing a more comprehensive reference for current processing strategies.
[0169] K2: Perform feature embedding processing on the time-series feature sequence, convert the discrete encoding reduction strategy identifier into a dense vector, convert the classification label into a one-hot encoded vector, and use the normalized bias directly as one of the input dimensions. After concatenation, the embedded time-series feature sequence is formed.
[0170] In this embodiment, feature embedding processing converts discrete features into continuous vector representations, facilitating processing by neural networks. Dense vectors are low-dimensional vectors containing more information, while one-hot encoded vectors are an encoding method that converts classification labels into binary vectors.
[0171] In one embodiment, an embedding layer is used to embed the discrete-encoded reduction strategy identifier into features, converting it into a dense vector. The classification label is then converted into a one-hot encoded vector. The normalized bias is directly used as one of the input dimensions. These vectors are concatenated to form the embedded temporal feature sequence.
[0172] For example, when processing historical records of kitchen waste, feature embedding can convert different types of features into a unified vector representation, thereby improving the processing efficiency of neural networks.
[0173] K3: The embedded temporal feature sequence is input into the long short-term memory state encoder. The temporal dependencies in the historical record are learned through the control of the forget gate, input gate, and output gate, and the comprehensive representation vector of the current state is output.
[0174] In this embodiment, the forget gate, input gate, and output gate are the core components of the LSTM network, used to control the forgetting, input, and output of information. Through the control of these gates, the LSTM network can learn the temporal dependencies in historical records. The synthesized representation vector is the vector output by the LSTM network containing current state information.
[0175] In one embodiment, the embedded temporal feature sequence is input into a Long Short-Term Memory (LSTM) state encoder. The forget gate determines which information needs to be forgotten, the input gate determines which new information needs to be added to memory, and the output gate determines which information needs to be output. Through the control of these gates, the LSTM network learns the temporal dependencies in the historical record and outputs a comprehensive representation vector of the current state.
[0176] For example, when processing historical records of kitchen waste, the LSTM network can learn the temporal dependencies between processing strategies and execution effects at different points in time, and output a comprehensive representation vector of the current state, providing a basis for subsequent decision-making.
[0177] K4: Input the comprehensive representation vector into the output layer of the reinforcement learning model (Q-learning), calculate the state-policy matching score of all possible decrement policy combinations in the current state, and form a state-policy matching score table.
[0178] In this embodiment, Q-learning is a reinforcement learning algorithm used to learn the optimal policy. The state-policy matching score represents the degree of matching of a certain reduction policy in the current state. The scoring table is a table formed by organizing the scores of all possible combinations of reduction policies.
[0179] In one embodiment, the synthesized representation vector is input into the output layer of the Q-learning algorithm. The Q-values of all possible combinations of deceleration policies in the current state are calculated as state-policy matching scores. These scores are then compiled into a state-policy matching score table.
[0180] For example, when dealing with food waste, there are several different combinations of reduction strategies to choose from. By calculating the state-strategy fit score and creating a scoring table, it is possible to help select the optimal reduction strategy.
[0181] K5: Based on the state-strategy matching score table, select strategy combinations with scores higher than a preset threshold, and extract their corresponding historical execution deviation as the deviation of highly relevant reference items.
[0182] In this embodiment, the preset threshold is a pre-defined scoring standard used to filter out strategy combinations with high matching degrees. The deviation of the highly relevant reference item is the historical execution deviation corresponding to the filtered strategy combination, providing a reference for the current processing strategy.
[0183] In one embodiment, strategy combinations with scores higher than a preset threshold are selected from a state-policy matching score table. The historical execution deviations corresponding to these strategy combinations are extracted as high-relevance reference item deviations.
[0184] For example, when dealing with food waste, by screening for highly relevant reference items with varying degrees of deviation, we can understand which strategies have historically performed well, providing a more accurate reference for current treatment strategies.
[0185] K6: Package the state-policy matching score table, the deviation of highly relevant reference items, and the comprehensive representation vector into a dynamic feedback context structure, and output the dynamic feedback context representing historical experience feedback.
[0186] In this embodiment, the dynamic feedback context structure is a structure that integrates the state-policy matching score table, the bias of highly relevant reference items, and the comprehensive representation vector. The output dynamic feedback context contains historical experience information, providing a reference for the current processing strategy.
[0187] In one embodiment, the state-policy matching score table, the bias of highly relevant reference items, and the comprehensive representation vector are packaged into a dynamic feedback context structure. This structure is output as a dynamic feedback context representing historical experience feedback.
[0188] For example, when processing food waste, the dynamic feedback context structure contains a comprehensive representation vector of the matching scores of different strategies in history, the amount of execution deviation, and the current state, providing a comprehensive reference for the current processing strategy.
[0189] In one embodiment, reference Figure 6 Step S40 may include steps S41-S45, which will be described in detail below: S41: Traverse the preset reduction operation combination library and filter out the set of shredding particle size grades that are compatible with the current physical properties of the waste.
[0190] In this embodiment, the volume reduction operation combination library is a pre-stored series of possible processing strategy combinations. The pulverization particle size class set is a selection of suitable pulverization particle size classes based on the current physical properties of the waste.
[0191] In one embodiment, a preset reduction operation combination library is traversed, and a set of crushing particle size grades compatible with the physical properties of the current waste, such as morphological profile parameters, surface humidity distribution, and temperature gradient characteristics, is selected.
[0192] S42: Match a feasible range of dehydration intensity levels based on the surface humidity distribution characteristics, and exclude options that exceed the equipment's capacity limit.
[0193] In this embodiment, the surface humidity distribution characteristics reflect the moisture content of the waste. The dewatering intensity range is a feasible range matched based on the surface humidity distribution characteristics. Excluding options that exceed the equipment's capacity limit ensures the normal operation of the equipment.
[0194] In one embodiment, a feasible range of dehydration intensity levels is determined based on the surface humidity distribution characteristics. The equipment's technical parameters are consulted to exclude options that exceed the equipment's capacity limits.
[0195] For example, when processing a large amount of food waste with high moisture content, a higher dehydration intensity range should be selected. However, if some settings exceed the equipment's capacity, they should be excluded.
[0196] S43: Based on the frequency of disposal and the changing trend of waste composition in the user operation behavior sequence, predict the risk of organic matter mixing and determine whether it is necessary to trigger sorting intervention in advance.
[0197] In this embodiment, the disposal frequency reflects how frequently users dispose of waste, and the waste composition change trend reflects the changes in waste composition. Organic matter contamination risk refers to the possibility that organic matter in the waste may be mixed with other substances. Sorting intervention timing refers to the time point during the food waste treatment process when sorting operations are performed.
[0198] In one embodiment, reference Figure 7 Step S43 may include steps S431-S435, which will be described in detail below: S431: Count the number of times the message is delivered per unit time in the sequence of user operation behavior, and calculate the moving average of the delivery frequency.
[0199] In this embodiment, the disposal frequency reflects how frequently users dispose of kitchen waste within a unit of time. The moving average is a method for smoothing time-series data, reflecting the data's trend by calculating the average value within a certain time window.
[0200] In one embodiment, a time window, such as 1 hour, is defined. The number of times the message is displayed within each 1-hour time window in the user action sequence is counted. A moving average of these display counts is calculated, meaning that each calculation includes the display count within the current time window and the average of the display counts within the previous few time windows.
[0201] For example, count the number of times a user disposes of trash during different time periods of the day. In the time window of 9:00 AM to 10:00 AM, a user disposed of trash 5 times; in the time window of 10:00 AM to 11:00 AM, a user disposed of trash 3 times. Calculate the moving average of the disposal frequency for these two time windows as (5 + 3) / 2 = 4 times / hour.
[0202] S432: Analyze the variation range of the morphological profile parameters of the waste corresponding to multiple consecutive disposals to determine the possibility of abrupt changes in composition.
[0203] In this embodiment, the waste morphology profile parameters reflect the shape and size characteristics of the waste. Analyzing the changes in the waste morphology profile parameters after multiple consecutive disposals can determine whether there have been abrupt changes in the waste composition.
[0204] For example, in three consecutive garbage disposals, the first disposal has a convex area of 100 square centimeters and an aspect ratio of 2; the second disposal has a convex area of 150 square centimeters and an aspect ratio of 3; and the third disposal has a convex area of 200 square centimeters and an aspect ratio of 4. The calculated changes in convex area are (150 - 100) / 100 = 0.5 and (200 - 150) / 150 ≈ 0.33, respectively, and the changes in aspect ratio are (3 - 2) / 2 = 0.5 and (4 - 3) / 3 ≈ 0.33, respectively. If a threshold of 0.4 is set, it can be determined that the possibility of a sudden change in composition is relatively high.
[0205] S433: When the delivery frequency exceeds the first threshold and the variance of the profile parameter exceeds the second threshold, it is determined that there is a high risk of confounding.
[0206] In this embodiment, the first threshold and the second threshold are pre-set judgment criteria. A disposal frequency exceeding the first threshold and a profile parameter variance exceeding the second threshold indicate that the disposal situation and composition of the waste are changing drastically, posing a high risk of organic matter contamination.
[0207] For example, the first threshold is set to 5 times / hour, and the second threshold is set to 0.5. If the calculated moving average of the disposal frequency is 6 times / hour, and the variance of the waste morphology profile parameter is 0.6, then a high risk of contamination is identified.
[0208] S434: In situations with high risk of contamination, the sorting intervention time is set to the pre-treatment stage before the waste enters the processing chamber.
[0209] In this embodiment, under conditions of high contamination risk, performing sorting operations in advance can effectively reduce the impact of organic matter contamination and improve treatment efficiency. Setting the sorting intervention time to the pretreatment stage before the waste enters the treatment chamber allows for screening and separation at an early stage of waste treatment.
[0210] In one embodiment, when a high risk of contamination is determined, the timing of sorting intervention is adjusted to the pretreatment stage before the waste enters the processing chamber. During the pretreatment stage, the waste undergoes preliminary sorting to separate organic matter from other substances.
[0211] For example, at a food waste treatment plant, when a high risk of contamination is detected, sorting is performed before the waste enters the crushing and dehydration processes to separate out unsuitable materials such as plastic bags and bones, thereby improving the efficiency and quality of subsequent processing.
[0212] S435: In situations with low risk of contamination, delay the sorting intervention until the intermediate product stage after the dehydration process is completed.
[0213] In this embodiment of the application, under conditions of low contamination risk, delaying the sorting intervention can reduce unnecessary sorting operations and improve processing efficiency. Delaying the sorting intervention to the intermediate product stage after the dewatering process is completed allows the waste to be screened after a certain amount of treatment.
[0214] In one embodiment, when a low risk of contamination is determined, the sorting intervention is adjusted to the intermediate product stage after the dehydration process is completed. At this stage, the dehydrated waste is sorted to further separate out useful resources.
[0215] For example, when dealing with kitchen waste with low risk of contamination, it is first crushed and dehydrated, and then sorted in the intermediate product stage to separate some recyclable materials such as metals and plastics, thereby improving the resource recycling rate.
[0216] S44: Combine the screened crushed particle size grade, dewatering intensity level and sorting intervention time by Cartesian product to form an initial reduction path candidate set.
[0217] In this embodiment, the Cartesian product combination is an operation that combines elements from multiple sets. The initial reduction path candidate set is a series of possible processing paths obtained by combining the screened crushing particle size grade, dewatering intensity level, and sorting intervention timing.
[0218] In one embodiment, the selected set of pulverized particle size grades, the range of dewatering intensity levels, and the determined sorting intervention timing are combined using a Cartesian product. For example, with 3 pulverized particle size grades, 2 dewatering intensity levels, and 2 sorting intervention timings, a Cartesian product combination can yield 3×2×2 = 12 initial reduction path candidate sets.
[0219] S45: Evaluate the expected execution stability of each candidate path based on the weighted deviation of each historical strategy in the dynamic feedback context, and generate a priority ranking by sorting them in descending order of stability score.
[0220] In this embodiment, expected execution stability refers to the stability of the candidate path during actual execution. Deviation is the difference between the execution result of the historical strategy and the expected goal. Stability score is a score obtained by weighting the deviation. Priority ranking is the ranking of candidate paths based on their stability scores.
[0221] In one embodiment, a weight is assigned to each candidate path based on the deviation of each historical strategy in the dynamic feedback context. An expected execution stability score is calculated for each candidate path; a higher score indicates better stability. Candidate paths are then sorted in descending order of stability score to generate a priority ranking.
[0222] In this embodiment, the reinforcement learning model mainly consists of a state encoder, a policy network, and a value network. The state encoder uses a Long Short-Term Memory (LSTM) network to process temporal feature sequences and capture long-term dependencies in historical data. The policy network is responsible for generating different deceleration policies based on the input state information, while the value network evaluates the value of each policy.
[0223] The number of neurons in the input layer of a state encoder is equal to the dimension of the temporal feature sequence, ensuring accurate reception and processing of input data. An LSTM network contains multiple hidden layers, each composed of multiple LSTM units. These units, controlled by forget gates, input gates, and output gates, enable the memorization and updating of historical information.
[0224] Both the policy network and the value network are fully connected neural networks. The policy network takes as input a state representation vector from the state encoder and outputs a probability distribution of different reduction policies. The value network also takes as input a state representation vector and outputs a value estimate for each policy.
[0225] When training the model, the first step is data preparation. Several historical records whose distance in the state space from the current composite state vector is less than a preset threshold are retrieved from locally stored historical logs. For each record, the corresponding reduction strategy identifier, the type of actual resource recovery product, and the deviation between the execution result and the expected target are extracted. The reduction strategy identifier is converted into a discrete code, the resource recovery product type is mapped to a classification label, and the deviation is normalized to form a temporal feature sequence. Next, the weights and bias parameters of the state encoder, policy network, and value network are randomly initialized.
[0226] During training, forward propagation is performed first, inputting the temporal feature sequence into the state encoder to obtain the state representation vector, which is then input into the policy network and value network respectively to obtain the probability distribution and value estimate of different waste reduction strategies. Then, based on the probability distribution output by the policy network, a waste reduction strategy is selected as the current action using random sampling or a greedy strategy. The corresponding equipment control command sequence is sent to the food waste treatment device to execute the waste reduction operation, and the actual execution deviation is recorded as the reward signal. Afterwards, the loss functions of the policy network and value network are calculated, and the model parameters are updated using the backpropagation algorithm. The above steps are repeated until the model converges or reaches the preset number of 1000 training rounds. Training parameters are set as follows: learning rate 0.001, controlling the step size of model parameter updates; discount factor 0.9, balancing the importance of current and future rewards; batch size 32, using 32 samples per training iteration.
[0227] Accordingly, to better implement the above methods, this application also provides a food waste reduction optimization system based on an AI feedback mechanism. For example... Figure 8 As shown, the AI-based food waste reduction and optimization system 80 includes:
[0228] The acquisition module 801 is used to collect multimodal sensing data during the process of disposing of kitchen waste, and simultaneously acquire waste container status information and user operation behavior sequence. The multimodal sensing data includes visible light image frames, infrared thermal images and weight change time series signals. The feature extraction module 802 is used to extract primary features related to the physical properties of kitchen waste from the multimodal sensing data, and to fuse the state information of the waste container and the user operation behavior sequence to generate a composite state vector, wherein the primary features include morphological contour parameters, surface humidity distribution and temperature gradient features. The feature fusion module 803 is used to associate and map the composite state vector with the historical reduction execution records in the time dimension, and to construct a dynamic feedback context through a reinforcement learning model, wherein the dynamic feedback context includes the previous reduction strategy identifier, the resource recycling product type and the corresponding execution deviation. The adaptation processing module 804 is used to determine the adaptability of the current kitchen waste status based on the dynamic feedback context, generate a reduction path candidate set and assign priority sorting, wherein the reduction path candidate set includes the crushing particle size level, dewatering intensity level and sorting intervention time. The instruction generation module 805 is used to select the optimal reduction path according to the priority sorting and output the corresponding equipment control instruction sequence, and update the reinforcement learning model according to the actual execution deviation. The equipment control instruction sequence directly drives the food waste treatment device to perform waste reduction operation to achieve the waste reduction optimization goal.
[0229] The implementation details of each module are provided in the preceding method embodiments and will not be repeated here. The technical effects achieved by each module and device are described in the foregoing method embodiments.
[0230] like Figure 9 As shown, this application embodiment also provides a computer device 90, which includes a processor 901 and a memory 902, wherein the memory 902 stores a computer program, and when the computer program is executed by the processor 901, the processor 901 performs the steps of any of the methods described above.
[0231] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A method for optimizing the reduction of kitchen waste based on an AI feedback mechanism, characterized in that, include: Multimodal sensing data is collected during the process of disposing of kitchen waste, and the status information of the waste container and the sequence of user operation behavior are acquired simultaneously. The multimodal sensing data includes visible light image frames, infrared thermal images and weight change time-series signals. Primary features related to the physical properties of kitchen waste are extracted from the multimodal sensing data, and a composite state vector is generated by fusing the state information of the waste container and the user operation behavior sequence. The primary features include morphological contour parameters, surface humidity distribution and temperature gradient features. Retrieve from the locally stored historical logs several historical records whose distance from the current composite state vector in the state space is less than a preset threshold; The historical records are arranged in reverse chronological order, and the reduction strategy identifier, the type of resource recovery product actually produced, and the deviation between the execution result and the expected target are extracted for each record. The reduction strategy identifier is converted into a discrete code, the resource recycling product type is mapped to a classification label, and the deviation is normalized. The encoded strategy identifier, classification label, and normalized deviation are organized into a time-series feature sequence according to time steps; The temporal feature sequence is input into the state encoder of the reinforcement learning model, and the output is a dynamic feedback context representing the feedback of historical experience. The dynamic feedback context includes the previous reduction strategy identifier, the resource recycling product type and the corresponding execution deviation. Based on the dynamic feedback context, the current state of kitchen waste is assessed for adaptability, a set of reduction path candidates is generated and assigned priority, wherein the set of reduction path candidates includes the crushing particle size level, the dewatering intensity level and the sorting intervention time. The optimal waste reduction path is selected based on the priority ranking, and the corresponding equipment control instruction sequence is output. The reinforcement learning model is updated based on the actual execution deviation. The equipment control instruction sequence directly drives the food waste treatment device to perform waste reduction operations to achieve the waste reduction optimization goal.
2. The method according to claim 1, characterized in that, The process of collecting multimodal sensing data during the disposal of kitchen waste, and simultaneously acquiring waste container status information and user operation behavior sequences, includes: Continuous visible light imaging is performed on the area of the kitchen waste disposal port to capture a sequence of image frames containing the waste stacking pattern and disposal action. The image frame sequence is timestamped and aligned with the container opening and closing status signal. Simultaneously activate the infrared thermal imaging sensor to acquire the thermal radiation distribution map of the waste surface, and spatially register the thermal radiation distribution map with the visible light image frame to generate a registered multispectral fusion frame; The weight signal output by the weighing unit at the bottom of the waste container is monitored in real time, and the weight signal is processed by sliding window differential processing to extract the weight increment change curve per unit time. Record user-triggered opening and closing of the delivery door, and arrange these events in chronological order to form a sequence of user actions. The registered multispectral fusion frame, weight increment change curve, and user operation behavior sequence are encapsulated into a synchronous multimodal data packet, wherein the synchronous multimodal data packet contains perception and behavior metadata under a unified time reference.
3. The method according to claim 1 or 2, characterized in that, The step of extracting primary features related to the physical properties of kitchen waste from the multimodal sensing data and fusing the waste container state information and the user operation behavior sequence to generate a composite state vector includes: Edge detection and connected component analysis are performed on visible light image frames to extract the outer contour boundary point set of the garbage stack. The convex hull area and aspect ratio of the boundary point set are calculated as morphological contour parameters. Based on the mapping relationship between pixel grayscale values and temperature in infrared thermal imaging, the actual temperature values of each region on the surface of the waste are retrieved, the temperature difference between adjacent regions is calculated, and a temperature gradient feature matrix is constructed. By combining the texture roughness of visible light images with the local temperature rise rate of infrared images, the surface moisture evaporation trend is derived, and a spatial probability map representing the humidity distribution is generated. Read the current fill rate, sealing status, and remaining capacity of the waste container as container status information; The morphological contour parameters, temperature gradient feature matrix, surface humidity distribution spatial probability map, container state information, and user operation behavior sequence are vectorized and concatenated to generate a composite state vector.
4. The method according to claim 3, characterized in that, The step of inputting the temporal feature sequence into the state encoder of the reinforcement learning model and outputting a dynamic feedback context representing historical experience feedback includes: Obtain the state encoder of the long short-term memory network of the reinforcement learning model, whose number of input layer neurons is equal to the dimension of the temporal feature sequence, and use it to map the temporal feature sequence into a state representation vector containing long-term dependencies; The time-series feature sequence is subjected to feature embedding processing. The discrete encoding reduction strategy identifier is converted into a dense vector, the classification label is converted into a one-hot encoding vector, and the normalized bias is directly used as one of the input dimensions. After concatenation, the embedded time-series feature sequence is formed. The embedded temporal feature sequence is input into the long short-term memory state encoder. The temporal dependencies in the historical record are learned through the control of the forget gate, input gate, and output gate, and the comprehensive representation vector of the current state is output. The integrated representation vector is input into the output layer of the reinforcement learning model to calculate the state-policy matching score of all possible deceleration policy combinations in the current state, forming a state-policy matching score table; Based on the state-policy matching score table, strategy combinations with scores higher than a preset threshold are selected, and their corresponding historical execution deviations are extracted as high-relevance reference item deviations. The state-policy matching score table, the deviation of highly relevant reference items, and the comprehensive representation vector are packaged into a dynamic feedback context structure, and the dynamic feedback context representing historical experience feedback is output.
5. The method according to claim 3, characterized in that, The adaptive determination of the current food waste status based on the dynamic feedback context generates a candidate set of reduction paths and assigns them priority rankings. The candidate set of reduction paths includes particle size distribution, dewatering intensity level, and sorting intervention timing, including: Iterate through the preset reduction operation combination library and filter out the set of pulverization particle size grades that are compatible with the current physical properties of the waste; Match feasible dehydration intensity ranges based on surface humidity distribution characteristics, and exclude options that exceed the equipment's capacity limit; Based on the frequency of disposal and the changing trend of waste composition in the user operation behavior sequence, predict the risk of organic matter mixing and determine whether it is necessary to trigger sorting intervention in advance. The selected crushing particle size grade, dewatering intensity level and sorting intervention time are combined by Cartesian product to form an initial set of candidate reduction paths; The expected execution stability of each candidate path is evaluated by weighting the deviation of each historical strategy in the dynamic feedback context, and the paths are sorted in descending order of stability score to generate a priority ranking.
6. The method according to claim 3, characterized in that, The method of combining the texture roughness of visible light images with the local temperature rise rate of infrared images to deduce the surface moisture evaporation trend and generate a spatial probability map characterizing the humidity distribution includes: Calculate the gray-level co-occurrence matrix of local regions in visible light images, and extract contrast and entropy values as texture roughness indicators; By performing time differentiation on the same region in the infrared image, the temperature rise rate field per unit time can be obtained. The texture roughness index and the temperature rise rate field are aligned at the pixel level to establish a joint response function between the two. A preliminary humidity level map is generated by mapping the output value of the joint response function to a preset humidity level range. The preliminary humidity level map is smoothed by neighborhood filtering to eliminate isolated noise points, and the final surface humidity distribution spatial probability map is output.
7. The method according to claim 4, characterized in that, The process of arranging the historical records in reverse chronological order and extracting the reduction strategy identifier, the type of resource recovery product actually produced, and the deviation between the execution result and the expected target for each record includes: Analyze the operation logs in each historical record to identify the combination of crushing, dehydration and sorting parameters used, and abstract them into a unique reduction strategy identifier; Read the type of resource recycling product reported by the product detection module after the corresponding batch processing is completed; Compare the actual product type with the expected target product of the strategy. If they are inconsistent, mark it as a type deviation event. Calculate the ratio of the actual volume reduction to the theoretical maximum volume reduction, and use the difference between this ratio and the preset benchmark value as the execution deviation. The reduction strategy identifier, resource recycling product type, and execution deviation are bound into a structured triple and stored in a temporary buffer queue in reverse chronological order.
8. The method according to claim 4, characterized in that, The process of selecting the optimal waste reduction path based on the priority ranking and outputting the corresponding equipment control command sequence, and updating the reinforcement learning model based on the actual execution deviation, wherein the equipment control command sequence directly drives the food waste treatment device to perform waste reduction operations to achieve the waste reduction optimization goal, includes: Based on the priority ranking, the first-ranked reduction path is selected as the optimal path. If there is a device execution conflict, the second-best path is selected in order. Generate a sequence of equipment control commands, which includes parameters for the crushing module, parameters for the dewatering module, parameters for the sorting intervention timing, and calibration items for the AI optimizer. The equipment control command sequence is sent to the food waste treatment device to perform the reduction operation, and the actual execution parameters and action sequence of each module are recorded as an execution log. Identify the actual types of recycled products, collect the actual volume reduction through a weighing unit, and calculate the actual execution deviation. The actual execution deviation is used as the reward signal for the reinforcement learning model, and the policy value function of the model is updated through backpropagation to achieve adaptive optimization of the model.
9. A kitchen waste reduction and optimization system based on an AI feedback mechanism, characterized in that, The system includes: The acquisition module is used to collect multimodal sensing data during the disposal of kitchen waste, and simultaneously acquire waste container status information and user operation behavior sequence. The multimodal sensing data includes visible light image frames, infrared thermal images and weight change time-series signals. The feature extraction module is used to extract primary features related to the physical properties of kitchen waste from the multimodal sensing data, and to fuse the state information of the waste container and the user operation behavior sequence to generate a composite state vector, wherein the primary features include morphological contour parameters, surface humidity distribution and temperature gradient features. The feature fusion module is used to retrieve several historical records from locally stored historical logs that are less than a preset threshold in the state space distance from the current composite state vector; arrange the historical records in reverse chronological order, extract the reduction strategy identifier, the type of resource recovery product actually produced, and the deviation between the execution result and the expected target for each record; convert the reduction strategy identifier into discrete encoding, map the resource recovery product type to a classification label, and normalize the deviation; organize the encoded strategy identifier, classification label, and normalized deviation into a temporal feature sequence by time step; input the temporal feature sequence into the state encoder of the reinforcement learning model, and output a dynamic feedback context representing the historical experience feedback, wherein the dynamic feedback context includes the previous reduction strategy identifier, the type of resource recovery product, and the corresponding execution deviation; The adaptation processing module is used to determine the adaptability of the current kitchen waste status based on the dynamic feedback context, generate a reduction path candidate set and assign priority sorting, wherein the reduction path candidate set includes the crushing particle size level, dewatering intensity level and sorting intervention time. The instruction generation module is used to select the optimal reduction path according to the priority sorting and output the corresponding equipment control instruction sequence, and update the reinforcement learning model according to the actual execution deviation. The equipment control instruction sequence directly drives the food waste treatment device to perform waste reduction operation to achieve the waste reduction optimization goal.
Citation Information
Patent Citations
Self-supervision pre-training method for kitchen garbage image processing
CN118135549A
Kitchen garbage classification method based on image recognition
CN119169527A
