A liquid material box usage monitoring and early warning method, a computer device, and a storage medium

CN122964457APending Publication Date: 2026-10-23QIANYI INTELLIGENT INNOVATION TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610966513.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]本发明实施例的目的在于提供一种液料盒用量的监测预警方法、计算机设备及存储介质,旨在解决现有技术加料误判、分析维度单一的问题

Benefits of technology

[0015]本发明实施例提供的液料盒用量的监测预警方法、计算机设备及存储介质,基于液料盒在预设采样周期下的实时重量数据计算多时间维度的液料用量冻结数据,实现了对液料盒重量的精细化监测;通过加料事件检测与分段修正有效剔除了加料过程对用量计算的干扰,显著提升了液料用量冻结数据的准确性;通过结合多种外部环境数据构建多维度特征向量并进行用量分析,实现了对液料用量趋势的精准预测和异常识别;最终根据用量检测结果及预设的异常判定条件生成异常预警信息,从而实现了用量异常的准确识别与主动预警,能够为液料补充和设备维护提供精准的数据支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964457A_ABST
    Figure CN122964457A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of quantity detection, and particularly relates to a liquid material box quantity monitoring and early warning method, a computer device and a storage medium. The method comprises the following steps: based on real-time weight data of the liquid material box in a preset sampling period, a plurality of time-dimension liquid material quantity frozen data are calculated; the liquid material box is subjected to a liquid addition event detection based on the real-time weight data, and the liquid material quantity frozen data are segmented and corrected according to the obtained liquid addition detection result; a multi-dimension feature vector is constructed in combination with a plurality of external environment data; quantity analysis is performed based on the segmented and corrected liquid material quantity frozen data and the multi-dimension feature vector, and a quantity detection result is generated; and abnormal early warning information is generated according to the quantity detection result and a preset abnormality judgment condition. The present application can accurately detect the liquid material quantity, thereby realizing accurate prediction and abnormal identification of the liquid material quantity trend.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of dosage detection technology, and particularly relates to a method for monitoring and early warning of liquid cartridge dosage, a computer device, and a storage medium. Background Technology

[0002] Currently, liquid container cartridges are widely used in automated catering equipment (such as cooking machines) to store and quantitatively supply seasoning liquids. Existing technologies for monitoring the usage of liquid containers mostly use simple weight sensors combined with periodic readings, estimating liquid consumption by calculating the weight difference between two readings.

[0003] However, this approach has many shortcomings: existing feeding detection methods are mostly based on simple threshold judgments, which cannot effectively distinguish between feeding events and instantaneous fluctuations, resulting in the feeding weight often being miscalculated as normal consumption, which seriously affects the accuracy of usage statistics; in addition, existing usage analysis is mostly based on a single time dimension and lacks the comprehensive utilization of multi-dimensional external data, making it difficult to achieve high-precision usage prediction and anomaly detection. Summary of the Invention

[0004] The purpose of this invention is to provide a method, computer equipment, and storage medium for monitoring and early warning of liquid cartridge usage, aiming to solve the problems of misjudgment of material addition and single analysis dimension in the prior art.

[0005] The present invention is implemented as follows: a method for monitoring and early warning of liquid cartridge usage is provided, comprising the following steps: Based on the real-time weight data of the liquid container during the preset sampling period, the liquid usage freezing data in multiple time dimensions are calculated. Based on the real-time weight data, the liquid container is subjected to feeding event detection, and the liquid usage freezing data is corrected in segments according to the obtained feeding detection results; Construct multi-dimensional feature vectors by combining various external environmental data; Based on the segmented corrected liquid usage frozen data and the multi-dimensional feature vector, usage analysis is performed to generate usage detection results; Based on the dosage detection results and preset anomaly judgment conditions, anomaly warning information is generated.

[0006] In some embodiments, before the step of calculating the liquid usage freezing data across multiple time dimensions based on the real-time weight data of the liquid container during a preset sampling period, the method further includes: Multiple weight sampling points are determined before and after the zero-point time each minute; The real-time weight data of the liquid container is obtained based on the weight sampling points; The calculation of liquid usage freezing data across multiple time dimensions based on real-time weight data of the liquid container during a preset sampling period includes the following steps: The real-time weight data is subjected to extreme value removal and averaging to obtain the baseline weight data per minute; Subtract the baseline weight data from adjacent minutes to obtain the minute usage data; Based on the minute-by-minute usage data, frozen liquid usage data are generated in the time dimension, including minute, hour, day, month, and year dimensions.

[0007] In some implementations, the step of detecting feeding events in the liquid container based on the real-time weight data and segmenting the frozen liquid usage data according to the obtained feeding detection results includes the following steps: When the weight change of the liquid container meets the preset triggering conditions, it is determined that the feeding event is triggered, and the start time and start weight data are recorded. The triggering conditions are: the weight change in a single second is greater than the preset single-second rise threshold, the cumulative weight change is greater than the preset cumulative rise threshold, and the cumulative weight change rise duration is greater than the preset continuous rise duration. If the weight change per second during the feeding process is less than the preset single-second drop threshold, or the cumulative weight change drop duration is greater than the preset continuous drop duration, then the feeding event is determined to end, and the end time and end weight data are recorded. Based on the start time, the start weight data, the end time, and the end weight data, the liquid material usage freezing data for adjacent minutes are segmented and corrected.

[0008] In some embodiments, the step of segmenting and correcting the liquid material usage freezing data for adjacent minutes based on the start time, the start weight data, the end time, and the end weight data includes the following steps: Based on the start time and the end time, determine whether the start and end times of the feeding event belong to the same minute span; If it is determined that the start and end times of the feeding event belong to the same minute span, then the frozen data of liquid material usage is corrected to the sum of the difference between the previous minute's baseline weight data and the starting weight data, and the difference between the ending weight data and the current minute's baseline weight data; If it is determined that the start and end times of the feeding event do not belong to the same minute span, then the frozen data of the liquid material usage in the previous minute is corrected to the difference between the baseline weight data of the previous minute and the starting weight data, and the frozen data of the liquid material usage in the next minute is corrected to the difference between the ending weight data and the baseline weight data of the next minute.

[0009] In some implementations, constructing a multi-dimensional feature vector by combining various external environmental data includes the following steps: Collect at least a variety of external environmental data, including time period classification, holiday markers, weather type, and temperature range; The time period classification, the holiday marker, the weather type, and the temperature range are numerically encoded to generate environmental features; Statistical features are extracted from the liquid material usage freezing data, including the average liquid material usage in the same time unit within a preset time period in the past; The environmental features are concatenated or fused with the statistical features to construct a multi-dimensional feature vector.

[0010] In some implementations, the step of performing dosage analysis based on the segmented corrected liquid dosage freezing data and the multi-dimensional feature vector to generate dosage detection results includes the following steps: In response to user analysis needs, multiple target prediction algorithms are invoked to process the segmented and corrected frozen liquid usage data and the multi-dimensional feature vector, obtaining the initial usage detection results of each target prediction algorithm. The prediction algorithms include an association rule mining algorithm, a time series decomposition algorithm, a statistical deviation calculation algorithm, and a machine learning regression prediction algorithm. The association rule mining algorithm includes mining association rules between different combinations of external environmental data and high usage events from the frozen liquid usage data and the multi-dimensional feature vector. The time series decomposition algorithm includes separating trend terms, seasonal terms, and residual terms from the frozen liquid usage data, and determining periodic fluctuation residuals based on the trend terms, seasonal terms, and residual terms. The statistical deviation calculation algorithm includes calculating the Z-score anomaly index of the current liquid usage relative to historical liquid usage under the same conditions. The machine learning regression prediction algorithm includes predicting the liquid usage for future periods based on the multi-dimensional feature vector. The comprehensive score is obtained by weighting and summing the initial usage detection results of each target prediction algorithm and the corresponding weight parameters. The risk level is determined based on the comprehensive score, and the dosage test results are generated.

