A control method, system and device for self-service selling ice cream

By combining weighing analysis and closed-loop quality control processes with infrared anti-pinch light curtains and drive mechanism current monitoring, the problems of poor product consistency, rigid delivery processes, and insufficient safety in self-service ice cream vending equipment have been solved, resulting in improved product consistency, enhanced delivery process flexibility, and improved safety.

CN122454672APending Publication Date: 2026-07-24XINGTAI ZHONGCE INSTR EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610661745.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-14
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing self-service ice cream vending machines suffer from poor product quality control, rigid delivery processes, and insufficient safety, especially when users temporarily leave the premises. The reliance on a single sensor for detection also poses a safety hazard.

Method used

We employ a weighing analysis and closed-loop quality control process, using weighing sensors to acquire and compare net weight in real time, dynamically adjusting delivery strategies, and combining infrared anti-pinch light curtains and dual monitoring of drive mechanism current to ensure product quality and user safety.

Benefits of technology

This has improved product consistency, enhanced delivery flexibility, reduced the risk of user injury from being pinched, and ensured equipment safety and user trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122454672A_ABST
    Figure CN122454672A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of self-service vending equipment, and discloses a control method, system and device for self-service vending of ice cream, which comprises the following steps: controlling an execution mechanism to complete filling and obtaining an actual net weight through weighing; comparing the actual net weight with a preset product control interval, and executing discarded reprocessing or fuse refunding when an abnormality is determined; when the product is determined to be qualified, controlling the execution mechanism to move to a delivery position or stay in a cold area inside a cabinet according to the in-situ state of a user; opening a window door plate after the finished product reaches the delivery position, and closing the window door plate under anti-pinch safety monitoring after confirming that the finished product is taken away. The present application introduces a weighing analysis and closed-loop product control process after production, dynamically adjusts the delivery and temporary storage strategy in combination with the in-situ state of the user, simultaneously enhances the anti-pinch safety of the delivery window by using multi-sensor fusion, solves the problems of poor production consistency, rigid delivery process and insufficient safe interaction, and improves the automation level of the device and the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of self-service vending equipment technology, specifically to a control method, system, and equipment for self-service ice cream vending. Background Technology

[0002] With the development of automated retail models, self-service ice cream vending machines are gradually becoming more common in the market. However, existing equipment still has some shortcomings in operation. In terms of product quality control, most equipment relies on open-loop quantitative methods, such as filling according to preset time or a fixed number of cycles. This type of method is easily affected by factors such as the state of raw materials, ambient temperature, and mechanical wear, resulting in unstable net weight of the ice cream and difficulty in ensuring product consistency.

[0003] Regarding the intelligentization of the delivery process, existing equipment typically employs a fixed interactive process, directly delivering the finished product to the collection port for the user to pick up after it is made. If the user leaves briefly for any reason, the equipment may discard the finished product due to exceeding the time limit, or the ice cream may melt due to waiting too long at room temperature, lacking the ability to flexibly respond to the common scenario of users leaving temporarily.

[0004] Regarding the safety of equipment use, the anti-pinch function of the automatic material handling window usually relies on a single sensor for detection. In complex actual use environments, a single detection method is at risk of failure or misjudgment, and cannot provide users with sufficient and comprehensive safety protection. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a control method, system, and equipment for self-service ice cream vending, which solves the problems of poor product consistency, rigid delivery process, and insufficient physical interaction security of existing equipment.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] The first aspect of this invention provides a control method for self-service ice cream vending, comprising the following steps:

[0008] The quality control module controls the actuator to obtain an empty container and completes the filling at the ice cream dispensing mechanism. The actual net weight is then obtained through weighing analysis.

[0009] The quality control processing module compares the actual net weight with the preset quality control range and makes a judgment based on the comparison result. If an abnormality is found, the module will discard and remake the product according to the retry mechanism, or execute a circuit breaker refund after reaching the maximum number of retry attempts.

[0010] If the actual net weight is qualified, the delivery preparation module will determine the user's presence status. When the user is present, the actuator will be controlled to move to the delivery position of the automatic material picking window. When the user leaves, the actuator will be controlled to carry the finished product to the cold zone inside the cabinet.

[0011] When the finished product arrives at the delivery location and the user is present, the delivery execution module drives the window door to open and monitors the take-away event.

[0012] After delivery is confirmed, the window door is driven to close under anti-pinch safety monitoring via a closed-loop reset module, and the system global state variables are reset to restore standby after the window door is fully closed.

[0013] Preferably, the step of obtaining the actual net weight through weighing analysis may specifically include: controlling the actuator to stop at a preset calibration coordinate and recording the empty reference weight of the ice cream serving device; after the actuator obtains an empty container, measuring and recording the combined tare weight containing the empty container; after filling is completed, measuring the total gross weight and subtracting the combined tare weight from the total gross weight to calculate the actual net weight.

[0014] Preferably, the quality control processing module's judgment steps specifically include: obtaining the standard target weight corresponding to the current order; calculating the lower and upper thresholds of the qualified range based on the standard target weight; comparing the actual net weight with the lower and upper thresholds to determine whether the finished product is a qualified product, a short-quantity abnormal product, or an excessive-quantity abnormal product; when the finished product is determined to be an abnormal product, comparing the current value of the retry counter with the preset maximum number of retries, and deciding whether to execute discard and remake or circuit breaker refund based on the comparison result.

[0015] Preferably, the step of the delivery preparation module in determining the user's presence status specifically involves: processing the scanning data of the user's presence radar within a preset time window, and comparing the processed result with the presence determination threshold and the departure determination threshold to determine whether the user is present or absent.

[0016] Preferably, the step of controlling the actuator to hold the finished product in the cold zone inside the cabinet further includes monitoring food safety conditions, specifically: monitoring the real-time ambient temperature of the cold zone inside the cabinet and the actual residence time of the finished product; when the actual residence time or the real-time ambient temperature exceeds a preset safety threshold, controlling the actuator to discard the finished product; if the user returns before exceeding the safety threshold, controlling the actuator to go to the automatic material handling window to complete the delivery.

[0017] Preferably, the step of driving the window door panel to open may specifically include: when the actuator is in position and the user is present, outputting a signal to the window driving mechanism to open the window door panel; monitoring whether the opening timeout occurs during the opening process; if the upper limit switch for opening is not touched within a preset time, stopping the opening and triggering an alarm; if it is touched within a preset time, stopping the window door panel at the maximum opening position.

[0018] Preferably, the step of monitoring the removal event may specifically include: jointly monitoring the occupancy status of the infrared anti-pinch light curtain sensor and the real-time weight value of the miniature weighing sensor; when the real-time weight value is continuously detected to return to the tolerance range of the unloaded reference weight within a preset confirmation time, and the infrared anti-pinch light curtain sensor is not blocked, the removal event is determined to be completed.

[0019] Preferably, the step of driving the window door panel to close under anti-pinch safety monitoring may specifically include: driving the window door panel to close downwards, and continuously monitoring anti-pinch events during the closing process; the triggering condition for the anti-pinch event is that the infrared anti-pinch light curtain sensor is blocked, or the operating current of the window driving mechanism exceeds a preset stall current threshold; when the anti-pinch event is triggered, the window door panel reverses to the fully open position, and if it still cannot close after a specified number of retries, it stops running and locks.

[0020] A second aspect of the present invention provides a control system for self-service ice cream vending, comprising:

[0021] The quality control module controls the actuator to acquire empty containers, completes filling at the ice cream dispensing mechanism, obtains the actual net weight through weighing analysis, and makes a judgment based on the comparison result of the actual net weight with the preset quality control range. If an anomaly is detected, the system will either discard and remake the ice cream or issue a refund.

[0022] The delivery preparation module is used to control the actuator to move to the delivery position or stay in the cold zone based on the user's presence status when the actual net weight is determined to be qualified.

[0023] The delivery execution module is used to drive the window door to open when the finished product arrives and the user is present, and to monitor the take-away event to confirm the delivery is complete.

[0024] The closed-loop reset module is used to drive the window door panel to close and reset the system state under anti-pinch safety monitoring after delivery confirmation.

[0025] The third aspect of the present invention provides a self-service ice cream vending device, including a cabinet, a control panel and an automatic dispensing window installed on the front side of the cabinet, and an ice cream dispensing mechanism, a feeding component, an actuator, a receiving seat, a sensor network and a control module inside the cabinet;

