Self-service meal taking abnormality identification method and system based on time-series weight data
Patent Information
- Application Number
- CN202611120272.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]该现有的异常识别方法存在硬件依赖度高与环境适应性差的技术缺陷;首先,基于图像识别的方案需要额外增加摄像头硬件,大幅提高了系统的部署成本与维护复杂度;同时,在人流密集、光照变化复杂的食堂环境中,视觉算法极易受到人员遮挡或视角反光的影响,导致行为识别发生误判;其次,基于预设固定标准曲线的比对方案泛化能力极其有限;不同用户的取餐习惯,如夹取速度、停顿时间以及不同菜品的物理属性差异巨大,固定的标准曲线无法涵盖所有正常的取餐波动,极易产生高频误报;此外,现有方案高度依赖云端服务器进行图像处理或复杂规则比对,在网络波动或断网状态下会导致整个结算系统陷入瘫痪
1.本发明区别于传统单一静态重量结算模式,通过提取重量幅值、变化速率、变化加速度多维度时域差分特征,结合自适应双阈值精准截取取餐动作区间,规避环境干扰;同时融合深度学习模型概率推理与轨迹指纹人工先验规则的双判别机制,对压秤虚假重量、取餐中途断停漏结算两类高频异常工况实现高精度识别,解决了传统自助结算设备无法智能识别异常的问题,提升自助取餐结算的准确性与公平性,减少餐饮运营结算纠纷;
Smart Images