[0011] In some implementations, generating an anomaly warning information based on the dosage detection results and preset anomaly determination conditions includes the following steps: Calculate the deviation index of the real-time weight data relative to the dosage detection result, where the deviation index is a standardized deviation value; The preset abnormality determination conditions include a preset usage determination index. It is determined whether the deviation index exceeds the preset usage determination index. If so, a usage warning message is generated.

[0012] In some implementations, the abnormal warning information includes at least one of the following: Based on the cumulative usage being lower than the minimum usage threshold for several consecutive days, a warning message indicating that no material has been used for several days is generated. Based on the fact that the cumulative usage over several consecutive days is lower than the material replacement threshold and no material addition event is detected, a warning message for multiple days without material replacement is generated. A frequent material change warning is generated based on the number of times materials are added in a single day exceeding the frequent material change threshold. If the deviation of the real-time weight data at adjacent sampling times exceeds the deviation threshold of the weighing module, an abnormal warning message for the weighing module is generated. A leak warning message is generated based on the detection of a power-on event after a power outage and the fact that the weight reduction during the power outage is greater than the leak threshold. A low usage warning message is generated if the total usage of a single discharge is lower than the minimum usage threshold.

[0013] Another embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the liquid cartridge usage monitoring and early warning method as described in any of the above embodiments.

[0014] Another embodiment of the present invention provides a storage medium storing a computer program that can be executed to implement the steps of the liquid cartridge usage monitoring and early warning method as described in any of the above embodiments.

[0015] The liquid cartridge usage monitoring and early warning method, computer equipment, and storage medium provided in this invention calculate multi-time-dimensional frozen liquid usage data based on real-time weight data of the liquid cartridge during a preset sampling period, achieving refined monitoring of the liquid cartridge weight. Through feeding event detection and segmented correction, interference from the feeding process on usage calculation is effectively eliminated, significantly improving the accuracy of the frozen liquid usage data. By combining various external environmental data to construct multi-dimensional feature vectors and performing usage analysis, accurate prediction and anomaly identification of liquid usage trends are achieved. Finally, based on the usage detection results and preset anomaly judgment conditions, anomaly early warning information is generated, thereby achieving accurate identification and proactive early warning of usage anomalies, providing precise data support for liquid replenishment and equipment maintenance. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method for monitoring and early warning of liquid cartridge usage provided in the embodiments of the present invention; Figure 2 This is a schematic diagram of the curves of the original sequence, trend term, seasonal term, and residual term based on the time series decomposition algorithm provided in the embodiments of the present invention. Figure 3 This is a structural block diagram of the liquid container usage monitoring and early warning device provided in the embodiments of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the invention, and should not be construed as limiting the invention. Furthermore, it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0018] In the description of this invention, it should be understood that the terms "length", "width", "upper", "lower", "left", "right", "horizontal", "top", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0019] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0020] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection, an electrical connection, or a connection that allows for communication; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0021] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0022] The following disclosure provides numerous different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this invention, but those skilled in the art will recognize the application of other processes and / or the use of other materials.

[0023] This invention provides a method for monitoring and early warning of liquid cartridge usage, with reference to... Figure 1 This includes the following steps: S100. Based on the real-time weight data of the liquid container under the preset sampling period, calculate the liquid usage freezing data in multiple time dimensions. S200: Detect feeding events in the liquid container based on real-time weight data, and perform segmented correction of the frozen liquid usage data according to the obtained feeding detection results; S300: Construct multi-dimensional feature vectors by combining various external environmental data; S400: Based on the segmented corrected liquid usage frozen data and multi-dimensional feature vectors, usage analysis is performed to generate usage detection results; S500: Generate abnormal warning information based on the dosage detection results and preset abnormal judgment conditions.

[0024] The liquid container can be used in cooking machines to supply liquid ingredients. In practical applications, a high-precision weight sensor, such as an electromagnetic weight sensor or a strain gauge weight sensor, is installed at the bottom of the liquid container. This sensor continuously collects real-time weight data of the liquid container at a preset sampling period of seconds, denoted as W(t), where t is a timestamp in seconds. The real-time weight data reflects the total weight of the liquid container and its contents, with an accuracy down to the gram level. The real-time weight data output by the weight sensor can be transmitted to the main control chip via a communication interface and cached in memory for subsequent calculations. The serial interface can be, for example, I2C, SPI, or RS485, and the main control chip can be, for example, an STM32 series microcontroller. Alternatively, the real-time weight data output by the weight sensor can also be transmitted to a backend server via a WiFi module or to a mobile terminal on-site via a Bluetooth module for subsequent calculations.

[0025] Based on real-time weight data, frozen liquid usage data across multiple time dimensions is calculated. These time dimensions include, but are not limited to, minutes, hours, days, months, and years. Specifically, after acquiring real-time weight data, the system processes the data at the boundary moments of each time dimension to obtain the baseline weight data for that time dimension. The liquid usage data for that time dimension is then calculated using the difference between the baseline weight data of adjacent time dimensions. The calculated liquid usage data for each time dimension forms frozen liquid usage data; that is, once a time dimension ends, its frozen liquid usage data is stored. The frozen liquid usage data is accumulated hierarchically over time; for example, minute-level usage is accumulated to form hourly usage, hourly usage to form daily usage, and so on. This process ultimately constructs a database covering frozen liquid usage data across multiple time dimensions, stored in non-volatile storage media, providing a reliable data foundation for subsequent usage analysis and historical backtracking.

[0026] Addition events are detected in the liquid container based on real-time weight data, and the frozen liquid usage data is segmented and corrected according to the obtained addition detection results. A addition event refers to the act of adding liquid to the container manually or automatically, causing the acquired real-time weight data to rise continuously within a short period. Since the weight increase during the addition process should not be included in the liquid usage, it is essential to accurately identify addition events and exclude the weight change during the addition process from the usage calculation. The occurrence of an addition event is determined by analyzing the trend of real-time weight data. If so, the addition detection results are obtained, such as start and end times and start and end weights. Based on the addition detection results, the frozen liquid usage data for the corresponding time dimension affected by the addition event is segmented and corrected to ensure that usage calculations are based only on the actual liquid usage, thereby ensuring the accuracy of the usage calculation.

[0027] A multi-dimensional feature vector is constructed by combining various external environmental data. Liquid feed volume is not only time-related but also influenced by numerous external factors. Various external environmental data related to liquid feed volume are collected, including but not limited to time period classification, holiday markers, weather types, and temperature ranges. This external environmental data can be collected through system clocks, calendar services, weather API interfaces, etc. After collecting the external environmental data, a multi-dimensional feature vector is constructed to characterize "what liquid feed volume is under what environmental data conditions," providing rich input information for subsequent volume analysis.

[0028] After constructing a multi-dimensional feature vector, at least one usage analysis algorithm is used to analyze the frozen liquid usage data and the multi-dimensional feature vector. This process extracts patterns, identifies anomalies, and predicts trends from historical frozen liquid usage data, ultimately generating a usage detection result that comprehensively assesses current or future usage. For example, the usage detection result could be in the form of "Is the current usage too high / too low?", "What is the predicted usage value for a certain period in the future?", or "What is the risk level of high usage under the current combination of conditions?"

[0029] Based on the usage detection results and preset anomaly judgment conditions, anomaly warning information is generated. At least one anomaly judgment condition is preset to measure whether the usage detection results deviate from the normal range. Anomaly judgment conditions may include judgment rules based on statistical thresholds, judgment rules based on prediction intervals, or judgment rules based on model confidence. The usage detection results are compared with the anomaly judgment conditions. When an anomaly is determined, a corresponding anomaly warning information is generated; when no anomaly is determined, no anomaly warning information is generated. Anomaly warning information includes, but is not limited to, usage warnings, material management warnings, weighing module health warnings, leakage detection warnings, and material discharge process anomaly warnings. Anomaly warning information can be generated on the local terminal, uploaded to the backend server in real time via the communication module, or generated by the backend server and synchronized to the local terminal to guide operators to take timely measures.