[0026] The end of the actuator is connected to an ice cream holding device, which integrates a miniature weighing sensor. The automatic dispensing window includes a window driving mechanism and a window door panel.

[0027] The sensor network includes a user presence radar, a finished product arrival sensor, an infrared anti-pinch light curtain sensor, a cold zone temperature sensor, an upper limit switch for opening the door, and a lower limit switch for closing the door.

[0028] This invention provides a control method, system, and device for self-service ice cream vending. It has the following beneficial effects:

[0029] 1. This invention integrates weighing analysis and closed-loop quality control processes into the equipment, enabling real-time acquisition of the net weight of ice cream after filling and comparison with the standard quality control range. For unqualified products, it automatically discards and remakes or issues a refund. The entire process requires no manual intervention in quality inspection and error correction steps, ensuring that the products delivered to users all meet the preset standards, thereby improving product consistency and user trust.

[0030] 2. This invention can dynamically adjust the delivery strategy according to the user's presence. When the user leaves the site, it will automatically control the finished product to stay safely in the cold zone inside the cabinet and continuously monitor the residence time and ambient temperature. This allows the delivery process to adapt to the user's non-immediate pickup behavior, avoids product quality degradation or transaction failure caused by the user's short-term absence, and increases the flexibility of the delivery process.

[0031] 3. During the closing process of the automatic material handling window, the system constructs an anti-pinch protection system through dual monitoring of the infrared anti-pinch light curtain and the operating current of the drive mechanism. By using two sensors with different physical principles to make collaborative judgments, compared with a single sensor solution, the risk of users being pinched due to accidental obstruction can be reduced, ensuring the safety of physical interaction. Attached Figure Description

[0032] Figure 1 This is a perspective view of a self-service ice cream vending machine according to the present invention;

[0033] Figure 2 This is a front view of the cabinet of the present invention;

[0034] Figure 3 for Figure 2 Enlarged view of point A in the middle;

[0035] Figure 4 This is a side view of the cabinet of the present invention;

[0036] Figure 5 This is a flowchart illustrating the overall steps of a self-service ice cream vending control method according to the present invention.

[0037] Figure 6 This is a flowchart of the control logic sub-flow of the exception handling procedure and the deadlock prevention circuit breaker mechanism of the present invention;

[0038] Figure 7 This is a flowchart of the control logic for spatial path diversion and cold chain residence monitoring in this invention.

[0039] Figure 8 This is a flowchart of the control logic sub-process of the event joint determination procedure of the present invention;

[0040] Figure 9 This is a flowchart of the door closing control logic sub-flowchart of the present invention, which features anti-pinch intervention and jamming fault tolerance.

[0041] Figure 10 This is a net weight monitoring curve for the quality control assessment and abnormal retry process of this invention;

[0042] Figure 11 This is a current monitoring curve of the dynamic anti-pinch intervention and jamming fault tolerance strategy of the present invention.

[0043] The components include: 1. Cabinet; 2. Control panel; 3. Automatic feeding window; 4. Ice cream dispensing mechanism; 5. Feeding assembly; 6. Actuator; 7. Ice cream serving device; 8. Window drive mechanism; 9. Window door panel; and 10. Receiving base. Detailed Implementation

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

[0045] See attached document Figure 1 - Appendix Figure 4 This invention provides a self-service ice cream vending machine, which includes a cabinet 1, a control panel 2, an automatic dispensing window 3, an ice cream dispensing mechanism 4, a feeding assembly 5, an actuator 6, a receiving base 10, a sensor network, and a control module. The cabinet 1 is internally divided into a feeding area, a processing area, a cooling area, and a waste area. The waste area is equipped with a waste collection tray, which includes a solid container receiving area and a liquid residue receiving area.

[0046] The actuator 6 is installed inside the cabinet 1 and can move in multi-axis linkage between various areas. The end of the actuator 6 is connected to the ice cream holding device 7, which integrates a miniature weighing sensor. The automatic dispensing window 3 is installed on the front side of the cabinet 1 and consists of a window drive mechanism 8, a window door panel 9, an upper limit switch for opening the door, and a lower limit switch for closing the door.

[0047] The sensor network is deployed in different spatial locations within cabinet 1. A user-position radar is installed externally within cabinet 1 to scan the target status in the area in front of the equipment. Finished product arrival sensors are positioned at the delivery coordinate point inside the automatic material handling window 3. Anti-pinch sensors are located at the closed edge of the automatic material handling window 3. Cold zone temperature sensors are installed in the cold zone environment inside cabinet 1. All of the above hardware components are electrically connected to the control module.

[0048] This invention provides a control system for self-service ice cream vending, including a quality control processing module, a delivery preparation module, a delivery execution module, and a closed-loop reset module.

[0049] The quality control processing module is configured to respond to orders and drive the actuator 6 to complete the entire process from obtaining empty containers and calibrating tare weight to filling ice cream, and analyze to obtain the actual net weight; compare the actual net weight with the preset quality control range, and activate the waste self-healing or circuit breaker mechanism when an anomaly is detected, and output a qualified finished product signal to trigger the subsequent process when the product is qualified.

[0050] The delivery preparation module is configured to receive the qualified finished product signal output by the quality control processing module, call the scanning signal of the user's on-site radar, and perform time-domain jitter removal processing to establish the user's on-site status; based on the user's on-site status, it performs spatial-dimensional path diversion control to send the qualified finished product to the automatic material picking window 3 or the temporary cold zone, and performs food safety condition monitoring during this period.

[0051] The delivery execution module is configured to open the window door 9 by driving the window drive mechanism 8 after confirming that the qualified finished product is in place and the user is present; activate the joint judgment model of the take-away event based on the spatial dimension and the quality dimension, and output a confirmation signal of delivery completion after the take-away event is successfully judged.

[0052] The closed-loop reset module is configured to respond to the delivery completion confirmation signal output by the delivery execution module, and execute door closing control with fault tolerance mechanism. During the downward movement of window door 9, a dynamic anti-pinch intervention and jamming fault tolerance strategy based on multi-source monitoring fusion is introduced. After confirming that window door 9 is completely closed, the system global state reset and memory release are performed to restore the device to the initial polling standby state.

[0053] See attached document Figure 5 This invention provides a control method for self-service ice cream vending, comprising the following steps:

[0054] S100, the quality control processing module establishes the empty reference weight of the ice cream holding device 7, initializes the retry counter after receiving the order, controls the actuator 6 to go to the feeding component 5 to obtain the empty container and calibrate the combined tare weight, and then completes the ice cream filling at the ice cream discharging mechanism 4 and analyzes the actual net weight.

[0055] S200, the quality control processing module compares the actual net weight with the preset quality control range; if the net weight is abnormal, it will discard the product and return to the previous preparation step before the maximum number of retry attempts is reached; if the maximum number of retry attempts is reached, it will trigger a circuit breaker and a refund will be issued.

[0056] S300, if the net weight is qualified, the delivery preparation module determines whether the user is present based on the scanning signal of the user's presence radar; if the user leaves, the control actuator 6 carries the finished product to the cold zone inside the cabinet 1 and monitors food safety conditions; if the user is present, the control actuator 6 moves to the delivery position at the automatic material handling window 3.

[0057] S400: When the finished product arrives and the user is present, the delivery execution module drives the window door panel 9 to open through the window drive mechanism 8; after the window door panel 9 is fully opened, the module monitors the take-away event and confirms the delivery is completed after the preset take-away judgment conditions are met.

[0058] After the S500 is confirmed to be delivered, the closed-loop reset module outputs a window closing command and performs anti-pinch safety monitoring; after the window door panel 9 finally touches the lower limit switch of the door closing, the system global state variables are reset, so that the control system returns to standby.

[0059] To make the technical solution of the present invention clearer, the technical implementation details of each step will be described in detail below.

[0060] To eliminate mechanical fatigue errors caused by prolonged operation of actuator 6 and to establish an accurate system state machine starting point, the quality control module performs static baseline extraction and variable initialization operations during the standby phase and the initial stage of order generation. The control logic of this process includes the following sub-steps:

