Pet feeding machine control method and system based on machine learning
By using machine learning to predict pet feeding needs and dynamically adjust feeding plans, the problem of lack of flexibility and accuracy in pet feeding machine feeding plans is solved, achieving more accurate pet feeding management and interactive experience.
Patent Information
- Application Number
- CN202510975723.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-10-24
AI Technical Summary
The feeding plans of existing pet feeders lack flexibility and precision, and cannot adapt to the individual differences and dynamic needs of pets, which affects the health of pets and increases the complexity of feeding.
By obtaining the pet feeder's preset feeding plan, historical feeding data, and behavioral data, a machine learning model is used to predict the pet's feeding needs and dynamically adjust the feeding plan to generate a target feeding plan.
It achieves more accurate and personalized pet feeding management, improves pet health, reduces the burden on owners, and enhances the interactive experience between pets and owners.
Smart Images

Figure CN120827093A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pet equipment, in particular to a pet feeding machine control method and system based on machine learning. BACKGROUND
[0002] A pet feeding device is a device for providing food for pets on a regular basis. At present, traditional pet feeding devices, especially simple models, use a preset fixed feeding plan for operation. Even if the actual needs of the pet change due to factors such as breed, age, health status, activity level, or environmental changes, the feeding plan remains unchanged, resulting in limited rationality of feeding. Advanced feeding devices with certain timed feeding functions, while optimizing feeding times, still do not fully consider individual differences and dynamic needs of pets, often relying on simple preset rules for feeding, lacking flexibility and precision.
[0003] Due to the limitations of the above feeding plan, the pet may not be able to obtain a food quantity that matches its actual needs, which may affect the pet's health status over the long term. For the owner, it is necessary to constantly observe and adjust the pet's feeding situation, increasing the complexity and burden of feeding.
[0004] Therefore, how to improve the rationality of the feeding plan of the pet feeding machine is a problem to be solved. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a pet feeding machine control method and system based on machine learning to improve the rationality of the feeding plan of the pet feeding machine.
[0006] In a first aspect, the present application provides a pet feeding machine control method based on machine learning, comprising:
[0007] obtaining a preset feeding plan of the pet feeding machine, historical feeding data of the pet, and behavior data;
[0008] obtaining a predicted feeding requirement of the pet according to the preset feeding plan, the historical feeding data, and the behavior data;
[0009] adjusting the preset feeding plan of the pet feeding machine according to the predicted feeding requirement to generate a target feeding plan;
[0010] performing a feeding operation according to the target feeding plan.
[0011] In a second aspect, the present application provides a pet feeding machine control system based on machine learning, comprising a machine readable storage medium and a processor, wherein the machine readable storage medium stores machine executable instructions, and the processor, when executing the machine executable instructions, implements the pet feeding machine control method based on machine learning.
[0012] The pet feeding machine control method and system based on machine learning provided by the present application obtain the preset feeding plan of the pet feeding machine, the historical feeding data and behavior data of the pet. According to the preset feeding plan, the historical feeding data and the behavior data, the predicted feeding demand of the pet is obtained. According to the predicted feeding demand, the preset feeding plan of the pet feeding machine is adjusted to generate a target feeding plan, and the feeding operation is performed according to the target feeding plan, so as to dynamically optimize the feeding arrangement according to the actual demand and habits of the pet, avoid unreasonable feeding caused by the fixed feeding plan failing to adapt to the individual differences and changes of the pet, and realize more accurate and personalized pet feeding management, improve the health level of the pet, enhance the interactive experience between the pet and the owner, and at the same time, reduce the burden of the owner in pet feeding. BRIEF DESCRIPTION OF DRAWINGS
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the description.
[0014] Figure 1 A flowchart of a pet feeding machine control method based on machine learning provided by an embodiment of the present application;
[0015] Figure 2 A structural diagram of a pet feeding machine control system based on machine learning provided by an embodiment of the present application.
[0016] Through the above drawings, the specific embodiments of the present application have been shown, and will be described in more detail hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. According to the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0018] The terms "first", "second", and the like in the description and in the claims of the present application and above figures are used for distinguishing between similar objects, not necessarily described in a particular sequential order. Also, the terms "comprise", "comprising", and the like are to be construed in an open-ended way, meaning that it includes at least the recited steps or elements but not excluding others. For example, a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to the listed steps or elements, but can include further steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
[0019] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. It is expressly understood that any of the embodiments described herein can be incorporated in to other embodiments.
[0020] Figure 1 A flowchart of a pet feeding machine control method based on machine learning provided by the embodiments of the present application is shown. It should be understood that in other embodiments, the order of some steps of the pet feeding machine control method based on machine learning of the present embodiments can be shared according to actual needs, or some steps can be omitted or maintained. As shown in the figure, the method can include the following steps: Figure 1
[0021] Step S110: Obtain the preset feeding plan of the pet feeding machine, the historical feeding data of the pet, and the behavior data.
[0022] In the present embodiment, the preset feeding plan is a series of feeding arrangements (for example, which can be set by the user through a mobile application, a web interface, or an operation interface of the pet feeding machine, etc.) set by the user in advance in the control interface of the pet feeding machine or the associated mobile application according to the breed, age, weight, health status, activity amount, and other factors of the pet. The plan is usually presented in the form of a time sequence, which contains a plurality of feeding time points (for example, accurate to minutes) and corresponding feeding amount information (for example, feeding weight, feeding portion, etc.). Optionally, the feeding plan can also be set by setting the feeding frequency within a period (for example, feeding several times a day, feeding several days a week, etc.); or special feeding days can also be set, such as different feeding plans on ordinary days and special days such as holidays, pet birthdays, etc.
[0023] The preset feeding plan can be stored in the pet feeding device (for example, in a memory deployed in the pet feeding device) or synchronized to the cloud for storage, so that the user can remotely modify and manage the preset feeding plan through the cloud.
[0024] The historical feeding data is a collection of detailed information recording each feeding condition of the pet in the past period of time. These data can be stored in the local storage module of the pet feeding machine or the cloud server associated therewith. The historical feeding data contains the specific time of each feeding and the actual feeding amount, etc. Through analysis of these data, the feeding habits and food intake trend of the pet can be understood. For example, it can be found that the pet's food intake is relatively stable in certain specific time period, while it fluctuates in other time periods.
[0025] The behavior data can be obtained by means of various sensors and cameras installed around the pet feeding machine. These sensors and cameras can monitor various behaviors of the pet in real time. For example, the acceleration sensor can detect the activity intensity of the pet, and by analyzing the motion speed and amplitude of the pet in different time periods, the size of the activity intensity can be determined. The image sensor (such as the camera) can record the frequency of the pet approaching the feeding machine, and by analyzing the video image, the number of times the pet approaches the feeding machine in a certain time can be counted. In addition, the sound sensor can also collect the call information of the pet, further enriching the content of the behavior data. These behavior data can reflect the physiological state and appetite of the pet, providing an important basis for subsequent prediction.
[0026] Step S120: obtaining the predicted feeding demand of the pet according to the preset feeding plan, the historical feeding data and the behavior data.
[0027] After obtaining the preset feeding plan, the historical feeding data and the behavior data, these data need to be comprehensively analyzed to obtain the predicted feeding demand of the pet. These data reflect the pet's eating habits, health status and current physiological needs from different dimensions, and by combining them for analysis, the future feeding demand of the pet can be more accurately predicted.
[0028] Step S121: extracting feeding time features and feeding amount features from the preset feeding plan.
[0029] Detailed analysis of the preset feeding plan can extract feeding time features and feeding amount features. Feeding time features can be represented in the form of time points or time intervals. For example, each feeding time point in the preset feeding plan can be taken as a feature value, or the time interval between adjacent feeding time points can be calculated as a feature. Feeding amount features are the amount of food for each feeding, which can form a vector, with each vector element corresponding to the feeding amount of a feeding time point. By extracting these features, the preset feeding plan can be converted into quantified data for subsequent analysis.
[0030] Step S122: determining the basic feeding requirement of the pet according to the feeding time features and the feeding amount features.
[0031] Based on the extracted feeding time features and feeding amount features, the basic feeding requirement of the pet can be determined. The basic feeding requirement is a preliminary estimate based on the preset feeding plan, which provides a basic framework for subsequent prediction. The feeding time features and the feeding amount features can be combined to form a description vector of the basic feeding requirement. This vector contains information about each feeding time point and the corresponding feeding amount, thus clearly defining the basic feeding requirement of the pet under the preset plan.
[0032] Step S123: determining the historical eating data of the pet according to the historical feeding data.
[0033] The historical eating data includes eating amount data and eating time data.
[0034] Processing the historical feeding data can obtain the historical eating data of the pet. The eating amount data in the historical eating data is the actual amount of food ingested by the pet during each feeding, which can be arranged in chronological order to form an eating amount sequence. The eating time data is the specific time of each feeding, which can also be recorded in chronological order. By analyzing the historical eating data, the eating habits and food intake changes of the pet in the past period of time can be understood. For example, the average eating amount, standard deviation of eating amount, and other statistical indicators in different time periods can be calculated to assess the stability and fluctuation of the pet's eating.
[0035] Step S124: inputting the basic feeding requirement, the eating amount data, the eating time data, and the behavior data into a pre-trained feeding requirement prediction model, and obtaining the predicted feeding requirement of the pet by adjusting the basic feeding requirement.
[0036] The basic feeding requirement, feeding amount data, feeding time data, and behavior data are input into a pre-trained feeding requirement prediction model as inputs. The feeding requirement prediction model can be trained based on a large amount of pet feeding data, which can learn the complex correlation between the data. Inside the model, each input data will undergo a series of processing and conversion. For example, the feeding requirement prediction model can be constructed based on one or more of time series analysis algorithms (such as ARIMA, LSTM, etc.), regression analysis algorithms (such as linear regression, polynomial regression, support vector regression, etc.), neural network algorithms (such as feedforward neural network, recurrent neural network, etc.), etc.
[0037] Firstly, the basic feeding requirement serves as a preliminary estimate, providing a starting point for the model. The feeding amount data and feeding time data can help the model understand the pet's historical feeding patterns, so as to determine whether the current basic feeding requirement conforms to the pet's actual habits. The behavior data provides the model with the pet's current physiological state and appetite information. For example, the pet's activity intensity can reflect its energy consumption, and a higher activity intensity can mean that the pet needs more food to replenish energy; the frequency of the pet approaching the feeding machine can directly reflect its demand for food.
[0038] The feeding requirement prediction model can perform feature extraction and fusion processing on these input data. Different types of data will be converted into feature vectors with the same dimension and unit, so as to be uniformly analyzed and calculated. In the feature fusion process, the feeding requirement prediction model can assign appropriate weights according to the importance of different data, and then concatenate or add the feature vectors with weights to form a comprehensive feature representation.
[0039] Then, the feeding requirement prediction model uses the internal neural network structure to further analyze and infer the comprehensive features, and excavates the potential relationship between the data. Finally, the feeding requirement prediction model adjusts the basic feeding requirement according to the analysis results, and outputs the predicted feeding requirement of the pet. This predicted feeding requirement is a sequence containing multiple feeding time points and corresponding feeding amounts, which takes into account the pet's historical feeding habits, current behavior state, and other factors, and is more in line with the actual needs of the pet.
[0040] Step S1241: performing feature decomposition processing on the basic feeding requirement to obtain a reference feeding time interval in the time dimension and a reference feeding amount in the quantity dimension.
[0041] After inputting the basic feeding requirement into the model, it needs to be processed by feature decomposition. The basic feeding requirement can be regarded as a composite feature containing time and quantity information. Through feature decomposition, it can be split into features in the time dimension and the quantity dimension.
[0042] The reference feeding time interval in the time dimension is obtained by analyzing and calculating each feeding time point in the basic feeding demand. Specifically, the time difference between adjacent feeding time points can be calculated, and then statistical analysis is performed on these difference values, such as calculating the average, median, etc., to obtain a representative reference feeding time interval, which reflects the basic feeding rhythm of the pet.
[0043] The reference feeding amount in the amount dimension is obtained by processing the feeding amount corresponding to each feeding time point in the basic feeding demand. Statistical analysis can be performed on these feeding amount data, such as calculating the average, mode, etc., to determine a reference feeding amount. This reference feeding amount represents the approximate amount of food that the pet eats each time under normal circumstances.
[0044] Step S1242: Perform historical deviation analysis processing on the feeding amount data, calculate the difference between each actual feeding amount and the reference feeding amount, and generate a feeding amount deviation sequence.
[0045] In this step, each actual feeding amount can be compared with the reference feeding amount obtained earlier to calculate the difference between them, and the difference values can be used to form a feeding amount deviation sequence.
[0046] When calculating the difference, it is necessary to ensure the time correspondence of the data, that is, each actual feeding amount is compared with the corresponding reference feeding amount. By analyzing the feeding amount deviation sequence, the fluctuation of the pet's feeding amount relative to the reference feeding amount can be understood. For example, if the values in the deviation sequence are mostly positive, it means that the actual feeding amount of the pet is usually greater than the reference feeding amount; if the values in the deviation sequence are mostly negative, it means that the actual feeding amount of the pet is usually less than the reference feeding amount.
[0047] Step S1243: Perform historical deviation analysis processing on the feeding time data, calculate the time difference between each actual feeding time and the reference feeding time interval, and generate a feeding time deviation sequence.
[0048] The time difference refers to the deviation of the actual feeding time from the theoretical feeding time calculated according to the reference feeding time interval, and the time correspondence of the data must also be ensured when calculating the time difference. By analyzing the feeding time deviation sequence, the deviation of the pet's feeding time relative to the reference feeding time interval can be understood. For example, it may be found that the pet's feeding time is often advanced or delayed, and this deviation may have certain regularity.
[0049] Step S1244: Perform behavior pattern recognition processing on the behavior data, and extract the activity intensity features and the frequency features of approaching the feeding machine of the pet in different time periods.
[0050] The behavior data contains activity information of the pet in different time periods. By analyzing the information, the behavior pattern of the pet can be identified.
[0051] The activity intensity feature can be obtained by processing the motion data of the pet. For example, an acceleration sensor installed on the pet or around the feeding machine can record the motion acceleration of the pet. By integrating and statistically analyzing the acceleration data, the activity intensity of the pet in different time periods can be obtained. The activity intensity can be represented by a numerical value or a vector, which reflects the energy consumption of the pet in the time period.
[0052] The frequency of approaching the feeding machine is obtained by counting the number of times the pet approaches the feeding machine. For example, a time window can be set to count the number of times the pet approaches the feeding machine in the time window. The number of times is taken as the frequency of approaching the feeding machine. By analyzing the frequency of different time periods, the demand degree of the pet for food at different times can be understood.
[0053] Step S1245: input the reference feeding time interval, the reference feeding amount, the food intake amount deviation sequence, the food intake time offset sequence, the activity intensity feature, and the frequency of approaching the feeding machine into the feature association layer of the feeding demand prediction model, and perform multi-source information association analysis processing to generate an association feature set.
[0054] The main function of the feature association layer is to perform association analysis on these different sources of information. In the feature association layer, each input feature will be further processed and converted to mine the potential relationship between them.
[0055] Firstly, different features will be converted into feature vectors with the same dimension and unit to facilitate unified analysis. Then, the feeding demand prediction model can calculate the corresponding association coefficient according to the correlation between different features.
[0056] For example, there may be a certain association relationship between the activity intensity feature and the food intake amount deviation sequence. When the activity intensity is high, the energy consumption of the pet increases, which may lead to an increase in the food intake amount deviation. The feeding demand prediction model can measure the strength of this relationship by calculating the association coefficient.
[0057] In the process of calculating the association coefficient, statistical methods such as Pearson correlation coefficient and Spearman correlation coefficient can be used. The association coefficient is used to reflect the linear or nonlinear relationship between different features.
[0058] Then, the correlation coefficients can be used to weight and combine the feature vectors. Features with higher correlation coefficients are given higher weights, and features with lower correlation coefficients are given lower weights. By weighting and combining, different feature vectors are fused together to form a set of associated features. This set of associated features contains the correlation information between multiple features and can more comprehensively reflect the pet's feeding needs.
[0059] Step S1246: The demand adjustment reasoning process is performed on the set of associated features by the adjustment decision layer of the feeding demand prediction model, to generate a first adjustment amount of the reference feeding time interval and a second adjustment amount of the reference feeding amount.
[0060] Step S12461: Trend analysis is performed on the food intake deviation sequence in the set of associated features to identify the long-term change trend of the actual food intake of the pet relative to the reference feeding amount.
[0061] The adjustment decision layer first performs trend analysis on the food intake deviation sequence in the set of associated features. For example, moving average method, linear regression method, etc. can be used to sort and analyze the data in the food intake deviation sequence to identify the long-term change trend of the actual food intake of the pet relative to the reference feeding amount.
[0062] The moving average method is to smooth the data in the food intake deviation sequence and calculate the average value within a certain time window. By observing the change trend of the moving average value, it can be determined whether the actual food intake is gradually increasing, decreasing or remaining stable. The linear regression method is to fit a straight line to describe the change trend of the food intake deviation sequence, and according to the slope of the straight line, the direction and amplitude of the long-term change can be determined.
[0063] Step S12462: Periodic analysis is performed on the food intake time offset sequence in the set of associated features to identify the periodic offset pattern of the actual food intake time of the pet relative to the reference feeding time interval.
[0064] For the food intake time offset sequence in the set of associated features, the adjustment decision layer can perform periodic analysis by methods such as Fourier transform, autocorrelation analysis, etc.
[0065] Fourier transform can convert the food intake time offset sequence from time domain to frequency domain, and by analyzing the peak values in the frequency spectrum, the periodic components in the sequence can be identified. Autocorrelation analysis is to calculate the correlation of the food intake time offset sequence with itself at different time delays, and by observing the peak position and amplitude of the autocorrelation function, the periodic offset pattern of the sequence can be determined. For example, it is found that the pet's feeding time has a certain periodic offset, such as an advance or delay in feeding time every few days.
[0066] Step S12463: performing correlation analysis on the activity intensity feature in the associated feature set to determine the correlation between the activity intensity of the pet and the food intake deviation.
[0067] The adjustment decision layer can, for example, perform a correlation analysis on the activity intensity feature and the food intake deviation in the associated feature set using methods such as the Pearson correlation coefficient or the Spearman correlation coefficient mentioned above to obtain the degree of correlation between the activity intensity feature and the food intake deviation.
[0068] Correlation analysis can determine whether activity intensity and food intake deviation are positively correlated, negatively correlated, or not significantly related. A positive correlation indicates that as activity intensity increases, food intake deviation also increases, meaning that more active pets may need more food. A negative correlation indicates that as activity intensity increases, food intake deviation decreases.
[0069] Step S12464: performing causal analysis on the frequency feature of the pet approaching the feeder in the associated feature set to determine the causal relationship between the frequency of the pet approaching the feeder and the offset of the feeding time.
[0070] The adjustment decision layer can, for example, perform a causal analysis on the frequency of proximity to the feeder and the offset in feeding time within the associated feature set using methods such as Granger causality testing. Granger causality testing determines causal relationships by comparing the predictive power of different time series. For example, if the frequency of proximity to the feeder can help predict offset in feeding time, but offset in feeding time cannot, then the frequency of proximity to the feeder can be considered the Granger cause of the offset in feeding time. This analysis can determine the causal relationship between the frequency of a pet's proximity to the feeder and offset in feeding time, specifically whether an increase in the frequency of a pet's proximity to the feeder leads to an earlier or later feeding time.
[0071] Step S12465: Construct a demand adjustment rule set based on the long-term change trend, the periodic offset pattern, the correlation relationship, and the causal relationship.
[0072] After completing the analysis of each feature, the adjustment decision layer can build a set of demand adjustment rules based on long-term change trends, periodic offset patterns, correlations and causal relationships.
[0073] For long-term trends, if actual food intake is found to be gradually increasing, then when adjusting the baseline feeding amount, rules can be established to appropriately increase the amount of each feeding. For periodic offset mode, if it is determined that the pet's feeding time is periodically advanced, the baseline feeding interval can be adjusted accordingly to make the feeding time more in line with the pet's actual needs.
[0074] According to the correlation between activity intensity and food intake deviation, if the correlation is positive, the reference feeding amount can be appropriately increased when the activity intensity increases; if the correlation is negative, the reference feeding amount can be reduced when the activity intensity increases. For the causal relationship between the frequency of approaching the feeding machine and the shift of eating time, if it is determined that the increase in frequency will cause the eating time to be advanced, the reference feeding time can be advanced when the frequency of the pet approaching the feeding machine increases.
[0075] By sorting and summarizing these rules, the demand adjustment rule set is completed. The demand adjustment rule set includes a plurality of rules corresponding to a plurality of specific situations and corresponding adjustment strategies.
[0076] Step S12466: Adjusting the reference feeding time interval and the reference feeding amount according to the demand adjustment rule set to generate the first adjustment amount and the second adjustment amount.
[0077] The adjustment decision layer can adjust the reference feeding time interval and the reference feeding amount according to the demand adjustment rule set. For example, when the data in the association feature set meets a certain adjustment rule in the adjustment rule set, the reference feeding time interval and the reference feeding amount can be adjusted accordingly according to the adjustment rule.
[0078] For example, if the adjustment rule stipulates that the reference feeding amount needs to be increased when the activity intensity increases and the actual food intake shows an increasing trend, then when it is detected that the activity intensity increases and the food intake deviation sequence shows that the actual food intake has an increasing trend, the reference feeding amount will be increased by a certain percentage. The amount of this increase is the second adjustment amount.
[0079] For the reference feeding time interval, if the adjustment rule stipulates that the feeding time can be advanced when the frequency of approaching the feeding machine increases and the eating time is periodically advanced, the feeding time can be advanced, that is, the amount of time that needs to be advanced can be calculated according to the adjustment rule. This amount of time is the first adjustment amount.
[0080] Finally, by adjusting the reference feeding time interval and the reference feeding amount, the first adjustment amount and the second adjustment amount are generated, which will be used for subsequent correction of the basic feeding demand.
[0081] Step S1247: Based on the first adjustment amount and the second adjustment amount, dynamically correcting the basic feeding demand to obtain the predicted feeding demand.
[0082] In this step, the first adjustment amount can be added to the reference feeding time interval in the basic feeding demand to obtain the corrected feeding time interval; the second adjustment amount can be added to the reference feeding amount to obtain the corrected feeding amount.
[0083] For example, the original baseline feeding interval is a fixed value. After adding the first adjustment amount, the new feeding interval will be more consistent with the pet's actual eating habits. Similarly, after adding the second adjustment amount, the baseline feeding amount can also be adjusted to better meet the pet's food intake needs.
[0084] After this correction, the basic feeding needs are converted into predicted feeding needs. This predicted feeding needs is the result of comprehensive consideration and dynamic adjustment, which fully considers multiple factors such as the pet's historical feeding data and behavioral data, and can more accurately reflect the pet's future feeding needs.
[0085] Step S130: adjusting the preset feeding plan of the pet feeder according to the predicted feeding demand to generate a target feeding plan.
[0086] After obtaining the predicted feeding needs, the pet feeder's preset feeding plan is adjusted according to this demand. The preset feeding plan is the feeding schedule initially set by the user, while the predicted feeding needs are obtained by comprehensively considering multiple factors and more in line with the pet's actual feeding needs.
[0087] Exemplarily, the specific adjustment process is as follows: the preset feeding plan includes multiple feeding time points and corresponding feeding amounts, for example, it can be recorded as P_plan = {(t_plan1, a_plan1), (t_plan2, a_plan2), ..., (t_plank, a_plank)}, where t_plani represents the i-th feeding time point, and a_plani represents the feeding amount corresponding to the i-th feeding time point. The predicted feeding needs also include multiple feeding time points and corresponding feeding amounts, for example, it can be recorded as P_pred = {(t_pred1, a_pred1), (t_pred2, a_pred2), ..., (t_predn, a_predn)}.
[0088] For each predicted feeding time t_predi, find the closest feeding time t_planj in the preset feeding plan. Calculate the time difference Δt = |t_predi - t_planj|. If Δt is less than a set threshold, the two time points are considered to be corresponding.
[0089] For the corresponding time point, the feeding amount a_planj in the preset feeding plan is adjusted according to the feeding amount a_predi in the predicted feeding demand. If there is a difference between a_predi and a_planj, a_planj can be replaced by a certain ratio or directly with a_predi.
[0090] For the feeding time point that exists in the predicted feeding demand but does not exist in the preset feeding plan, the time point and the corresponding feeding amount can be added in the preset feeding plan.
[0091] By such adjustment, the preset feeding plan is converted into the target feeding plan. The target feeding plan is more in line with the actual demand of the pet and can provide more reasonable diet arrangement for the pet.
[0092] Step S140: performing a feeding operation according to the target feeding plan.
[0093] After obtaining the target feeding plan, the pet feeding machine can perform the feeding operation according to the plan. For example, the pet feeding machine has a corresponding control system and feeding mechanism inside. The control system will trigger the feeding mechanism when the specified time arrives according to the feeding time point in the target feeding plan.
[0094] The feeding mechanism may, for example, be an electric feeding device that can accurately control the feeding amount each time. When the control system issues a feeding instruction, the feeding mechanism will put out food according to the feeding amount specified in the target feeding plan.
[0095] In the process of performing the feeding operation, the pet feeding machine can also monitor the feeding situation in real time. For example, the weight sensor can detect whether the amount of food put out is accurate, and if it is found that the amount of food put out deviates from the feeding amount in the target feeding plan, adjustment can be made. At the same time, the actual situation of each feeding, such as the actual feeding time and the actual feeding amount, can be recorded, and these data can be used as new historical feeding data for subsequent analysis and prediction.
[0096] The method provided by the embodiments of the present application obtains the preset feeding plan of the pet feeding machine, the historical feeding data and the behavior data of the pet. According to the preset feeding plan, the historical feeding data and the behavior data, the predicted feeding demand of the pet is obtained. The preset feeding plan of the pet feeding machine is adjusted according to the predicted feeding demand, a target feeding plan is generated, and a feeding operation is performed according to the target feeding plan, so as to dynamically optimize the feeding arrangement according to the actual demand and habits of the pet, avoid unreasonable feeding caused by the fixed feeding plan that cannot adapt to individual differences and changes of the pet, and thus realize more accurate and personalized pet feeding management, improve the health level of the pet, enhance the interactive experience between the pet and the owner, and at the same time, reduce the burden of the owner in feeding the pet.
[0097] In a possible implementation, the actual feeding demand of the pet can also be predicted in combination with weather information. Specifically, the following steps can be used to achieve this purpose:
[0098] Step S210: Obtain historical weather information of the location where the pet feeding machine is located, the historical weather information including temperature characteristic information, humidity characteristic information, and precipitation characteristic information.
[0099] In addition to the factors considered above, weather conditions can also affect the appetite and feeding needs of pets. Therefore, historical weather information of the location where the pet feeding machine is located can also be obtained. Historical weather information can be obtained through various means, such as meteorological websites, meteorological sensors, etc. Temperature characteristic information refers to the temperature variation within a certain period of time, which can be presented in the form of a time series, recording the temperature values at different time points. Humidity characteristic information reflects the amount of water vapor in the air, also recording the humidity values at different times in the form of a time series. Precipitation characteristic information includes whether it is raining and the intensity of the precipitation, which can be represented by binary or continuous values. For example, whether it is raining can be represented by 0 and 1, with 0 representing no rain and 1 representing rain; the intensity of the precipitation can be measured by the amount of precipitation or the precipitation level.
[0100] Step S220: Perform time axis alignment processing on the historical weather information to generate weather history association data corresponding to each historical feeding record time node in the historical feeding data.
[0101] After obtaining the historical weather information, it needs to be time axis aligned with the historical feeding data. The historical feeding data has its specific time nodes, each node corresponding to a feeding record. In order to analyze the influence of weather information on pet feeding, the temperature, humidity, and precipitation characteristics in the historical weather information need to be corresponded one by one with the time nodes of these feeding records.
[0102] The specific time axis alignment process can be implemented in the following way. First, determine the time node sequence in the historical feeding data, denoted as T_fed={t_fed1,t_fed2,…,t_fedn},where t_fedi represents the time of the i-th feeding. Then, for the temperature characteristic information T_temp={t_temp1,t_temp2,…,t_tempm} in the historical weather information, the humidity characteristic information T_humid={t_humid1,t_humid2,…,t_humidm} and the precipitation characteristic information T_rain={t_rain1,t_rain2,…,t_rainm}(here it is assumed that the length of the weather information time series is m), we need to find the closest time point in the weather information time series for each feeding time node.
[0103] For each t_fedi, the time points t_tempj, t_humidj and t_rainj with the smallest difference from t_fedi can be searched in the time series of weather information. The time difference Δt_temp = |t_fedi - t_tempj|, Δt_humid = |t_fedi - t_humidj| and Δt_rain = |t_fedi - t_rainj| can be calculated, and the j with the smallest difference is selected as the corresponding time index. In this way, the temperature value temp_i, humidity value humid_i and precipitation value rain_i corresponding to each historical feeding record time node can be obtained, so as to generate weather history association data W = {(temp_1, humid_1, rain_1), (temp_2, humid_2, rain_2), …, (temp_n, humid_n, rain_n)}, where n is the number of historical feeding records.
[0104] Step S230: Analyzing the corresponding relationship between the weather history association data and the historical feeding data, extracting the first influence mode of the temperature feature information on the historical feeding data, the second influence mode of the humidity feature information on the historical feeding data, and the third influence mode of the precipitation feature information on the historical feeding data.
[0105] After obtaining the weather history association data, the corresponding relationship between the weather history association data and the historical feeding data can be further analyzed to extract the influence mode of different weather features on the historical feeding data.
[0106] Step S231: Extracting a temperature feature information sequence and a corresponding feeding amount data sequence from the weather history association data, and statistically analyzing the centralized distribution trend of the feeding amount data in the same temperature interval to generate a temperature and feeding amount mapping relationship as the first influence mode.
[0107] The temperature feature information sequence T_temp_associated = {temp_1, temp_2, …, temp_n} and the corresponding feeding amount data sequence E_amount = {e_amount1, e_amount2, …, e_amountn} are extracted from the weather history association data. Then, the temperature interval is divided, for example, the temperature range can be divided into multiple non-overlapping subintervals [T_min1, T_max1), [T_min2, T_max2), …, [T_mink, T_maxk).
[0108] For each temperature sub-interval, the eating amount data falling in the interval is counted. Let the set of eating amount data falling in the i-th temperature sub-interval [T_min_i, T_max_i) be E_amount_i = {e_amount_j1, e_amount_j2, …, e_amount_jl}, where j1, j2, …, jl are indices satisfying T_min_i ≤ temp_j ≤ T_max_i. Statistical analysis is performed on E_amount_i, for example, calculating the mean, median, mode, etc., to determine the central tendency of the eating amount data in the temperature interval.
[0109] By performing such statistical analysis on all temperature sub-intervals, a mapping relationship between temperature and eating amount is obtained. For example, when the temperature is in a certain specific interval, what is the average eating amount of the pet? This mapping relationship constitutes the first influence pattern. This mapping relationship can be represented by a function or table, and the function form can be expressed as E_amount = f(T_temp), where E_amount is the eating amount and T_temp is the temperature.
[0110] Step S232: Extract the humidity feature information sequence and the corresponding eating time data sequence from the weather history association data, calculate the deviation value distribution of eating time under different humidity intervals, and generate a humidity and eating time deviation mapping relationship as the second influence pattern.
[0111] From the weather history association data, extract the humidity feature information sequence T_humid_associated = {humid_1, humid_2, …, humid_n} and the corresponding eating time data sequence E_time = {e_time1, e_time2, …, e_time_n}. Similarly, divide the humidity interval into multiple humidity sub-intervals [H_min1, H_max1), [H_min2, H_max2), …, [H_minm, H_maxm).
[0112] For each humidity sub-interval, calculate the deviation value of the eating time in the interval relative to the reference eating time. Let the reference eating time be E_time_base, and the set of eating time data falling in the i-th humidity sub-interval [H_min_i, H_max_i) be E_time_i = {e_time_j1, e_time_j2, …, e_time_jl}, then the corresponding deviation value set is ΔE_time_i = {e_time_j1-E_time_base, e_time_j2-E_time_base, …, e_time_jl-E_time_base}.
[0113] The deviation value set in each humidity sub-interval is statistically analyzed, for example, the average value, standard deviation, etc. of the deviation value is calculated, to obtain the distribution of the eating time deviation under different humidity intervals. The mapping relationship between humidity and eating time deviation constitutes the second influence mode, which can be expressed as ΔE_time=g(T_humid) by function or table, where ΔE_time is the eating time deviation, and T_humid is the humidity.
[0114] Step S233: Extracting the precipitation feature information sequence and the corresponding eating frequency data sequence from the weather history association data, comparing the eating frequency difference value distribution of the period with precipitation record and the period without precipitation record, and generating the mapping relationship between precipitation and eating frequency difference value as the third influence mode.
[0115] The precipitation feature information sequence T_rain_associated={rain_1, rain_2, …, rain_n} and the corresponding eating frequency data sequence E_freq={e_freq1, e_freq2, …, e_freq_n} are extracted from the weather history association data. According to the precipitation feature information, the data is divided into periods with precipitation record and periods without precipitation record.
[0116] For example, assume that the eating frequency data set of the period without precipitation record is E_freq_no_rain={e_freq_j|rain_j=0}, and the eating frequency data set of the period with precipitation record is E_freq_rain={e_freq_k|rain_k=1}. The eating frequency difference value of the period with precipitation record and the period without precipitation record is calculated, i.e. ΔE_freq=E_freq_rain-E_freq_no_rain.
[0117] The difference values are statistically analyzed, for example, the average value, median, etc. are calculated, to obtain the distribution of the eating frequency difference value under different precipitation conditions. The mapping relationship between precipitation and eating frequency difference value constitutes the third influence mode, which can be expressed as ΔE_freq=h(T_rain) by function or table, where ΔE_freq is the eating frequency difference value, and T_rain is the precipitation feature information.
[0118] Step S240: According to the feeding time feature, the feeding amount feature, combining the first influence mode, the second influence mode, and the third influence mode, adjusting the basic feeding demand to generate an environment corrected basic feeding demand.
[0119] After obtaining the first influence mode, the second influence mode, and the third influence mode, the basic feeding demand can be adjusted in combination with the feeding time feature and the feeding amount feature in the preset feeding plan.
[0120] The basic feeding requirement includes a baseline feeding time interval and a baseline feeding amount. According to the first influence mode, if the current temperature is in a certain interval, and the average feeding amount corresponding to the interval is different from the baseline feeding amount, the baseline feeding amount can be adjusted according to the difference. For example, if the first influence mode indicates that the average feeding amount of the pet should be increased at the current temperature, the baseline feeding amount can be correspondingly increased.
[0121] According to the second influence mode, if the current humidity condition causes a deviation in feeding time, the baseline feeding time interval can be adjusted. For example, if the feeding time of the pet is usually advanced at the current humidity, the baseline feeding time interval can be correspondingly shortened.
[0122] According to the third influence mode, if there is precipitation at the current time, and the feeding frequency is different under such conditions, the feeding time and the feeding amount can be comprehensively adjusted according to the difference. For example, if the feeding frequency of the pet is increased when it is raining, the feeding frequency or the feeding amount of each feeding can be appropriately increased.
[0123] By comprehensively considering the three influence modes, the baseline feeding time interval and the baseline feeding amount in the basic feeding requirement are adjusted to obtain an environment-corrected basic feeding requirement. This environment-corrected basic feeding requirement takes into account the influence of weather factors on pet feeding and is more in line with the actual needs of pets under different weather conditions.
[0124] Step S250: input the environment-corrected basic feeding requirement, the feeding amount data, the feeding time data, and the behavior data into a pre-trained feeding requirement prediction model, and obtain the predicted feeding requirement by adjusting the environment-corrected basic feeding requirement through the feeding requirement prediction model.
[0125] The environment-corrected basic feeding requirement, the feeding amount data and the feeding time data in the historical feeding data, and the behavior data are input into the pre-trained feeding requirement prediction model.
[0126] The pre-trained feeding requirement prediction model has learned the relationship between various factors and pet feeding requirements. The environment-corrected basic feeding requirement provides a basic estimate that takes into account weather factors, the feeding amount data and the feeding time data reflect the historical feeding habits of the pet, and the behavior data reflects the current physiological state and appetite of the pet.
[0127] The feeding requirement prediction model comprehensively analyzes and processes these input data. First, feature extraction and conversion are performed on different types of data to convert them into feature vectors with the same dimensions and units. Then, these feature vectors are fused by weighted splicing or weighted addition to form a comprehensive feature representation.
[0128] Then, the feeding demand prediction model further analyzes and infers the comprehensive features, continuously excavating potential relationships between data. Finally, the feeding demand prediction model adjusts the environmental correction basic feeding demand according to the analysis results, and outputs the predicted feeding demand. The predicted feeding demand is a more accurate and comprehensive result, which takes into account the pet's historical eating habits, behavior state, and weather factors, and can better meet the actual needs of the pet.
[0129] The method provided by the embodiments of the present application acquires historical weather information of the location where the pet feeding machine is located, performs time axis alignment processing on the historical weather information, and generates weather historical association data corresponding to each historical feeding record time node in the historical feeding data. The corresponding relationship between the weather historical association data and the historical eating data is analyzed, and the first influence mode of the temperature feature information and the historical eating data, the second influence mode of the humidity feature information and the historical eating data, and the third influence mode of the precipitation feature information and the historical eating data are extracted. According to the feeding time feature, the feeding amount feature, the first influence mode, the second influence mode, and the third influence mode, the basic feeding demand is adjusted to generate an environmental correction basic feeding demand, and the environmental correction basic feeding demand, the eating amount data, the eating time data, and the behavior data are input into a pre-trained feeding demand prediction model. The environmental correction basic feeding demand is adjusted by the feeding demand prediction model to obtain the predicted feeding demand. The influence of weather factors on pet eating habits is considered comprehensively, the basic feeding demand is more suitable for the actual eating needs of pets in different environmental conditions, and the inaccuracy of feeding caused by simply relying on the basic feeding demand and ignoring environmental factors is avoided. Therefore, a more scientific and more pet-actual-need-conforming feeding plan is formulated, the accuracy and rationality of pet feeding are improved, the health status of pets is maintained, the life quality of pets is improved, and the owner can more easily manage the diet of pets.
[0130] Optionally, the method of the present application can also adjust the sensor sensitivity, wake-up threshold, state switching delay, etc. of the pet feeding machine based on the prediction of the predicted feeding demand, to balance the feeding function and device energy consumption of the pet feeding machine, so as to reduce the device energy consumption while ensuring that the feeding function meets the demand, thereby improving the energy saving effect.
[0131] Step S310: dividing the active period and the inactive period of the pet feeding machine according to the predicted feeding demand, the active period being a period in which the feeding demand is greater than or equal to a demand threshold, and the inactive period being a period in which the feeding demand is less than the demand threshold.
[0132] The predicted feeding demand reflects the feeding demand of the pet at different time periods. In order to realize the energy saving and efficient operation of the pet feeding machine, the active period and the non-active period can be divided according to the predicted feeding demand.
[0133] Firstly, a demand threshold can be determined according to the actual demand. The demand threshold can be set according to historical feeding data, breed, age and other factors of the pet, for example. For example, the average feeding demand of the pet in a period of time can be calculated, and then this average value is multiplied by a coefficient as the demand threshold.
[0134] For each time point in the predicted feeding demand and the corresponding feeding amount, the feeding amount is compared with the demand threshold. If the feeding amount is greater than or equal to the demand threshold, the time period in which the time point is located is divided into an active period; if the feeding amount is less than the demand threshold, the time period in which the time point is located is divided into a non-active period.
[0135] Through such division, the running time of the pet feeding machine can be divided into active period and non-active period, so as to adopt different control strategies.
[0136] Step S320: increasing the sensor sensitivity of the pet feeding machine, reducing the wake-up threshold of the pet feeding machine, and reducing the state switching delay of the pet feeding machine in the active period.
[0137] In the active period, the pet's feeding demand is high, and the pet feeding machine needs to respond in time. Therefore, the sensor sensitivity of the pet feeding machine needs to be improved. The improvement of the sensor sensitivity can make the pet feeding machine more accurately detect the behavior and state of the pet. For example, improving the sensitivity of the acceleration sensor can more accurately detect the activity intensity of the pet, and improving the sensitivity of the infrared sensor can more timely detect whether the pet is close to the feeding machine.
[0138] Reducing the wake-up threshold of the pet feeding machine means that the pet feeding machine is more likely to be awakened. In the active period, a slight action or approach of the pet may trigger the wake-up of the feeding machine, so that it enters the working state, so as to timely detect the need for feeding operation, thereby being able to provide food for the pet more quickly.
[0139] Reducing the state switching delay of the pet feeding machine makes the feeding machine be able to switch from standby state to working state more quickly after receiving the wake-up signal. For example, the motor starting time, data processing time, etc. are shortened, so that the pet can be provided with food more quickly.
[0140] Step S330: reducing the sensor sensitivity of the pet feeding machine, increasing the wake-up threshold of the pet feeding machine, and increasing the state switching delay of the pet feeding machine in the non-active period.
[0141] During the inactive period, the pet feeding demand is low. In order to save energy, the sensor sensitivity of the pet feeding machine can be reduced. Reducing the sensor sensitivity can reduce the power consumption of the sensor, and can also avoid unnecessary false triggering. For example, reducing the sensitivity of the acceleration sensor can reduce the detection of the pet's small movements.
[0142] Increasing the wake-up threshold of the pet feeding machine means that the pet needs to have more obvious movements or approach to trigger the wake-up of the pet feeding machine. This can reduce unnecessary wake-up of the pet feeding machine during the inactive period and reduce energy consumption.
[0143] Increasing the state switching delay of the pet feeding machine means that the pet feeding machine will not immediately switch from the standby state to the working state after receiving the wake-up signal, but will have a certain delay. This can avoid frequent state switching due to accidental signals during the inactive period, further saving energy.
[0144] Step S340: Based on the adjusted sensor sensitivity, wake-up threshold, and state switching delay, generate a time-sharing wake-up strategy, and control the pet feeding machine to maintain a high response state during the active period and a low energy consumption state during the inactive period according to the time-sharing wake-up strategy.
[0145] According to the adjustment of the sensor sensitivity, the wake-up threshold and the state switching delay during the active period and the inactive period, a time-sharing wake-up strategy is generated. The time-sharing wake-up strategy may, for example, be a strategy table containing the sensor sensitivity, the wake-up threshold and the state switching delay corresponding to different time periods.
[0146] In each time period, the control system of the pet feeding machine will set the parameters according to the time-sharing wake-up strategy. During the active period, the control system will set the sensor sensitivity to a higher value, the wake-up threshold to a lower value, and the state switching delay to a smaller value, so that the pet feeding machine maintains a high response state and can meet the pet's feeding demand in time.
[0147] During the inactive period, the control system will set the sensor sensitivity to a lower value, the wake-up threshold to a higher value, and the state switching delay to a larger value, so that the pet feeding machine maintains a low energy consumption state and reduces energy consumption.
[0148] The method provided by the embodiments of the present application divides the active period and the non-active period of the pet feeding machine according to the predicted feeding demand. The sensor sensitivity of the pet feeding machine is increased, the wake-up threshold of the pet feeding machine is reduced, and the state switching delay of the pet feeding machine is reduced in the active period. The sensor sensitivity of the pet feeding machine is reduced, the wake-up threshold of the pet feeding machine is increased, and the state switching delay of the pet feeding machine is increased in the non-active period. The time-sharing wake-up strategy is generated based on the adjusted sensor sensitivity, wake-up threshold, and state switching delay, and the pet feeding machine is controlled to keep a high response state in the active period and a low energy consumption state in the non-active period according to the time-sharing wake-up strategy. In the active period when the pet is likely to need feeding, the sensor sensitivity is increased, the wake-up threshold is reduced, and the state switching delay is reduced, so that the pet feeding machine can quickly perceive the pet approaching or the relevant triggering action and respond in time to meet the feeding demand. In the non-active period when the pet is unlikely to eat, the sensor sensitivity is reduced, the wake-up threshold is increased, and the state switching delay is increased, so that unnecessary device wake-up and operation are reduced, energy consumption is reduced, the overall energy consumption of the pet feeding machine is effectively reduced while meeting the pet feeding demand, the service life of the device is prolonged, the use cost is reduced, environmental protection and energy saving are promoted, and the user satisfaction with the product is improved.
[0149] Optionally, the method of the present application can also adjust the time-sharing wake-up strategy of the pet feeding machine according to the user's preference for the energy saving effect of the pet feeding machine, the wake-up sensitivity preference, and the current time-sharing wake-up strategy of the pet feeding machine, so as to further make the time-sharing wake-up strategy adopted by the pet feeding machine meet the user's preference and improve the user's experience.
[0150] Step S410: Obtain the user's preference for the energy saving effect of the pet feeding machine and the wake-up sensitivity preference.
[0151] In order to further optimize the operation strategy of the pet feeding machine, the user's preference can also be further considered. The user can set his / her preference for the energy saving effect and the wake-up sensitivity in the control interface of the pet feeding machine or the associated mobile application.
[0152] The preference for energy saving effect reflects the user's expectation for the energy saving degree of the pet feeding machine. For example, the user may hope that the pet feeding machine can save energy to the maximum extent, and then a higher energy saving preference can be set. Or the user pays more attention to the response speed of the pet feeding machine and has a relatively low requirement for energy saving, and then a lower energy saving preference can be set.
[0153] The wake-up sensitivity preference reflects the user's requirement for the response speed of the pet feeding machine. If the user wants the pet feeding machine to wake up quickly and respond when the pet has a demand, a higher wake-up sensitivity preference can be set; otherwise, if the user does not have high requirements for the response speed of the wake-up and prefers to keep the feeding machine in a relatively quiet standby state to reduce unnecessary interference, a lower wake-up sensitivity preference can be set. These preference information set by the user will be stored in the control system of the pet feeding machine or the cloud server associated therewith for subsequent analysis and use.
[0154] Step S420: According to the environmental feedback data corresponding to the current time-sharing wake-up strategy, the environmental feedback data includes the actual energy saving effect and the actual wake-up sensitivity.
[0155] The current time-sharing wake-up strategy will generate corresponding environmental feedback data during execution. The actual energy saving effect can be evaluated by monitoring the energy consumption of the pet feeding machine in a period of time. For example, the total power consumption of the feeding machine in the active period and the non-active period can be recorded, and then compared with the power consumption without using the time-sharing wake-up strategy, to calculate the proportion or specific energy saving value of energy saving. This process requires accurate power monitoring equipment that can record the energy consumption of each component of the feeding machine, such as sensors, motors, control systems, etc.
[0156] The actual wake-up sensitivity can be measured by counting the number of wake-ups and response times of the pet feeding machine under different conditions. When the pet makes behaviors such as approaching the feeding machine and making sounds that may trigger wake-up, record whether the feeding machine successfully wakes up and the time interval from the triggering behavior to the wake-up. Through statistical analysis of a large amount of such data, an index reflecting the actual wake-up sensitivity of the feeding machine can be obtained. For example, the proportion of successful wake-up of the feeding machine in a certain number of triggering behaviors, and the average wake-up response time, etc.
[0157] Step S430: Define the state space and action space of reinforcement learning, the state space includes the current feeding time feature, the current feeding amount feature included in the current target feeding plan, the actual energy saving effect, the actual wake-up sensitivity, the wake-up sensitivity preference, the action space includes time adjustment operation, amount value adjustment operation on the current target feeding plan, energy saving effect adjustment operation, wake-up sensitivity adjustment operation on the current time-sharing wake-up strategy.
[0158] In order to further optimize the control strategy of the pet feeding machine, a reinforcement learning algorithm can be introduced, for example, Q-Learning, Deep Q-Network (DQN), Policy Gradient, etc. Reinforcement learning algorithm. First, the state space and action space of reinforcement learning need to be defined.
[0159] The state space is a description of the current system state, which contains multiple features related to the operation of the pet feeding machine. The current feeding time feature in the current target feeding plan can be represented by a time sequence, each time point corresponding to the time arrangement of a feeding; the current feeding amount feature is the feeding amount corresponding to each feeding time point, which can also be represented by a sequence. The actual energy saving effect and the actual wake-up sensitivity are indicators obtained by monitoring and statistics in the previous steps, which reflect the actual operation effect of the current time-sharing wake-up strategy. The wake-up sensitivity preference is the user's expectation of the response speed of the feeding machine, which provides the user's subjective demand information for reinforcement learning. Combining these features together constitutes the state space of reinforcement learning.
[0160] The action space defines the operations that the system can take. The time adjustment operation on the current target feeding plan means that the feeding time points can be changed, such as advancing or delaying some feeding times; the amount adjustment operation is to adjust the amount of each feeding, increasing or decreasing the feeding amount. The energy saving effect adjustment operation on the current time-sharing wake-up strategy can be realized by changing the sensor sensitivity, wake-up threshold and state switching delay parameters of the inactive period, etc., to further improve the energy saving effect; the wake-up sensitivity adjustment operation is to adjust the wake-up threshold and other parameters of the active period and the inactive period to meet the user's preference for wake-up sensitivity.
[0161] Step S440: based on the current state in the state space, a target action is selected from the action space by a reinforcement learning strategy to generate an adjusted target feeding plan and adjusted time-sharing wake-up strategy parameters.
[0162] After the state space and the action space are defined, the reinforcement learning algorithm can select a suitable target action from the action space according to the current state. The reinforcement learning strategy may, for example, be based on a policy network, which can calculate the value or probability of each action according to the input state information.
[0163] The policy network can be a deep neural network, whose input is each feature in the state space, and after calculation and transformation by multiple layers of neurons inside the policy network, the score or probability distribution of each action is output. The reinforcement learning algorithm selects the action with the highest score or the highest probability as the target action according to these scores or probability distributions.
[0164] For example, if the actual energy savings in the state space do not meet user expectations and the current wake-up sensitivity is high, the reinforcement learning algorithm can adjust the current time-sharing wake-up strategy to achieve energy savings, such as further reducing sensor sensitivity during inactive periods and raising the wake-up threshold. Furthermore, based on the feeding time and amount characteristics of the current target feeding plan, combined with the actual pet's eating habits and user preferences, the target feeding plan can also be adjusted for time or amount.
[0165] After determining the target action, the current target feeding plan and time-sharing wake-up strategy are adjusted based on the target action. For example, the target feeding plan can be adjusted by updating the feeding time and amount in the target feeding plan based on the specific content of the time adjustment operation and the amount adjustment operation. For the time-sharing wake-up strategy, parameters such as sensor sensitivity, wake-up threshold, and state switching delay can be adjusted accordingly to generate the adjusted time-sharing wake-up strategy parameters.
[0166] Step S450: Execute the adjusted target feeding plan and the adjusted time-sharing wake-up strategy parameters to obtain new environmental feedback data after execution, and use the new environmental feedback data and the energy-saving effect preference and the wake-up sensitivity preference to update the reinforcement learning strategy.
[0167] After generating the adjusted target feeding plan and adjusted time-sharing wake-up strategy parameters, the pet feeder will operate according to the new plan and strategy. During operation, environmental feedback data can continue to be collected to obtain new environmental feedback data after execution. This new environmental feedback data also includes the new actual energy savings and the new actual wake-up sensitivity. The evaluation method for these data is the same as the method for obtaining current environmental feedback data, so it will not be repeated here.
[0168] Step S451: extracting an energy-saving emphasis parameter from the energy-saving effect preference, and extracting a wake-up attention parameter from the wake-up sensitivity preference.
[0169] The user's energy-saving effect and wake-up sensitivity preferences can be further refined into specific parameters. The energy-saving emphasis parameter can reflect the user's emphasis on energy-saving effects. For example, the energy-saving effect preference can be converted into a numerical value, with a higher value indicating a greater emphasis on energy saving. This conversion process can be performed according to pre-defined rules, such as mapping different energy-saving effect preference levels to different numerical ranges.
[0170] The wake-up attention parameter corresponds to the user's level of attention to wake-up sensitivity and can also be converted into a specific value. By extracting these two parameters, we can more accurately measure user needs and provide a basis for subsequent reinforcement learning strategy updates.
[0171] Step S452: determining an energy saving effect improvement amount based on a difference value between the new actual energy saving effect in the new environment feedback data and the actual energy saving effect in the environment feedback data.
[0172] The difference value between the new actual energy saving effect in the new environment feedback data and the actual energy saving effect in the previous environment feedback data is calculated. The difference value can reflect the improvement degree of the adjusted time-sharing wake-up strategy in terms of energy saving. If the difference value is positive, it means that the energy saving effect has been improved; if the difference value is negative, it means that the energy saving effect has decreased.
[0173] When calculating the difference value, the accuracy and comparability of the data need to be ensured. For example, when calculating energy consumption, the monitoring time period, the monitored devices and methods, etc. should be kept consistent. By analyzing this difference value, the energy saving effect improvement amount can be determined, which is an index for measuring the effectiveness of the adjustment strategy.
[0174] Step S453: determining a wake-up sensitivity improvement amount based on a difference value between the new actual wake-up sensitivity in the new environment feedback data and the actual wake-up sensitivity in the environment feedback data.
[0175] Similarly, the difference value between the new actual wake-up sensitivity in the new environment feedback data and the previous actual wake-up sensitivity is calculated. This difference value can reflect the improvement of the adjusted time-sharing wake-up strategy in terms of wake-up sensitivity. For example, if the new average wake-up response time is shorter, or the proportion of successful wake-up under the same triggering behavior is higher, it means that the wake-up sensitivity has been improved.
[0176] Similar to calculating the energy saving effect improvement amount, when calculating the wake-up sensitivity improvement amount, the accuracy and consistency of the data can also be ensured. By statistically analyzing a large amount of wake-up data, a reliable difference value is obtained, and thus the wake-up sensitivity improvement amount is determined.
[0177] Step S454: determining a target reward value according to the energy saving emphasis parameter, the energy saving effect improvement amount, the wake-up attention parameter, and the wake-up sensitivity improvement amount.
[0178] The reward value is an important index in reinforcement learning for evaluating the effect of strategy adjustment. The target reward value takes into account the user's preference and the actual improvement brought by the strategy adjustment. The target reward value can be calculated according to the energy saving emphasis parameter, the energy saving effect improvement amount, the wake-up attention parameter, and the wake-up sensitivity improvement amount.
[0179] One possible calculation method: the energy saving effect improvement amount can be multiplied by the energy saving attention parameter to obtain the reward contribution in the energy saving aspect; the wake-up sensitivity improvement amount can be multiplied by the wake-up attention parameter to obtain the reward contribution in the wake-up sensitivity aspect. Then, the two reward contributions are added to obtain the final target reward value. For example, if the user attaches great importance to energy saving, the energy saving attention parameter is high, and the adjusted strategy brings a large energy saving effect improvement amount, then the reward contribution in the energy saving aspect will be larger; similarly, if the user has a high attention to the wake-up sensitivity, and the wake-up sensitivity is significantly improved, then the reward contribution in the wake-up sensitivity aspect will also be larger.
[0180] Step S455: updating the reinforcement learning strategy using the target reward value.
[0181] After obtaining the target reward value, the target reward value is used to update the reinforcement learning strategy. In reinforcement learning, the policy network can adjust its parameters according to the reward value, so as to obtain higher rewards in future decision-making.
[0182] Specifically, the updating process can use optimization algorithms such as gradient descent. For example, the target reward value can be used as a feedback signal to guide the parameter updating direction of the policy network. If the target reward value is high, it means that the selected target action is effective, and the policy network will adjust the parameters in the direction of increasing the probability of selecting this action; if the target reward value is low, it means that the current action may not be suitable, and the policy network will adjust the parameters to reduce the probability of selecting this action.
[0183] By continuously executing the adjusted plan and strategy, obtaining new environment feedback data, calculating the target reward value and updating the reinforcement learning strategy, the control strategy of the pet feeding machine can be continuously optimized, and gradually reach the best state that can meet the feeding needs of pets and meet the preferences of users for energy saving and wake-up sensitivity.
[0184] For the construction and training of the foregoing feeding demand prediction model, taking the feeding demand prediction model as an example based on a neural network model, the feeding demand prediction model can include an input layer, a hidden layer and an output layer. The input layer is used to receive the processed feature vectors of the basic feeding demand, historical feeding data, behavior data, etc. The hidden layer can contain multiple neuron layers, each neuron layer performs nonlinear transformation on the input features, and through continuous transmission and calculation, the potential relationship between data is mined. The neurons between different layers are connected through weights, and these weights are continuously adjusted and optimized during the model training process.
[0185] The training process of the feeding demand prediction model requires a large amount of labeled data, for example, a large amount of pet feeding related data can be collected, and each data sample is labeled with the corresponding actual feeding demand. During training, the input data is passed into the feeding demand prediction model, the feeding demand prediction model outputs the predicted feeding demand, and then the predicted result is compared with the labeled actual feeding demand to calculate the loss function. The loss function can measure the difference between the predicted result and the actual result. Common loss functions include mean square error loss function, cross entropy loss function, etc.
[0186] Using an optimization algorithm such as stochastic gradient descent, the weight parameters of the model are adjusted according to the value of the loss function. This process is repeated continuously, that is, the data is continuously input, the loss is calculated, and the weight is adjusted, until the difference between the predicted result of the feeding demand prediction model and the actual result reaches an acceptable range, at which time the training of the feeding demand prediction model is completed. The trained feeding demand prediction model can be used to predict the feeding demand of a new pet.
[0187] The method provided by the embodiments of the present application acquires the user's preference for the energy saving effect and the wake-up sensitivity of the pet feeding machine, and acquires the environmental feedback data corresponding to the current time-sharing wake-up strategy, the environmental feedback data including the actual energy saving effect and the actual wake-up sensitivity. The state space and the action space of the reinforcement learning related to the above factors are defined, the target action is selected from the action space based on the current state in the state space through the reinforcement learning strategy, the adjusted target feeding plan and the adjusted time-sharing wake-up strategy parameter are generated. The adjusted target feeding plan and the adjusted time-sharing wake-up strategy parameter are executed to obtain the new environmental feedback data after execution, and the new environmental feedback data and the energy saving effect preference and the wake-up sensitivity preference are used to update the reinforcement learning strategy, so as to continuously optimize the feeding plan and the time-sharing wake-up strategy parameter according to the user's preference and the actual environmental feedback data by using the reinforcement learning algorithm. The reinforcement learning strategy can select the optimal action from the action space according to the current state, so that the pet feeding machine can continuously adapt to the environmental changes while meeting the user's requirements for the energy saving effect and the wake-up sensitivity, and gradually approach the optimal combination of feeding and wake-up strategy, thereby achieving the balance between the energy saving and the wake-up sensitivity of the pet feeding machine according to the user's expectation, improving the intelligent level and the user experience of the pet feeding machine, and ensuring that the pet feeding machine can operate in the optimal way in different use scenarios, meeting the pet feeding demand and maximizing the personalized demand of the user for the energy saving and the wake-up sensitivity, and improving the product competitiveness and the user satisfaction.
[0188] Figure 2 A structure schematic diagram of a pet feeding machine control system 100 based on machine learning provided by the embodiments of the present application is provided. As shown in FIG. 1, the pet feeding machine control system 100 includes a pet feeding machine 1000, a user terminal 2000, and a server 3000. Figure 2As shown, the processor 120 can be used on the machine learning based pet feeder control system 100 and used to perform the functions in the present application.
[0189] The machine learning based pet feeder control system 100 can be a general purpose server or a special purpose server, both of which can be used to implement the machine learning based pet feeder control method of the present application. Although only one server is shown in the present application, for the sake of convenience, the functions described in the present application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0190] For example, the machine learning based pet feeder control system 100 can include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and different forms of storage media 140, such as a disk, a ROM, or a RAM, or any combination thereof. Exemplarily, the machine learning based pet feeder control system 100 can also include program instructions stored in a ROM, a RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The machine learning based pet feeder control system 100 also includes an input / output (I / O) interface 150 between the computer and other input / output devices.
[0191] For the sake of illustration, only one processor is described in the machine learning based pet feeder control system 100. However, it should be noted that the machine learning based pet feeder control system 100 in the present application can also include multiple processors, so the steps performed by one processor described in the present application can also be jointly performed or individually performed by multiple processors. For example, if the processor of the machine learning based pet feeder control system 100 performs steps A and B, it should be understood that steps A and B can also be jointly performed by two different processors or individually performed in one processor. For example, a first processor performs step A, a second processor performs step B, or the first processor and the second processor jointly perform steps A and B.
[0192] The embodiment of the present application discloses a computer readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform the steps in the machine learning based pet feeder control method of the aforementioned embodiment.
[0193] The embodiment of the present application discloses a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the machine learning based pet feeder control method of the aforementioned embodiment.
[0194] The apparatus embodiments described above are only illustrative, wherein the modules illustrated as separate components can or can not be physically separated, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place or distributed to multiple network modules. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0195] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, and the computer software products can be stored in a computer readable storage medium, including Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other medium capable of storing data and computer readable.
[0196] Finally, it should be noted that: the above disclosed is only the preferred embodiment of the present application, only for the purpose of describing the technical solutions of the present application, not for its limitation; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand; it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1.A pet feeder control method based on machine learning, characterized by, The method comprises: acquiring a preset feeding plan of the pet feeder, historical feeding data of the pet, and behavior data; obtaining a predicted feeding requirement of the pet according to the preset feeding plan, the historical feeding data, and the behavior data; adjusting the preset feeding plan of the pet feeder according to the predicted feeding requirement to generate a target feeding plan; performing a feeding operation according to the target feeding plan. 2.The machine learning-based pet feeder control method of claim 1, wherein, The method comprises: extracting feeding time features and feeding amount features from the preset feeding plan; determining a basic feeding requirement of the pet according to the feeding time features and the feeding amount features; determining historical eating data of the pet according to the historical feeding data, the historical eating data comprising eating amount data and eating time data; inputting the basic feeding requirement, the eating amount data, the eating time data, and the behavior data into a pre-trained feeding requirement prediction model, and obtaining the predicted feeding requirement of the pet by adjusting the basic feeding requirement. 3.The pet feeding machine control method based on machine learning according to claim 2, characterized in that, The method comprises: performing feature decomposition processing on the basic feeding requirement to obtain a reference feeding time interval in a time dimension and a reference feeding amount in a quantity dimension; performing historical deviation analysis processing on the eating amount data to calculate a difference between each actual eating amount and the reference feeding amount, and generating an eating amount deviation sequence; performing historical offset analysis processing on the eating time data to calculate a time difference between each actual eating time and the reference feeding time interval, and generating an eating time offset sequence; performing behavior pattern recognition processing on the behavior data to extract activity intensity features and frequency features of approaching the feeder of the pet in different time periods; inputting the reference feeding time interval, the reference feeding amount, the eating amount deviation sequence, the eating time offset sequence, the activity intensity features, and the frequency features of approaching the feeder into a feature association layer of the feeding requirement prediction model to perform multi-source information association analysis processing and generate an associated feature set; performing requirement adjustment reasoning processing on the associated feature set by an adjustment decision layer of the feeding requirement prediction model to generate a first adjustment amount of the reference feeding time interval and a second adjustment amount of the reference feeding amount; performing dynamic correction processing on the basic feeding requirement based on the first adjustment amount and the second adjustment amount to obtain the predicted feeding requirement. 4.The pet feeding machine control method based on machine learning according to claim 3, wherein, The method comprises: perform trend analysis processing on the eating amount deviation sequence in the associated feature set, and identify a long-term change trend of the actual eating amount of the pet relative to the reference feeding amount; perform periodicity analysis processing on the eating time offset sequence in the associated feature set, and identify a periodicity offset mode of the actual eating time of the pet relative to the reference feeding time interval; perform correlation analysis processing on the activity intensity feature in the associated feature set, and determine an association between the activity intensity and the eating amount deviation of the pet; perform causality analysis processing on the frequency feature of approaching the feeding machine in the associated feature set, and determine a causality between the frequency of the pet approaching the feeding machine and the eating time offset; construct a demand adjustment rule set based on the long-term change trend, the periodicity offset mode, the association, and the causality; adjust the reference feeding time interval and the reference feeding amount according to the demand adjustment rule set, and generate the first adjustment amount and the second adjustment amount. 5.The machine learning based pet feeder control method of claim 2, wherein, The inputting the basic feeding demand, the eating amount data, the eating time data, and the behavior data into the pre-trained feeding demand prediction model, and obtaining the predicted feeding demand of the pet through adjustment of the basic feeding demand, includes: obtaining historical weather information of a location where the pet feeding machine is located, the historical weather information including temperature feature information, humidity feature information, and precipitation feature information; performing time axis alignment processing on the historical weather information to generate weather historical association data corresponding to each historical feeding record time node in the historical feeding data; analyzing a corresponding relationship between the weather historical association data and the historical eating data, extracting a first influence mode of the temperature feature information and the historical eating data, a second influence mode of the humidity feature information and the historical eating data, and a third influence mode of the precipitation feature information and the historical eating data; adjusting the basic feeding demand according to the feeding time feature and the feeding amount feature, and combining the first influence mode, the second influence mode, and the third influence mode to generate an environment corrected basic feeding demand; inputting the environment corrected basic feeding demand, the eating amount data, the eating time data, and the behavior data into a pre-trained feeding demand prediction model, and obtaining the predicted feeding demand through adjustment of the environment corrected basic feeding demand by the feeding demand prediction model. 6.The pet feeding machine control method based on machine learning according to claim 5, wherein, The analysis of the corresponding relationship between the weather historical association data and the historical eating data, the extraction of the first influence mode of the temperature feature information and the historical eating data, the second influence mode of the humidity feature information and the historical eating data, and the third influence mode of the precipitation feature information and the historical eating data, includes: extracting a temperature feature information sequence and a corresponding eating amount data sequence from the weather historical association data, and statistically analyzing the centralized distribution trend of the eating amount data in the same temperature interval to generate a temperature and eating amount mapping relationship as the first influence mode; extracting a humidity feature information sequence and a corresponding eating time data sequence from the weather history correlation data, calculating a deviation value distribution of eating time under different humidity intervals, and generating a humidity and eating time deviation mapping relationship as the second influence mode; extracting a precipitation feature information sequence and a corresponding eating frequency data sequence from the weather history correlation data, comparing the eating frequency difference value distribution of the period with precipitation records and the period without precipitation records, and generating a precipitation and eating frequency difference value mapping relationship as the third influence mode. 7.The machine learning based pet feeder control method of claim 1, wherein, The method further comprises: dividing an active period and an inactive period of the pet feeding machine according to the predicted feeding demand, the active period being a period in which the feeding demand is greater than or equal to a demand threshold, and the inactive period being a period in which the feeding demand is less than the demand threshold; increasing the sensor sensitivity of the pet feeding machine, reducing the wake-up threshold of the pet feeding machine, and reducing the state switching delay of the pet feeding machine in the active period; decreasing the sensor sensitivity of the pet feeding machine, increasing the wake-up threshold of the pet feeding machine, and increasing the state switching delay of the pet feeding machine in the inactive period; generating a time-sharing wake-up strategy based on the adjusted sensor sensitivity, wake-up threshold, and state switching delay, and controlling the pet feeding machine to maintain a high-response state in the active period and a low-energy-consumption state in the inactive period according to the time-sharing wake-up strategy. 8.The pet feeding machine control method based on machine learning according to claim 7, wherein, The method further comprises: obtaining a user's preference for energy-saving effect and wake-up sensitivity of the pet feeding machine; obtaining current environment feedback data corresponding to the current time-sharing wake-up strategy, the environment feedback data including actual energy-saving effect and actual wake-up sensitivity; defining a state space and an action space of reinforcement learning, the state space including current feeding time features, current feeding amount features, actual energy-saving effect, actual wake-up sensitivity, and wake-up sensitivity preference included in the current target feeding plan, and the action space including time adjustment operations and amount value adjustment operations on the current target feeding plan, and energy-saving effect adjustment operations and wake-up sensitivity adjustment operations on the current time-sharing wake-up strategy; based on the current state in the state space, selecting a target action from the action space through a reinforcement learning strategy to generate an adjusted target feeding plan and an adjusted time-sharing wake-up strategy parameter; executing the adjusted target feeding plan and the adjusted time-sharing wake-up strategy parameter to obtain new environment feedback data after execution, and updating the reinforcement learning strategy using the new environment feedback data and the energy-saving effect preference and the wake-up sensitivity preference. 9.The pet feeding machine control method based on machine learning according to claim 8, wherein, The updating of the reinforcement learning strategy using the new environment feedback data and the energy-saving effect preference and the wake-up sensitivity preference comprises: extracting an energy-saving emphasis parameter from the energy-saving effect preference and a wake-up attention parameter from the wake-up sensitivity preference; determining an energy-saving effect improvement amount based on the difference between the new actual energy-saving effect in the new environment feedback data and the actual energy-saving effect in the environment feedback data; determine a wake-up sensitivity improvement amount based on a difference value between a new actual wake-up sensitivity in the new environment feedback data and the actual wake-up sensitivity in the environment feedback data; determine a target reward value according to the energy-saving emphasis parameter, the energy-saving effect improvement amount, the wake-up attention parameter, and the wake-up sensitivity improvement amount; update the reinforcement learning strategy using the target reward value. 10.A pet feeding machine control system based on machine learning, characterized in that, The pet feeding machine control method based on machine learning comprises a processor and a computer readable storage medium, wherein the computer readable storage medium stores machine executable instructions, and the machine executable instructions are executed by the computer to implement the pet feeding machine control method based on machine learning.
Citation Information
Patent Citations
Pet feeding method and device, computer equipment and storage medium
CN111109105A
Automatic feeding management system for pets
CN116369227A
Feeding control method and device of pet feeder and computer readable storage medium
CN116602227A
A smart remote pet feeding apparatus and the realistic control method therefor
KR1020150122303A
In-home pet feeding and monitoring system
US20150342143A1