[0030] In this invention, by acquiring real-time weight data of the liquid container within a preset sampling period and calculating multi-time-dimensional frozen liquid usage data, refined monitoring of the liquid container weight is achieved. Through feeding event detection and segmented correction, interference from the feeding process on usage calculation is effectively eliminated, significantly improving the accuracy of frozen liquid usage data. By combining various external environmental data to construct multi-dimensional feature vectors and performing usage analysis, accurate prediction and anomaly identification of liquid usage trends are achieved. Finally, based on the usage detection results and preset anomaly judgment conditions, anomaly warning information is generated, thereby achieving accurate identification and proactive warning of usage anomalies, providing precise data support for liquid replenishment and equipment maintenance.

[0031] In some specific embodiments of this application, before the step of calculating the liquid usage freezing data for multiple time dimensions based on the real-time weight data of the liquid container during a preset sampling period, a step of obtaining the real-time weight data of the liquid container during the preset sampling period is also included, specifically including: Multiple weight sampling points are determined before and after the zero-point time each minute; Real-time weight data of the liquid container is obtained based on weight sampling points; Accordingly, based on the real-time weight data of the liquid container during a preset sampling period, the liquid usage freezing data for multiple time dimensions are calculated, including the following steps: The real-time weight data is processed by removing extreme values ​​and averaging to obtain the baseline weight data per minute. Subtract the baseline weight data from adjacent minutes to obtain the usage data per minute; Based on minute-by-minute usage data, frozen liquid usage data is generated in minute, hour, day, month, and year dimensions.

[0032] The method for obtaining real-time weight data of the liquid container involves determining multiple weight sampling points before and after each zero-point interval per minute. The zero-point interval refers to the 0th second of each minute, such as 10:00:00, 10:01:00, and 10:02:00. To prevent single-point sampling from being affected by vibration or momentary interference, data is collected for several seconds before and after each zero-point interval, for example, from -3 seconds to +3 seconds, resulting in a total of 7 weight sampling points. Based on these multiple weight sampling points, a high-precision weight sensor acquires the real-time weight data of the liquid container. This data is temporarily stored in memory for subsequent calculations and processing of liquid usage freezing data.

[0033] The method for calculating the liquid usage freezing data is as follows: First, the collected real-time weight data is processed by removing extreme values ​​and averaging. Specifically, in the real-time weight data corresponding to a set of weight sampling points, one maximum and one minimum value are removed. The average value of the remaining real-time weight data is calculated to obtain the baseline weight data for each minute crossing zero, denoted as Wavg(t_min). For example, the above 7 weight sampling points correspond to 7 real-time weight data. One maximum and one minimum value are removed, and the average value of the remaining 5 real-time weight data is calculated to obtain the baseline weight data. If there are two or more identical maximum values, one of the maximum values ​​is removed, and the rest are retained; if there are two or more identical minimum values, one of the minimum values ​​is removed, and the rest are retained. This processing method can effectively suppress the interference of second-level spike noise on the baseline weight data. Even if the system experiences brief vibrations at the zero-point, it will not affect the accuracy of the baseline weight data. Second, the baseline weight data of adjacent minutes are subtracted to obtain the minute usage data. The formula is: Usage_min = Wavg(t_prev) - Wavg(t_curr). Where t_prev represents the time when the previous minute crossed midnight, and t_curr represents the time when the current minute crossed midnight. Since the weight of the liquid gradually decreases during normal use, this difference is usually positive. Finally, based on the minute-by-minute usage data, frozen liquid usage data is generated in the time dimensions of minutes, hours, days, months, and years. Specifically: frozen liquid material usage data at the minute level refers to usage data statistically analyzed on a minute-by-minute basis; frozen liquid material usage data at the hour level refers to usage data statistically analyzed on an hourly basis, equal to the sum of frozen liquid material usage data for all minutes within a single hour; frozen liquid material usage data at the daily level refers to usage data statistically analyzed on a daily basis, equal to the sum of frozen liquid material usage data for all hours within a single day; frozen liquid material usage data at the monthly level refers to usage data statistically analyzed on a monthly basis, equal to the sum of frozen liquid material usage data for all days within a single month; frozen liquid material usage data at the yearly level refers to usage data statistically analyzed on a yearly basis, equal to the sum of frozen liquid material usage data for all months within a year. These multi-dimensional frozen liquid material usage data are stored in different memory storage areas and are indexed with timestamps for easy subsequent on-demand querying and analysis.

[0034] In some specific embodiments of this application, the liquid container is fed with a material based on real-time weight data, and the frozen liquid usage data is corrected in segments according to the obtained feeding detection results, including the following steps: When the weight change of the liquid container meets the preset trigger conditions, the feeding event is determined to be triggered, and the start time and start weight data are recorded. The trigger conditions are: the weight change in a single second is greater than the preset single-second rise threshold, the cumulative weight change is greater than the preset cumulative rise threshold, and the cumulative weight change rise duration is greater than the preset continuous rise duration. If the weight change per second during the feeding process is less than the preset single-second drop threshold, or the cumulative weight change drop duration is greater than the preset continuous drop duration, then the feeding event is determined to end, and the end time and end weight data are recorded. Based on the start time, start weight data, end time, and end weight data, the liquid material usage freezing data for adjacent minutes are segmented and corrected.

[0035] The system allows setting preset thresholds for single-second weight increase, cumulative weight increase, continuous weight increase duration, single-second weight decrease, and continuous weight decrease. The preset single-second weight increase threshold (Trise, e.g., 1g) determines whether the weight change in a single second represents an upward trend. The preset cumulative weight increase threshold (Ttotal, e.g., 5g) determines whether the cumulative weight increase has reached the feeding scale. The preset continuous weight increase duration (N_confirm, e.g., 3 seconds) determines whether the upward trend has lasted long enough to eliminate momentary fluctuations. The preset single-second weight decrease threshold (Tdrop, e.g., 2g) determines whether a downward fluctuation occurs that could interrupt the feeding process. The preset continuous weight decrease duration (2 seconds) determines whether the feeding process has ended. By setting the preset single-second weight increase threshold, cumulative weight increase threshold, and continuous weight increase duration, the system can determine if a feeding event has been triggered. By setting the preset single-second weight decrease threshold and continuous weight decrease duration, the system can determine if the feeding process has ended.

[0036] When the weight change per second in the liquid container exceeds a preset single-second rise threshold, the cumulative weight change exceeds a preset cumulative rise threshold, and the cumulative rise duration exceeds a preset continuous rise duration, the weight change in the liquid container meets the preset trigger conditions, triggering a feeding event and recording the feeding start time and initial weight data. If, during the feeding process, the weight change per second is less than a preset single-second fall threshold, or the cumulative fall duration exceeds a preset continuous fall duration, the feeding time in the liquid container is considered complete, and the feeding event ends, recording the end time and end weight data. Based on the recorded start time, initial weight data, end time, and end weight data, the frozen liquid usage data for adjacent minutes is segmented and corrected to eliminate weight changes during the feeding process. Specifically, the system determines the time dimension boundary it spans based on the start and end times of the feeding event, and splits the frozen data of liquid material consumption for the affected minutes into a consumption segment before feeding and a consumption segment after feeding. Only the actual consumption portion is included in the frozen data of liquid material consumption for the corresponding minutes, thereby avoiding the feeding weight being mistakenly counted as liquid material consumption.