[0061] S101, during the standby period when the system has no concurrent orders, the control module issues a position command to drive the actuator 6 to move in the three-dimensional space inside the cabinet 1 until it stops at the preset calibration coordinates. The preset calibration coordinates refer to the independent suspended position inside the cabinet 1 that avoids the feeding component 5 and the ice cream dispensing mechanism 4. In this position, the ice cream holding device 7 at the end of the actuator 6 does not come into contact with any physical structure inside the cabinet 1, thereby eliminating the influence of external mechanical interference stress on the miniature weighing sensor.

[0062] S102, after the actuator 6 reaches the preset calibration coordinate and remains stationary, the control module activates the miniature weighing sensor integrated on the ice cream serving device 7 to perform continuous data sampling. The control module acquires the single discrete sample weight value in the time series. ,in This is the index of the discrete time points of the sampled sequence. The control module truncates the sequence to a length of... The continuously sampled data sequence is used as a sliding time window. The population variance of all sampled data sequences within this time window is less than or equal to a preset static variance threshold. At this point, the ice cream serving device 7 is determined to have reached a static stable state that meets the measurement requirements. The control module then calculates the weight values ​​of all single discrete samples within that time window. The arithmetic mean of the weights is recorded as the empty reference weight of the ice cream serving device 7. The specific calculation formula is as follows:

[0063] ;

[0064] Extracting the unloaded reference weight The prerequisite constraints are:

[0065] ;

[0066] in, This indicates the unloaded reference weight of the ice cream serving device 7; Indicates the length of the continuous sampling window; Indicates the discrete time point index of the sampled sequence; Indicates the first The weight value of a single discrete sample corresponding to a discrete time point; Indicates the index of discrete time points from 1 to... The corresponding values ​​are summed. This represents the preset static variance threshold.

[0067] Continuous sampling window length The specific value is determined by the sampling frequency of the analog-to-digital conversion in the miniature weighing sensor hardware, with the benchmark set at a time span greater than the inherent mechanical oscillation period of actuator 6. Static variance threshold. The value is determined based on the factory-set noise level of the miniature weighing sensor and the maximum allowable calibration deviation of the system. For the analog signal amplification and analog-to-digital conversion processing at the underlying hardware circuitry of the miniature weighing sensor, those skilled in the art can consult the sensor chip datasheet for interface matching and communication protocol configuration. The acquisition and conditioning of the underlying hardware signals are well-known technologies in this field and will not be elaborated upon here.

[0068] S103, the control module completes the no-load reference weight. After data extraction and storage, the control system maintains a standby polling state to await external interaction commands. Upon receiving a valid order signal, the control module locks the execution flow of the current sales channel in the software process to avoid interference from external concurrent data packets in the subsequent physical preparation stage.

[0069] After the channel is locked, the control module allocates global parameter storage space for the current order in memory and initializes the preparation retry counter for that order. The control module will prepare a retry counter. The initial value is set to 0. A retry counter is then prepared. As an independent control variable throughout the entire lifecycle of a single order, this single-time reset and assignment operation is only performed at the initial order acceptance stage. In all subsequent control logic, this variable is specifically used to count the number of abnormal rejections due to quality control interception. Limit the preparation of a retry counter. The zeroing trigger node provides data support for the control module to subsequently execute anti-deadlock hard fuse actions based on count comparison.

[0070] After initializing the global variables, the control system further executes operations such as empty container acquisition, tare weight extraction, and net weight parsing. The control logic at this stage includes the following sub-steps:

[0071] S104, the control module issues an action command, driving the actuator 6 to move to the feeding assembly 5 to acquire the empty container. After the acquisition is completed, the actuator 6 carries the empty container to a suspended coordinate point without physical interference, and the control module reactivates the miniature weighing sensor to perform continuous sampling. This is used to extract the empty reference weight. Using the same sliding window variance constraint mechanism, after confirming that the sampled data has reached a static steady state, the control module calculates the arithmetic mean of the weight values ​​of a single discrete sample within the current sliding time window and records it as the joint tare weight. .

[0072] To prevent abnormal conditions such as empty cups getting stuck and failing to fall, or multiple cups overlapping and falling, from occurring in the feeding component 5, the control module performs container error prevention checks in memory. The control module will then obtain the combined tare weight. Subtract no-load reference weight The independent weight of the empty container is obtained. Subsequently, the control module determines the independent weight of the empty container. Is it within the preset reasonable weight range for an empty cup? The upper and lower limits of the preset reasonable weight range for an empty cup are determined by a combination of the factory standard weight of the empty container and its manufacturing tolerance range. If the empty container has an independent weight... If the cup is outside the specified range, the control module determines that the cup retrieval is abnormal and interrupts the subsequent filling process, executing the corresponding abnormal retry or shutdown alarm mechanism. If the cup is within the specified range, the filling operation proceeds.

[0073] S105, after the cup verification is passed, the control module drives the actuator 6 to move directly below the dispensing port of the ice cream dispensing mechanism 4 and triggers the filling control command. The ice cream dispensing mechanism 4 opens the dispensing valve according to the preset control parameters and squeezes the material into the empty container located on the ice cream holding device 7.

[0074] After the filling command is executed, the control module closes the valve of the ice cream dispensing mechanism 4 and controls the actuator 6 to remain stationary at the current coordinate, waiting for the mechanical sloshing of the fluid material to naturally decay. After a preset settling buffer time, the control module reads the data sequence from the miniature weighing sensor, uses the same variance-constrained static judgment logic as described above to obtain the average weight after the system reaches steady state, and records it as the total gross weight. Regarding the compressor cooling start / stop and air pump expansion ratio adjustment inside the ice cream dispensing mechanism 4, those skilled in the art can refer to the general specifications of commercial soft ice cream machines for hardware configuration. Its fluid circulation control and physical refrigeration mechanism are well-known technologies in the field and will not be described in detail here.

[0075] S106, Obtain Total Gross Weight Subsequently, the control module performs dynamic net weight analysis calculations in the underlying software logic. Since the zero point of the miniature weighing sensor will fluctuate slightly with ambient temperature drift and mechanical deformation, the system uses the combined tare weight extracted in real-time within a single order. Differential calculations are performed to offset common-mode errors at the underlying hardware level. The control module uses the total gross weight... Value minus combined tare weight Numerical values ​​are used to calculate the actual net weight of this filling. The specific calculation formula is as follows:

[0076] ;

[0077] in, This indicates the actual net weight of the ice cream filling; This indicates the total gross weight including the ice cream serving device 7, the empty container, and the ice cream ingredients; This indicates the combined tare weight including the ice cream serving device 7 and the empty container.

[0078] The control module calculates the actual net weight. Then, it is written as an absolute quantitative indicator into the system memory cache. This actual net weight The data will move beyond basic physical weighing and be transformed into key data for measuring the single-batch pass rate of the ice cream dispensing mechanism, providing a benchmark for comparison and judgment for the quality control processing module to enter the subsequent state machine flow.

[0079] The quality control processing module analyzes the actual net weight. Then, a dynamic quality control evaluation procedure is immediately initiated, comparing the quantified weight data with preset quality control standards to accurately determine the quality of the finished product from a single batch. The control logic of this evaluation mechanism includes the following sub-steps:

[0080] S201, the control module retrieves the quality control model parameters corresponding to the currently sold product category from the system configuration parameter library. This quality control model is based on the standard target weight. Together with the upper and lower tolerances, the three-state determination interval is defined. The control module determines the three-state determination interval based on the standard target weight. Lower limit tolerance and upper limit tolerance The lower threshold of the qualified range is calculated. With upper limit threshold .

[0081] Standard target weight The values ​​are preset by the product formulation and market specifications. Lower tolerance limit. With upper limit tolerance The value of this parameter takes into account raw material cost control, the physical dispensing accuracy of the ice cream dispensing mechanism 4, and the minimum portion size requirement to ensure a good user experience. Its specific range is typically set between 2% and 5% of the standard target weight. The specific calculation formula is as follows:

[0082] ;

[0083] ;

[0084] in, This represents the lower limit threshold of the acceptable range; Indicates the upper limit threshold of the acceptable range; Indicates the standard target weight; Indicates the lower limit of tolerance; This indicates the upper limit of tolerance.

[0085] S202, the control module will calculate the actual net weight from the previous stage. The lower limit threshold of the qualified range and upper limit threshold Numerical comparisons are performed, and based on the comparison results, the currently prepared finished product is classified into one of three states.