Figure CN122926207A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of time series analysis technology, specifically to a method and system for identifying anomalies in self-service meal pickup based on time series weight data. Background Technology
[0002] In modern smart canteens and self-service catering scenarios, self-service checkout systems based on weighing sensors are widely used. Users take food from a serving dish and place it on a bound tray. The system calculates the weight of the food taken by measuring the weight change of the serving dish and automatically deducts the payment accordingly. However, during this process, some users may engage in irregular or abnormal behaviors such as weighing the food or failing to pay. One existing method for identifying abnormal behaviors in self-service food collection is to deploy a camera above the weighing area and use computer vision algorithms to extract the user's human body coordinate frame and key point location information, combined with simple weight readings for comprehensive judgment. Alternatively, a fixed weight change standard curve for correct food collection can be pre-established in the system, including fixed stages such as picking up the spoon, taking food, and putting the spoon back. When the weight curve shape deviates from this standard model when the user takes food, the system determines it as abnormal and triggers an alarm.
[0003] Existing anomaly detection methods suffer from high hardware dependence and poor environmental adaptability. Firstly, image recognition-based solutions require additional camera hardware, significantly increasing deployment costs and maintenance complexity. Furthermore, in crowded canteen environments with complex lighting conditions, visual algorithms are highly susceptible to occlusion or glare, leading to misjudgments. Secondly, comparison schemes based on preset fixed standard curves have extremely limited generalization capabilities. Different users exhibit vastly different eating habits, such as picking speed, pause times, and the physical properties of different dishes; fixed standard curves cannot cover all normal eating fluctuations, easily resulting in high-frequency false alarms. Additionally, existing solutions heavily rely on cloud servers for image processing or complex rule comparisons; network fluctuations or outages can paralyze the entire payment system. Current technologies fail to fully exploit the action semantic features inherent in the high-frequency time-series signals of the weighing sensors themselves, making it difficult to achieve robust and low-latency anomaly behavior detection and hierarchical control on standalone devices independent of network and vision hardware. Summary of the Invention
[0004] To address the aforementioned technical issues, this technical solution provides a method and system for identifying anomalies in self-service meal pickup based on time-series weight data.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A self-service meal pickup anomaly identification method based on time-series weight data includes: In response to the authentication signal triggered by the identity recognition terminal, the weighing sensor is activated to continuously collect weight data at a fixed sampling frequency, generating a raw weight time-series data stream; The original weight time-series data stream is subjected to reference zero-point correction and high-frequency noise filtering to obtain a standard weight time-series sequence. Time-domain difference calculations are performed on the standard weight time series to extract the first-order difference sequence representing the rate of weight change and the second-order difference sequence representing the acceleration of weight change; During the extraction process, when the absolute value of the first-order difference sequence is greater than the starting threshold, it is marked as the starting point of a single meal taking action. When the absolute values of both the first-order difference sequence and the second-order difference sequence approach zero, it is marked as the stable ending point of a single meal taking action. By splicing together the standard weight time series, the first-order difference sequence, and the second-order difference sequence, a time-domain derived feature matrix is generated; The time-domain derived feature matrix is input into a lightweight temporal classification model deployed on an edge computing unit for forward inference, and the abnormal probability distribution vector of the meal picking event is output. The target anomaly category is determined based on the anomaly probability distribution vector, and the corresponding hierarchical response and settlement instructions are triggered on the local terminal based on the target anomaly category.
[0006] Furthermore, reference zero-point correction and high-frequency noise filtering are performed on the original weight time-series data stream, including: Extract multiple background weight samples within a time window during which the system is in a static state before the authentication signal is triggered; Calculate the arithmetic mean of multiple background weight samples and use it as the baseline zero point value; Subtract the reference zero point value from each data node in the original weight time series data stream to obtain the zero point correction sequence; A moving average filter is used to perform window sliding filtering denoising on the zero-point correction sequence, and a standard weight time series is output to filter out outlier high-frequency interference signals caused by sensor temperature drift and environmental mechanical vibration.
[0007] Furthermore, the lightweight temporal classification model includes depthwise separable convolutional layers and global average pooling layers; the temporal derived feature matrix is input into the lightweight temporal classification model deployed on edge computing units for forward inference, and the output is an anomaly probability distribution vector of the meal pickup event, including: The standard weight time series, the first-order difference sequence, and the second-order difference sequence are concatenated along the feature channel dimension to obtain the comprehensive input feature matrix; By using channel-wise convolutional kernels in depthwise separable convolutional layers, local features of the temporal dimension of the comprehensive input feature matrix are extracted to obtain intermediate channel features; By using pointwise convolutional kernels to perform cross-channel linear combination of the intermediate channel features, a high-level semantic feature matrix is output. The high-level semantic feature matrix is compressed into a one-dimensional representation vector by a global average pooling layer, and then input into a fully connected layer to output an anomaly probability distribution vector.
[0008] Furthermore, the target anomaly category is determined based on the anomaly probability distribution vector, and corresponding hierarchical response and settlement instructions are triggered on the local terminal based on the target anomaly category, including: When the abnormal probability distribution vector points to abnormal weighing behavior and the probability value is greater than the benchmark judgment threshold, it is determined that the extracted time-domain derived feature matrix has a high amplitude weight holding feature with a duration exceeding the upper limit threshold. A prompt command to remove the pressure item is triggered on the local display screen and the sound and light alarm is activated. When the abnormal probability distribution vector points to a missed settlement behavior and the probability value is greater than the benchmark judgment threshold, it is determined that the extracted first-order difference sequence is truncated before it approaches zero, and a prompt instruction to reposition the plate is triggered on the local display screen. When the abnormal probability distribution vector points to normal meal pickup and the probability value is greater than the benchmark judgment threshold, the steady-state difference of the standard weight time series is calculated, and a local deduction settlement instruction is generated based on the steady-state difference.
[0009] Furthermore, the lightweight temporal classification model is obtained and deployed to edge computing units through the following training and compression methods: Obtain historical weight time-series datasets for historical self-service meal pickup scenarios. The historical weight time-series datasets include behavioral labels labeled with normal meal pickup, abnormal weighing behavior, and missed payment behavior. Supervised iterative training is performed on the historical weight time series dataset using an initial deep neural network. The error is calculated using the cross-entropy loss function and the network parameters are updated through backpropagation until the model converges to obtain a floating-point benchmark model. Collect quantization verification datasets for edge computing units; The distribution of activation values in the floating-point benchmark model is statistically calculated using a quantized verification dataset to determine the cutoff boundary of activation values. Based on the truncation boundary, the 32-bit floating-point weights and activation values in the floating-point baseline model are mapped to eight-bit integer parameters to generate a lightweight time-series classification model, which is then burned into the read-only memory of the edge computing unit.
[0010] Furthermore, prior to responding to the authentication signal triggered by the identity verification terminal, it also includes: Detect the network connection status of the local terminal; When a network disconnection signal is detected, switch to local offline control mode; In local offline control mode, the local cache database is used to verify the identity of the plate read by the RFID module. The generated hierarchical response instructions, settlement instructions, and corresponding log data are appended to the local non-volatile memory. Listen for network recovery signals, and when the network is connected, start an asynchronous thread to upload the log data in the local non-volatile storage to the cloud management server for verification and archiving.
[0011] Furthermore, after the local display screen triggers a prompt to remove the pressure object and the audible and visual alarm is activated, it also includes: Reset and start the local countdown timer; Within the timing interval of the local countdown timer, continuously monitor the rate of change of the standard weight time series; Once the rate of change returns to the normal range and the stable weight value is valid, the audible and visual alarm will be deactivated, and the execution of local billing and settlement instructions will be automatically resumed. If the countdown timer expires and the rate of change is still within the abnormal range, the settlement process of the current weighing channel is frozen, and a manual intervention request message is pushed to the cloud management server.
[0012] Furthermore, the process of calculating the error using the cross-entropy loss function and updating the network parameters through backpropagation also includes an outlier augmentation step: Extract normal meal pickup sequence samples from the model training batch; A simulated weighing sequence was synthesized by performing a numerical translation and lifting operation on data from a specific time period in a normal meal collection sequence sample. The time axis of the normal meal collection sequence samples is truncated to create a simulated missed payment sequence; The simulated weighing sequence and the simulated underpayment sequence are mixed into the original training set to update the historical weight time series dataset.
[0013] Furthermore, before determining the target anomaly category based on the anomaly probability distribution vector, a trajectory fingerprint enhancement discrimination step is also included: Based on the marked start and stable end points of a single food retrieval action, standard weight time sequence segments are extracted within the corresponding time period. The sequence segments are normalized to scale their time length to a uniform dimension and the weight values are mapped to a range of 0 to 1. Calculate the trajectory morphological features of the normalized sequence segment. The trajectory morphological features include: The ratio of the duration of the action to the preset typical meal pickup time; The total variation energy of a sequence segment is defined as the sum of the absolute values of the first-order difference sequences; The time asymmetry coefficient between the weight descent phase and the ascent phase; The trajectory morphology features and the anomaly probability distribution vector are concatenated and then input into a lightweight decision fusion network. The decision fusion network outputs the corrected anomaly category confidence score, and the final target anomaly category is determined based on the corrected confidence score.
[0014] A tray and tableware circulation status tracking system based on radio frequency sensing includes: The raw weight time-series data stream acquisition module, in response to the authentication signal triggered by the identity recognition terminal, starts the weighing sensor to continuously acquire weight data at a fixed sampling frequency, generating the raw weight time-series data stream; The data preprocessing module performs reference zero-point correction and high-frequency noise filtering on the raw weight time-series data stream to obtain a standard weight time-series sequence. The time-domain difference feature extraction module performs time-domain difference calculations on the standard weight time series to extract the first-order difference sequence representing the rate of weight change and the second-order difference sequence representing the acceleration of weight change. The food retrieval action boundary marking module marks the start of a single food retrieval action when the absolute value of the first-order difference sequence is greater than the start threshold during the extraction process, and marks the stable end point of a single food retrieval action when the absolute values of both the first-order difference sequence and the second-order difference sequence approach zero. The time-domain derived feature matrix generation module concatenates a standard weighted time series sequence, a first-order difference sequence, and a second-order difference sequence to generate a time-domain derived feature matrix. The anomaly probability distribution inference module inputs the time-domain derived feature matrix into a lightweight temporal classification model deployed on edge computing units for forward inference and outputs the anomaly probability distribution vector of the meal pickup event. The tiered response and settlement triggering module determines the target anomaly category based on the anomaly probability distribution vector, and triggers the corresponding tiered response and settlement instructions on the local terminal based on the target anomaly category.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The core beneficial effects of this invention 1. This invention differs from the traditional single static weight settlement mode. By extracting multi-dimensional time-domain difference features of weight amplitude, rate of change, and acceleration of change, and combining them with adaptive dual thresholds to accurately capture the food-taking action range, it avoids environmental interference. At the same time, it integrates a dual discrimination mechanism of probabilistic inference from a deep learning model and manual prior rules of trajectory fingerprints to achieve high-precision identification of two high-frequency abnormal conditions: false weights from the scale and missed settlements due to interruption during food taking. This solves the problem that traditional self-service settlement equipment cannot intelligently identify abnormalities, improves the accuracy and fairness of self-service food taking settlement, and reduces settlement disputes in catering operations. 2. This invention significantly reduces the number of model parameters and inference latency while ensuring high recognition accuracy through dataset sample enhancement and model quantization compression technologies. It is suitable for local real-time inference on low-computing-power edge devices of self-service terminals, without relying on cloud computing power, and has fast response speed and strong real-time performance. At the same time, it establishes a dual working mechanism of online cloud collaboration and offline independent operation. In offline mode, it can fully realize the entire process of identity verification, anomaly recognition, automatic settlement and local data retention. After the network is restored, the data is automatically synchronized, which solves the defects of high network dependence and easy data loss of traditional devices. It is suitable for actual operation scenarios such as canteens with dense traffic, complex environment and frequent network fluctuations, and improves the stability of device operation and scenario adaptability. Attached Figure Description
[0016] Figure 1 This is a flowchart outlining the steps of the present invention. Figure 2 This is a system architecture diagram of the present invention. Detailed Implementation
[0017] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0018] Example 1: Refer to Figure 1 As shown, the self-service meal pickup anomaly identification method based on time-series weight data includes the following steps: Step 101: In response to the identity verification signal triggered by the identity recognition terminal, the weighing sensor is activated to continuously collect weight data at a fixed sampling frequency, generating a raw weight time-series data stream. Specifically, the identity recognition terminal configured in the self-service meal pickup terminal supports multiple verification methods such as card swiping, facial recognition, and RFID tray recognition. After the user completes identity verification and the identity recognition terminal outputs a valid identity verification signal, the terminal main control module immediately triggers the weighing sensor to start the high-frequency sampling working mode. The weighing sensor uses a high-precision resistive weighing sensor module with a preset fixed sampling frequency of 100Hz, that is, weight data is sampled once every 10 milliseconds, and the sampling range is adapted to the weight range of the self-service meal pickup tray and the meal. Raw weight values are continuously collected throughout the user's meal pickup process, and encapsulated and arranged according to the sampling timestamp order to generate a raw weight time-series data stream with time-series tags. The raw weight time-series data stream mentioned here refers to a continuous structured data sequence containing time and raw weight values, including data from the static state before meal pickup, dynamic changes during meal pickup, and stable data after meal pickup. Step 102: Perform baseline zero-point calibration and high-frequency noise filtering on the original weight time-series data stream to obtain a standard weight time-series sequence. Specifically, the original weight data stream is susceptible to sensor temperature drift, vibrations from a light breeze in the canteen environment, and slight electromagnetic interference from equipment, resulting in baseline shift and high-frequency random noise. This solution completes baseline calibration by pre-collecting static background data to eliminate zero-point shift errors, and then removes high-frequency discrete noise through a filtering algorithm, ultimately obtaining a standard weight time-series sequence with a stable baseline and clean noise, providing an accurate data foundation for subsequent feature extraction. Step 103: Perform time-domain difference calculation on the standard weight time series to extract the first-order difference sequence representing the rate of weight change and the second-order difference sequence representing the acceleration of weight change. Organize the complete standard weight time series data into a sampled data set arranged chronologically, count the total number of all sampling points, with each sampling point corresponding to a standard weight value at a given time, and all sampling time intervals uniformly fixed at 10 milliseconds. Firstly, the first-order difference sequence is used to represent the rate of weight change. The calculation method is to sequentially calculate the difference between the weight value of each sampling point and the weight value of the previous adjacent sampling point, traversing all data starting from the second sampling point, and finally obtaining the complete first-order difference sequence. The first-order difference data sequence has positive and negative values corresponding to increases and decreases in food weight, respectively, with the absolute value of the difference representing the rate of weight change per unit time. Secondly, the second-order difference sequence characterizes the acceleration of weight change. It is calculated by taking the first-order difference sequence as an example, sequentially calculating the difference between two adjacent first-order difference results, and then iterating through all data starting from the second first-order difference result to obtain a complete second-order difference data sequence. This sequence reflects the magnitude of the increase or decrease in the rate of weight change, corresponding to different states such as acceleration, deceleration, stillness, and sudden changes in the food-taking action. These two sets of difference sequences can accurately distinguish between different food-taking conditions, such as static stillness, uniform speed, sudden pressure, and sudden stoppage. Step 104: During the extraction process, when the absolute value of the first-order difference sequence is greater than the start threshold, it is marked as the starting point of a single food retrieval action. When the absolute values of both the first-order and second-order difference sequences approach zero, it is marked as the stable end point of a single food retrieval action. For example: the system presets a fixed basic threshold for starting food retrieval at 0.5 grams and a fixed basic threshold for static stability at 0.2 grams. Both thresholds can be automatically adjusted upwards based on the intensity of environmental interference. The core rule is that the stronger the environmental interference, the larger the threshold compensation value, and the adjustment amplitude is positively correlated with the average fluctuation of real-time environmental noise. The specific calculation rules are divided into three steps: First, noise mean statistics: collect and statistically analyze the average absolute value of all first-order difference data within the first five seconds when the equipment is stationary, using this to represent the basic noise level of the current scene. Second, calculate the threshold compensation amount: multiply the average noise value by 0.3 to obtain the corresponding compensation value. Third, update the adaptive threshold: based on the basic start threshold and the basic static threshold, respectively, add the corresponding compensation value to obtain the real-time effective start threshold and static threshold. Example values: (The last sentence appears to be a separate, unrelated statement and is left as is.) In a quiet environment, the average noise level at rest is 0.1 g, corresponding to a compensation of 0.03 g. The adaptive start threshold is updated to 0.53 g, and the static threshold is updated to 0.23 g. When there is heavy foot traffic in the canteen and strong vibration interference from ground equipment, the average noise level at rest is 0.8 g, corresponding to a compensation of 0.24 g. The adaptive start threshold is increased to 0.74 g, and the static threshold is increased to 0.44 g, effectively shielding against high-intensity environmental interference. Action determination calculation logic: When the absolute value of the first-order difference data at any sampling point exceeds the real-time adaptive start threshold... The system immediately marks this moment as the starting point of the food retrieval action. When the absolute values of the first-order and second-order difference data of three consecutive sampling points do not exceed the real-time adaptive static threshold, the weight of the plate is determined to be completely stable, and this moment is marked as the stable endpoint of a single food retrieval action. Through the dual threshold joint judgment method, a complete food retrieval time segment can be accurately extracted, avoiding the mis-extraction of action ranges caused by the superposition of multiple actions and invalid slight fluctuations. The term "approaching zero" here means that the difference value falls within the static error threshold range preset by the system, with no effective weight change characteristics. Step 105: Concatenate the standard weight time series, the first-order difference sequence, and the second-order difference sequence to generate a time-domain derived feature matrix. Using each time series sampling point as the matrix row dimension and the three feature types as the matrix column dimension, first unify the time series length of the three sets of sequences, prune and remove invalid difference data at the beginning and end, and ensure that the data dimensions of all sequences are aligned. Assuming the total number of sampling points is n, the final result is an n-row, 3-column time-domain derived feature matrix. Each row of the matrix corresponds to an independent time series sampling point, and the three columns of data correspond to the standard weight value, the first-order difference rate of change value, and the second-order difference acceleration value of the sampling point, respectively. Through this concatenation method, the original weight amplitude, dynamic rate of change, and dynamic acceleration of change are retained simultaneously at the same time series node, fully covering the static weight features and dynamic motion features of the meal picking process, enriching the input feature dimensions of the model inference, and improving the accuracy of anomaly identification. Step 106: Input the temporal-domain derived feature matrix into the lightweight temporal classification model deployed on the edge computing unit for forward inference, and output the abnormal probability distribution vector of the food pickup event. Specifically, this method relies entirely on the local edge computing unit of the terminal to complete the operation without relying on the cloud network. The concatenated temporal-domain derived feature matrix is used as the model input and sent to the pre-trained, quantized, compressed and burned into the deployed lightweight temporal classification model. The model performs multi-class inference on the current food pickup event through multi-layer feature extraction, fusion and mapping operations, and outputs a probability distribution vector containing three working conditions: normal food pickup, abnormal weighing and missed payment. The values of each dimension in the vector correspond to the confidence probability of the corresponding working condition. Step 107: Determine the target anomaly category based on the anomaly probability distribution vector, and trigger the corresponding hierarchical response and settlement instructions on the local terminal based on the target anomaly category; Specifically, compare the confidence values of each category in the probability distribution vector, and select the working condition corresponding to the highest probability as the final target anomaly / normal category; For three different scenarios, namely normal meal picking, weighing anomaly, and missed settlement anomaly, match the preset hierarchical response mechanism, and execute differentiated instructions such as automatic deduction settlement, anomaly alarm prompt, and operation error correction prompt respectively, so as to realize intelligent identification and closed-loop handling of meal picking anomalies.
[0019] In one implementation, the sampling frequency of the weighing sensor can be adaptively adjusted according to the food collection flow rate in the canteen. During peak periods, the sampling frequency is increased to ensure the integrity of dynamic features, while during off-peak periods, the sampling frequency is reduced to save edge computing power. For example, a preset basic sampling frequency of 100Hz is used, with the number of effective food collections per minute as the basis for flow rate determination, and 30 times per minute is set as the critical threshold for food collection flow rate. When the real-time number of food collections per minute exceeds the critical threshold, it is determined to be a peak period, and the sampling frequency is increased by 0.5 times the difference between the real-time number of food collections and the threshold. When the real-time number of food collections per minute is lower than the critical threshold, it is determined to be an off-peak period, and the sampling frequency is decreased by 0.3 times the difference between the threshold and the real-time number of food collections, with the minimum sampling frequency not lower than 50Hz. For example, during peak periods, with 40 food collections per minute, the frequency is increased by 5Hz, and the real-time sampling frequency is updated to 105Hz; during off-peak periods, with 10 food collections per minute, the frequency is decreased by 6Hz, and the real-time sampling frequency is updated to 94Hz.
[0020] The above technical solution solves the problems of traditional self-service meal collection and settlement methods failing to identify weighing errors and missed settlements by preprocessing time-series weight data, extracting multi-dimensional time-domain differential features, accurately capturing action intervals, and designing a lightweight edge inference and hierarchical response process. It also achieves local real-time inference by relying on edge computing, eliminating the need for cloud interaction, resulting in fast response speed and strong anti-interference capabilities, thus improving the accuracy and stability of self-service meal collection and settlement.
[0021] In some embodiments, performing reference zero-point correction and high-frequency noise filtering operations on the raw weight time-series data stream includes: Step 201: Extract multiple background weight sample values within the time window before the authentication signal is triggered and the system is in a static state. Specifically, the system presets a pre-static time window, preferably 500 milliseconds before the authentication signal is triggered. Within this time window, the plate is completely still and inactive, with no human subjective action of taking food, and only environmental interference and sensor drift noise exist. All weight sample values within this window are continuously collected as background reference sample data to eliminate interference from human operation weight changes on zero-point calibration. Based on a 10-millisecond sampling interval, 50 sets of background sample data can be collected within a 500-millisecond window. Step 202: Calculate the arithmetic mean of multiple background weight samples and use it as the baseline zero-point value; sum all 50 sets of background sample data collected within the 500-millisecond pre-static window, and then divide the sum by the total number of samples, 50. The final arithmetic mean is the baseline zero-point value for this meal pick-up identification process; this mean can effectively offset the random noise of a single sample, accurately reflect the true empty zero-point baseline of the current environment and current sensor status, and recalibrate the zero point after each authentication trigger to adapt to sensor temperature drift and real-time changes in environmental conditions; Step 203: Subtract the reference zero-point value from each data node in the original weight time-series data stream to obtain the zero-point correction sequence; traverse the value of each sampling point in the original weight time-series data stream, subtract the pre-calculated reference zero-point value from each original weight value, complete the correction of all data one by one, and generate a complete zero-point corrected data sequence; this calculation method eliminates the temperature drift baseline error and equipment installation offset error caused by long-term operation of the sensor, so that the corrected data only retains the effective weight change caused by the increase or decrease of food, ensuring the absolute accuracy of the weight data; Step 204: Apply a moving average filter to the zero-point correction sequence using a window sliding filter for denoising, outputting a standard weight time series sequence to filter out outlier high-frequency interference signals caused by sensor temperature drift and environmental mechanical vibration. The system defaults to using a five-point moving average filter as the basic denoising rule. The core logic is to select five consecutive time series sampling points as a calculation window, sum and average all data within the window, and use this average as the final output value of the center sampling point of the window. The window slides backward one by one, calculating the filter value at each position in turn. After traversing all data, the overall denoising is completed, and a complete standard weight time series sequence is output. The filtering window supports adaptive adjustment according to the intensity of environmental interference. The preset critical threshold for environmental interference intensity is 0.5 grams, and the real-time noise fluctuation amplitude of the zero-point correction data is used as the criterion. The filtering mechanism is as follows: When the real-time noise amplitude exceeds the critical threshold, the filter window size is automatically increased. The window increment is twice the difference between the noise amplitude and the threshold, and the calculation result is rounded to the nearest integer. When the real-time noise amplitude does not exceed the critical threshold, the five-point basic filter window is maintained. For example: if the noise amplitude is 0.6 grams and exceeds the threshold by 0.1 grams, the window is increased by 2 sampling points, and the filter window is adaptively adjusted to seven points. If the noise amplitude is 1.0 grams and exceeds the threshold by 0.5 grams, the window is increased by 1 sampling point, and the filter window is adaptively adjusted to eleven points. The five-point basic window is maintained when there is no strong interference. This filtering method can effectively filter out high-frequency outliers caused by canteen staff movement, equipment vibration, and electromagnetic interference, while fully preserving effective low-frequency weight change characteristics such as food taking, food placement, and weighing. The final output is a standard weight time series with a stable baseline, clean noise, and complete characteristics.
[0022] In one implementation, the size of the moving average filter window can be adaptively adjusted according to the intensity of environmental interference. The window is increased when the interference is strong and decreased when the interference is weak, thus balancing the denoising effect and the real-time performance of the data.
[0023] The above technical solution, through the preprocessing method of pre-static window zero-point self-calibration combined with moving average filtering, solves the problem of data distortion caused by fixed zero-point calibration being unable to adapt to sensor temperature drift and environmental interference.
[0024] In some embodiments, the lightweight temporal classification model includes depthwise separable convolutional layers and global average pooling layers; the temporal derived feature matrix is input into the lightweight temporal classification model deployed on an edge computing unit for forward inference, and the output is an anomaly probability distribution vector of the meal pickup event, including: Step 301: Concatenate the standard weight time series, the first-order difference sequence, and the second-order difference sequence along the feature channel dimension to obtain a comprehensive input feature matrix. First, perform dimension alignment on the three different time series sequences, and unify the time series length of the three sequences by pruning and interpolation to ensure that the number of sampling points of the three sequences is completely consistent. According to the feature channel concatenation rules, merge the three one-dimensional time series sequences into a multi-row, three-column comprehensive input feature matrix to achieve deep fusion of three types of features: static weight amplitude, dynamic rate, and dynamic acceleration, thus enriching the model input representation dimensions. Step 302: Utilize the channel-wise convolutional kernels in the depthwise separable convolutional layer to extract local features of the temporal dimension from the comprehensive input feature matrix, obtaining the intermediate channel features. The channel-wise convolution adopts a single-channel independent operation mode, with no information exchange between feature channels. A three-row, one-column convolutional kernel is set to adapt to temporal local feature extraction. For the three feature channels of the comprehensive input feature matrix, temporal sliding convolution operations are performed separately. For each temporal position of each channel, the feature values of the current position and the two adjacent positions are taken, multiplied by the corresponding convolutional kernel weight parameters, and then summed to obtain the convolution output value at that position. After completing the convolution operations for all channels and all temporal positions, the independent temporal change features of each channel are retained to generate an intermediate channel feature matrix with unchanged dimensions, accurately capturing subtle weight changes, steady-state fluctuations, and action start-stop features during the food retrieval process. Step 303: Use pointwise convolution kernels to perform cross-channel linear combination of intermediate channel features to output a high-level semantic feature matrix; pointwise convolution uses a row-column convolution kernel to achieve cross-channel feature fusion and shallow feature dimensionality enhancement of the three feature channels; for each temporal position, the intermediate feature values corresponding to the three channels are multiplied by the fusion weights corresponding to each channel, summed, and then superimposed with a fixed bias parameter to finally obtain the high-level semantic feature values for that temporal position; through linear weighted combination, the coupled correlation features of the original weight, rate of change, and acceleration of change are mined, and the single-dimensional temporal features are fused into comprehensive semantic features to generate a highly recognizable high-level semantic feature matrix; Step 304: Compress the high-level semantic feature matrix into a one-dimensional representation vector using a global average pooling layer, and input it into the fully connected layer to output an anomaly probability distribution vector. The first step, global average pooling compression, involves summing all feature values at all positions in the two-dimensional high-level semantic feature matrix and dividing by the total number of elements in the matrix to compress the two-dimensional matrix into a fixed-length one-dimensional feature representation vector. The second step, fully connected layer dimension mapping, completes the feature dimension transformation through preset weight parameters, outputting the original scores for three work conditions. The third step, normalized probability calculation, involves performing exponential operations on the original scores for the three work conditions, dividing the result of the exponential operation of each score by the sum of the three scores' exponential operation results, ultimately obtaining the three confidence probabilities corresponding to normal food pickup, abnormal weighing, and abnormal missed payment, respectively. The sum of all probability values is 1, generating a three-dimensional probability distribution vector.
[0025] In one implementation, multiple depthwise separable convolutional layers can be stacked to adapt to the multi-scale temporal feature extraction requirements of complex meal picking scenarios, while maintaining the lightweight nature of the model and not affecting the real-time inference speed of edge devices.
[0026] The above technical solution uses depthwise separable convolution to build a lightweight temporal classification model. Compared with the traditional CNN temporal model, the number of parameters is reduced by more than 60%, the inference latency is greatly reduced, and it is adapted to the low computing power and low latency operation requirements of edge computing units. This improves the accuracy of anomaly classification in complex food picking scenarios and avoids misjudgment caused by single features.
[0027] In some embodiments, the target anomaly category is determined based on the anomaly probability distribution vector, and corresponding hierarchical response instructions and settlement instructions are triggered on the local terminal based on the target anomaly category, including: Step 401: When the abnormal probability distribution vector points to abnormal weighing behavior and the probability value is greater than the baseline judgment threshold, it is determined that the extracted time-domain derived feature matrix has a high-amplitude weight holding feature with a duration exceeding the upper limit threshold. A prompt to remove the pressurized item is triggered on the local display screen, and the audible and visual alarm is activated. For example, the system presets a basic abnormal judgment probability threshold of 0.85. The threshold can be adaptively fine-tuned according to the settlement accuracy requirements. The core logic is to raise the threshold to improve rigor in high-precision settlement scenarios, and to slightly lower the threshold to balance efficiency in high-throughput, fast settlement scenarios. The overall threshold fine-tuning fluctuation range is between -0.05 and +0.05. In high-precision settlement scenarios, the allowable error is no more than 1 gram, so the threshold is raised by 0.05, and the adaptive judgment threshold is updated to 0.90. In high-throughput canteen scenarios, the threshold is lowered by 0.05, and the adaptive judgment threshold is further updated. The new threshold is 0.80; the basic threshold for the duration of abnormal weighing is 2 seconds. This duration is the standard normal meal-taking benchmark duration defined by the system and supports adaptive adjustment. The stronger the environmental interference, the greater the increase in the duration threshold. The range of a single increase is between 0.2 seconds and 0.5 seconds to avoid misjudgment caused by instantaneous fluctuations. Specifically, when the probability value of weighing behavior output by the model exceeds the adaptive threshold, the current meal-taking condition is determined to be abnormal weighing. The core characteristics of abnormal weighing are that the plate has a long-term constant extra weight amplitude, the rate of weight change and acceleration are close to zero for a long time, and the duration of the abnormality exceeds the preset upper limit threshold. After the terminal recognizes the abnormality, the local display screen will pop up a text prompt "Please remove the pressure item from the plate" and at the same time activate the sound and light alarm to remind the user to resolve the abnormal weighing in time and avoid the problem of overcharging due to false weight. Step 402: When the abnormal probability distribution vector points to a missed payment behavior and the probability value is greater than the baseline judgment threshold, it is determined that the extracted first-order difference sequence is truncated before it approaches zero, and a prompt instruction to reposition the plate is triggered on the local display screen. Specifically, the missed payment anomaly judgment reuses the above-mentioned adaptive probability threshold. When the missed payment probability value is greater than the threshold and meets the core characteristics: at the end of the meal collection sequence node, the absolute value of the first-order difference is still greater than the static threshold, the weight has not entered a stable state, and the time series data is truncated in advance, it can be judged as a missed payment anomaly. The terminal immediately pops up a prompt instruction on the display screen: "Please reposition the plate stably to complete the meal collection and payment", guiding the user to operate in a standardized manner and solving the problem of missed payment caused by interruption during meal collection and the plate not being placed stably. Step 403: When the abnormal probability distribution vector points to normal meal pickup and the probability value is greater than the benchmark judgment threshold, calculate the steady-state difference of the standard weight time series, and generate a local deduction settlement instruction based on the steady-state difference. The first step is to accurately extract the standard weight time series data segment from the meal pickup start point to the steady-state end point. The second step is to extract the steady-state time series interval data before and after meal pickup, sum and calculate the average value of all weight samples within the two intervals to avoid calculation errors caused by small data fluctuations. The third step is to subtract the average weight of the steady-state before meal pickup from the average weight of the steady-state after meal pickup to obtain the actual meal pickup weight difference. The fourth step is to multiply the meal weight difference by the unit price per unit weight of the dishes to calculate the deduction amount for this meal pickup, generate a local automatic deduction settlement instruction based on the final amount, and complete the self-service settlement process.
[0028] In one implementation, the baseline judgment threshold can be customized and adjusted according to the canteen's settlement accuracy requirements. In high-precision settlement scenarios, the threshold can be appropriately increased to improve the rigor of anomaly identification; in high-throughput meal picking scenarios, the threshold can be finely adjusted to balance identification accuracy and settlement efficiency.
[0029] Through the above technical solution, a differentiated hierarchical response mechanism is designed for three working conditions: abnormal weighing, missed settlement, and normal meal picking. The working condition type is accurately determined by probability threshold, and the anomaly is verified by combining the core characteristics of time sequence features, avoiding false triggering caused by probability determination of a single model. A closed-loop hierarchical handling of anomaly warning, operation error correction, and automatic settlement is realized, reducing the settlement error and failure rate of self-service meal picking.
[0030] In some embodiments, the lightweight temporal classification model is acquired and deployed to edge computing units through the following training and compression methods: Step 501: Obtain historical weight time-series datasets for historical self-service food pickup scenarios. These datasets include behavioral labels indicating normal food pickup, abnormal weighing, and missed payment. Specifically, collect raw weight time-series data for self-service food pickup from multiple time periods, users, and food types, covering various real-world scenarios such as normal and standardized food pickup, heavy object weighing, tableware weighing, plate removal during pickup, and interrupted payment due to unstable plate placement. All collected time-series data are manually and precisely labeled, assigning three behavioral labels: normal food pickup, abnormal weighing, and missed payment. This constructs a comprehensive and highly adaptable historical weight time-series dataset, providing sufficient sample support for model training. Step 502: Supervised iterative training is performed on the historical weight time series dataset using the initial deep neural network. The error is calculated using the cross-entropy loss function and the network parameters are updated through backpropagation until the model converges to obtain a floating-point benchmark model. The model training error is statistically calculated using a multi-class cross-entropy loss calculation method. The core calculation logic is to perform logarithmic fitting calculation on the true labels and model prediction probabilities of all samples within a single training batch, and then average the error results of all samples to obtain the overall loss value of the current batch. During the training process, the gradient descent backpropagation algorithm is used to adjust and update the network weights and bias parameters layer by layer according to the loss value, continuously reducing the model prediction error. When the fluctuation range of the loss value of the model for ten consecutive iterations is less than 0.001 and the classification accuracy is stably higher than 98%, the model training is determined to be converged, and a high-precision original benchmark model of 32-bit floating-point type is obtained. Step 503: Collect the quantization verification dataset of the edge computing unit; specifically, collect real meal picking time-series data adapted to the actual operating conditions of the edge terminal, remove duplicate samples from the training set, and construct an independent quantization verification dataset; the dataset covers various abnormal and normal operating conditions and is used for accuracy verification in the subsequent model quantization process to ensure that the quantized model will not experience a significant drop in accuracy. Step 504: Statistically calculate the activation value distribution of the floating-point baseline model using the quantization verification dataset to determine the cutoff boundaries of the activation values. For example: Input the quantization verification dataset into the original floating-point model for layer-by-layer forward inference, statistically analyze the maximum and minimum values of all activation values in each layer of the network, and obtain the complete distribution range of the original activation values. To eliminate the influence of extreme discrete noise values on quantization accuracy, set a fixed cutoff compensation coefficient of 0.02 to correct the original extreme values: use the original maximum value multiplied by 0.98 as the effective maximum value boundary, and use the original minimum value multiplied by 1.02 as the effective minimum value boundary. Eliminate extreme invalid activation values outside the boundaries, and finally determine the effective numerical range of the model quantization. For example: The original activation value range of a certain layer of the network is -5.2 to 6.8. After compensation correction, the effective maximum value is 6.664, and the effective minimum value is -5.304. Only values within this range are retained for subsequent quantization calculations. Step 505: Based on the truncation boundary, the 32-bit floating-point weights and activation values in the floating-point baseline model are mapped and converted into 8-bit integer parameters to generate a lightweight temporal classification model, which is then burned into the local non-volatile read-only memory of the edge computing unit. The range of the 8-bit integer quantization value is set to -128 to 127. Based on the corrected effective value range, a linear mapping conversion is performed on all 32-bit floating-point weights and activation values. First, the difference between the current floating-point value and the effective minimum value is calculated, then the overall difference of the effective value range is calculated. The ratio of the two differences is multiplied by 127, and finally the calculation result is rounded to obtain the corresponding 8-bit integer quantization value. After quantization, the model recognition accuracy is verified batch by batch to ensure that the quantization error is less than one percent. Finally, the lightweight model is generated and burned into the local non-volatile read-only memory of the edge device.
[0031] In one implementation, the model quantization process can use symmetric quantization to simplify the mapping operation logic and further improve the inference speed of edge devices.
[0032] Through the above technical solution, a high-precision floating-point benchmark model is obtained by training with real-world scenario datasets. Then, the model is lightweighted and compressed by precise quantization truncation and integer conversion. While ensuring the accuracy of anomaly recognition, the model size is compressed by more than 75%, and the inference speed is increased several times. The model is solidified and deployed on the local non-volatile read-only memory of the edge device, eliminating network dependence and perfectly adapting to the low computing power and high real-time operation requirements of self-service meal pickup terminals.
[0033] In some embodiments, prior to an authentication signal triggered by the identity verification terminal, the method further includes: Step 601: Detect the network connection status of the local terminal; Specifically, the terminal main control module polls and detects the connectivity status of network links such as Ethernet and WiFi in real time, determines whether the network is normally connected through heartbeat packet verification, and obtains network connection status parameters in real time to provide a basis for switching working modes. Step 602: When a network disconnection signal is detected, switch to local offline control mode; specifically, when a network heartbeat packet interruption or link disconnection is detected, the system automatically blocks cloud interaction commands and immediately switches to local offline independent working mode. All data collection, feature inference, anomaly judgment, and settlement calculation are completed in the local edge unit without relying on the cloud server. Step 603: In local offline control mode, the local cache database is used to verify the identity of the plate read by the RFID module. Specifically, the terminal is equipped with a small cache database to pre-store the RFID identity data of all compliant plates. The RFID module reads the unique identity code of the current plate in real time and matches and verifies it with the compliant identifier in the local cache database to complete the offline identity verification. No cloud database interaction is required, which ensures that the plate identity verification function works normally in the offline state. Step 604: The generated hierarchical response instructions and settlement instructions, along with the corresponding log data, are appended to the local non-volatile read-only memory. Specifically, all meal collection records, abnormal alarm records, deduction settlement data, and equipment operation logs generated during offline operation are appended to the local non-volatile read-only memory in encrypted format. This memory has a power-off retention function, which can prevent the loss of offline data caused by power failure or restart of the equipment, and ensure the integrity and traceability of offline settlement data. Step 605: Listen for network recovery signals. When the network is connected, start an asynchronous thread to upload the log data in the local non-volatile read-only memory to the cloud management server for verification and archiving. Specifically, the system continuously listens for network recovery status in the background. Once the network link is detected to be reconnected, an independent asynchronous upload thread is immediately started without occupying the foreground settlement and inference computing power. Offline log data in the local memory is read asynchronously, and uploaded to the cloud management server in batches with encryption. The cloud performs data verification, deduplication, and permanent archiving, achieving synchronization and unification between offline data and cloud data.
[0034] In one implementation, offline log upload supports breakpoint resume functionality to avoid upload failures and data loss caused by network fluctuations. Through the above technical solutions, a dual-mode working mechanism of online cloud collaboration and offline local independent operation was constructed, which solved the problems of network fluctuations in the canteen, paralysis of self-service meal collection and settlement in the event of network outage, data loss, and inability to verify identity; in offline mode, the entire process of abnormal identification and settlement functions can be fully realized, and the data is automatically synchronized after the network is restored, which improves the stability of equipment operation and scenario adaptability.
[0035] In some embodiments, after a prompt command to remove the pressure object is triggered on the local display screen and an audible and visual alarm is activated, the method further includes: Step 701: Reset and start the local countdown timer; Specifically, after triggering the scale abnormality alarm, the system immediately resets the local hardware timer and starts a countdown of a preset duration, preferably 10 seconds, to allow users sufficient time for abnormality rectification operations. Step 702: Within the timing interval of the local countdown timer, continuously monitor the rate of change of the standard weight time series; specifically, during the countdown operation, the weighing sensor continuously samples at high frequency, updates the standard weight time series in real time, synchronously and continuously calculates the first-order differential rate of change, dynamically monitors whether the abnormality of the weighing scale is resolved, and captures changes in weight status in real time. Step 703: When the rate of change returns to the normal range and the stable weight value is valid, deactivate the audible and visual alarm and automatically resume executing the local deduction and settlement command. Example: The normal weight change rate judgment threshold reuses the adaptive static threshold from step 101. To distinguish between the single-meal-collection endpoint judgment and the anomaly resolution judgment standard, this step adopts an enhanced stability judgment condition: the absolute value of the first-order difference data of five consecutive sampling points does not exceed the adaptive static threshold, and the fluctuation difference of the weight value does not exceed 0.3 grams. Meeting this condition determines that the scale anomaly has been completely resolved. Example: In a strong interference scenario, the adaptive static threshold is 0.44 grams. The weight change rates of five consecutive sampling points are 0.2 grams, 0.15 grams, 0.22 grams, 0.18 grams, and 0.25 grams, respectively, all below the threshold and with stable weight value fluctuations. The system automatically deactivates the audible and visual alarm and resumes the normal deduction and settlement process. Step 704: When the countdown timer expires and the rate of change is still within the abnormal range, freeze the settlement process of the current weighing channel and push a manual intervention request message to the cloud management server; specifically, if the weight change rate continues to be in the abnormal range after the preset countdown time has ended, and the weight cannot be stabilized, it is determined that the user has not handled the abnormality or there is a equipment malfunction; the system immediately freezes all settlement processes of the current weighing channel, prohibits further deductions, and actively pushes a manual intervention request message with the equipment number, abnormality type, and abnormal duration to the cloud management server to remind the back-end management personnel to remotely verify or handle the issue on-site; In one implementation, the countdown duration can be customized based on the canteen's food pickup scenario, balancing user error tolerance with equipment operating efficiency. For example, the basic countdown duration is 10 seconds, adaptively adjusted based on the historical weight-weighting anomaly rectification success rate. When the rectification success rate is below 90%, the countdown duration increases by 2 seconds; when the rectification success rate is above 98%, the countdown duration decreases by 1 second. For example, in a new canteen where users are not familiar with the operation and the anomaly rectification success rate is 85%, the adaptive countdown duration is increased to 12 seconds; in a maturely operating canteen where users operate correctly and the rectification success rate is 99%, the adaptive countdown duration is decreased to 9 seconds.
[0036] The above technical solution incorporates alarm, time-limited rectification, automatic recovery, and manual backup logic for handling abnormalities in the weighing scale. This not only preserves the user's operational space for self-correction and avoids accidental interception of settlement due to minor abnormalities, but also promptly identifies abnormal faults that cannot be repaired independently. Manual intervention ensures the fairness of settlement and the safety of equipment operation, reducing settlement disputes and the probability of equipment downtime caused by abnormal faults.
[0037] In some embodiments, calculating the error using the cross-entropy loss function and updating the network parameters via backpropagation further includes an outlier enhancement step: Step 801: Extract normal meal collection sequence samples from the model training batch; specifically, select high-quality normal meal collection time sequence samples with accurate annotation, complete temporal sequence, and no interference from the original training dataset as the basic data source for sample augmentation to ensure the authenticity and rationality of synthesized abnormal samples. Step 802: Perform numerical translation and lifting operations on the data of a specific time period in the normal meal collection sequence sample to synthesize a simulated weighing sequence; For example: Select the stable data interval of the latter 20% of the normal meal collection time sequence sample, and perform fixed amplitude lifting processing on all weight values in this interval to simulate the constant weighing weight characteristics caused by placing heavy objects on the plate and tableware; The lifting compensation value ranges from 2 grams to 20 grams, and by randomly selecting different compensation values, samples of weighing anomalies of different intensities are generated; For example: The original stable meal collection weight is 50 grams, and 8 grams is randomly selected as the lifting compensation value. After processing, the weight in the corresponding interval is constant at 58 grams, which highly restores the steady-state anomaly characteristics of weighing under real-world scenarios; Step 803: Truncate the timeline of the normal meal collection sequence samples to synthesize a simulated missed settlement sequence. Example: Calculate the total duration of the complete normal meal collection time series samples, select an interval of 60% to 90% of the complete duration as a random truncation node, retain the time series data before the truncation node, and delete the data in the stable tail interval, so that the final retained time series terminates at the stage where weight change is not stable, simulating the missed settlement anomaly caused by removing plates midway through meal collection or prematurely ending sampling. Example: The complete meal collection time series duration is 2 seconds. Randomly select a 75% truncation ratio, truncate the data at 1.5 seconds. At this time, the weight change is not yet stable and the difference value has not returned to zero, which can accurately simulate the real missed settlement situation. Step 804: Mix the simulated weighing sequence and the simulated missed settlement sequence into the original training set to update the historical weight time series dataset; specifically, randomly mix the batch-synthesized simulated abnormal samples with the original real samples to expand and optimize the historical weight time series dataset, balance the ratio of normal samples to abnormal samples in the dataset, and solve the problems of model training bias and low abnormal identification accuracy caused by the small number of abnormal samples and sample imbalance in real scenarios.
[0038] In one implementation, the boosting value and truncation duration can be randomly adjusted during sample augmentation to increase the diversity of synthesized samples and further improve the model's generalization ability. The above technical solution uses data augmentation technology to synthesize highly realistic abnormal samples in batches, expanding the abnormal sample library at low cost and high efficiency, and balancing the distribution of the training dataset. It effectively solves the industry pain points of low frequency of abnormal conditions and scarcity of effective labeled samples in real self-service meal picking scenarios, improves the model's ability to identify and generalize various abnormal conditions, and reduces the false negative rate and false positive rate after actual deployment.
[0039] In some embodiments, before determining the target anomaly category based on the anomaly probability distribution vector, a trajectory fingerprint enhancement discrimination step is further included: Step 901: Based on the marked start and stable end times of a single food retrieval action, extract standard weight time-series segments within the corresponding time period; specifically, based on the marked start and stable end timestamps of the food retrieval action, accurately extract standard weight time-series segments corresponding to a single complete food retrieval process, remove invalid static data before and after food retrieval, and focus on the time-series trajectory features of the core food retrieval action. Step 902: Normalize the sequence segments to scale their time length to a uniform dimension and map the weight values to the range of 0 to 1; use linear interpolation scaling to uniformly scale and fix the food collection trajectory segments of different durations to 100 time nodes to achieve uniform time length dimension; use the maximum and minimum value mapping method to complete the numerical normalization, subtract the minimum weight value in the segment from the real-time weight value of a single sampling point, and then divide the difference by the difference between the maximum and minimum weight values in the segment, finally uniformly mapping all weight values to the range of 0 to 1, eliminating the interference of food collection speed and food weight amplitude differences on the recognition results; Step 903: Calculate the trajectory morphology features of the normalized sequence segment. The trajectory morphology features include the action duration ratio, the total variation energy of the sequence, and the time asymmetry coefficient. For example: First, the action duration ratio is obtained by dividing the actual duration of a single meal pickup by the standard meal pickup duration of 2 seconds. The ratio range for normal meal pickup conditions is 0.6 to 1.5. If it exceeds this range, it is judged as an abnormal duration. Second, the total variation energy of the sequence is obtained by summing the absolute values of all first-order difference data in the normalized sequence. This is used to characterize the intensity of weight fluctuation throughout the process. The total energy is below 1.2 under normal conditions, below 0.3 for abnormal weighing, and above 1.8 for abnormal missed settlement. Third, the time asymmetry coefficient is calculated by the ratio of the downward time of meal pickup weight loss to the upward time of meal return weight gain. The ratio for normal meal pickup conditions is close to 1, while the ratio for abnormal weighing and missed settlement conditions will deviate significantly from 1. These three features accurately depict the differentiated fingerprint features of the meal pickup trajectory from three dimensions: duration, fluctuation, and morphology. Step 904: The trajectory morphology features and the anomaly probability distribution vector are concatenated and input into the lightweight decision fusion network. Specifically, the three types of manually defined high-discrimination trajectory fingerprint features and the three types of working condition probability features output by the model inference are concatenated and integrated into a six-dimensional fusion feature vector, which is then fed into the lightweight decision fusion network. Secondary feature selection and fusion are completed through weighted normalization operations to balance the weight ratio of manually defined rule features and deep learning model features. Step 905: Output the corrected anomaly category confidence score through the decision fusion network, and determine the final target anomaly category based on the corrected confidence score; The fusion network corrects the initial probability of the model through a preset weight matrix, and sums the product of the manual trajectory rule score and the corresponding weight, and the product of the initial probability of the model and the corresponding weight to obtain the final confidence score of each working condition. Select the working condition with the highest confidence score as the final target anomaly or normal category to complete the accurate discrimination.
[0040] In one implementation, the lightweight decision fusion network adopts a single-layer fully connected structure, which is simple in structure, has a very small amount of computation, and does not increase the inference burden of edge devices.
[0041] By introducing the above technical solution, a trajectory fingerprint enhancement discrimination mechanism is introduced, which combines manual prior rule features and deep learning inference features to make up for the shortcomings of single model probability judgment being susceptible to noise interference and inaccurate identification of minor anomalies. Through multi-dimensional trajectory feature constraints, the identification accuracy of minor anomalies such as weighing and missed settlement is greatly improved, the probability of model misjudgment is reduced, and the stability and accuracy of self-service meal pick-up anomaly identification are further improved.
[0042] Example 2: Refer to Figure 2 As shown, this application also provides a self-service meal pickup anomaly identification system based on time-series weight data, including a raw weight time-series data stream acquisition module, a data preprocessing module, a time-domain differential feature extraction module, a meal pickup action boundary marking module, a time-domain derived feature matrix generation module, an anomaly probability distribution inference module, and a graded response and settlement triggering module; The raw weight time-series data stream acquisition module, in response to the authentication signal triggered by the identity recognition terminal, starts the weighing sensor to continuously acquire weight data at a fixed sampling frequency, generating a raw weight time-series data stream; specifically, this module integrates an identity recognition interaction unit and a high-precision weighing sensing unit, which is responsible for receiving the authentication trigger signal, controlling the sensor to sample at high frequency, completing the raw acquisition and time-series encapsulation of the entire process of weight time-series data, and providing raw data input support for the system; The data preprocessing module performs baseline zero-point calibration and high-frequency noise filtering on the raw weight time-series data stream to obtain a standard weight time-series sequence. Specifically, this module has built-in zero-point calibration algorithm and moving average filtering algorithm, which can automatically extract static background data to complete zero-point self-calibration, filter out environmental and sensor high-frequency noise, and output standard time-series data with stable baseline and high purity to ensure the accuracy of subsequent feature extraction. The time-domain difference feature extraction module performs time-domain difference calculations on the standard weight time series to extract the first-order difference sequence representing the rate of weight change and the second-order difference sequence representing the acceleration of weight change. Specifically, the module has a built-in time-domain difference operation unit, which can quickly complete the difference operation of data between adjacent time points and synchronously output the two types of dynamic feature sequences, rate and acceleration, to fully depict the dynamic change law of the meal picking process. The food retrieval action boundary marking module marks the start of a single food retrieval action when the absolute value of the first-order difference sequence is greater than the start threshold during the extraction process, and marks the stable end point of a single food retrieval action when the absolute values of both the first-order and second-order difference sequences approach zero. Specifically, this module has a built-in dual-threshold adaptive judgment logic that can update the threshold compensation amount in real time according to the environmental noise, accurately extract the time interval of a single independent food retrieval action, and filter out invalid slight fluctuations to achieve accurate segmentation of the food retrieval action. The temporal derived feature matrix generation module concatenates the standard weighted time series, the first-order difference sequence, and the second-order difference sequence to generate a temporal derived feature matrix. Specifically, this module is responsible for the channel-level concatenation and fusion of multi-dimensional features to construct a comprehensive feature matrix containing static and dynamic features, providing complete input features for model inference. The anomaly probability distribution inference module inputs the time-domain derived feature matrix into a lightweight temporal classification model deployed on the edge computing unit for forward inference and outputs the anomaly probability distribution vector of the meal picking event. Specifically, this module is equipped with a quantized and compressed lightweight temporal classification model, which relies on the edge computing unit to complete local real-time inference and outputs multi-condition probability distribution vectors. At the same time, it integrates a trajectory fingerprint enhancement discrimination submodule to achieve secondary correction and optimization of the anomaly confidence. The tiered response and settlement triggering module determines the target anomaly category based on the anomaly probability distribution vector, and triggers the corresponding tiered response and settlement instructions on the local terminal based on the target anomaly category. Specifically, this module has a built-in tiered response strategy library, which performs differentiated handling for normal meal picking, weighing anomalies, and missed settlement anomalies, and integrates functions such as alarms, error correction, automatic settlement, manual reporting, and offline data storage to achieve closed-loop management of the entire meal picking process. In one implementation, each module is deployed on the local terminal edge computing unit, and the modules interact with each other through the local bus, without the need for cloud forwarding, resulting in low response latency and strong stability. Through the above technical solutions, this invention constructs a complete self-service meal pickup anomaly identification and intelligent settlement system based on time-series weight data. Relying on baseline zero-point self-calibration and sliding filtering technology, it solves the problem of time-series data distortion caused by sensor temperature drift and environmental vibration, ensuring the accuracy of the original data. By extracting static and dynamic fusion features through first-order and second-order time-domain difference extraction, combined with dual-threshold action boundary marking, it segments the single meal pickup action interval, avoiding invalid noise interference. A lightweight time-series classification model is constructed using depthwise separable convolution, combined with sample augmentation and model quantization compression technology, achieving high-precision classification of normal meal pickup, abnormal weighing, and missed settlement anomalies with extremely low computational overhead. A trajectory is added. The fingerprint-enhanced discrimination mechanism integrates rule-based prior knowledge and deep learning features to further reduce the probability of anomaly misjudgment; it establishes an online and offline dual operation mode to ensure normal device operation and data integrity and traceability in network outage scenarios; it designs a hierarchical closed-loop response mechanism for different abnormal operating conditions to realize the whole process of user self-correction, automatic settlement, and manual backup; this invention effectively avoids the problems of missing anomaly identification, frequent mis-settlement and missed settlement, weak anti-interference ability, high network dependence, and untimely anomaly handling in existing self-service meal collection and settlement technologies, improves the accuracy of self-service catering settlement, reduces operational disputes and manual maintenance costs, and adapts to the large-scale implementation needs of various canteen self-service meal collection and settlement scenarios.
[0043] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for identifying anomalies in self-service meal pickup based on time-series weight data, characterized in that, include: In response to the authentication signal triggered by the identity recognition terminal, the weighing sensor is activated to continuously collect weight data at a fixed sampling frequency, generating a raw weight time-series data stream; The original weight time-series data stream is subjected to reference zero-point correction and high-frequency noise filtering to obtain a standard weight time-series sequence. Time-domain difference calculations are performed on the standard weight time series to extract the first-order difference sequence representing the rate of weight change and the second-order difference sequence representing the acceleration of weight change; During the extraction process, when the absolute value of the first-order difference sequence is greater than the starting threshold, it is marked as the starting point of a single meal taking action. When the absolute values of both the first-order difference sequence and the second-order difference sequence approach zero, it is marked as the stable ending point of a single meal taking action. By splicing together the standard weight time series, the first-order difference sequence, and the second-order difference sequence, a time-domain derived feature matrix is generated; The time-domain derived feature matrix is input into a lightweight temporal classification model deployed on an edge computing unit for forward inference, and the abnormal probability distribution vector of the meal picking event is output. The target anomaly category is determined based on the anomaly probability distribution vector, and the corresponding hierarchical response and settlement instructions are triggered on the local terminal based on the target anomaly category.
2. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 1, characterized in that, Perform reference zero-point correction and high-frequency noise filtering operations on the raw weight timing data stream, including: Extract multiple background weight samples within a time window during which the system is in a static state before the authentication signal is triggered; Calculate the arithmetic mean of multiple background weight samples and use it as the baseline zero point value; Subtract the reference zero point value from each data node in the original weight time series data stream to obtain the zero point correction sequence; A moving average filter is used to perform window sliding filtering denoising on the zero-point correction sequence, and a standard weight time series is output to filter out outlier high-frequency interference signals caused by sensor temperature drift and environmental mechanical vibration.
3. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 1, characterized in that, The lightweight temporal classification model includes depthwise separable convolutional layers and global average pooling layers; The time-domain derived feature matrix is input into a lightweight temporal classification model deployed on edge computing units for forward inference, outputting anomaly probability distribution vectors for food pickup events, including: The standard weight time series, the first-order difference sequence, and the second-order difference sequence are concatenated along the feature channel dimension to obtain the comprehensive input feature matrix; By using channel-wise convolutional kernels in depthwise separable convolutional layers, local features in the temporal dimension of the comprehensive input feature matrix are extracted to obtain intermediate channel features; By using pointwise convolutional kernels to perform cross-channel linear combination of the intermediate channel features, a high-level semantic feature matrix is output. The high-level semantic feature matrix is compressed into a one-dimensional representation vector by a global average pooling layer, and then input into a fully connected layer to output an anomaly probability distribution vector.
4. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 1, characterized in that, The target anomaly category is determined based on the anomaly probability distribution vector, and corresponding tiered response and settlement instructions are triggered on the local terminal based on the target anomaly category, including: When the abnormal probability distribution vector points to abnormal weighing behavior and the probability value is greater than the benchmark judgment threshold, it is determined that the extracted time-domain derived feature matrix has a high amplitude weight holding feature with a duration exceeding the upper limit threshold. A prompt command to remove the pressure item is triggered on the local display screen and the sound and light alarm is activated. When the abnormal probability distribution vector points to a missed settlement behavior and the probability value is greater than the benchmark judgment threshold, it is determined that the extracted first-order difference sequence is truncated before it approaches zero, and a prompt instruction to reposition the plate is triggered on the local display screen. When the abnormal probability distribution vector points to normal meal pickup and the probability value is greater than the benchmark judgment threshold, the steady-state difference of the standard weight time series is calculated, and a local deduction settlement instruction is generated based on the steady-state difference.
5. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 1, characterized in that, The lightweight temporal classification model is obtained and deployed to edge computing units through the following training and compression methods: Obtain historical weight time-series datasets for historical self-service meal pickup scenarios. The historical weight time-series datasets include behavioral labels labeled with normal meal pickup, abnormal weighing behavior, and missed payment behavior. Supervised iterative training is performed on the historical weight time series dataset using an initial deep neural network. The error is calculated using the cross-entropy loss function and the network parameters are updated through backpropagation until the model converges to obtain a floating-point benchmark model. Collect quantization verification datasets for edge computing units; The distribution of activation values in the floating-point benchmark model is statistically calculated using a quantized verification dataset to determine the cutoff boundary of activation values. Based on the truncation boundary, the 32-bit floating-point weights and activation values in the floating-point baseline model are mapped to eight-bit integer parameters to generate a lightweight time-series classification model, which is then burned into the read-only memory of the edge computing unit.
6. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 1, characterized in that, Before responding to the authentication signal triggered by the identity verification terminal, it also includes: Detect the network connection status of the local terminal; When a network disconnection signal is detected, switch to local offline control mode; In local offline control mode, the local cache database is used to verify the identity of the plate read by the RFID module. The generated hierarchical response instructions, settlement instructions, and corresponding log data are appended to the local non-volatile memory. Listen for network recovery signals, and when the network is connected, start an asynchronous thread to upload the log data in the local non-volatile storage to the cloud management server for verification and archiving.
7. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 4, characterized in that, After the local display screen triggers a prompt to remove the pressure item and the audible and visual alarm is activated, the following is also included: Reset and start the local countdown timer; Within the timing interval of the local countdown timer, continuously monitor the rate of change of the standard weight time series; Once the rate of change returns to the normal range and the stable weight value is valid, the audible and visual alarm will be deactivated, and the execution of local billing and settlement instructions will be automatically resumed. If the countdown timer expires and the rate of change is still within the abnormal range, the settlement process of the current weighing channel is frozen, and a manual intervention request message is pushed to the cloud management server.
8. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 5, characterized in that, The calculation of error using the cross-entropy loss function and the updating of network parameters via backpropagation also includes an outlier augmentation step: Extract normal meal pickup sequence samples from the model training batch; Numerical translation and lifting operations were performed on data from specific time periods in the normal meal collection sequence samples to synthesize a simulated weighing sequence. The time axis of the normal meal collection sequence samples is truncated to create a simulated missed payment sequence; The simulated weighing sequence and the simulated underpayment sequence are mixed into the original training set to update the historical weight time series dataset.
9. The self-service meal pickup anomaly identification method based on time-series weight data according to claim 4, characterized in that, Before determining the target anomaly category based on the anomaly probability distribution vector, a trajectory fingerprint enhancement discrimination step is also included: Based on the marked start and stable end points of a single food retrieval action, standard weight time sequence segments are extracted within the corresponding time period. The sequence segments are normalized to scale their time length to a uniform dimension and the weight values are mapped to a range of 0 to 1. Calculate the trajectory morphological features of the normalized sequence segment. The trajectory morphological features include: The ratio of the duration of the action to the preset typical meal pickup time; The total variation energy of a sequence segment is defined as the sum of the absolute values of the first-order difference sequences; The time asymmetry coefficient between the weight descent phase and the ascent phase; The trajectory morphology features and the anomaly probability distribution vector are concatenated and then input into a lightweight decision fusion network. The decision fusion network outputs the corrected anomaly category confidence score, and the final target anomaly category is determined based on the corrected confidence score.
10. A tray and tableware circulation status tracking system based on radio frequency sensing, characterized in that, The method for tracking the flow status of tray tableware based on radio frequency sensing as described in any one of claims 1-9 includes: The raw weight time-series data stream acquisition module, in response to the authentication signal triggered by the identity recognition terminal, starts the weighing sensor to continuously acquire weight data at a fixed sampling frequency, generating the raw weight time-series data stream; The data preprocessing module performs reference zero-point correction and high-frequency noise filtering on the raw weight time-series data stream to obtain a standard weight time-series sequence. The time-domain difference feature extraction module performs time-domain difference calculations on the standard weight time series to extract the first-order difference sequence representing the rate of weight change and the second-order difference sequence representing the acceleration of weight change. The food retrieval action boundary marking module marks the start of a single food retrieval action when the absolute value of the first-order difference sequence is greater than the start threshold during the extraction process, and marks the stable end point of a single food retrieval action when the absolute values of both the first-order difference sequence and the second-order difference sequence approach zero. The time-domain derived feature matrix generation module concatenates a standard weighted time series sequence, a first-order difference sequence, and a second-order difference sequence to generate a time-domain derived feature matrix. The anomaly probability distribution inference module inputs the time-domain derived feature matrix into a lightweight temporal classification model deployed on edge computing units for forward inference and outputs the anomaly probability distribution vector of the meal pickup event. The tiered response and settlement triggering module determines the target anomaly category based on the anomaly probability distribution vector, and triggers the corresponding tiered response and settlement instructions on the local terminal based on the target anomaly category.