[0037] In this embodiment, a state machine algorithm is used to detect feeding events based on the changing trend of real-time weight data. The state machine includes at least an idle state (IDLE), a candidate rising state (RISE_CANDIDATE), and a feeding state (ADDING). In the idle state, the system continuously calculates the weight change per second ΔWt = Wt - W(t-1). When ΔWt > Trie and the absolute value of ΔWt is greater than the jitter tolerance threshold δ (e.g., 1g), the system considers feeding to be possible, enters the candidate rising state, and records the candidate start time t_cand_start and the initial weight data W_cand_start. In the candidate rising state, the system continues to monitor the weight change every second thereafter. If the condition ΔWt > Trie is consistently met and no significant drop of ΔWt < -Tdrop occurs, the rising amount rise_sum is accumulated, and the continuous rising count cnt is incremented. When cnt ≥ N_confirm and rise_sum ≥ Ttotal, a feeding event is triggered, meaning the system confirms the start of feeding. t_cand_start and W_cand_start are officially recorded as the feeding start time t_add_start and the initial weight data W_add_start, and the state switches to the feeding in progress state. If a significant drop of ΔWt <- Tdrop occurs during the candidate weight increase, it is considered a jitter, and the system reverts to the idle state, clearing the candidate data. In the feeding in progress state, the system continues to monitor weight changes. If a significant drop of ΔWt <- Tdrop occurs, or if the continuous drop exceeds the set duration (e.g., more than 2 seconds), the feeding event is considered to have ended. The current time t is recorded as the feeding end time t_add_end, and the current weight Wt is recorded as the end weight data W_add_end, and the state reverts to the idle state. Otherwise, the system remains in the feeding in progress state and continues monitoring.

[0038] In some specific embodiments of this application, based on the start time, start weight data, end time, and end weight data, the liquid usage freezing data for adjacent minutes is segmented and corrected, including the following steps: Determine whether the start and end times of the feeding event belong to the same minute span based on the start and end times; If the start and end times of the feeding event are determined to belong to the same minute span, the frozen liquid dosage data will be corrected to the sum of the difference between the baseline weight data of the previous minute and the starting weight data, and the difference between the ending weight data and the baseline weight data of the current minute. If the start and end times of the feeding event are determined not to belong to the same minute span, the frozen data of liquid material usage in the previous minute is corrected to the difference between the baseline weight data and the starting weight data in the previous minute, and the frozen data of liquid material usage in the next minute is corrected to the difference between the ending weight data and the baseline weight data in the next minute.

[0039] The system first determines whether the start and end times of a feeding event belong to the same minute span based on the start time t_add_start and end time t_add_end. For example, if t_add_start = 10:00:02 and t_add_end = 10:00:08, then the start and end times of the feeding event belong to the same minute span; if t_add_start = 10:00:58 and t_add_end = 10:01:05, then the start and end times of the feeding event do not belong to the same minute span. Specifically, the system checks whether the minute indices of the start and end times are the same. If the minute indices are the same, they belong to the same minute span; if they are different, they do not belong to the same minute span.

[0040] Regarding segmented corrections for events falling within the same minute span: When a feeding event occurs entirely within one minute, for example, from 10:00:02 to 10:00:08, all within the minute of 10:00, the frozen liquid usage data for that affected minute is corrected to the sum of two parts: The first part is the difference between the baseline weight data Wavg(t_prev) and the starting weight data W_add_start of the previous minute, representing the actual consumption within that minute before feeding; the second part is the difference between the ending weight data W_add_end and the baseline weight data Wavg(t_curr) of the current minute, representing the actual consumption within that minute after feeding. The corrected minute usage formula is: Usage_min = (Wavg(t_prev) - W_add_start) + (W_add_end - Wavg(t_curr)). The weight increase from W_add_start to W_add_end during the feeding process is completely excluded and not included in any frozen liquid usage data.

[0041] Regarding segmented corrections for events not belonging to the same minute span: When a feeding event crosses a minute boundary, such as from 10:00:58 to 10:01:05, the frozen liquid consumption data for the two minutes before and after the event are corrected separately. For the first minute (i.e., the minute to which feeding begins), the frozen liquid consumption data for that minute is corrected to the difference between the baseline weight data Wavg(t_prev) and the starting weight data W_add_start for the first minute, which is the actual consumption before feeding begins in that minute. For the second minute (i.e., the minute to which feeding ends), the frozen liquid consumption data for that minute is corrected to the difference between the ending weight data W_add_end and the baseline weight data Wavg(t_next) for the second minute, which is the actual consumption after feeding ends in that minute. The weight increase across minutes from W_add_start to W_add_end during the feeding process was completely excluded, and the frozen liquid usage data for the two minutes before and after did not include the added weight, ensuring the independence and accuracy of the frozen liquid usage data for each minute.

[0042] In some specific embodiments of this application, a multi-dimensional feature vector is constructed by combining various external environmental data, including the following steps: Collect at least a variety of external environmental data, including time period classification, holiday markers, weather type, and temperature range; The time period classification, holiday markers, weather types, and temperature ranges are numerically encoded to generate environmental characteristics; Statistical features are extracted from the frozen liquid usage data, including the average liquid usage in the same time unit within a preset time period in the past. By splicing or fusing environmental features with statistical features, a multi-dimensional feature vector can be constructed.

[0043] Collect external environment data from multiple data sources, including at least the following four categories: Time Segmentation: Based on the current hour, the day is divided into morning, noon, and evening periods. For example, 6:00-10:00 is "morning," 10:00-14:00 is "noon," 14:00-22:00 is "evening," and 22:00-6:00 the next day is "night." This time segmentation reflects the impact of different meal times on liquid feed usage.

[0044] Holiday marker: By reading the system calendar or calling the public holiday API, determine whether the current date is a statutory holiday (such as Spring Festival, National Day) or a special promotional day. The holiday marker is usually set to 1 (holiday) or 0 (non-holiday), reflecting the significant impact of holidays on customer traffic and liquid material consumption.

[0045] Weather type: Real-time weather conditions for the current area are obtained via network APIs (such as Wind Weather and OpenWeatherMap) and mapped to discrete types such as sunny, rainy, snowy, and cloudy. Weather type affects users' dining choices and liquid consumption patterns.

[0046] Temperature range: Based on the average or real-time temperature of the day, the temperature is divided into low temperature (e.g., <10℃), normal temperature (10℃-25℃), and high temperature (>25℃). The temperature range is related to the user's appetite and the amount of liquid feed used.

[0047] Since the aforementioned external environmental data are mostly discrete categorical data and cannot be directly input into the numerical calculation model, numerical encoding is performed on the external environmental data. One-hot encoding or sequential encoding can be used. For example, time period classification can be encoded as: morning = 0, noon = 1, evening = 2; holiday markers: non-holiday = 0, holiday = 1; weather type: sunny = 0, rain = 1, snow = 2, cloudy = 3; temperature range: low temperature = 0, normal temperature = 1, high temperature = 2. The encoded values ​​constitute the environmental characteristics.

[0048] Statistical features are extracted from the calculated and stored frozen liquid usage data. Specifically, this includes the average frozen liquid usage data for the same time unit (e.g., the same hour, such as 18:00-19:00) within a preset historical time period (e.g., the past 7 days), denoted as Past7dAvg. This feature reflects the recent trend in liquid usage during the same time period. Additionally, the average frozen liquid usage data for the same day of the week (e.g., both Fridays) within a preset historical week period (e.g., the past 4 weeks) can be extracted, denoted as Past4wAvg. This statistical feature reflects the periodic pattern of liquid usage.

[0049] The encoded environmental features are then concatenated or weighted with the extracted statistical features to form a complete multi-dimensional feature vector. For example, concatenation can be done using vector concatenation, combining environmental and statistical features in a fixed order to form a high-dimensional feature vector. Fusion can be achieved using weighted summation, feature crossing, or embedding layer mapping to enhance the interactive expressive power between features.

[0050] For example, a multi-dimensional feature vector can be represented as: [Period_encoded, Holiday_flag, Weather_encoded, Temp_encoded, Past7dAvg, Past4wAvg]. This multi-dimensional feature vector contains both scene information under the current environmental conditions and statistical patterns of historical usage, comprehensively describing the usage status "under what environment and what historical trend," providing high-quality input for subsequent usage analysis algorithms.