[0086] If the actual net weight Meet the conditions The control module determines that the finished product is qualified and assigns the quality control status variable a value of qualified. In this state, the system process will proceed normally to the subsequent delivery preparation stage.

[0087] If the actual net weight Meet the conditions The control module determines that the finished product is an abnormal product due to insufficient quantity. This status indicates that there may be a problem with the ice cream dispensing mechanism 4, such as blockage or insufficient raw material supply, and the finished product quantity does not meet the minimum standard, making it impossible to deliver.

[0088] If the actual net weight Meet the conditions The control module determines that the finished product is an abnormal product due to excessive quantity. This state is usually caused by a delayed valve closure or control failure in the ice cream dispensing mechanism 4. Excessive dispensing not only increases operating costs, but also poses a risk of finished product overflowing and contaminating the ice cream holding device 7 or the internal environment of the cabinet 1.

[0089] The control module outputs the final judgment status—pass, under-quantity, or over-quantity—as a signal to trigger subsequent differentiated control flow branches. Compared to the traditional binary (pass / fail) judgment, this three-state quality control model provides more refined data traceability support for system fault diagnosis and subsequent maintenance.

[0090] See attached document Figure 6 When the quality control assessment result is abnormal, the control module initiates an exception handling procedure. By introducing retry and circuit breaker mechanisms, it ensures that the system has self-healing capabilities in the face of intermittent failures, and can decisively terminate in the face of persistent failures to prevent deadlock loops. This control logic includes the following sub-steps:

[0091] S203: When the control module determines that the finished product is either under-quantity or over-quantity abnormal, it will immediately block the normal control flow to the delivery preparation stage. The control module first reads the preparation retry counter from the global parameter storage space of the current order. The current value is compared with the system's preset maximum number of retries. Compare them.

[0092] S204, if the comparison result is This indicates that the retry opportunities for the current order have not been exhausted, and the control module initiates the waste self-healing process. The control module issues a path planning instruction, driving the actuator 6 to move the abnormal finished product to the waste area inside the cabinet 1. After reaching the designated coordinates, the end effector of the actuator 6 performs a preset tilting action, such as tilting the ice cream container 7 to tilt the container and the ice cream inside into the waste liquid receiving tray.

[0093] After the discard action is completed, the control module will prepare a retry counter. Increment the value by one, that is, execute Operation. Subsequently, the control system jumps the program execution pointer back to step S104, that is, restarts the action of obtaining an empty container, and performs a completely new preparation attempt for the current order. This process forms a closed-loop self-correction and recovery mechanism to cope with single preparation failures caused by factors such as sudden changes in raw material flowability or accidental sensor interference.

[0094] S205, if the comparison result is This indicates that consecutive preparation attempts have failed, and the control module determines that there is a persistent or hardware-level fault in the system. To avoid unlimited waste of materials and prevent the system from falling into a permanent retry loop, the control module triggers the deadlock prevention circuit breaker mechanism. Maximum number of retries. It is an integer that can be configured by the operations and maintenance personnel. Its value is usually set to 2 or 3. This value is the result of a trade-off between the material loss cost of a single transaction and the expectation of improving the success rate of the transaction.

[0095] Upon triggering the circuit breaker mechanism, the control module executes a series of termination operations. First, the control module sends a refund instruction to the backend server or payment gateway via the communication interface, automatically issuing a full refund to the current user. Second, the control module records a severity-level fault message in the local log system, including the fault type and a description of the event indicating that the maximum number of retries has been reached, for subsequent remote diagnostics and maintenance. Simultaneously, the control module drives the control panel 2 to display fault prompts and a successful refund interface. Finally, the control module places the currently sold product category or entire unit into a suspended service state and, after performing a final abandonment operation, the control actuator 6 returns to the standby position, awaiting manual intervention.

[0096] Once the actual net weight meets the qualification requirements, the system enters the delivery preparation phase. To avoid false signal triggering caused by personnel passing in front of the equipment, brief obstructions, or environmental electromagnetic noise, the delivery preparation module performs time-domain jitter removal processing on the output data of the user's on-site radar. This signal establishment mechanism includes the following sub-steps:

[0097] S301, the control module reads the raw scan data from the user-in-situ radar. To accurately define the safe interaction space, the user-in-situ radar is fixed to the front panel of cabinet 1 at a preset downward tilt angle, thereby creating a specific effective detection area in front of the equipment. The specific value of this downward tilt angle is determined comprehensively based on the actual installation height of the radar above the ground and the need to avoid interference from distant background pedestrians; its value range is typically set between 15° and 30°.

[0098] The effective detection area is defined in a three-dimensional coordinate system as a preset distance range and an angle sector directly in front of the automatic material handling window 3. The preset distance range is set based on the safe arm length distance for a user to reach for food and the need to avoid near-field multipath reflections generated by the front panel of cabinet 1. Its value range is typically set to a radial depth range of 0.3m to 0.8m from the front panel of cabinet 1. The angle sector value is set based on the physical opening width of the automatic material handling window 3 and the shoulder width span of a normal standing human body. Its value range is typically limited to a sector range with a horizontal deflection angle of ±30° (i.e., a total coverage angle of 60°) based on the normal of the user's on-site radar center.

[0099] The user-in-situ radar transmits detection signals to the aforementioned effective detection area at a fixed sampling period and outputs a binary raw state sequence reflecting the presence or absence of the target. The control module operates at set discrete sampling times. Obtain the original state value When a target with a reflective cross-section matching human characteristics exists within the radar's field of view, and the radar's underlying algorithm determines that the target's three-dimensional spatial coordinates fall within a preset range and angle sector, The value is assigned to 1; when no target matching the characteristics is detected, or when the target's three-dimensional spatial coordinates are outside the preset distance range and angle sector (such as a pedestrian crossing laterally in the distance), The value is assigned to 0. For the underlying frequency division multiple access modulation, echo reception, and point cloud analysis processing of the user-in-situ radar, those skilled in the art can use commercial millimeter-wave radar modules and configure the corresponding communication protocols. The underlying hardware detection mechanism is a well-known technology in this field and will not be described in detail here.

[0100] S302, the control module constructs a length of [length] in the software process. A sliding time window is used to buffer the raw state values ​​of continuous inputs. The control module accumulates all the original state values ​​within the sliding time window to obtain the total target detection frequency within the current time window. The specific calculation formula is as follows:

[0101] ;

[0102] in, This represents the total frequency of target detection within the sliding time window; This represents the total number of discrete sampling points included in the sliding time window; Indicates the discrete sampling time; Indicates the sequence index of the sampling time point; Indicates at discrete sampling time The original state value obtained; This indicates the sequence index from 1 to... The corresponding original state values ​​are summed.

[0103] S303, the control module calculates the total frequency of target detection. Each is compared with the system's preset presence determination threshold. and exit judgment threshold Perform numerical comparisons to output the final debouncing result.

[0104] When the total frequency of target detection Greater than or equal to the in-situ determination threshold This indicates that the probability of the target remaining in the delivery area within the past time window is extremely high, and the control module filters out occasional signal loss. At this point, the control module establishes the system state of user presence and assigns the Boolean variable representing the user's presence to true.

[0105] When the total frequency of target detection Less than or equal to the exit judgment threshold This indicates that the delivery area was essentially vacant during the past time window, and the control module eliminated transient interference caused by passersby. At this point, the control module establishes the system state of user departure and assigns the Boolean variable representing user presence to false.

[0106] When the total frequency of target detection At the exit threshold With the in-situ determination threshold During this period, the control module maintains the Boolean variable state output from the previous sliding time window unchanged, thus forming a hysteresis interval for state reversal, further enhancing the system's ability to resist noise interference.

[0107] Total number of discrete sampling points included in the sliding time window The number of sampling points, typically set to cover 2 to 3 seconds of physical time, is determined by combining the radar hardware's sampling refresh rate with the normal gait dwell time of a human. The in-situ determination threshold is... The value is usually set to 80% to 90%, the threshold for leaving the venue. The value is usually set to The percentage is 10% to 20%. Through this time-domain integration and dual-threshold hysteresis comparison mechanism, the system obtains stable and reliable environmental perception data, providing accurate preconditions for whether to perform the final product delivery action.

