A Pet Intelligent Feeding Control Method and System Based on Behavior Recognition
By collecting pet behavior data and using Bayesian networks and random forest models to dynamically adjust feeding parameters, the problem of inaccurate estimation of pet feeding needs in existing technologies is solved, and refined and dynamic feeding control is achieved.
Patent Information
- Application Number
- CN202611423743.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies cannot accurately estimate a pet's true eating needs, including whether it needs to eat, the type of food, and the amount of food. They also cannot distinguish between a pet's brief approach and genuine hunger behavior, resulting in a lack of precision and dynamic adjustment in feeding decisions.
By collecting time-series behavioral data of pets, and using Bayesian network models and random forest models, combined with the pet's dwell time in the feeding area, the time interval since the last feeding, the range of motion, and barking characteristics, feeding parameters, including the type and amount of food, are dynamically adjusted.
It enables precise estimation and dynamic adjustment of a pet's actual eating needs, reduces false triggers, improves the accuracy and adaptability of feeding decisions, and meets the feeding needs of different levels of hunger.
Smart Images

Figure CN123113559A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pet feeding control technology, and in particular to a pet intelligent feeding control method and system based on behavior recognition. Background Technology
[0002] Existing technologies typically employ time-triggered or physical interaction-triggered control strategies, executing feeding operations at preset times or releasing food in response to physical behaviors such as pressing or pawing by the pet. Other approaches attempt to identify pet feeding-related behaviors through image acquisition and behavioral temporal analysis, and then implement feeding control based on the behavior recognition results.
[0003] However, existing technologies, when making feeding decisions, rely solely on momentary behaviors or simple actions such as whether the pet is near the food bowl, whether it scratches at the bowl, or approaches it. They fail to incorporate the duration of the pet's stay within the feeding area—a characteristic reflecting the intensity of behavioral intent—or the time interval between the current moment and the pet's last actual feeding time as an independent feature for demand inference. Since a pet's brief curious approach and genuine hunger-driven waiting exhibit similar behavioral patterns but fundamentally different needs, relying solely on momentary behavior cannot distinguish between these two scenarios, resulting in a lack of information in the mapping relationship between behavioral observation and actual feeding needs. Furthermore, the decision output of existing technologies is a discrete binary state label, directly determining hunger or non-hunger, failing to quantify the degree to which current behavioral evidence supports the demand state. When the pet's behavioral characteristics are at the boundary between hunger and non-hunger, binary decision-making cannot express this uncertainty in the degree of demand.
[0004] Furthermore, existing technologies, once they determine that feeding is needed, use fixed preset values for the type and amount of food to provide, without dynamically adjusting based on the intensity of demand reflected in the current behavioral data. For example, they cannot distinguish between mild hunger and severe hunger to provide different types or amounts of food. Summary of the Invention
[0005] The embodiments of the present invention provide a pet intelligent feeding control method and system based on behavior recognition, which aims to solve the problem that the existing technology cannot accurately estimate the pet's real eating needs, including whether it needs to eat, the type of food, and the amount of food, based on behavior observation data.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a pet intelligent feeding control method based on behavior recognition, comprising the following steps: Behavioral data of the target pet are collected by setting a collection step size; the behavioral data includes the pet's stay time in the predetermined feeding area, the time interval since the pet last fed, the pet's movement amplitude and / or the pet's barking characteristics; Input time-series behavioral data into a pre-trained machine learning model and output the probability value of the target pet's actual need to eat; When the probability value exceeds a preset threshold, the probability value and the behavior data are input into a pre-trained feeding mapping model, and the corresponding feeding parameters are output; the feeding parameters include the type of food and the amount of food fed. The feeding parameters trigger the preset feeding device to perform the feeding action.
[0007] Furthermore, the machine learning model is a Bayesian network model; The Bayesian network model includes: a hidden node representing the pet's actual eating needs, and several observation nodes corresponding to each feature dimension in the behavioral data. In this context, each observation node serves as the parent node of the hidden node, and the state space of the hidden node is a binary state, including a state of actual need for food and a state of non-actual need for food; the state space of each observation node is discretized into several intervals according to the value range of the corresponding feature dimension.
[0008] Furthermore, the Bayesian network model is pre-trained through the following steps: Collect behavioral data of the target pet over a historical period as training samples, and collect the actual feeding results corresponding to each training sample through a food bowl weight sensor; If the actual food intake is greater than the preset effective food intake threshold, the training sample is marked as a positive sample and the corresponding hidden node state is marked as a state where food is truly needed; otherwise, it is marked as a negative sample and the corresponding hidden node state is marked as a state where food is not truly needed. Discretize each feature dimension of the behavioral data in each training sample into corresponding observation values; Count the frequency of occurrence of the hidden node state for each observation node in each value interval, and calculate the conditional probability between the value of each observation node and the hidden node state. The calculated conditional probabilities and the prior probabilities of hidden nodes are stored in the model to complete the training.
[0009] Furthermore, the probability value of the output target pet actually needing to eat is calculated as follows: Discretize each feature value in the current time series behavioral data into the corresponding observation value; Each observation is input into the Bayesian network model. Based on the stored conditional probabilities and the prior probabilities of the hidden nodes, Naive Bayes inference is used to calculate the posterior probability that the hidden nodes are in a state of needing to eat under the current combination of observations. The posterior probability is the probability value that the target pet actually needs to eat.
[0010] Furthermore, the pre-trained feeding mapping model is constructed in the following manner: Collect multiple feeding records from the target pet's historical data. Each record includes an input vector before feeding and the actual amount of food consumed after feeding, detected by a weight sensor. The input vector includes the probability value and the behavioral data. A random forest model is trained using the input vector as the independent variable and the actual food intake as the dependent variable. After training is complete, the current input vector is input into the random forest model, and the output predicted value is the amount of food fed. The type of food to be fed is determined based on the probability value, including: feeding staple food when the probability value is greater than the first variety threshold, feeding snacks when the probability value is less than or equal to the first variety threshold but greater than the second variety threshold, and not feeding when the probability value is less than or equal to the second variety threshold.
[0011] Furthermore, it also includes feedback update steps, including: Within a preset monitoring time window after the feeding action is performed, data from the weight sensor at the bottom of the feeding bowl is continuously collected. Based on the change in the slope of the weight data, identify the time when the pet starts eating and the time when it stops eating, and calculate the weight difference between the two as the actual amount of food consumed; Compare the actual food intake with the preset effective food intake threshold; If the actual food intake is greater than or equal to the effective feeding threshold, the probability value and behavioral data before that feeding are marked as positive samples; if the actual food intake is less than the effective feeding threshold, it is marked as a negative sample. When the cumulative number of positive or negative samples reaches the preset batch size, incremental training of the feeding mapping model is triggered to retrain or update the feeding mapping model with samples accumulated in the historical database.
[0012] Furthermore, it also includes multiple pet identification and handling steps, including: Images of the designated feeding area are captured by a camera placed above the feeder, and a pre-trained object detection model is used to identify the pets in the images and outline the pet area. For the defined pet area, facial landmark detection or electronic tags on the pet's body are used to identify the current pet's identity. Establish an independent model parameter library for each pet, including the pet's machine learning model parameters, feeding mapping model parameters, preset thresholds, effective feeding thresholds, as well as historical behavior data and feeding records; Once the identification of the pet currently entering the feeding area is recognized, the model parameters corresponding to the identification are loaded, and the probability calculation, threshold comparison and feeding parameter mapping steps are performed. When multiple pets are detected entering the feeding area at the same time, the anti-conflict mode is triggered: the pet closest to the food bowl or the one that stays there the longest is prioritized as the current target pet, or automatic feeding is paused and a notification is pushed to the user's terminal for remote confirmation.
[0013] Furthermore, the pet's stay time in the predetermined feeding area is the length of time the pet continuously resides within the predetermined feeding area; the time interval since the pet's last feeding is the time difference between the current moment and the last feeding behavior; the movement amplitude is the pet's trunk displacement or acceleration modulus; and the vocalization characteristics include vocalization frequency, duration, and / or pitch.
[0014] Secondly, the present invention provides a pet intelligent feeding control system based on behavior recognition, applied to the pet intelligent feeding control method based on behavior recognition as described above, characterized in that it includes a behavior data acquisition module, a probability calculation module, a feeding mapping module, and a feeding execution module connected by communication, wherein: The behavior data acquisition module is used to collect time-series behavior data of the target pet by setting the acquisition step size; The probability calculation module is equipped with a pre-trained machine learning model, which is used to input the behavioral data into the machine learning model and output the probability value of the target pet's actual need to eat. The feeding mapping module is equipped with a pre-trained feeding mapping model, which is used to input the probability value and the behavior data into the feeding mapping model when the probability value exceeds a preset threshold, and output the corresponding feeding parameters, including the type of food and the amount of food fed. The feeding execution module is used to trigger a preset feeding device to perform a feeding action based on the feeding parameters.
[0015] The above technical solution has the following technical effects: By setting a collection step size to collect time-series behavioral data of the target pet, and incorporating the pet's dwell time in the designated feeding area and the time interval since the pet's last feeding into the behavioral data, the system can distinguish whether the pet is briefly passing by or genuinely waiting in front of the food bowl. Simultaneously, it combines the time elapsed since the last meal to determine the current physiological hunger level, effectively reducing false triggers caused by the pet's curiosity or habitual digging at the bowl. By inputting the time-series behavioral data into a pre-trained machine learning model, the system outputs a probability value indicating the target pet's actual need to eat, transforming discrete behavioral observations into a continuous probability output. This probability value quantifies the strength of the current behavioral evidence supporting the feeding demand state, providing more refined information for subsequent decisions than discrete hunger or lack thereof. When the probability value exceeds a preset threshold, the probability value and behavioral data are jointly input into a pre-trained feeding mapping model, outputting feeding parameters including the type and amount of food to be fed. This allows the type and amount of food to be fed to be dynamically adjusted based on the demand intensity reflected in the current behavioral data, achieving tiered and refined feeding. Finally, the feeding device is triggered to perform the feeding action based on the feeding parameters. This invention solves the problem that existing technologies cannot accurately estimate a pet's true eating needs based on behavioral observation data, including whether it needs to eat, the type of food, and the amount of food consumed. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a behavior recognition-based intelligent pet feeding control method according to an embodiment of the present invention.
[0017] Figure 2 This is a schematic diagram of the structure of a machine learning-based e-sports power management system according to an embodiment of the present invention. Detailed Implementation
[0018] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily used to illustrate the embodiments and to explain the operating principles of the embodiments in conjunction with the relevant descriptions in the specification. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. Components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0019] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0020] Figure 1 This is a flowchart illustrating an embodiment of the intelligent pet feeding control method based on behavior recognition according to the present invention. Figure 1 As shown, the method of this embodiment includes the following steps: Behavioral data of the target pet is collected in time series by setting a collection step size. The behavioral data includes the pet's dwell time in the designated feeding area, the time interval since the pet's last feeding, the pet's movement amplitude, and the pet's vocalization characteristics.
[0021] In this embodiment, the data acquisition step size is set to 1 second, meaning that behavioral data for the current moment is acquired every second. The predetermined feeding area is a semi-circular area with a radius of 50 centimeters centered on the feeder's food bowl. Images of this area are continuously acquired by a camera positioned above the feeder, and a lightweight object detection algorithm is used to identify in real time whether a pet has entered the area. A timer is started when a pet enters and stopped when the pet leaves, accumulating the single dwell time. Dwell time refers to the length of time the pet continuously resides within the predetermined feeding area, measured in seconds.
[0022] The time interval since the pet's last feeding is obtained via a weight sensor at the bottom of the food bowl. The weight sensor continuously collects the weight of the food bowl at a sampling frequency of 100 times per second. When the weight data decreases by more than 2 grams within 10 consecutive sampling points, it is considered a feeding event, and the end time of the event is recorded. The difference between the current time and that time is the time interval, in minutes.
[0023] The motion amplitude is calculated by measuring the displacement of the pet's outline in the images captured by the camera. Specifically, for each frame of the detected pet bounding box, the coordinates of its center point are calculated. The Euclidean distance between the center points of two adjacent frames is taken as the instantaneous displacement. Within a 1-second acquisition step, all instantaneous displacements are summed to obtain the motion amplitude value, expressed in pixels. When the pet is equipped with an accelerometer, the acceleration magnitude can also be received via Bluetooth as the motion amplitude.
[0024] The vocalization features are collected via a microphone mounted on the feeder. The microphone continuously collects ambient audio, and a speech activity detection algorithm identifies segments of the pet's vocalizations. For each vocalization segment, the following features are extracted: vocalization frequency (number of vocalizations per minute); vocalization duration (duration of a single vocalization in seconds); and vocalization pitch (fundamental frequency extracted using Mel-frequency cepstral coefficients in Hertz). In this embodiment, the vocalization feature is the average of all vocalization segments within the current acquisition step.
[0025] The time-series behavioral data is input into a pre-trained machine learning model, which outputs the probability value of whether the target pet actually needs to eat.
[0026] In this embodiment, the machine learning model is a Bayesian network model. The choice of a Bayesian network over other machine learning models is based on three specific requirements of this technical scenario.
[0027] First, this scenario requires handling uncertainty and missing data. Whether a pet truly needs to eat is a latent variable that cannot be directly observed, while behavioral data provides indirect evidence. Bayesian networks are naturally adept at handling such latent variable inference problems. In contrast, discriminative models such as Support Vector Machines or Random Forests can only output classification results directly based on complete features. When a feature is missing, such as when the pet doesn't bark or the microphone doesn't capture valid audio, these models often fail to function properly or require additional interpolation. Bayesian networks, however, can support missing features through marginalization: when the value of an observation node is missing, simply sum and eliminate that node, then use the conditional probabilities of the remaining nodes for inference. For example, when a pet quietly sits in front of its food bowl without making any noise, the barking feature is missing, but a Bayesian network can still use the three features of dwell time, time interval, and movement amplitude for inference without artificially filling in a false barking value.
[0028] Second, this scenario requires the model to be interpretable. Pet feeding decisions involve the pet's health, and users need to understand why the system makes the decision to feed or not feed. Bayesian networks' conditional probability tables provide transparency: users can see that under conditions where feeding is truly needed, the probability of staying longer than 60 seconds is 85%, while under conditions where feeding is not truly needed, this probability is only 12%. This probabilistic relationship is intuitive and easy to understand; users can comprehend how the system makes its judgment. In contrast, the decision-making process of deep neural networks is a black box; users cannot know why a certain combination of behaviors triggers feeding. While random forests can provide some explanation through feature importance, they cannot provide the specific contribution of each feature value to the final decision.
[0029] Third, the sample size in this scenario is limited and requires online updates. Data for each pet needs to be accumulated from scratch, and the initial sample size may be small. Bayesian networks perform stably in small sample scenarios because their parameter learning only requires frequency statistics and does not require complex gradient optimization. Even with only a few dozen samples, Bayesian networks can provide reasonable conditional probability estimates. In contrast, deep learning models are prone to overfitting with small samples, and while random forests are not sensitive to overfitting, they require a larger number of samples to stabilize the tree partitioning. Furthermore, online updates of Bayesian networks are extremely simple: whenever a new positive or negative sample is obtained, the count value of the corresponding observation interval is simply incremented by one, and the conditional probability is recalculated, without retraining the entire model. This incremental update method has minimal computational cost and can be completed in real time on embedded devices.
[0030] Based on the above three technical considerations, this embodiment selects Bayesian network as the core inference model.
[0031] The Bayesian network model is structured as follows: it contains one hidden node representing the pet's true need for food, and four observation nodes, corresponding to the four feature dimensions of the behavioral data: dwell time, time interval, movement amplitude, and vocalization characteristics. Each observation node points to the hidden node via directed edges, meaning the observation node acts as the parent node of the hidden node, representing the probability of inferring the pet's true need for food based on observed behavioral features. The state space of the hidden node is binary, including both the true need for food and the non-true need for food.
[0032] The state space of each observation node is discretized into several intervals based on the value range of the corresponding feature dimension. For dwell time, it is discretized into four intervals: 0 to 10 seconds, 10 to 30 seconds, 30 to 60 seconds, and more than 60 seconds. For time interval, it is discretized into four intervals: 0 to 30 minutes, 30 to 60 minutes, 60 to 120 minutes, and more than 120 minutes. For motion amplitude, it is discretized into four intervals: 0 to 10 pixels, 10 to 30 pixels, 30 to 50 pixels, and more than 50 pixels. For vocalization features, it is discretized into four intervals: no vocalization, low-frequency vocalization (0 to 3 times per minute), medium-frequency vocalization (3 to 10 times per minute), and high-frequency vocalization (more than 10 times per minute).
[0033] The Bayesian network model is pre-trained through the following steps. First, behavioral data of the target pet over a historical period is collected as training samples. In this embodiment, data from the past 30 days is collected, recording approximately 50 behavioral events per day, totaling approximately 1500 training samples. Each training sample corresponds to one behavioral event where the pet appears in the feeding area. Simultaneously, the actual feeding result corresponding to each training sample is collected using a food bowl weight sensor. Specifically, within a 10-minute time window after the behavioral event, if the amount of food detected by the weight sensor is greater than a preset effective feeding threshold, it is marked as effective feeding. In this embodiment, the effective feeding threshold is set to 5 grams.
[0034] If the actual food intake is greater than 5 grams, the training sample is marked as a positive sample, and the corresponding hidden node state is marked as a state of genuine need for food. If the actual food intake is less than or equal to 5 grams, it is marked as a negative sample, and the corresponding hidden node state is marked as a state of non-genuine need for food. Then, each feature dimension of the behavioral data in each training sample is converted into corresponding observation values according to the aforementioned discretization interval. The frequency of occurrence of the hidden node state of each observation node in each value interval is counted, and the conditional probability between each observation node value and the hidden node state is calculated. For example, the proportion of positive samples where the dwell time falls within the interval of more than 60 seconds is the probability of the dwell time taking that value under the condition of genuine need for food. Similarly, the proportion of all negative samples in this interval is counted to obtain the probability of the dwell time taking that value under the condition of non-genuine need for food. The prior probability of the hidden node is set according to the historical feeding frequency. In this embodiment, it is set as the average number of times the pet actually eats per day divided by the total number of times it appears in the feeding area per day. The calculated conditional probabilities and the prior probabilities of the hidden nodes are stored in the model to complete the training.
[0035] During the real-time inference phase, the probability value is calculated as follows: Each feature value in the current time-series behavioral data is converted into a corresponding observation value according to the aforementioned discretization rules. For example, the currently collected behavioral data includes: a dwell time of 45 seconds, discretized into a range of 30 to 60 seconds; a time interval of 90 minutes, discretized into a range of 60 to 120 minutes; a movement amplitude of 25 pixels, discretized into a range of 10 to 30 pixels; and a barking frequency of 5 times per minute, discretized into a mid-frequency barking range. These observation values are input into the Bayesian network model. Based on the stored conditional probabilities and the prior probabilities of the hidden nodes, Naive Bayes inference is used to calculate the posterior probability that the hidden node is in a state of genuine needing to eat under the current combination of observation values. This posterior probability is the probability value that the target pet truly needs to eat, and its value is between 0 and 1. In this embodiment, the calculated probability value is 0.85.
[0036] When the probability value exceeds a preset threshold, the probability value and behavioral data are input into a pre-trained feeding mapping model, which outputs the corresponding feeding parameters. The feeding parameters include the type of food and the amount of food fed.
[0037] In this embodiment, the preset threshold is set to 0.6. Since the calculated probability value of 0.85 is greater than 0.6, the feeding mapping model is triggered.
[0038] The feeding mapping model is pre-built as follows: Multiple feeding records from the target pet's historical data are collected. Each record includes an input vector before feeding and the actual amount of food consumed after feeding, detected by a weight sensor. The input vector includes probability values and four feature dimensions of behavioral data: dwell time, time interval, movement amplitude, and vocalization characteristics, for a total of five input features. In this embodiment, 200 valid feeding records from the past 30 days were collected as training data.
[0039] A random forest model is trained using the input vector as the independent variable and the actual amount of food consumed as the dependent variable. The random forest model consists of 50 decision trees, with a maximum depth of 10 and a minimum leaf node sample size of 2. After training, the model can predict the amount of food consumed based on the input vector. The random forest model can automatically capture the non-linear interactions between features. For example, when both the dwell time and the time interval are long, the amount of food consumed should be greater than the linear sum of their individual effects. Conversely, when the dwell time is long but the movement amplitude exhibits high-frequency, small-amplitude fluctuations, the amount of food consumed should be reduced accordingly. The random forest model achieves this non-linear mapping through the voting mechanism of the decision trees.
[0040] The type of food given is determined based on probability values. In this embodiment, the threshold for the first type is set to 0.7, and the threshold for the second type is set to 0.4. When the probability value is greater than 0.7, staple food is given; in this embodiment, the staple food is high-protein adult cat or dog food. When the probability value is less than or equal to 0.7 but greater than 0.4, treats are given; in this embodiment, treats are freeze-dried food or meat puree. When the probability value is less than or equal to 0.4, no food is given. In this embodiment, the probability value is 0.85, which is greater than 0.7; therefore, the type of food given is determined to be staple food.
[0041] The current input vector is fed into the random forest model, and the model outputs a feeding amount of 32 grams. This input vector contains a probability value of 0.85, a dwell time of 45 seconds, a time interval of 90 minutes, a movement amplitude of 25 pixels, and a call frequency of 5 times per minute.
[0042] The feeding device is triggered by preset feeding parameters to perform the feeding action. In this embodiment, the feeding device includes a grain storage bin, two independent compartments, and a feed dispensing screw driven by a stepper motor. The two independent compartments store staple food and snacks respectively. When the type of food to be fed is determined to be staple food and the amount to be fed is 32 grams, the controller starts the stepper motor in the corresponding staple food compartment, driving the feed dispensing screw to rotate a preset number of revolutions. The amount of food dispensed per revolution of the stepper motor is pre-calibrated; in this embodiment, the calibration value is 4 grams per revolution. Therefore, to achieve a feed dispensing amount of 32 grams, the stepper motor needs to rotate 8 revolutions. After the controller sends a pulse signal for 8 revolutions, the stepper motor stops, and the feeding action is completed.
[0043] Within a preset monitoring time window following the feeding action, the system continuously collects data from the weight sensor at the bottom of the feeding bowl. In this embodiment, the monitoring time window is set to 30 minutes after the feeding action is completed. The weight sensor continuously collects data at a sampling frequency of 100 times per second.
[0044] Based on the rate of decline in weight data, the system automatically identifies when the pet begins and stops eating. Specifically, when the rate of decline in weight data exceeds 0.5 grams per second over five consecutive sampling points, it is determined that eating has begun. When the rate of decline in weight data is less than 0.1 grams per second over ten consecutive sampling points, it is determined that eating has stopped. The weight difference between the start and stop times is calculated as the actual amount of food consumed.
[0045] The actual food intake is compared with a preset effective feeding threshold. In this embodiment, the effective feeding threshold is set to 5 grams. If the actual food intake is greater than or equal to 5 grams, the probability value and behavioral data before that feeding are marked as positive samples. If the actual food intake is less than 5 grams, it is marked as a negative sample. When the cumulative number of positive or negative samples reaches a preset batch size, incremental training of the feeding mapping model is triggered. In this embodiment, the preset batch size is set to 50 samples. After triggering incremental training, the system retrains the random forest model with all samples accumulated in the historical database, enabling the model to gradually adapt to changes in the pet's eating habits.
[0046] When there are multiple pets in the household, the system performs a multi-pet identification and processing step. An image of the designated feeding area is captured by a camera positioned above the feeder. A pre-trained object detection model is then used to identify the pets in the image and define the pet area. In this embodiment, the object detection model employs the lightweight YOLOv5 algorithm, which can run in real-time on embedded devices.
[0047] Within the defined pet area, facial landmark detection is used to identify the current pet. Specifically, key points such as the pet's eyes, nose, and ears are extracted, and the geometric distance ratios between these key points are calculated to form a unique facial feature vector for that pet. This feature vector is then compared with the feature vectors of registered pets in the database, and the one with the highest similarity is used as the current pet's identity. When the pet is wearing an RFID tag or Bluetooth beacon, the identity can also be read directly using a reader.
[0048] An independent model parameter library is established for each pet, including the pet's Bayesian network model parameters, feeding mapping model parameters, preset thresholds, effective feeding thresholds, and historical behavior data and feeding records. When the system identifies the pet that has entered the feeding area, it automatically loads the model parameters corresponding to that identification and performs probability calculations, threshold comparisons, and feeding parameter mapping steps.
[0049] When multiple pets are detected entering the feeding area simultaneously, the system triggers an anti-collision mode. In this embodiment, the anti-collision mode prioritizes identifying the pet closest to the food bowl as the current target pet. Specifically, by analyzing the bounding box positions of each pet in the camera image, the distance between the midpoint of the lower edge of each pet's bounding box and the center point of the food bowl is calculated, and the pet with the smallest distance is selected as the target pet. If the smallest distances are equal, the pet that has stayed the longest is selected. In anti-collision mode, the system only automatically feeds the target pet, ignoring the behavior of other pets. Alternatively, the system can pause automatic feeding, push a notification to the user's terminal, and wait for the user to remotely confirm via a mobile application or manually select the target pet before resuming the feeding action.
[0050] In this embodiment, the dwell time is the length of time the pet continuously resides within the predetermined feeding area. The time interval is the time difference between the current moment and the last feeding behavior, calculated using feeding events detected by the food bowl weight sensor. The movement amplitude is the pet's trunk displacement or acceleration modulus, acquired through contour displacement in camera images or a wearable accelerometer. Vocalization characteristics include at least one of vocalization frequency, duration, and pitch, acquired through a microphone.
[0051] Example 2:
[0052] Figure 2 This is a schematic diagram of the structure of a behavior recognition-based intelligent pet feeding control system according to an embodiment of the present invention. Figure 2 As shown, the system includes a behavior data acquisition module, a probability calculation module, a feeding mapping module, and a feeding execution module, all connected via communication.
[0053] The behavior data acquisition module is used to collect time-series behavior data of the target pet by setting the acquisition step size. This module includes a camera, microphone, food bowl weight sensor, and an optional pet-wearable accelerometer. The camera is used to acquire images of the pet to identify dwell time and movement amplitude. The microphone is used to collect vocalizations to extract vocalization features. The weight sensor is used to detect feeding events to calculate time intervals and to detect actual food intake in the update step.
[0054] The probability calculation module is equipped with a pre-trained machine learning model. Behavioral data is input into the machine learning model, and the output is the probability value of whether the target pet truly needs to eat. In this embodiment, the machine learning model is a Bayesian network model, and the model's parameters are stored in non-volatile memory within the probability calculation module.
[0055] The feeding mapping module is equipped with a pre-trained feeding mapping model. When the probability value exceeds a preset threshold, the model inputs the probability value and behavioral data and outputs the corresponding feeding parameters. These parameters include the type and amount of food fed. In this embodiment, the feeding mapping model is a random forest model.
[0056] The feeding execution module triggers a preset feeding device to perform the feeding action based on feeding parameters. This module includes a food storage bin, at least two feeding channels for different types of pet food, and a feeding dispensing mechanism driven by a stepper motor. The feeding execution module selects the corresponding feeding channel based on the type of pet food, calculates the number of rotations the stepper motor needs to make based on the amount of food being fed, and then sends the corresponding number of pulse signals to the stepper motor driver.
[0057] The above system can be integrated into a pet feeder. The pet feeder includes a casing, a food storage compartment inside the casing, a food dispensing mechanism below the food storage compartment, a food bowl at the front of the casing, a weight sensor at the bottom of the food bowl, a camera at the top of the casing, an edge computing motherboard inside the casing, and a passive infrared sensor on the front of the casing. The edge computing motherboard integrates a microcontroller, memory, a wireless communication module, and a real-time clock for running the inference calculations of the probability calculation module and the feeding mapping module.
[0058] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for intelligent pet feeding control based on behavior recognition, characterized in that, Includes the following steps: Behavioral data of the target pet are collected by setting a collection step size; the behavioral data includes the pet's stay time in the predetermined feeding area, the time interval since the pet last fed, the pet's movement amplitude and / or the pet's barking characteristics; Input time-series behavioral data into a pre-trained machine learning model and output the probability value of the target pet's actual need to eat; When the probability value exceeds a preset threshold, the probability value and the behavior data are input into a pre-trained feeding mapping model, and the corresponding feeding parameters are output; the feeding parameters include the type of food and the amount of food fed. The feeding parameters trigger the preset feeding device to perform the feeding action.
2. The pet intelligent feeding control method based on behavior recognition according to claim 1, characterized in that, The machine learning model is a Bayesian network model; The Bayesian network model includes: a hidden node representing the pet's actual eating needs, and several observation nodes corresponding to each feature dimension in the behavioral data. In this context, each observation node serves as the parent node of the hidden node, and the state space of the hidden node is a binary state, including a state of actual need for food and a state of non-actual need for food; the state space of each observation node is discretized into several intervals according to the value range of the corresponding feature dimension.
3. The pet intelligent feeding control method based on behavior recognition according to claim 2, characterized in that, The Bayesian network model is pre-trained through the following steps: Collect behavioral data of the target pet over a historical period as training samples, and collect the actual feeding results corresponding to each training sample through a food bowl weight sensor; If the actual food intake is greater than the preset effective food intake threshold, the training sample is marked as a positive sample and the corresponding hidden node state is marked as a state where food is truly needed; otherwise, it is marked as a negative sample and the corresponding hidden node state is marked as a state where food is not truly needed. Discretize each feature dimension of the behavioral data in each training sample into corresponding observation values; Count the frequency of occurrence of the hidden node state for each observation node in each value interval, and calculate the conditional probability between the value of each observation node and the hidden node state. The calculated conditional probabilities and the prior probabilities of hidden nodes are stored in the model to complete the training.
4. The pet intelligent feeding control method based on behavior recognition according to claim 2, characterized in that, The probability value of the output target pet actually needing to eat is calculated as follows: Discretize each feature value in the current time series behavioral data into the corresponding observation value; Each observation is input into the Bayesian network model. Based on the stored conditional probabilities and the prior probabilities of the hidden nodes, Naive Bayes inference is used to calculate the posterior probability that the hidden nodes are in a state of needing to eat under the current combination of observations. The posterior probability is the probability value that the target pet actually needs to eat.
5. The pet intelligent feeding control method based on behavior recognition according to claim 1, characterized in that, The pre-trained feeding mapping model is constructed in the following way: Collect multiple feeding records from the target pet's historical data. Each record includes an input vector before feeding and the actual amount of food consumed after feeding, detected by a weight sensor. The input vector includes the probability value and the behavioral data. A random forest model is trained using the input vector as the independent variable and the actual food intake as the dependent variable. After training is complete, the current input vector is input into the random forest model, and the output predicted value is the amount of food fed. The type of food to be fed is determined based on the probability value, including: feeding staple food when the probability value is greater than the first variety threshold, feeding snacks when the probability value is less than or equal to the first variety threshold but greater than the second variety threshold, and not feeding when the probability value is less than or equal to the second variety threshold.
6. The intelligent pet feeding control method based on behavior recognition according to claim 1, characterized in that, It also includes feedback update steps, including: Within a preset monitoring time window after the feeding action is performed, data from the weight sensor at the bottom of the feeding bowl is continuously collected. Based on the change in the slope of the weight data, identify the time when the pet starts eating and the time when it stops eating, and calculate the weight difference between the two as the actual amount of food consumed; Compare the actual food intake with the preset effective food intake threshold; If the actual food intake is greater than or equal to the effective feeding threshold, the probability value and behavioral data before that feeding are marked as positive samples; if the actual food intake is less than the effective feeding threshold, it is marked as a negative sample. When the cumulative number of positive or negative samples reaches the preset batch size, incremental training of the feeding mapping model is triggered to retrain or update the feeding mapping model with samples accumulated in the historical database.
7. The pet intelligent feeding control method based on behavior recognition according to claim 1, characterized in that, It also includes multiple pet identification and handling steps, including: Images of the designated feeding area are captured by a camera placed above the feeder, and a pre-trained object detection model is used to identify the pets in the images and outline the pet area. For the defined pet area, facial landmark detection or electronic tags on the pet's body are used to identify the current pet's identity. Establish an independent model parameter library for each pet, including the pet's machine learning model parameters, feeding mapping model parameters, preset thresholds, effective feeding thresholds, as well as historical behavior data and feeding records; Once the identification of the pet currently entering the feeding area is recognized, the model parameters corresponding to the identification are loaded, and the steps of probability calculation, threshold comparison and feeding parameter mapping are performed. When multiple pets are detected entering the feeding area at the same time, the anti-conflict mode is triggered: the pet closest to the food bowl or the one that stays there the longest is prioritized as the current target pet, or automatic feeding is paused and a notification is pushed to the user's terminal for remote confirmation.
8. The intelligent pet feeding control method based on behavior recognition according to claim 1, characterized in that, The time a pet spends in the designated feeding area is the length of time the pet continuously resides within the designated feeding area; the time interval since the pet last fed is the time difference between the current moment and the last feeding behavior; the amplitude of movement is the pet's trunk displacement or acceleration modulus; the vocalization characteristics include vocalization frequency, duration, and / or pitch.
9. A pet intelligent feeding control system based on behavior recognition, applied to the pet intelligent feeding control method based on behavior recognition as described in any one of claims 1-8, characterized in that, It includes a behavior data acquisition module for communication connection, a probability calculation module, a feeding mapping module, and a feeding execution module, wherein: The behavior data acquisition module is used to collect time-series behavior data of the target pet by setting the acquisition step size; The probability calculation module is equipped with a pre-trained machine learning model, which is used to input the behavioral data into the machine learning model and output the probability value of the target pet's actual need to eat. The feeding mapping module is equipped with a pre-trained feeding mapping model, which is used to input the probability value and the behavior data into the feeding mapping model when the probability value exceeds a preset threshold, and output the corresponding feeding parameters, including the type of food and the amount of food fed. The feeding execution module is used to trigger a preset feeding device to perform a feeding action according to the feeding parameters.