[0051] In some specific embodiments of this application, dosage analysis is performed based on the segmented corrected liquid dosage freezing data and multi-dimensional feature vectors to generate dosage detection results, including the following steps: In response to user analysis needs, multiple target prediction algorithms are invoked to process the segmented and corrected frozen liquid usage data and multi-dimensional feature vectors, obtaining the initial usage detection results of each target prediction algorithm. These prediction algorithms include association rule mining, time series decomposition, statistical deviation calculation, and machine learning regression prediction algorithms. The association rule mining algorithm involves mining association rules between different combinations of external environmental data and high usage events from the frozen liquid usage data and multi-dimensional feature vectors. The time series decomposition algorithm involves separating trend, seasonal, and residual terms from the frozen liquid usage data, and determining the periodic fluctuation residuals based on these terms. The statistical deviation calculation algorithm calculates the Z-score anomaly index of the current liquid usage relative to historical liquid usage under the same conditions. The machine learning regression prediction algorithm predicts future liquid usage based on multi-dimensional feature vectors. The comprehensive score is obtained by weighting and summing the initial usage detection results of each target prediction algorithm and the corresponding weight parameters. The risk level is determined based on the comprehensive score, and the dosage test results are generated.

[0052] This method, based on user-inputted analysis requirements, simultaneously runs multiple target prediction algorithms: association rule mining, time series decomposition, statistical deviation calculation, and machine learning regression prediction. These algorithms mine and evaluate the segmented, corrected liquid material usage freezing data and multi-dimensional feature vectors from different dimensions. These target prediction algorithms, tailored to different business scenarios and data characteristics, complement each other and form the basis for comprehensive evaluation. It should be noted that in this embodiment, "multiple target prediction algorithms" can refer to all or some of the algorithms selected by the user based on actual application needs; no limitation is imposed.

[0053] The goal of association rule mining algorithms is to discover strong association rules between different combinations of external environmental data and high-usage events. This algorithm constructs transaction records in "hourly" units. Each transaction record includes a time period category (morning / noon / evening), a holiday marker (yes / no), a weather type (sunny / rainy / snowy / cloudy), a temperature range (low / normal / high temperature), and a Boolean flag field, High_Usage_Flag, to indicate whether the frozen liquid usage data for that hour is significantly high. In practice, the system extracts all hourly records from the frozen liquid usage data over a past period (e.g., the last 30 or 90 days) to form a transaction set D. Using the Apriori or FP-Growth algorithm, with minimum support thresholds (e.g., 0.05) and minimum confidence thresholds (e.g., 0.7), it mines all association rules that meet the conditions. For each mined rule X→Y (where X is a combination of conditions and Y is High_Usage_Flag=1), the support (reflecting the prevalence of condition combination X), confidence (reflecting the probability of a high-usage event occurring under condition combination X), and lift (reflecting the influence of condition combination X on the high-usage event; greater than 1 indicates positive correlation, equal to 1 indicates independence, and less than 1 indicates negative correlation) are calculated. These rules and their metrics are stored in a rule base for real-time matching of current environmental conditions.

[0054] This time series decomposition algorithm is used to separate the trend, seasonal, and residual terms from long-term frozen liquid consumption data. This algorithm primarily processes frozen liquid consumption data at the daily or hourly level. Taking daily frozen liquid consumption data as an example, the original sequence Y(D) represents the frozen liquid consumption data for day D. The STL algorithm (Seasonal and Trend decomposition using Loess) is employed for decomposition, a robust seasonal trend decomposition method based on locally weighted regression. After decomposition, the trend term T(D) is obtained, reflecting the long-term trend of liquid material usage freeze data. For example, the liquid material usage freeze data gradually increases due to increased passenger flow or equipment aging, which can be estimated using a 7-day moving average or LOESS smoothing. The seasonal term S(D) is obtained, reflecting fluctuations within a fixed period (usually 7 days). For example, a seasonal coefficient of +150g for Saturday indicates that the liquid material usage freeze data on Saturday is 150g higher than the trend value. The residual term R(D) = Y(D) - T(D) - S(D) is obtained, representing non-periodic fluctuations caused by sudden factors (such as temporary large-scale events, abnormal weather, and holiday effects). When the absolute value of the residual on a certain day is significantly greater than the standard deviation of the historical residuals, it indicates the existence of an anomaly. (Reference) Figure 2 , Figure 2A schematic diagram of the original sequence Y(D), trend term T(D), seasonal term S(D), and residual term R(D) of one embodiment is shown.

[0055] The statistical deviation calculation algorithm (Z-score method) is used to determine the degree of deviation of the current hour's liquid material usage freezing data from the historical normal level under the same conditions. The key to this algorithm is that, for a specific combination of environmental conditions C (e.g., "Friday 18:00, rainy day, low temperature"), it extracts all historical liquid material usage freezing data that meet these conditions, calculates their mean μ_C and standard deviation σ_C, and then compares the current hour's liquid material usage freezing data x with this distribution, calculating Z-score = (x - μ_C) / σ_C. In practice, the system maintains a condition-statistical mapping table, with the condition combination C as the key and the historical usage mean μ and standard deviation σ under these conditions as the values. This mapping table is updated periodically. For the current hour's liquid material usage freezing data x, the corresponding μ_C and σ_C are retrieved from the mapping table based on the current environmental characteristics; if the condition combination is not found in the mapping table (e.g., insufficient historical data), a coarser-grained condition or the global mean is used as an alternative. After calculating the Z-score, the normal range interval [μ_C-k·σ_C,μ_C+k·σ_C] is also output (k is usually 2.5 or 3). For example, if the historical mean under the same conditions is 241.29g and the standard deviation is 4.59g, and the current hourly liquid material usage freeze data is 280g, then the Z-score ≈ 8.43, indicating that the current hourly liquid material usage freeze data deviates significantly from the normal level.

[0056] This machine learning regression prediction algorithm is used to estimate liquid material usage over a future time period to enable early warning and inventory management decisions. This method uses multi-dimensional feature vectors as input and the actual usage over the target time period as labels to train the regression model. The multi-dimensional feature vectors include time period classification codes, holiday label codes, weather type codes, temperature range codes, average usage for the same hour over the past 7 days (Past7dAvg), and average usage for the same day of the week over the past 4 weeks (Past4wAvg). The label value is the actual usage for that hour. This algorithm uses linear regression, random forest regression, or XGBoost as the base model. The training process is as follows: Frozen data on hourly liquid material usage over a past period (e.g., 90 days) and their corresponding multi-dimensional feature vectors are collected to form a training set. After standardizing or normalizing the features, the model is trained, and hyperparameters are adjusted through cross-validation. After training, the model can output the predicted usage for any future time based on environmental and statistical characteristics. For example, to predict usage at 19:00 on March 7th of a certain year, the input features are evening peak, holiday, rainy day, low temperature, Past7dAvg=315.0, Past4wAvg=308.0, and the model outputs a predicted usage of 427.1g. This predicted usage is compared with a preset safety stock threshold (e.g., 300g). If the threshold is exceeded, a replenishment warning is triggered.

[0057] The four prediction algorithms mentioned above each output specific initial usage detection results: the association rule mining algorithm outputs high usage association rules, the time series decomposition algorithm outputs periodic fluctuation residuals, the statistical deviation calculation algorithm outputs the Z-score anomaly index, and the machine learning regression prediction algorithm outputs predicted usage for future periods.

[0058] In some specific implementations, when the initial usage detection results output by these four prediction algorithms are inconsistent (for example, the association rule indicates high risk but the Z-score is normal, or the time series residual is small but the machine learning prediction is too high), a weighted scoring method can be used for comprehensive evaluation. That is, weights are assigned to each target prediction algorithm, and a weighted calculation is performed based on the initial usage detection results of each target prediction algorithm and the weights corresponding to each initial usage detection result to obtain a comprehensive score, so as to avoid misjudgment or limitations of a single algorithm.

[0059] For example: First, the output of each target prediction algorithm is mapped to a unified "signal strength", with a value between 0 and 1, representing the degree to which the algorithm supports the conclusion that "the current conditions will lead to high usage". The mapping rules are as follows: For association rule mining algorithms, if a rule is hit and the confidence level is ≥0.8 and the lift is ≥1.5, the signal strength is 1.0 (strong signal); if the confidence level is between 0.6 and 0.8 or the lift is between 1.2 and 1.5, the signal strength is 0.5 (weak signal); otherwise, it is 0.0. For time series decomposition algorithms, if |R / σ_R| ≥2.0, the signal strength is 1.0; if 1.0 ≤ |R / σ_R| < 2.0, the signal strength is 0.5; otherwise, it is 0.0. For statistical deviation calculation algorithms, if |Z| ≥ 2.5, the signal strength is 1.0; if 1.5 ≤ |Z| < 2.5, the signal strength is 0.5; otherwise, it is 0.0. For machine learning regression prediction algorithms, if the predicted value Pred is more than 20% higher than the business threshold, the signal strength is 1.0; if it is 10% to 20% higher, the signal strength is 0.5; otherwise, it is 0.0.