[0108] See attached document Figure 7After establishing the user's presence, the control system performs spatial path diversion control based on this status. If the user fails to pick up their meal promptly, the system utilizes a physical cold chain to ensure the quality of the finished product. This control logic includes the following sub-steps:

[0109] S304, the control module reads a Boolean variable representing the user's presence. When the Boolean variable is true, it indicates that the user is in the delivery area in front of cabinet 1. At this time, the control module directly issues a path coordinate command, driving the actuator 6 to move the finished ice cream to the delivery coordinate point inside the automatic dispensing window 3, ready to perform the window opening and delivery operation.

[0110] When the Boolean variable is false, it indicates that the user has temporarily left the delivery area. At this time, the control module intercepts the movement command to the automatic feeding window 3. To prevent the finished ice cream from melting and spoiling due to prolonged exposure in the ambient temperature zone or processing zone inside the cabinet 1, the control module drives the actuator 6 to carry the finished product to the preset cold zone coordinates inside the cabinet 1 for waiting.

[0111] S305, after actuator 6 reaches the cold zone coordinates and remains stationary, the control module records the current system timestamp in the system memory, using it as the initial time of entering the cold zone. During the stay, the control module activates a dual failure defense monitoring program, using joint constraints of time and ambient temperature dimensions to ensure that the cold zone environmental conditions during the stay meet the requirements for short-term residence of the finished product, thereby indirectly assessing food safety risks.

[0112] The control module calculates the actual dwell time during discrete polling intervals of the dwell cycle. The control module synchronously reads data from the cold zone temperature sensor installed inside the cold zone of rack 1 to obtain the real-time ambient temperature within the cold zone. For the underlying data acquisition and analog-to-digital conversion processing of the cold zone temperature sensor, those skilled in the art can use common NTC thermistors and peripheral circuits; the signal acquisition and conditioning are well-known techniques in the field and will not be elaborated upon here.

[0113] S306, the control module executes the failure judgment logic. The control system constructs a dual judgment model consisting of a time limit and a temperature limit. When the actual residence time reaches the time limit or the real-time ambient temperature reaches the temperature limit, the system determines that the current finished product has exceeded the safety control range. The Boolean expression for the specific failure judgment logic is as follows:

[0114] ;

[0115] ;

[0116] in, Indicates the actual residence time of the finished product; This indicates the current system timestamp read by the system; Indicates the initial timestamp of the finished product entering the cold zone; A Boolean result variable representing the failure determination; Indicates the preset maximum safe dwell time; This indicates the real-time temperature value output by the cold zone temperature sensor; This indicates the preset upper limit threshold for the safe temperature of the cold zone; Represents a logical OR operation.

[0117] Maximum safe dwell time The value is determined based on the physical melting curve of the ice cream recipe at a set temperature in the cold zone, ensuring that the finished product does not show visible collapse. The specific range is typically set between 3 and 5 minutes. (Cold zone safe temperature upper limit threshold) The value is determined based on the mandatory requirements for cold chain storage in local food safety regulatory standards. It is used to characterize whether there is a heat intrusion phenomenon in the cold zone environment that causes the ice cream to melt and collapse, rather than directly measuring the temperature of the ice cream itself. In soft ice cream application scenarios, the upper limit threshold of this temperature is usually set between -5℃ and 0℃.

[0118] S307, in the Boolean result variable of the failure determination Assuming the value is false, the control module continuously monitors the Boolean variable representing the user's presence. Once the Boolean variable is detected to have flipped from false to true, the control module immediately interrupts the cold zone dwell procedure and drives the actuator 6 to carry the finished product within the safety period to the automatic material handling window 3 to complete the delivery.

[0119] If during the stay, the Boolean result variable of the failure determination If the value is set to true, the control module immediately determines that the current finished product is scrapped. The control module drives actuator 6 to leave the cold zone and proceed to the waste area inside cabinet 1 to perform the dumping action. After the finished product is scrapped, the control system performs a termination and refund operation on the current order and clears the global state variables to avoid delivering potentially deteriorated products to the user.

[0120] When the system is ready for delivery, to ensure safe human-machine interaction and prevent unnecessary loss of cool air inside rack 1, the delivery execution module executes window opening logic based on multi-source state linkage. This control logic includes the following sub-steps:

[0121] S401, the control module collects state variables from three independent data sources to determine the timing of the window opening. The first state variable is the position signal of the actuator 6. When the actuator 6, carrying the finished ice cream, accurately arrives at the preset delivery coordinate point inside the automatic dispensing window 3, and the position feedback error is within the static tolerance range allowed by the servo drive, this position signal is assigned a true value. The second state variable is a Boolean variable representing the user's presence status established in the previous processing stage. The third state variable is a Boolean result variable for the failure determination output from the aforementioned cold chain residence stage.

[0122] S402, the control module performs a logical AND operation on the three independent state variables mentioned above during the software process. The system requires that three constraints be simultaneously met: the finished product is physically in place, the user is indeed present and waiting, and the finished product itself has not failed in quality, before the mechanical door opening action can be triggered. The specific logical expression for generating the window opening command is as follows:

[0123] ;

[0124] in, A Boolean variable representing the instruction that triggered the window opening action; This represents the position signal of actuator 6 (Boolean variable). This represents a Boolean variable that indicates the user's in-service status. A Boolean result variable representing the failure determination; This represents the logical AND operation; It represents the logical NOT operation.

[0125] S403, Boolean variable for the instruction that triggers the window opening action. When the logical operation is assigned a true value, the control module outputs a positive running signal to the window drive mechanism 8 of the automatic material handling window 3. Upon receiving the drive signal, the window drive mechanism 8 starts, causing the window door panel 9 to slide upwards along the guide rail, physically opening the delivery channel between the inside and outside of the cabinet 1. Simultaneously, the control module records the initial timestamp of the window opening in the system memory.

[0126] S404, Inside the physical structure of the automatic material handling window 3, an upper limit switch for opening the door is fixedly installed at the upper end of the door panel's running trajectory. After issuing the window opening command, the control module immediately begins real-time high-frequency polling of the level status of this upper limit switch.

[0127] During the upward movement of the window door panel 9, the control module calculates the difference between the current timestamp and the initial timestamp of the window opening in real time to determine the opening duration. If this opening duration exceeds the preset maximum window opening timeout threshold, and the control module still fails to detect the level transition signal generated by the upper limit switch, the control module determines that the window drive mechanism 8 or the window door panel 9 has experienced mechanical jamming during opening. At this time, the control module immediately cuts off the positive drive power of the window drive mechanism 8, stops the opening action, and drives the control panel 2 to display a device fault alarm. The system enters a safe shutdown protection mode, awaiting manual intervention. The maximum window opening timeout threshold is calculated based on the physical running distance of the window door panel 9 throughout its entire stroke and the rated speed of the window drive mechanism 8, with a certain amount of redundancy time margin reserved. Its specific value range is usually set to 3s to 5s.

[0128] When the upward-moving window door 9 physically touches the upper limit switch within the maximum window opening timeout threshold, the switch's output level changes. Upon capturing this level change signal, the control module determines that the automatic food retrieval window 3 has reached a fully open state. At this point, the control module immediately cuts off the positive drive power to the window drive mechanism 8, keeping the window door 9 stationary at its maximum open position, thus creating a physically unobstructed food retrieval space for the user. For the optocoupler isolation acquisition of the underlying H-bridge drive circuit and the limit switch of the window drive mechanism 8, those skilled in the art can use a general-purpose motor drive chip and a basic GPIO digital input interface for configuration. The hardware power amplification and signal isolation acquisition are well-known technologies in the field and will not be elaborated upon here.

[0129] See attached document Figure 8 After the automatic material handling window 3 is fully open, the control module initiates the joint judgment procedure for the material handling event. To prevent false judgments caused by users touching the container but not actually taking it, the system establishes a joint judgment model based on pre-constraints in both time and space dimensions. This judgment logic includes the following sub-steps:

[0130] S405, the control module activates the space detection element installed at the automatic material handling window 3. This space detection element uses an infrared anti-pinch light curtain sensor to monitor the physical occupancy status of the delivery channel in real time. The control module reads the output level of the infrared anti-pinch light curtain sensor at a fixed frequency and converts it into a Boolean variable representing the space occupancy status. When an external object, such as a user's arm, is detected crossing the delivery channel, the Boolean variable is set to true, indicating that the space is occupied; when there is no physical obstruction in the delivery channel, the Boolean variable is set to false, indicating that the space is free.