[0060] Then, based on the historical accuracy and business importance of different target prediction algorithms in practical applications, weight parameters are assigned to each target prediction algorithm. Example weight parameters are as follows (which can be dynamically adjusted according to actual data): the weight for the association rule mining algorithm is 0.35, the weight for the time series decomposition algorithm is 0.20, the weight for the statistical deviation calculation algorithm is 0.25, and the weight for the machine learning regression prediction algorithm is 0.20.

[0061] Next, based on the initial usage detection results and weight parameters, a weighted sum is performed to calculate the comprehensive score Score = Σ(weight_i × signal strength_i). The risk level is determined based on the comprehensive score, and the usage detection results are generated. The risk level is determined according to the range in which the Score falls: Score ≥ 0.7 is high risk (significant high usage risk, requiring immediate response), 0.5 ≤ Score < 0.7 is medium risk (risk tendency exists, strengthen monitoring), and Score < 0.5 is low risk (normal fluctuation, maintain the regular plan). For example, if the association rule has a strong signal (1.0), the statistical deviation has a weak signal (0.5), the time series has no signal (0.0), and the machine learning has a weak signal (0.5), then Score = 0.35 × 1.0 + 0.25 × 0.5 + 0.20 × 0.0 + 0.20 × 0.5 = 0.575, which belongs to medium risk. The final usage detection results include risk level, comprehensive score, original output summary of each algorithm, and suggested actions (such as increasing the amount of inventory, whether to enable real-time monitoring, and whether manual review is required), providing a basis for decision-making for subsequent abnormal warnings.

[0062] It is understood that in some implementations, the four prediction algorithms described above can also be used individually. By calling any one of the target prediction algorithms, the risk level is determined based on the initial usage detection result output by that algorithm, and a usage detection result is generated. Alternatively, each target prediction algorithm can be called individually; if the initial usage detection results output by these algorithms are consistent, the risk level is determined based on one of the initial usage detection results, and a usage detection result is generated.

[0063] In some specific embodiments of this application, an anomaly warning message is generated based on the dosage detection results and preset anomaly judgment conditions, including the following steps: Calculate the deviation index of real-time weight data relative to the dosage detection results. The deviation index is the standardized deviation value. The preset abnormal judgment conditions include a preset usage judgment index. It determines whether the deviation index exceeds the preset usage judgment index. If so, a usage warning message is generated.

[0064] This embodiment calculates the deviation index of the real-time weight data relative to the usage detection results based on the comprehensive evaluation. The deviation index can be in the form of Z-score (directly obtained from the statistical deviation calculation algorithm, i.e., Z=(x-μ_C) / σ_C) or in the form of relative deviation (Δ=(x-Pred) / Pred, where Pred is the machine learning prediction value or the expected usage benchmark in the comprehensive evaluation). The preset anomaly judgment conditions are divided into multiple levels according to the degree of deviation, for example, mild anomaly: 1.5≤|Z|<2.5 or 10%≤|Δ|<20%; moderate anomaly: 2.5≤|Z|<3.5 or 20%≤|Δ|<30%; severe anomaly: |Z|≥3.5 or |Δ|≥30%. When the real-time data meets any level condition, the system generates corresponding usage warning information, including warning level, current usage value, expected usage range, deviation index, and recommended action (such as "It is recommended to increase the replenishment quantity by 30% today"). The abnormal warning information is pushed to the back-end management system via WiFi and displayed on the local screen or indicator light of the liquid container.

[0065] In some implementations, the abnormal warning information also includes other information, such as abnormal warning information for the discharge process. This abnormal warning information targets the health status of the pump / pipeline system and identifies periodic faults and single discharge anomalies by analyzing second-level weight difference data. Specifically, it includes the following processing logic: The system continuously monitors the second-level weight difference ΔW_t = W_t - W_{t-1} (ΔW_t is negative during discharge, indicating a decrease in weight), and defines a discharge judgment threshold ΔW_min (e.g., -0.5 g / s). When ΔW_t ≤ ΔW_min is satisfied for M1 consecutive seconds (e.g., 3 seconds), the first time that meets the condition is recorded as the discharge start time t_start; after t_start, when |ΔW_t| < |ΔW_min| is satisfied for M2 consecutive seconds (e.g., 2 seconds), the last time that meets the discharge condition is recorded as the discharge end time t_end. For a single dispensing event [t_start, t_end], the average speed is calculated using the formula: v_avg = (W_{t_start} - W_{t_end}) / (t_end - t_start), and the total consumption is calculated using the formula: Q = W_{t_start} - W_{t_end}. The system then associates this dispensing event with the corresponding dish category C based on the work order or program number of the cooking machine. Next, the standard deviation σ_v and coefficient of variation CV = σ_v / |v_avg| of the speed per second during the dispensing process are extracted. These two features reflect the stability of the dispensing process; excessively high values ​​indicate inconsistent speeds, which may be caused by impeller jamming, pipe blockage, or leakage. For dish C, the system maintains a historical database storing dispensing records from at least N previous normal production modes, including the total consumption Q_i and average speed v_i for each instance. Baseline statistics are calculated: the mean and standard deviation of the total consumption μ_Q, and the mean and standard deviation of the average speed μ_v. For the current discharge event, calculate the deviation Z_Q = |Q - μ_Q| / σ_Q, Z_v = |v_avg - μ_v| / σ_v. If Z_Q > 2.5 or Z_v > 2.5, then this discharge is marked as "suspicious". If the current mode is test mode (such as equipment trial or cleaning mode), it is not included in the anomaly count, but only archived in the log; in production mode, the system maintains a sliding window counter (window length, for example, 50 discharges) to record the number of suspicious discharges N_abnormal within the window. When N_abnormal ≥ a preset threshold (such as 5 times), an abnormal warning message for the discharge process is triggered. If both σ_v and CV are too high (or CV is too high) and N_abnormal ≥ the threshold, it is judged as "pump / pipeline periodic failure", and immediate maintenance is recommended. The abnormal warning message push content includes the anomaly type (such as speed deviation / total deviation / periodic fluctuation), related dishes, a list of suspicious discharge times, and recommended maintenance actions (such as checking the motor, cleaning the pipeline, calibrating the weighing, etc.).

[0066] In other embodiments, various additional abnormal warning messages are generated based on usage detection results from other dimensions to cover comprehensive health management of the liquid storage box system. For example, a warning message for multiple days without material is generated. This is implemented by the system recording the date index L_D of the last dispensing, and checking the difference between the current date index C_D and L_D every morning. If C_D - L_D ≥ D_idle_th (e.g., 3 days), an abnormal warning message is generated, prompting the operator to check if the equipment is out of service, malfunctioning, or empty. Another example is a warning message for multiple days without material replacement. This is implemented by the system recording the liquid storage box installation date or the last filling date I_D. If the difference between the current date C_D and I_D exceeds the replacement cycle threshold (e.g., 7 days), an abnormal warning message is generated, reminding the operator to check if the liquid has deteriorated or if the box is empty. For example, a frequent material change warning is implemented as follows: the system counts the number of refills (N_refill) within a single day (0:00 to 24:00). If N_refill ≥ N_refill_th (e.g., 4 times / day), an abnormal warning is generated, indicating that the average daily usage at that location may be close to or exceed the tank capacity, and it is recommended to replace it with a larger capacity liquid tank. Another example is a weighing module abnormal warning. The system maintains a sliding window (e.g., 60 seconds) and calculates the standard deviation (σ_ΔW) of the weight difference (ΔW_t) between seconds within the window. If σ_ΔW ≥ σ_th (e.g., 2g), it indicates abnormal fluctuations in the weight data, possibly caused by vibration, airflow interference, or sensor malfunction. An abnormal warning is generated, and it is recommended to recalibrate or replace the sensor. For example, a drip warning is implemented as follows: the liquid container module has battery power and power-off detection functions. When the system detects a "power-off-power-on" event, it compares the weight W_power_on at power-on with the last recorded weight W_power_off before power-off. If W_power_off - W_power_on ≥ Δ_leak_th (e.g., 5g) and W_power_on > 0, it indicates that an unexpected decrease in liquid occurred during the power-off period, which is judged as a drip. An abnormal warning message is generated, and it is suggested to check the pipe joints and valve sealing. Another example is a low-usage warning. For a single dispensing event, if its total usage Q is lower than the SOP standard minimum usage threshold Q_min (e.g., 200g), and normal small-usage dishes are excluded, an abnormal warning message is generated, indicating that there may be pump dry running, pipe blockage, or program call error.

[0067] The aforementioned abnormal warning messages are generated when their respective triggering conditions are met. The system categorizes abnormal warning messages according to priority: high priority includes drip warnings and weighing module abnormal warnings, which may affect equipment or food safety; medium priority includes material discharge process abnormal warnings and warnings of materials not being used for several days, which may affect operational efficiency; low priority includes frequent material change warnings and low usage warnings, which are used to indicate areas for optimization. Abnormal warning messages are pushed through one or more of the following methods: uploaded to the backend cloud management platform via WiFi, displayed on the maintenance dashboard, and supported for historical querying and statistics; pushed to the operator's mobile app via Bluetooth or cloud, supporting instant notification and handling confirmation; and locally displayed on the liquid container body via LED indicator lights (e.g., flashing red for high priority, flashing yellow for medium priority, flashing blue for low priority), a buzzer (short beep), or a small display screen (showing the warning code). When the cause of the warning is eliminated (e.g., replenishing liquid, completing maintenance), the abnormal warning message is automatically deactivated or manually deactivated by the operator.

[0068] This invention provides a device for monitoring and early warning of liquid cartridge usage, with reference to... Figure 3 ,include: The data calculation unit 100 is used to calculate the liquid usage freezing data in multiple time dimensions based on the real-time weight data of the liquid container under a preset sampling period. The segmented correction unit 200 is used to detect feeding events in the liquid container based on real-time weight data, and to perform segmented correction on the frozen liquid usage data according to the obtained feeding detection results. Feature building unit 300 is used to combine various external environmental data to construct multi-dimensional feature vectors; The result generation unit 400 is used to perform dosage analysis based on the segmented corrected liquid dosage freezing data and multi-dimensional feature vectors, and generate dosage detection results. The abnormal alarm unit 500 is used to generate abnormal early warning information based on the dosage detection results and preset abnormal judgment conditions.

[0069] In some specific embodiments of this application, a data acquisition unit 100 is also included, which is specifically used to include: The sampling point acquisition module is used to determine multiple weight sampling points before and after the zero point every minute; The real-time data acquisition module is used to acquire real-time weight data of the liquid container based on weight sampling points; The data calculation unit 200 includes: The baseline data acquisition module is used to perform extreme value removal and averaging on real-time weight data to obtain baseline weight data per minute. The minute data acquisition module is used to subtract the baseline weight data of adjacent minutes to obtain the minute usage data; The time data generation module is used to generate liquid material usage freeze data in the time dimension, including minute, hour, day, month, and year, based on minute usage data.

[0070] In some specific embodiments of this application, the segmentation correction unit 300 includes: The feeding event triggering module is used to determine that the feeding event is triggered when the weight change of the liquid container meets the preset triggering conditions, and to record the start time and the start weight data. The triggering conditions are: the weight change in a single second is greater than the preset single-second rise threshold, the cumulative weight change is greater than the preset cumulative rise threshold, and the cumulative weight change rise duration is greater than the preset continuous rise duration. The feeding event termination module is used to determine the end of the feeding event if the weight change per second during the feeding process is less than the preset single-second drop threshold, or the cumulative weight change drop duration is greater than the preset continuous drop duration, and to record the end time and end weight data. The segmented correction module is used to segment and correct the liquid material usage freezing data for adjacent minutes based on the start time, start weight data, end time, and end weight data.

[0071] In some specific embodiments of this application, the segment correction module includes: The span determination submodule is used to determine whether the start and end times of a feeding event belong to the same minute span based on the start and end times. The first calculation submodule is used to correct the frozen liquid dosage data to the sum of the difference between the baseline weight data of the previous minute and the starting weight data, and the difference between the ending weight data and the baseline weight data of the current minute, if the start and end times of the feeding event belong to the same minute span. The second calculation submodule is used to correct the frozen liquid usage data of the previous minute to the difference between the baseline weight data of the previous minute and the starting weight data if the start and end times of the feeding event do not belong to the same minute span, and to correct the frozen liquid usage data of the next minute to the difference between the ending weight data and the baseline weight data of the next minute.

[0072] In some specific embodiments of this application, the feature construction unit 400 includes: The data acquisition module is used to collect various external environmental data, including at least time period classification, holiday markers, weather types, and temperature ranges. The feature generation module is used to numerically encode time period classification, holiday markers, weather types, and temperature ranges to generate environmental features; The feature extraction module is used to extract statistical features from the liquid material usage freezing data. The statistical features include the average liquid material usage in the same time unit within a preset time period in the past. The feature construction module is used to concatenate or fuse environmental features with statistical features to construct multi-dimensional feature vectors.

[0073] In some specific embodiments of this application, the result generation unit 500 includes: The multi-algorithm processing module is used to respond to user analysis needs by calling various target prediction algorithms to process the segmented and corrected liquid material usage frozen data and multi-dimensional feature vectors, obtaining the initial usage detection results of each target prediction algorithm. The prediction algorithms include association rule mining algorithms, time series decomposition algorithms, statistical deviation calculation algorithms, and machine learning regression prediction algorithms. The association rule mining algorithm includes: mining association rules between different combinations of external environmental data and high usage events from the liquid material usage frozen data and multi-dimensional feature vectors; the time series decomposition algorithm includes: separating trend terms, seasonal terms, and residual terms from the liquid material usage frozen data, and determining the periodic fluctuation residuals based on the trend terms, seasonal terms, and residual terms; the statistical deviation calculation algorithm includes: calculating the Z-score anomaly index of the current liquid material usage relative to historical liquid material usage under the same conditions; and the machine learning regression prediction algorithm includes: predicting the liquid material usage for future periods based on multi-dimensional feature vectors. The comprehensive scoring module is used to perform a weighted summation based on the initial usage detection results of each target prediction algorithm and the corresponding weight parameters to obtain a comprehensive score; The test result generation module is used to determine the risk level based on the comprehensive score and generate the dosage test results.

[0074] In some specific embodiments of this application, the abnormal alarm unit 600 includes: The deviation index calculation module is used to calculate the deviation index of real-time weight data relative to the dosage detection result. The deviation index is the standardized deviation value. The anomaly alarm module is used to determine whether the deviation index exceeds the preset usage judgment index based on preset anomaly judgment conditions. If so, it generates a usage warning message.

[0075] In some specific embodiments of this application, the abnormal warning information includes at least one of the following: Based on the cumulative usage being lower than the minimum usage threshold for several consecutive days, a warning message indicating that no material has been used for several days is generated. Based on the fact that the cumulative usage over several consecutive days is lower than the material replacement threshold and no material addition event is detected, a warning message for multiple days without material replacement is generated. A frequent material change warning is generated based on the number of times materials are added in a single day exceeding the frequent material change threshold. If the deviation of the real-time weight data at adjacent sampling times exceeds the deviation threshold of the weighing module, an abnormal warning message for the weighing module is generated. A leak warning message is generated based on the detection of a power-on event after a power outage and the fact that the weight reduction during the power outage is greater than the leak threshold. A low usage warning message is generated if the total usage of a single discharge is lower than the minimum usage threshold.