[0131] S406, the control module synchronously reads the real-time sampling data from the miniature weighing sensor on the ice cream serving device 7 at high frequency. The control module acquires the real-time weight value at discrete time points and compares it with the empty reference weight extracted during the system initialization phase. The difference is calculated. The control module determines whether the absolute value of the difference is less than a preset residual weight tolerance threshold. The residual weight tolerance threshold is set to take into account the zero-point drift of the miniature weighing sensor and the weight of a small amount of condensate adhering to the bottom of the container; its specific range is usually set to 2g to 5g. When the real-time weight value is compared with the no-load reference weight... When the absolute value of the difference is less than or equal to the tolerance threshold, the system initially determines that the container has been removed in terms of physical quality.

[0132] S407, the control module performs a joint constraint evaluation on the time axis for the judgment conditions of the spatial and mass dimensions. The control module requires that the removal state of the mass dimension must be maintained continuously for a preset confirmation time window, and at the end of this time window, the infrared anti-pinch light curtain sensor of the spatial dimension must be in an idle state. The specific spatiotemporal joint judgment logic expression is as follows:

[0133] ;

[0134] in, This is a Boolean result variable indicating whether the event of taking the item was successful. This indicates the total number of consecutive sampling points included in the preset confirmation time window; Represents the time series index of consecutive sampling points; Indicates the starting time series index that meets the weight determination criteria; Represents at discrete time points The real-time weight value of the sample; This indicates the unloaded reference weight of the ice cream serving device 7; This indicates the preset residual weight tolerance threshold; Represents a step function, when the input variable The output value is 1 when the input variable is 1. The output value is 0. This represents a Boolean variable indicating the space occupancy output by the infrared anti-pinch light curtain sensor at the current moment. This represents the logical AND operation; Indicates the logical NOT operation; Indicates the indexing of time series from arrive The corresponding values ​​are summed.

[0135] Confirm the total number of consecutive sampling points included in the time window Based on the operating frequency setting of the miniature weighing sensor, the corresponding time span is typically 1 to 2 seconds. This duration is used to filter out short-term mass fluctuation interference caused by environmental wind or mechanical vibration. For the infrared emitting diode array scanning and receiving diode level comparison circuit at the bottom layer of the infrared anti-pinch light curtain sensor, those skilled in the art can use commercially available photoelectric protection devices. The hardware optical path arrangement and digital signal output are well-known technologies in the field and will not be elaborated upon here.

[0136] S408, when a Boolean result variable represents the successful determination of the take-away event. When the value is set to true, the control module formally establishes a system event at the software level that the finished product has been safely retrieved. The control module then uploads a closed-loop status data packet containing the event timestamp to the cloud server to update the current order's lifecycle status to complete.

[0137] After the pickup event is confirmed, the control module issues a window closing command. The control module drives the window drive mechanism 8 to rotate in reverse, causing the window door plate 9 of the automatic material pickup window 3 to move downwards along the physical guide rail. When the window door plate 9 physically touches the lower limit switch located at the bottom, the control module cuts off the reverse drive power of the window drive mechanism 8, completing the physical closure of the delivery channel. Subsequently, the control module drives the actuator 6 to reset to the standby coordinate point inside the cabinet 1. The control module performs parameter clearing and storage space release for the single order operation environment in the system memory, and the entire device returns to the initial polling standby state to await subsequent interactive commands.

[0138] See attached document Figure 9 After the removal event is established and the window closing command is triggered, the closed-loop reset module executes door closing control with a fault-tolerant mechanism. To prevent users from being pinched or the transmission system from being damaged by mechanical foreign objects during the downward movement of the window door panel 9, the closed-loop reset module introduces a dynamic anti-pinch intervention and jamming fault-tolerant strategy based on multi-source monitoring fusion. The control logic of this stage includes the following sub-steps:

[0139] S501, before executing the physical closing action, the control module first executes the health status assessment program of the infrared anti-pinch light curtain sensor. The control module reads the sensor's underlying hardware status register and continuously samples the space occupancy Boolean variable within a preset time window. If the underlying registers report a hardware self-test error, or if a boolean variable indicates space usage... If the status remains true (i.e., constantly lit abnormal state) within a preset time window, it indicates that the sensor itself is physically damaged, or that there is a fixed obstruction in the delivery channel that cannot be pushed away by the automatic door panel. In this state, the control module prevents the system from entering the automatic door closing process, forcibly maintains the window door panel 9 in a suspended state, and directly triggers the equipment abnormality repair mechanism to prevent pinching accidents caused by the failure of the safety defense.

[0140] After confirming that the infrared anti-pinch light curtain sensor is functioning correctly, the control module outputs a reverse drive control signal to the window drive mechanism 8 of the automatic material handling window 3, driving the window door panel 9 to move downwards along the guide rail. During this downward movement, the control module simultaneously initiates the anti-pinch and jamming monitoring process. The control module continuously reads the space occupancy Boolean variable output by the infrared anti-pinch light curtain sensor at fixed intervals. .

[0141] The control module uses a current sampling resistor connected in series with the bottom layer of the window door panel 9 driving circuit to obtain the current of the window door panel 9 at discrete sampling time points. Real-time operating current For the current sampling, differential amplification, and analog-to-digital conversion process of the window panel 9 driving circuit, those skilled in the art can use a general operational amplifier combined with the microcontroller's ADC peripheral to construct it. Its hardware signal conditioning is a well-known technology in this field and will not be described in detail here.

[0142] S502, the control module executes dual anti-pinch judgment logic in the software process. When the space occupancy boolean variable is read... When assigned a true value, it indicates that the delivery channel was re-entered by an external object during the closing period. The control module will run the current in real time. Compared with the system's pre-stored no-load operating current reference Perform a subtraction operation to determine if the difference is greater than the preset stall current threshold. .

[0143] No-load operating current reference This represents the motor baseline current when window door 9 is moving downwards normally without interference. Stall current threshold. The specific value is determined based on a comprehensive evaluation of the rated torque of the window drive mechanism 8, the self-weight of the window door panel 9, and the friction of the guide rail. To balance anti-pinch sensitivity and prevent false triggering caused by mechanical vibration, the stall current threshold is typically set between 20% and 50% of the no-load operating current reference I0 (i.e., the total current reaches 120% to 150% of the rated no-load). (When space occupancy Boolean variable) True, or the current difference is greater than the stall current threshold. When the system triggers an anti-pinch event, the control module determines that the system has done so. The specific Boolean expression for the determination logic is as follows:

[0144] ;

[0145] in, This represents a Boolean result variable indicating the triggering of the anti-pinch event. A Boolean variable representing space usage; Represents discrete sampling time points during the door closing process; Represents discrete sampling time points The corresponding real-time operating current; This indicates the no-load operating current reference for the window drive mechanism 8; This indicates the preset stall current threshold. Represents a logical OR operation.

[0146] S503: The control module synchronously executes time-based lag monitoring logic. The control module records the initial timestamp of the door closing process the instant the window closing command is issued. During the downward movement of window door panel 9, the control module calculates the current timestamp and the initial closing timestamp in real time. The difference determines the duration of the door closure. .

[0147] If the window door panel 9 does not physically touch the lower limit switch for closing and the aforementioned anti-pinch event is not triggered, the closing duration is... Greater than the preset maximum window closing timeout threshold The control module determines that window door panel 9 has experienced a mechanical jamming event. Maximum window closing timeout threshold. The value is calculated based on the physical running distance of the window door panel 9 throughout its entire stroke and the rated speed of the window drive mechanism 8, with a certain amount of redundancy time margin reserved.

[0148] S504, if the control module determines that an anti-pinch event or a mechanical jamming event has occurred, it immediately interrupts the original door closing control flow. The control module cuts off the reverse drive power of the window drive mechanism 8, forces the window door panel 9 to stop descending, and quickly outputs a positive drive signal to drive the window door panel 9 to move upward again to the maximum opening position.

[0149] After window door panel 9 is reset to the hovering state, the control module will activate the independently allocated door closing retry counter. Perform an increment operation, i.e., execute Door close and retry counter This counter is used to record the cumulative number of door closing errors, and it is reset to zero during each system initialization standby phase. The control module determines the door closing retry counter. Has the value reached the preset maximum number of retries to close the door? Maximum number of retries to close the door. The value is usually set to 3 or 4 times.