[0076] The implementation method of the above-mentioned liquid container usage monitoring and early warning device can refer to the implementation method of the above-mentioned liquid container usage monitoring and early warning method, and will not be repeated here.

[0077] This invention provides a computer device, which includes a processor. The processor executes a computer program stored in a memory to implement the steps of the liquid cartridge usage monitoring and early warning method described above.

[0078] The present invention also provides a storage medium storing a computer program (instructions) thereon, which, when executed by a processor, implements the steps of the liquid cartridge usage monitoring and early warning method described above.

[0079] For example, a computer program can be divided into one or more modules, one or more of which are stored in memory and executed by a processor to perform the present invention. One or more modules can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a computer device. For example, the computer program can be divided into the steps of the liquid cartridge usage monitoring and early warning method provided in the above-described method embodiments.

[0080] Those skilled in the art will understand that the above description of the computer device is merely an example and does not constitute a limitation on the computer device. It may include more or fewer components than described above, or a combination of certain components, or different components, such as input / output devices, network access devices, buses, etc.

[0081] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.

[0082] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as interface display function, interface interaction function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as map interface, selection interface, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0083] If the modules / units integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, an electrical signal, and a software distribution medium, etc.

[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for monitoring and early warning of liquid cartridge usage, characterized in that, Includes the following steps: Based on the real-time weight data of the liquid container during the preset sampling period, the liquid usage freezing data in multiple time dimensions are calculated. Based on the real-time weight data, the liquid container is subjected to feeding event detection, and the liquid usage freezing data is corrected in segments according to the obtained feeding detection results; Construct multi-dimensional feature vectors by combining various external environmental data; Based on the segmented corrected liquid usage frozen data and the multi-dimensional feature vector, usage analysis is performed to generate usage detection results; Based on the dosage detection results and preset anomaly judgment conditions, anomaly warning information is generated.

2. The method for monitoring and early warning of liquid cartridge usage according to claim 1, characterized in that, Before the step of calculating the liquid usage freezing data across multiple time dimensions based on the real-time weight data of the liquid container during a preset sampling period, the method further includes: Multiple weight sampling points are determined before and after the zero-point time each minute; The real-time weight data of the liquid container is obtained based on the weight sampling points; The calculation of liquid usage freezing data across multiple time dimensions based on real-time weight data of the liquid container during a preset sampling period includes the following steps: The real-time weight data is subjected to extreme value removal and averaging to obtain the baseline weight data per minute; Subtract the baseline weight data from adjacent minutes to obtain the minute usage data; Based on the minute-by-minute usage data, frozen liquid usage data are generated in the time dimension, including minute, hour, day, month, and year dimensions.

3. The method for monitoring and early warning of liquid cartridge usage according to claim 1, characterized in that, The process of detecting material feeding events in the liquid container based on the real-time weight data, and segmenting and correcting the frozen liquid usage data according to the obtained feeding detection results, includes the following steps: When the weight change of the liquid container meets the preset triggering conditions, it is determined that the feeding event is triggered, and the start time and start weight data are recorded. The triggering conditions are: the weight change in a single second is greater than the preset single-second rise threshold, the cumulative weight change is greater than the preset cumulative rise threshold, and the cumulative weight change rise duration is greater than the preset continuous rise duration. If the weight change per second during the feeding process is less than the preset single-second drop threshold, or the cumulative weight change drop duration is greater than the preset continuous drop duration, then the feeding event is determined to end, and the end time and end weight data are recorded. Based on the start time, the start weight data, the end time, and the end weight data, the liquid material usage freezing data for adjacent minutes are segmented and corrected.

4. The method for monitoring and early warning of liquid cartridge usage according to claim 3, characterized in that, The step of segmenting and correcting the liquid material usage freezing data for adjacent minutes based on the start time, the start weight data, the end time, and the end weight data includes the following steps: Based on the start time and the end time, determine whether the start and end times of the feeding event belong to the same minute span; If it is determined that the start and end times of the feeding event belong to the same minute span, then the frozen data of liquid material usage is corrected to the sum of the difference between the previous minute's baseline weight data and the starting weight data, and the difference between the ending weight data and the current minute's baseline weight data; If it is determined that the start and end times of the feeding event do not belong to the same minute span, then the frozen data of the liquid material usage in the previous minute is corrected to the difference between the baseline weight data of the previous minute and the starting weight data, and the frozen data of the liquid material usage in the next minute is corrected to the difference between the ending weight data and the baseline weight data of the next minute.

5. The method for monitoring and early warning of liquid cartridge usage according to claim 1, characterized in that, The construction of a multi-dimensional feature vector by combining various external environmental data includes the following steps: Collect at least a variety of external environmental data, including time period classification, holiday markers, weather type, and temperature range; The time period classification, the holiday marker, the weather type, and the temperature range are numerically encoded to generate environmental features; Statistical features are extracted from the liquid material usage freezing data, including the average liquid material usage in the same time unit within a preset time period in the past; The environmental features are concatenated or fused with the statistical features to construct a multi-dimensional feature vector.

6. The method for monitoring and early warning of liquid cartridge usage according to claim 1, characterized in that, The step of performing usage analysis based on the segmented corrected liquid usage frozen data and the multi-dimensional feature vector to generate usage detection results includes the following steps: In response to user analysis needs, multiple target prediction algorithms are invoked to process the segmented and corrected frozen liquid usage data and the multi-dimensional feature vector, obtaining the initial usage detection results of each target prediction algorithm. The prediction algorithms include an association rule mining algorithm, a time series decomposition algorithm, a statistical deviation calculation algorithm, and a machine learning regression prediction algorithm. The association rule mining algorithm includes mining association rules between different combinations of external environmental data and high usage events from the frozen liquid usage data and the multi-dimensional feature vector. The time series decomposition algorithm includes separating trend terms, seasonal terms, and residual terms from the frozen liquid usage data, and determining periodic fluctuation residuals based on the trend terms, seasonal terms, and residual terms. The statistical deviation calculation algorithm includes calculating the Z-score anomaly index of the current liquid usage relative to historical liquid usage under the same conditions. The machine learning regression prediction algorithm includes predicting the liquid usage for future periods based on the multi-dimensional feature vector. The comprehensive score is obtained by weighting and summing the initial usage detection results of each target prediction algorithm and the corresponding weight parameters. The risk level is determined based on the comprehensive score, and the dosage test results are generated.

7. The method for monitoring and early warning of liquid cartridge usage according to claim 1, characterized in that, The step of generating an anomaly warning information based on the dosage detection results and preset anomaly judgment conditions includes the following steps: Calculate the deviation index of the real-time weight data relative to the dosage detection result, where the deviation index is a standardized deviation value; The preset abnormality determination conditions include a preset usage determination index. It is determined whether the deviation index exceeds the preset usage determination index. If so, a usage warning message is generated.

8. The method for monitoring and early warning of liquid cartridge usage according to claim 1, characterized in that, The abnormal warning information includes at least one of the following: Based on the cumulative usage being lower than the minimum usage threshold for several consecutive days, a warning message indicating that no material has been used for several days is generated. Based on the fact that the cumulative usage over several consecutive days is lower than the material replacement threshold and no material addition event is detected, a warning message for multiple days without material replacement is generated. A frequent material change warning is generated based on the number of times materials are added in a single day exceeding the frequent material change threshold. If the deviation of the real-time weight data at adjacent sampling times exceeds the deviation threshold of the weighing module, an abnormal warning message for the weighing module is generated. A leak warning message is generated based on the detection of a power-on event after a power outage and the fact that the weight reduction during the power outage is greater than the leak threshold. A low usage warning message is generated if the total usage of a single discharge is lower than the minimum usage threshold.

9. A computer device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for monitoring and warning the amount of liquid cartridge as described in any one of claims 1 to 8.

10. A storage medium, characterized in that, The storage medium stores a computer program that can be executed to implement the steps of the method for monitoring and early warning of liquid cartridge usage as described in any one of claims 1 to 8.