[0150] S505, if the door is closed, retry counter The value is less than the maximum number of retries to close the door. The control module drives the window door panel 9 to remain suspended in the fully open position and starts a preset avoidance delay timer. The avoidance delay is usually set to 3 to 5 seconds to give the user sufficient reaction time to retract their arm or remove the obstacle. After the avoidance delay ends, the execution pointer of the control module jumps back to step S501 and reissues the window closing command to attempt to close the passage.

[0151] If the door is closed, the counter will be retried. The value is greater than or equal to the maximum number of retries to close the door. This indicates that the obstacle cannot be automatically cleared or that there is substantial physical damage to the mechanical transmission components. The control module cuts off all driving power to the window drive mechanism 8, locking the system's underlying state machine flow. The control module drives the control panel 2 to display the equipment maintenance status and fault codes, and pushes a repair data packet carrying the fault location and current sensor snapshot data to the background cloud server. The entire equipment enters a safe shutdown protection mode to prevent mechanical components from overload and burning out, awaiting on-site inspection and intervention by maintenance personnel.

[0152] If the door panel's downward movement does not trigger the fault tolerance mechanism or the fault retry succeeds, the control module performs the final physical isolation and system initialization operations to end the current order's lifecycle. The control logic at this stage includes the following sub-steps:

[0153] S506, the control module continuously outputs a reverse drive signal to the window drive mechanism 8 of the automatic material handling window 3, driving the window door plate 9 to move downwards along the guide rail until the physical structure of the window door plate 9 touches the lower limit switch fixed at the lower end. The control module polls the output port of the limit switch in real time. When it detects a level flip signal caused by mechanical contact, the control module determines that the automatic material handling window 3 has reached a completely closed physical sealing state.

[0154] The control module then cuts off the power supply to the window drive mechanism 8, locking the window door 9 in its closed position, thereby blocking the heat exchange channel between the cooling zone inside the cabinet 1 and the external environment. After the physical seal is established, the control module issues a path planning command, driving the actuator 6 to detach from the delivery coordinate point inside the automatic material handling window 3 and return along a three-dimensional spatial trajectory to the preset standby zero point coordinate inside the cabinet 1. The standby zero point coordinate is located in an independent, suspended position inside the cabinet 1, far away from the feeding component 5 and the ice cream dispensing mechanism 4, avoiding mechanical interference with the internal structure of the equipment.

[0155] S507: After actuator 6 accurately docks at the standby zero-point coordinates and sends a position closed-loop completion signal to the control module, the control module initiates a system global state reset program in the software process. The control module performs data erasure and space release operations on the independent memory block allocated to the current order to prevent memory leaks from causing system crashes due to prolonged operation.

[0156] The control module restores the dynamic variables generated during the current lifecycle to their initial default values. The control module also includes the retry counter configuration involved in the aforementioned control flow. and door closure retry counter Forced reset. The control module synchronously resets the flags representing the system's operating status to false, such as restoring the Boolean result variables triggered by the anti-pinch event and the Boolean result variables of the failure determination to their initial states. The specific core variable reset logic can be described as the following set of assignments:

[0157] ;

[0158] ;

[0159] ;

[0160] in, This indicates the preparation retry counter for the current order; Indicates a door closure retry counter; Represents the main state machine variables of the control system; This represents the system's default idle standby state enumeration value. For the management of the microcontroller's underlying memory stack and the state machine pointer transitions in the real-time operating system, those skilled in the art can employ general embedded memory allocation mechanisms. The memory cleanup and task scheduling mechanisms are well-known technologies in this field and will not be elaborated upon here.

[0161] After the core variables are cleared and memory is reclaimed, the S508 control system returns to its initial polling state with no concurrent orders. The control module sends a heartbeat data packet carrying a device availability flag to the cloud-based backend server via the communication interface. Upon receiving this heartbeat data packet, the cloud-based backend server releases the lock on order placement for the current vending terminal.

[0162] The user interface of Control Panel 2 is simultaneously refreshed to the default selection screen. The control module reactivates the background scanning task of the user-in-situ radar and miniature weighing sensor, causing the program execution flow to jump back to the starting point of system basic parameter calibration and initialization. In this state, the system silently listens for external interactive data, establishing a basic operating environment for the next potential order task. At this point, the closed-loop control process for a single unmanned automated preparation and safe delivery is fully completed.

[0163] Specific application examples:

[0164] Taking a user purchasing a standard vanilla ice cream as an example, the system control parameters and execution flow are as follows:

[0165] When the system is in standby mode, the miniature weighing sensor continuously samples 50 data points (i.e., the continuous sampling window length). After confirming that the variance meets the standard, the arithmetic mean is calculated to obtain the empty reference weight of the ice cream serving device 7. .

[0166] After a user places an order, the system initializes the preparation retry counter. The actuator 6 picks up an empty paper cup with a nominal weight of 15g. After allowing it to stand for sampling again, the combined tare weight is measured. .

[0167] Calculate the independent weight of the empty container The weight falls within the preset legal paper cup weight range (14-16g), and the verification is successful.

[0168] Standard target weight for vanilla ice cream Set a lower tolerance level. Upper limit tolerance Lower threshold Upper limit threshold .

[0169] The total gross weight was measured after filling. Actual net weight Since 95 < 97, the system determines this to be a short-quantity abnormality. (Assuming a maximum number of retries is 2), the system dumps it into the waste area, letting... Take a new cup and prepare it.

[0170] After refilling, the new tare weight was still measured to be [value missing]. Total gross weight Actual net weight If the values ​​of 97 ≤ 102 ≤ 105 are met, the quality control variables are updated to qualified, and the product is released.

[0171] Set the total number of discrete sampling points included in the radar sampling sliding time window. (Approximately 3 seconds long), In-place determination threshold If the cumulative target detection frequency Since 28 ≥ 25, the user's presence is confirmed.

[0172] Window panel 9 is open; removal is in progress; tolerance threshold is set to... When the weight decreased from 267g and stabilized at 151g, And the light curtain was not blocked ( ), confirming that the finished product has been taken away.

[0173] Window door panel 9 moves downwards, setting the no-load operating current reference. Stalled rotor current threshold If someone reaches out at this moment, the current increases to 700mA. Since 700-500=200>150, the Boolean result variable triggered by the anti-pinch event will be... .

[0174] The window door panel 9 reverses and rises in an emergency, and after a 3-second delay, attempts to close safely again before finally returning to standby mode.

[0175] To verify the effectiveness of the control logic of this invention, a comparative experiment was conducted on 500 orders each of a traditional non-closed-loop vending machine and the vending machine of this invention, under the same ambient temperature (28°C) and raw material conditions.

[0176] Comparison of core experimental data: Net weight pass rate 89.4% 99.8% Reduced the risk of delivering non-conforming products. Scrap loss rate 10.6% 2.8% Reduced raw material waste caused by single preparation failures. Anti-pinch false positive / false negative rate 4.2% 0.4% Improved anti-interference capability under complex working conditions See attached document Figure 10 , attached Figure 10 The graph records the net weight quality control monitoring curves of the delivered finished products after the system processed 20 valid delivery orders consecutively. The horizontal axis of the graph represents the order number, and the vertical axis represents the actual net weight of the delivered finished products. The three horizontal dashed lines in the graph represent the target net weight (100g), the upper tolerance limit (105g), and the lower tolerance limit (97g), respectively.

[0177] As shown in the figure, the actual delivered net weight curves marked with squares all fall within the acceptable quality control range of 97g to 105g, indicating that the system maintained a high pass rate at the delivery end. According to the background log records, when processing orders 4 and 13, the initial net weight of the ice cream dispensing mechanism 4 was approximately 95g due to cavitation. Following the logic of steps S203 to S204, the system identified the net weight as below the lower threshold, judged it as an abnormal product, and subsequently interrupted delivery, discarded it, and triggered a retry process. After the system retry, the final delivered net weights of orders 4 and 13 were 98.5g and 100.2g, respectively. (Appendix) Figure 10 The data shows that the closed-loop retry mechanism of the present invention can effectively intercept defective products and reduce the outflow of defective products under traditional open-loop control.

[0178] See attached document Figure 11 , attached Figure 11 The figure shows the dynamic monitoring curve of the door closing anti-pinch current under simulated external light interference (causing occasional failure of the infrared light curtain sensor). The horizontal axis represents the sampling time after the door closing action is initiated, and the vertical axis represents the operating current of the drive mechanism. The dashed lines in the figure indicate the no-load current reference (500mA) and the anti-pinch trigger threshold (650mA, based on a stall current threshold of 150mA).

[0179] In the current curve marked with a square, window door 9 descends normally within the 0-450ms interval, with the operating current fluctuating around 500mA. At 500ms, mechanical interference simulating an object blocking the path was introduced in the experiment. As the resistance of window door 9 increases during its descent, the driving current rises accordingly. When the time reaches 800ms, the operating current reaches 680mA, exceeding the 650mA anti-pinch trigger threshold. The system confirms the anti-pinch event (this trigger point is marked with a pentagram in the figure).

[0180] After the anti-pinch logic is triggered, the control module stops the reverse drive and outputs a forward reversal signal according to step S504. The latter half of the curve (800ms to 1500ms) shows that the current drops rapidly after reaching its peak and returns to zero after 1000ms. The 0mA current indicates that the window door 9 has completed its reverse upward movement and entered a hovering avoidance state. (Appendix) Figure 11 The data verified that even in the event of a single sensor failure, the anti-pinch logic based on drive current monitoring of this invention can intervene normally, preventing the door panel from continuing to descend and causing safety hazards.

Claims

1. A control method for self-service ice cream vending, characterized in that, Includes the following steps: The quality control processing module controls the actuator (6) to obtain an empty container, completes the filling at the ice cream dispensing mechanism (4), and obtains the actual net weight through weighing analysis; The quality control processing module compares the actual net weight with the preset quality control range and makes a judgment based on the comparison result. If an abnormality is determined, the module executes the discard self-healing process according to the retry mechanism, or executes the circuit breaker and triggers a refund after reaching the maximum number of attempts. If the actual net weight is qualified, the delivery preparation module makes a judgment based on the user's presence status. When the user is present, it controls the actuator (6) to move to the delivery position of the automatic material picking window (3). When the user leaves, it controls the actuator (6) to carry the finished product to stay in the cold zone inside the cabinet (1). When the finished product arrives at the delivery location and the user is present, the delivery execution module drives the window door panel (9) to open through the window driving mechanism (8), monitors the take-away event, and confirms the delivery is completed after the take-away judgment condition is met. After delivery is confirmed, the closed-loop reset module drives the window door (9) to close under anti-pinch safety monitoring, and resets the system global state variables after it is completely closed, and resumes standby.

2. The control method for self-service ice cream vending according to claim 1, characterized in that, The steps for obtaining the actual net weight through weighing analysis specifically include: Control the actuator (6) to stop at the preset calibration coordinate, and record the empty reference weight of the ice cream serving device (7) after the weighing is stable; After the actuator (6) obtains an empty container from the feeding assembly (5), the combined tare weight containing the empty container is measured and recorded. After filling is completed, the total gross weight is measured, and the combined tare weight is subtracted from the total gross weight to calculate the actual net weight.

3. The control method for self-service ice cream vending according to claim 1, characterized in that, The quality control processing module makes a judgment based on the comparison result between the actual net weight and the preset quality control range, specifically including the following steps: Get the standard target weight corresponding to the current order; Calculate the lower and upper threshold values ​​of the acceptable range based on the standard target weight; The actual net weight is compared with the lower and upper thresholds to determine whether the finished product is a qualified product, a product with insufficient quantity or an abnormal product with excessive quantity. Once the finished product is determined to be either a product with insufficient quantity or a product with excessive quantity, the current value of the retry counter is compared with the preset maximum number of retries, and a decision is made based on the comparison result to either discard and remake the product or to trigger a refund.

4. The control method for self-service ice cream vending according to claim 1, characterized in that, The steps for the delivery preparation module to determine the user's availability status specifically include: By processing the scanning data of the user's in-situ radar within a preset time window and comparing the processed results with the in-situ determination threshold and the departure determination threshold, the system can determine whether the user is present or absent.

5. The control method for self-service ice cream vending according to claim 1, characterized in that, The step of controlling the actuator (6) to carry the finished product to reside in the cold zone inside the cabinet (1) further includes monitoring food safety conditions, specifically including: Monitor the real-time ambient temperature of the cold zone inside the cabinet (1) and the actual dwell time of the finished products; When the actual dwell time reaches or exceeds the preset maximum safe dwell time, or when the real-time ambient temperature reaches or exceeds the preset upper limit threshold of the cold zone safe temperature, the actuator (6) is controlled to discard the finished product. If the user returns before the maximum safe dwell time or the upper limit threshold of the cold zone safe temperature is exceeded, the actuator (6) is controlled to go to the automatic material picking window (3) to complete the delivery.

6. The control method for self-service ice cream vending according to claim 1, characterized in that, The specific steps of the delivery execution module driving the window door panel (9) to open via the window driving mechanism (8) include: When the actuator (6) is in place and the user is present, it outputs a signal to the window driving mechanism (8) to open the window door panel (9). During the opening process, monitor whether the door opening timeout has exceeded the preset time. If the door opening limit switch is not reached within the preset time, the opening will stop and an alarm will be triggered. If touched within a preset time, the window door panel (9) will stop at the maximum open position.

7. The control method for self-service ice cream vending according to claim 2, characterized in that, The steps for monitoring the removal event specifically include: Jointly monitor the occupancy status of the infrared anti-pinch light curtain sensor and the real-time weight value of the miniature weighing sensor; When the real-time weight value is continuously detected to have recovered to the tolerance range of the unloaded reference weight within the preset confirmation time, and the infrared anti-pinch light curtain sensor is not blocked, the removal event is determined to be completed.

8. The control method for self-service ice cream vending according to claim 1, characterized in that, The step of driving the window door panel (9) to close under anti-pinch safety monitoring specifically includes: Drive the window door panel (9) downward to close, and continuously monitor for anti-pinch events during the closing process; The triggering condition for the anti-pinch event is: The infrared anti-pinch light curtain sensor is blocked or the difference between the real-time operating current of the window drive mechanism (8) and the no-load operating current reference is greater than the preset stall current threshold. When the anti-pinch event is triggered, the window door panel (9) moves in reverse to the fully open position, and if it still cannot close after a specified number of retries, it stops running and locks.

9. A control system for self-service ice cream vending, characterized in that, A control method for self-service ice cream vending, applicable to any one of claims 1-8, comprises: The quality control processing module is used to control the actuator (6) to obtain an empty container, complete the filling at the ice cream dispensing mechanism (4), and obtain the actual net weight through weighing analysis. The actual net weight is judged based on the comparison result with the preset quality control range. If the actual net weight is determined to be abnormal, the discard and reprocessing is performed according to the retry mechanism, or the circuit breaker refund is performed after the maximum number of times is reached. The delivery preparation module is used to make a judgment based on the user's presence when the actual net weight is deemed to be qualified. When the user is present, the module controls the actuator (6) to move to the delivery position of the automatic material picking window (3). When the user leaves, the module controls the actuator (6) to carry the finished product to stay in the cold zone inside the cabinet (1). The delivery execution module is used to drive the window door panel (9) to open via the window driving mechanism (8) when the finished product arrives at the delivery location and the user is present, and to monitor the take-away event. After the take-away judgment condition is met, the delivery is confirmed to be completed. The closed-loop reset module is used to confirm that after delivery is completed, drive the window door (9) to close under anti-pinch safety monitoring, and reset the system global state variables and restore standby after the window door (9) is completely closed.

10. A self-service ice cream vending machine, comprising a cabinet (1), characterized in that, The cabinet (1) is equipped with a control panel (2) and an automatic feeding window (3) on the front side. The cabinet (1) is equipped with an ice cream dispensing mechanism (4), a feeding component (5), an actuator (6), a receiving seat (10), a sensor network, and a control module. The end of the actuator (6) is connected to an ice cream holding device (7), which is equipped with a miniature weighing sensor. The automatic feeding window (3) includes a window driving mechanism (8) and a window door panel (9). The sensor network includes a user presence radar, a finished product arrival sensor, an infrared anti-pinch light curtain sensor, a cold zone temperature sensor, an upper limit switch for opening the door, and a lower limit switch for closing the door.