Pig feeding method, device and equipment and storage medium

By identifying pig postures and analyzing appetite, an accurate index command was generated, which solved the problem that the porridge feed machine could not combine with the actual needs of pigs, achieved precise feeding, reduced feed waste and rancidity, and improved the economic benefits of the pig farm.

CN120340062APending Publication Date: 2025-07-18GUANGDONG MECHANICAL & ELECTRICAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510327037.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing porridge feed machines cannot effectively combine the actual feeding situation of pigs and the discharge and drainage behavior, resulting in waste and rancidity of feed, affecting pig health and breeding costs.

Method used

Through real-time monitoring video based on pig pens, the attitude recognition of pigs is determined, and the appetite desire is generated is generated. The food module is controlled for precise feeding and draining, and combined with computer vision, deep learning and data analysis technology, precise feeding is achieved.

Benefits of technology

It reduces feed waste and rancidity, reduces the risk of pigs' disease, and improves feed utilization and economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120340062A_ABST
    Figure CN120340062A_ABST
Patent Text Reader

Abstract

The invention discloses a pig feeding method, device and equipment and a storage medium, and relates to the technical field of pig farm feeding, and the method comprises the steps: carrying out the posture recognition of each pig in a pigsty based on a real-time monitoring video of the pigsty, and obtaining a posture recognition result; according to the posture recognition result, the eating desire of all pigs is determined, and a feeding instruction is generated based on the eating desire; and transmitting the feeding instruction to a preset feeding module to control the feeding module to perform feeding and feeding. According to the method, the current eating desire degree of the pig herd is judged according to the specific postures of the pigs in the fence, so that a corresponding feeding and launching strategy is adopted, the postures and behaviors of the pigs are combined with feeding of the porridge machine, effective feedback on feeding and launching is formed, and the feeding speed of the pigs is increased under the condition that the feed intake of the pigs is guaranteed as much as possible. The waste and rancidity deterioration of the feed are reduced to the maximum extent, so that the feed cost and the sick proportion of pigs are reduced, and the economic benefits of pig farm breeding are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of pig farm feeding, and in particular to a pig feeding method, device, equipment and storage medium. Background Art

[0002] In the pig farming process, feed costs account for more than 60% of the total cost of the breeding cycle. With the annual increase in feed prices and the difficulty in predicting pig price cycles, pig companies are facing increasing cost pressure. Therefore, how to reduce feed waste and improve feed conversion rate has become a key issue that needs to be urgently addressed in the pig farming industry.

[0003] Animal nutrition research has found that compared with directly feeding dry feed, feeding after mixing feed with water into a porridge state is more conducive to pig digestion and absorption, and can also reduce respiratory diseases caused by inhalation of feed dust. Based on this, the porridge feeding method has gradually been accepted by pig farming companies, and feeding devices that can simultaneously feed and drain water have also appeared on the market, namely the so-called "porridge feed machine". However, the main function of the "porridge feed machine" currently on the market is to quantitatively feed and drain water, and operate regularly according to the established feeding plan. It is impossible to effectively combine the actual feeding situation of pigs with the feeding and draining behavior to form an effective feedback mechanism. This results in the feed often not being eaten by pigs in time, and the residue in the feed trough is easy to sour. After pigs eat sour feed, they are prone to diarrhea and other diseases, which in turn causes problems such as increased pig mortality and increased feed waste.

[0004] Therefore, how to avoid the waste of feed surplus and feed rancidity in porridge feed machines is a problem that urgently needs to be solved. Summary of the invention

[0005] The main purpose of this application is to provide an invention name, aiming to solve the technical problems corresponding to the background technology.

[0006] To achieve the above objectives, the present application proposes a pig feeding method, which comprises:

[0007] Performing posture recognition on each pig in the pig pen based on the real-time monitoring video of the pig pen to obtain a posture recognition result;

[0008] Determining the eating desire of all pigs according to the posture recognition result, and generating a feeding instruction based on the eating desire;

[0009] The food placing instruction is transmitted to a preset food placing module to control the food placing module to place materials and water.

[0010] In one embodiment, the step of performing posture recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain the posture recognition result includes:

[0011] Perform pose recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain the pose categories of each pig and the number of pigs corresponding to any pose category;

[0012] Generate a pose recognition result according to each pose category and the corresponding number of pigs.

[0013] In one embodiment, the feeding desire includes a foraging desire and a drinking desire, and the step of determining the foraging desire of all pigs according to the pose recognition result and generating a feeding instruction based on the feeding desire includes:

[0014] Determine each target pig corresponding to the target pose category in the pose recognition result, where the target pose category conforms to a preset pose category;

[0015] Obtain a first distance between the head of any one of the target pigs and a preset foraging point, and a second distance between the head of any one of the target pigs and a preset drinking point;

[0016] Determine the foraging desire of all pigs according to each first distance, and determine the drinking desire of all pigs according to each second distance, where the first distance is negatively correlated with the foraging desire, and the second distance is negatively correlated with the drinking desire;

[0017] Generate a feeding instruction according to the foraging desire and the drinking desire.

[0018] In one embodiment, the step of determining the foraging desire of all pigs according to each first distance includes:

[0019] Screen out each target first distance within a preset foraging range among each first distance, and determine the corresponding number of first-index pigs based on the target first distances;

[0020] Determine the foraging desire of all pigs according to the ratio of the number of first-index pigs to the total number of all pigs.

[0021] In one embodiment, the step of determining the drinking desire of all pigs according to each second distance includes:

[0022] Screen out each target second distance within a preset drinking range among each second distance, and determine the corresponding number of second-index pigs based on the target second distances;

[0023] Determine the drinking desire of all pigs according to the ratio of the number of second-index pigs to the total number of all pigs.

[0024] In one embodiment, the feeding instruction includes a feeding instruction and a watering instruction, and the step of generating a feeding instruction according to the foraging desire and the drinking desire includes:

[0025] When the feeding desire is greater than a preset feeding threshold value and the drinking desire is less than or equal to a preset water supply threshold value, generate the feeding instruction and the water supply instruction according to the feeding desire, wherein the water supply instruction corresponds to the feeding instruction;

[0026] When the feeding desire is greater than a preset feeding threshold value and the drinking desire is greater than a preset water supply threshold value, generate the feeding instruction and the water supply instruction according to the feeding desire, and adjust the water supply instruction according to the drinking desire so that the adjusted water supply instruction increases the water supply amount of the feeding module.

[0027] In one embodiment, the feeding instruction includes a feeding instruction and a water supply instruction, the feeding module includes a preset feeding sub-module and a water supply sub-module, and the step of transmitting the feeding instruction to the preset feeding module includes:

[0028] Transmit the feeding instruction to the feeding sub-module to control the coding motor in the feeding sub-module to feed based on the feeding instruction;

[0029] Transmit the water supply instruction to the water supply sub-module to control the flow meter in the water supply sub-module to supply water based on the water supply instruction.

[0030] In addition, to achieve the above object, the present application also provides a pig feeding device, which includes:

[0031] An identification module, configured to perform pose identification on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain a pose identification result;

[0032] A generation module, configured to determine the feeding desire of all pigs according to the pose identification result and generate a feeding instruction based on the feeding desire;

[0033] A transmission module, configured to transmit the feeding instruction to a preset feeding module to control the feeding module to feed and supply water.

[0034] In addition, to achieve the above object, the present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the pig feeding method as described above.

[0035] In addition, to achieve the above object, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the pig feeding method as described above are implemented.

[0036] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the pig feeding method described above are implemented.

[0037] One or more technical solutions proposed by the present application have at least the following technical effects:

[0038] First, based on the real-time monitoring video of the pigsty, the present application performs pose recognition on each pig in the pigsty to obtain a pose recognition result. Through pose recognition, the current state and needs of the pigs can be effectively understood, providing a reliable data basis for precise feeding. Then, according to the pose recognition result, the feeding desire of all pigs is determined, and a feeding instruction is generated based on the feeding desire. By dynamically adjusting the feeding and watering instructions, the feeding needs of the pigs can be better met, realizing precise feeding according to the actual needs of the pigs and avoiding the problems of overfeeding or underfeeding. Finally, the feeding instruction is transmitted to a preset feeding module to control the feeding module to perform feeding and watering, realizing the automation and precision of the feeding process, and greatly improving the feeding efficiency. By precisely controlling the feeding and watering, it can ensure that the feed and water are mixed into a suitable porridge state, which is beneficial to the digestion and absorption of the pigs, while reducing the problems of feed waste and feed rancidity, and reducing the risk of pig diseases.

[0039] In summary, the present application judges the current feeding desire degree of the pig group according to the specific poses of the pigs in the pen, and thus adopts corresponding feeding and watering strategies to realize the on-demand feeding of the pigs, that is, organically combines the pose behaviors of the pigs with the feeding of the porridge machine to form an effective feedback on the feeding and watering. Thus, while ensuring that the pigs have as much feed intake as possible, the waste and rancidity of the feed are minimized, thereby realizing the reduction of the feed cost and the proportion of sick pigs, and improving the economic benefits of pig farm breeding. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with the present application and used together with the description to explain the principles of the present application.

[0041] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0042] Figure 1 It is a schematic flowchart provided for Embodiment 1 of the pig feeding method of the present application;

[0043] Figure 2 Schematic diagram for identifying the head position of pigs provided in the first embodiment of this application;

[0044] Figure 3 Schematic diagram of video partitioning for the pig feeding method provided in the first embodiment of this application;

[0045] Figure 4 Flow chart provided for the second embodiment of the pig feeding method of this application;

[0046] Figure 5 Brief flow chart for the pig feeding method provided in the second embodiment of this application;

[0047] Figure 6 Schematic diagram of the module structure of the pig feeding device according to the embodiment of this application;

[0048] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the pig feeding method according to the embodiment of this application.

[0049] The realization of the purpose, functional features and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners

[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.

[0051] In order to better understand the technical solutions of this application, the following will be described in detail in combination with the drawings in the specification and specific implementation manners.

[0052] The main solution of the embodiment of this application is: based on the real-time monitoring video of the pigsty, perform pose recognition on each pig in the pigsty to obtain the pose recognition result; determine the feeding desire of all pigs according to the pose recognition result, and generate a feeding instruction based on the feeding desire; transmit the feeding instruction to a preset feeding module to control the feeding module to feed and supply water

[0053] Since the main function of the current "porridge feeder" on the market is to quantitatively feed and supply water, and operate according to a predetermined feeding plan, it cannot effectively combine the actual feeding situation of pigs with the feeding and water supply behavior to form an effective feedback mechanism. This results in the feed being often not eaten by pigs in time, and it is easy to become sour when remaining in the trough. After pigs eat sour feed, it is easy to cause diseases such as diarrhea, which in turn leads to problems such as an increase in the mortality rate of pigs and an aggravation of feed waste. Therefore, how to avoid the waste of surplus feed and feed rancidity of the porridge feeder is an urgent problem to be solved at present.

[0054] The present application provides a solution, which determines the current feeding desire level of the pig group according to the specific postures of the pigs in the pen, and thus adopts corresponding strategies for feeding and watering, realizing the on-demand feeding of the pigs, that is, organically combining the posture behaviors of the pigs with the feeding of the porridge feeder to form an effective feedback on feeding and watering. Therefore, while ensuring that the pigs have as much feed intake as possible, it maximally reduces feed waste and rancidity, thereby achieving the reduction of feed costs and the proportion of sick pigs, and improving the economic benefits of pig farm breeding.

[0055] It should be noted that the execution entity of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a pig feeding system, etc. that can implement the above functions. Hereinafter, the pig feeding system will be taken as an example to illustrate this embodiment and the following embodiments.

[0056] Based on this, the embodiment of the present application provides a pig feeding method, referring to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the pig feeding method of the present application.

[0057] In this embodiment, the pig feeding method includes steps S10 to S30:

[0058] Step S10, perform posture recognition on each pig in the pig pen based on the real-time monitoring video of the pig pen to obtain a posture recognition result;

[0059] It should be noted that the posture recognition result refers to the classification and statistical information about different postures of pigs such as standing, lying down, and fighting obtained by analyzing the video images of pigs through image processing and deep learning algorithms.

[0060] It can be understood that since the traditional feeding method cannot understand the feeding status of pigs in real time, resulting in inaccurate feed feeding, which is likely to cause waste or shortage, so performing step S10 can avoid feed waste, feed rancidity, and pig health problems caused by the inability to accurately judge the feeding status of pigs. Thus, through real-time monitoring and posture recognition, the feeding status of each pig can be accurately understood, providing data support for precise feeding.

[0061] Exemplarily, install a high-definition camera above the pig pen to collect the video images of pigs in real time. Use a pre-trained deep learning model (such as a convolutional neural network) to analyze the video images in real time, identify different postures of pigs such as standing, lying down, and fighting, and store the recognition results in the database.

[0062] In a feasible implementation manner, step S10 may include steps S11 to S12:

[0063] Step S11: Based on the real-time monitoring video of the pigsty, perform pose recognition on each pig in the pigsty to obtain the pose category of each pig and the number of pigs corresponding to any pose category.

[0064] It can be understood that due to the lack of real-time monitoring of individual pig behaviors in traditional feeding methods, it is impossible to accurately grasp the feeding status and needs of each pig. Therefore, performing Step S11 can avoid improper feeding, feed waste, and pig health problems caused by inaccurate pig pose recognition. Thus, through real-time monitoring and pose recognition, the pose category of each pig (such as lying down, standing, fighting, etc.) and the number of pigs in each pose category can be accurately understood, providing reliable data support for subsequent feeding decisions.

[0065] Exemplarily, install multiple high-definition cameras in the pigsty to cover the entire pigsty area to ensure no blind spots in monitoring. Use deep learning algorithms (such as convolutional neural networks) to perform real-time analysis on the real-time video stream to identify the pose category of each pig (such as lying down, standing, fighting, etc.). Through image processing technology, duplicate removal and statistics are performed on the recognition results to obtain the number of pigs corresponding to each pose category, and this information is stored in the database in real time.

[0066] Step S12: Generate a pose recognition result based on each pose category and the corresponding number of pigs.

[0067] It can be understood that since simple pose category and quantity information cannot directly guide feeding, it is necessary to integrate and analyze this information to generate a more intuitive and easy-to-understand pose recognition result. Therefore, performing Step S12 can avoid difficulties and inaccuracies in feeding decisions caused by scattered information and lack of integration. Thus, by integrating each pose category and the corresponding number of pigs, a comprehensive situation recognition result is generated, facilitating the system to quickly understand the overall state of the pig group and providing an intuitive and effective basis for precise feeding.

[0068] Exemplarily, set a scheduled task to extract the latest pose category and corresponding pig quantity information from the database every certain period (such as 5 minutes). Use a data integration algorithm to summarize and analyze this information to generate a comprehensive situation recognition result including each pose category and the corresponding number of pigs. Display this result to the breeding personnel in the form of a chart or report, facilitating them to quickly understand the overall state of the pig group and make corresponding feeding decisions. At the same time, transmit this result to the subsequent feeding control system as an important basis for generating the food delivery instruction.

[0069] In this embodiment, by adopting multiple technical means combining computer vision, deep learning, image processing, and data integration and analysis, the problems of fuzzy and unspecific recognition results caused by the lack of detailed posture classification and quantity statistics are avoided. At the same time, the problems of inaccurate and non-precise feeding decisions caused by the inability to accurately quantify pig behaviors are also avoided. The refined and quantitative recognition of pig behaviors is achieved. Not only can the posture categories of each pig be accurately distinguished, but also the number of pigs in each posture category can be counted, thereby generating a more detailed and specific posture recognition result. This provides more reliable and accurate data support for subsequent feeding decisions, and helps to achieve more efficient and economical pig farming management.

[0070] Step S20, determine the feeding desire of all pigs according to the posture recognition result, and generate a feeding instruction based on the feeding desire;

[0071] It should be noted that the feeding instruction refers to a specific instruction generated according to the feeding desire of pigs for controlling the feeding module and the water supply module to feed and supply water, including information such as the feeding amount and the water supply amount.

[0072] It can be understood that since pure posture recognition cannot directly guide feeding and the posture information needs to be converted into an operable feeding instruction, step S20 is carried out, which can avoid feed waste and pig health problems caused by the mismatch between the feeding instruction and the actual needs of pigs. Thus, by converting the posture recognition result into a feeding desire and generating a corresponding feeding instruction, precise feeding is achieved and the feed utilization efficiency is improved.

[0073] Exemplarily, first set the association rules between postures and feeding desires, such as the eating posture indicates a high feeding desire, the lying posture indicates a low feeding desire, etc. According to the posture recognition result in the database, calculate the average feeding desire of all pigs. Use a preset threshold judgment algorithm to generate corresponding feeding and water supply instructions according to the feeding desire, such as a high feeding desire corresponding to a larger feeding amount and a larger water supply amount, and a low feeding desire corresponding to a smaller feeding amount and a smaller water supply amount.

[0074] In a feasible embodiment, the feeding desire includes a foraging desire and a drinking desire, and step S20 may include steps S21 to S24:

[0075] Step S21, determine the target pigs corresponding to the target posture category in the posture recognition result, where the target posture category conforms to a preset posture category;

[0076] It should be noted that the target posture category refers to the pig posture category identified by the posture recognition algorithm and conforming to the preset feeding posture; the preset posture category refers to the pre-set standard posture category indicating that the pig may be eating or preparing to eat, such as standing and eating, standing and waiting to eat.

[0077] It can be understood that in order to achieve precise feeding, it is necessary to screen out pigs that conform to a specific feeding posture from the posture recognition results. Therefore, performing step S21 can avoid misjudging pigs in non-feeding postures as those in need of feeding, thereby reducing feed waste and interference, and ensuring that only pigs truly in the feeding posture are identified, providing an accurate target group for subsequent feeding decisions.

[0078] Exemplarily, use a deep learning algorithm to perform posture recognition on the real-time monitoring video, compare the recognition results with the preset feeding posture categories, screen out the pigs that conform to the target posture category, and record their numbers.

[0079] Step S22, obtain a first distance between the head of any one of the target pigs and a preset feeding point, and a second distance between the head of any one of the target pigs and a preset drinking point;

[0080] It should be noted that the preset feeding point refers to the fixed position preset in the pigsty for pigs to eat, which can be the feeding point corresponding to the feeding of the feeding module (i.e., the porridge feeder); the first distance refers to the straight-line distance between the head of the target pig and the preset feeding point; the preset drinking point refers to the fixed position preset in the pigsty for pigs to drink; the second distance refers to the straight-line distance between the head of the target pig and the preset drinking point.

[0081] It can be understood that by measuring the distances between the pig's head and the feeding point and the drinking point, the feeding and drinking desires of the pig can be indirectly judged. Therefore, performing step S22 can avoid the singularity of making feeding decisions only relying on the posture recognition results, add the distance as a judgment basis, make the decision more comprehensive and accurate, thereby providing a quantitative index to evaluate the feeding and drinking desires of the pig, and providing more accurate data support for generating the feeding instruction. At the same time, it also avoids the problem of errors in recognition caused by the positioning point being easily blocked when positioning the pig's mouth to calculate the relative distance in the traditional recognition scheme, thereby improving the accuracy of recognition and calculation by calculating the relative distance based on the pig's head.

[0082] Exemplarily, use image processing techniques, such as edge detection and contour recognition, to accurately locate the head position of each target pig. Please refer to Figure 2, the highlighted white area in the figure is the head position of the pigs. At the same time, fixed feeding points and drinking points are preset in the pigsty, and the positions of these points are marked in the image. By calculating the pixel distance between the head of the target pig and these preset points and converting it into the actual physical distance, the first distance between the head of each pig and the feeding point and the second distance between the head of each pig and the drinking point are obtained. Please refer to Figure 3 , according to the structure of the pigsty in the figure, the pigsty is divided into 5 areas, namely the feeding area 2, the feeding waiting area or activity area 5, the drinking area 1, the drinking waiting area or rest area 3, and the activity area or rest area 4, and the pixel ranges of different areas are framed in the image.

[0083] Step S23, determine the feeding desire of all pigs according to each first distance, and determine the drinking desire of all pigs according to each second distance, wherein the first distance is negatively correlated with the feeding desire, and the second distance is negatively correlated with the drinking desire;

[0084] It can be understood that since there is a negative correlation between the distance and the desire, that is, the closer the distance, the stronger the desire, so performing step S23 can avoid ignoring the influence of the distance factor on the feeding decision, make the decision more in line with the actual needs of the pigs, and thus through the distance judgment, the feeding and drinking desires of all pigs can be more accurately evaluated, providing a more scientific basis for generating the feeding instruction.

[0085] Exemplarily, a series of distance thresholds are set, and these thresholds are compared with the obtained first distance and second distance. According to the distance, the feeding desire and drinking desire of the pigs are divided into different levels, such as high, medium, and low. Specifically, the smaller the first distance, the closer the pig is to the feeding point, and the higher its feeding desire; the smaller the second distance, the closer the pig is to the drinking point, and the higher its drinking desire. This negative correlation can be achieved through a preset mapping function or look-up table.

[0086] In a feasible implementation manner, the step of determining the feeding desire of all pigs according to each first distance in step S23 may include steps A231 to A232:

[0087] Step A231, screen out each target first distance within the preset feeding range among each first distance, and determine the corresponding first index pig number based on each target first distance;

[0088] It should be noted that the preset feeding range refers to a set distance range centered on the preset feeding point, and the pigs within this range are considered to be likely to feed; the target first distance refers to the distance between the pig's head and the preset feeding point, and this distance is within the preset feeding range; the first index pig number refers to the number of pigs within the preset feeding range, that is, the number of pigs that meet the target first distance.

[0089] It can be understood that in order to more accurately judge the feeding desire of pigs, it is necessary to screen out those pigs that are truly close to the feeding point and may be eating or about to eat. Therefore, by performing step A231, it is possible to avoid misjudging pigs that are far from the feeding point and have no intention of eating as having a feeding desire, thereby reducing feed waste caused by misjudgment, ensuring that only pigs that are truly close to the feeding point are counted in the statistics of feeding desire, and improving the accuracy of judging feeding desire.

[0090] Exemplarily, through image processing technology, the distance between the pig's head and the preset feeding point is monitored in real time. A preset feeding range is set, for example, 1 to 2 meters. The system automatically screens out pigs within the preset feeding range and counts them to obtain the number of pigs in the first indicator. For example, if the preset feeding range includes a feeding area and a feeding waiting area, pigs with their heads in the feeding area are classified as pigs a1 that are eating, and pigs with their heads in the feeding waiting area are classified as pigs a2 with a feeding desire. The corresponding number of pigs in the first indicator is then a1 + a2.

[0091] Step A232, determine the feeding desire of all pigs according to the ratio of the number of pigs in the first indicator to the total number of all pigs.

[0092] It can be understood that since the feeding desire of all pigs can be quantified by calculating the proportion of the number of pigs close to the feeding point to the total number of all pigs, performing step A232 can avoid the one-sidedness of judging the feeding desire of all pigs based only on the behavior of individual pigs, improve the comprehensiveness and accuracy of the judgment, and thus more scientifically reflect the feeding desire of all pigs by quantifying the ratio, providing more reliable data support for precise feeding.

[0093] Exemplarily, the system continuously counts the total number of all pigs in the pigsty and calculates the ratio of the number of pigs in the first indicator to the total number of all pigs. For example, the feeding desire coefficient r = (a1 + a2) / m is used to judge the strength of the pigs' feeding desire. If the number of pigs in the first indicator is 20 and the total number of all pigs is 100, the ratio is 0.2. The feeding desire level is determined according to the ratio. For example, a ratio of 0 - 0.3 indicates low desire, 0.3 - 0.7 indicates medium desire, and 0.7 - 1 indicates high desire. This feeding desire level is used as one of the important bases for generating the feeding instruction.

[0094] In this embodiment, a refined feeding decision-making scheme based on distance screening and ratio calculation is implemented, which avoids misjudgment caused by not considering the actual distance distribution between pigs and feeding points and the overall behavior state of pigs, resulting in inaccurate feeding decisions and feed waste. Therefore, through distance screening and ratio calculation, a more accurate and scientific judgment of the feeding desire of pigs is achieved, the accuracy of feeding decisions is improved, feed waste is effectively reduced, and the feeding efficiency and quality are enhanced. At the same time, through quantitative analysis, more reliable data support is provided for precise feeding.

[0095] In a feasible embodiment, the step of determining the drinking desire of all pigs according to each second distance in step S23 may include steps B231 to B232:

[0096] Step B231, screening each target second distance within a preset drinking range among the second distances, and determining the corresponding number of second-index pigs based on the target second distances;

[0097] It should be noted that the preset drinking range refers to a set distance range centered on a preset drinking point. Only when the distance between the pig's head and the drinking point is within this range is it considered that the pig may have a drinking behavior; the target second distance refers to the distance between the pig's head and the drinking point, and this distance is within the preset drinking range; the number of second-index pigs refers to the number of pigs within the preset drinking range, that is, the number of pigs that may be drinking or about to drink.

[0098] It can be understood that in order to accurately judge the drinking desire of pigs, it is necessary to pay attention to those pigs that are really close to the drinking point and may be drinking or about to drink. Therefore, performing step B231 can avoid misjudging pigs that are far from the drinking point and have no intention of drinking as having a drinking desire, thereby reducing the waste of drinking water resources and unnecessary water outlet operations caused by misjudgment, and ensuring that only pigs that are really close to the drinking point are counted in the statistics of drinking desire, improving the accuracy of drinking desire judgment.

[0099] Exemplarily, through image processing technology, the distance between the pig's head and the preset drinking point is monitored in real time. A preset drinking range is set, for example, 1 to 2 meters. The system automatically screens out the pigs whose distances are within the preset drinking range and counts them to obtain the number of second-index pigs. For example, if the preset drinking range includes a drinking area and a drinking waiting area, the pig's head located within the drinking area is classified as a drinking pig a3, and the pig's head located in the drinking waiting area is classified as a pig a4 with a drinking desire, then the corresponding number of second-index pigs is a3 + a4.

[0100] Step B232, determining the drinking desire of all pigs according to the ratio of the number of second-index pigs to the total number of all pigs.

[0101] It can be understood that since the drinking desire intensity of all pigs can be more objectively reflected through the proportional relationship, performing step B232 can avoid the one-sidedness of making an overall judgment based only on the behaviors of individual pigs, reduce the possibility of misjudgment, and thus through quantitative analysis, achieve a more accurate and scientific judgment of the drinking desire of all pigs, providing a reliable basis for subsequent water supply decisions.

[0102] Exemplarily, the system real-time counts the total number of all pigs in the pigsty and calculates the ratio of the number of pigs in the second index to the total number of all pigs. For example, the drinking desire coefficient k = (a3 + a4) / m is used to judge the strength of the pigs' drinking desire. If the number of pigs in the second index is 20 and the total number of all pigs is 50, the ratio is 0.4. The feeding desire level is determined according to the ratio. For example, a ratio of 0 - 0.3 indicates a low desire, 0.3 - 0.7 indicates a medium desire, and 0.7 - 1 indicates a high desire. This feeding desire level is used as one of the important bases for generating the food delivery instruction.

[0103] In this embodiment, by implementing a refined drinking desire evaluation scheme based on distance screening and ratio calculation, it avoids misjudgment caused by not considering the actual distance distribution of pigs to the drinking point and the overall behavior state of pigs, which may lead to inaccurate water supply decisions and unnecessary waste of water resources. Thus, it realizes a more accurate and scientific evaluation of the pigs' drinking desire, improves the accuracy of water supply decisions, effectively reduces water resource waste, and enhances the water supply efficiency and quality. At the same time, through quantitative analysis, it provides more reliable data support for precise water supply.

[0104] Step S24, generate a food delivery instruction according to the feeding desire and the drinking desire.

[0105] It can be understood that since a reasonable feeding strategy can be formulated according to the feeding and drinking desires of pigs, performing step S24 can avoid problems such as blind feeding or insufficient feeding, and thus achieve precise feeding according to the actual needs of pigs, reduce feed waste, and improve the precision and efficiency of feeding.

[0106] Exemplarily, according to the feeding desire and drinking desire levels of each pig, combined with a preset feeding strategy (such as the feed types, quantities, and water feeding ratios corresponding to different desire levels), personalized food delivery instructions are generated. These instructions include parameters such as the food delivery amount, water delivery amount, feed type, and feeding time. The generated instructions are transmitted to the intelligent feeding system in the pigsty through the wireless communication module. After receiving the instructions, the system controls the corresponding feed delivery device and water supply device to accurately deliver feed and supply water according to the instructions.

[0107] In this embodiment, by adopting multiple technical means of computer vision, image processing, deep learning, distance measurement, data analysis and intelligent control, the problems of inaccurate and non-precise feeding decisions caused by single posture recognition results and lack of quantitative indicators are avoided. At the same time, the problems of improper feeding, resource waste and pig health problems caused by the inability to distinguish the specific needs of pigs (such as eating or drinking water) are avoided. The refined and quantitative analysis of pig behavior is realized. It can not only accurately identify the pigs that meet the preset feeding postures, but also further determine their eating and drinking desires by measuring the distance between the pig's head and the preset feeding point and drinking point. This multi-dimensional data analysis makes the feeding decision more accurate and personalized, effectively reduces feed waste, improves feed conversion rate, and enhances the health level and breeding efficiency of pigs. At the same time, the generated feeding instruction is more scientific and reasonable, realizing precise feeding, and further optimizing the management of live pig breeding.

[0108] Step S30: Transmit the feeding instruction to a preset feeding module to control the feeding module to discharge feed and water.

[0109] It can be understood that since the generated feeding instruction needs to be transmitted to the actuator to realize the automated feeding process, performing step S30 can avoid the inaccuracy and untimely nature of manual feeding, reduce the influence of human factors on the feeding process, and thus realize the automation and precision of the feeding process by automatically controlling the discharge of feed and water, improving the feeding efficiency and quality.

[0110] Exemplarily, the generated feeding instruction is transmitted to a porridge feeder, that is, the feeding module, through a wireless communication module. After receiving the instruction, the porridge feeder controls the coded motor to rotate at a specific speed to achieve precise feed discharge; at the same time, it controls the flow meter to discharge water at a specific flow rate to achieve precise water discharge. The feed discharge and water discharge processes are monitored in real time to ensure consistency with the instruction, and precise feeding is completed.

[0111] In a feasible embodiment, the feeding instruction includes a feed discharge instruction and a water discharge instruction, and the feeding module includes a preset feed discharge sub-module and a water discharge sub-module. Step S30 may include steps S31 to S32:

[0112] Step S31: Transmit the feed discharge instruction to the feed discharge sub-module to control the coded motor in the feed discharge sub-module to discharge feed based on the feed discharge instruction;

[0113] It should be noted that the feed discharge instruction refers to the feed discharge amount instruction calculated according to factors such as the eating desire and growth stage of pigs, including parameters such as the feed discharge amount and the feed discharge time; the feed discharge sub-module refers to the subsystem responsible for executing the feed discharge instruction, including feed storage, conveying and discharging devices; the coded motor refers to a motor with an encoder that can precisely control the feed discharge amount and speed.

[0114] It can be understood that in order to ensure that pigs receive an appropriate and uniform amount of feed, the calculated feed discharge amount needs to be accurately transmitted to the feed discharge system for execution. Therefore, performing step S31 can avoid inaccurate and uneven feed amounts caused by manual feed discharge or lack of precise control, thereby reducing feed waste and uneven feeding among pigs, achieving precise feed discharge, ensuring that each pig receives an appropriate amount of feed, and improving feed utilization rate and pig growth efficiency.

[0115] Exemplarily, first, based on the feeding desire and growth stage of pigs, calculate the feed amount required for each pig and generate a feed discharge instruction, and then transmit the feed discharge instruction to the feed discharge sub-module. After receiving the instruction, the coded motor in the feed discharge sub-module discharges feed according to the specified feed discharge amount and speed in the instruction, ensuring that each pig receives an appropriate and uniform amount of feed.

[0116] Step S32: Transmit the water discharge instruction to the water discharge sub-module to control the flowmeter in the water discharge sub-module to discharge water based on the water discharge instruction.

[0117] It should be noted that the water discharge instruction refers to the water discharge amount instruction calculated according to the drinking desire of pigs or feed mixing requirements, including parameters such as the water discharge amount and water discharge time; the water discharge sub-module refers to the subsystem responsible for executing the water discharge instruction, including water source supply, transportation, and discharge devices; the flowmeter refers to the device used to measure and control the water flow rate, which can accurately control the water discharge amount and speed.

[0118] It can be understood that in order to provide an appropriate and stable water source for pigs to drink or mix feed, the calculated water discharge amount needs to be accurately transmitted to the water discharge system for execution. Therefore, performing step S32 can avoid unstable, insufficient, or excessive water amounts caused by manual water supply or lack of precise control, thereby reducing water resource waste and uneven drinking among pigs, achieving precise water supply, ensuring that pigs obtain a stable and appropriate water source, and improving water resource utilization rate and pig drinking health.

[0119] Exemplarily, according to the drinking desire of pigs or feed mixing requirements, calculate the required water amount, generate a water discharge instruction, and transmit the water discharge instruction to the water discharge sub-module. After receiving the instruction, the flowmeter in the water discharge sub-module discharges water according to the specified water discharge amount and speed in the instruction, that is, by reading the pulse number of the flowmeter to accurately control the volume of the water discharge amount, ensuring a stable and appropriate water source for pigs to drink or mix feed.

[0120] In this embodiment, by separately executing the feeding and water supply functions with independent feeding sub-modules and water supply sub-modules, each module receives specific feeding instructions and water supply instructions respectively, and uses coded motors and flow meters for precise control, avoiding problems such as inaccurate control and asynchronous response that may occur when a single module simultaneously processes feeding and water supply tasks. That is, unified control may lead to inaccurate mixing ratios of feed and water, or time differences during feeding and water supply, thus affecting the uniformity of feed and the feeding experience of pigs. Therefore, independent and precise control of the feeding and water supply processes is achieved, ensuring accurate mixing ratios of feed and water and synchronous feeding and water supply actions. This improves the precision of feeding, guarantees the uniformity and palatability of feed, and enhances the feeding efficiency of pigs and the utilization rate of water resources. At the same time, the independent modular design facilitates maintenance and upgrading, enhances the reliability and flexibility of the entire feeding system, and provides more efficient and stable support for intelligent pig farming management.

[0121] This embodiment provides a pig feeding method. According to the specific postures of pigs in the pen, the current feeding desire degree of the pig group is judged, and corresponding feeding and water supply strategies are adopted to achieve on-demand feeding of pigs. That is, the posture behaviors of pigs are organically combined with the feeding of the porridge feeder to form an effective feedback on feeding and water supply. Thus, while ensuring that pigs eat as much as possible, the waste and rancidity of feed are minimized, thereby reducing the feed cost and the proportion of sick pigs, and improving the economic benefits of pig farm breeding.

[0122] In a feasible embodiment, after step S20, steps S100 to S300 may further be included:

[0123] Step S100, obtaining a historical feeding data set, where the historical feeding data set includes historical feeding data at preset feeding points in the pig pen, historical water supply data at preset drinking points, and historical feeding data of the feeding module;

[0124] It should be noted that the historical feeding data set refers to the set of all relevant data recorded at each feeding point, drinking point, and feeding module in the pig pen over a past period of time; historical feeding data refers to the recorded data such as the amount and time of each feeding at preset feeding points in the pig pen over a past period of time; historical water supply data refers to the recorded data such as the amount and time of each water supply at preset drinking points in the pig pen over a past period of time; historical feeding data refers to the detailed records of the feeding instructions executed by the feeding module over a past period of time, including feeding time, feeding amount, etc.

[0125] It can be understood that, in order to deeply analyze the feeding behavior of pigs by using historical data and improve the accuracy of pig feeding prediction, step S100 is performed, which can avoid the one-sidedness of generating feeding instructions only based on current observation data, reduce the decision-making error caused by the lack of historical data support, and thus provide more comprehensive and rich input information for the prediction model by integrating historical feeding, watering and feeding data, enhancing the reliability and accuracy of the prediction.

[0126] Exemplarily, the system automatically extracts relevant data within the past month from the central database of the pigsty, including historical feeding data such as the feeding amount, feeding time, feed type, etc. at each preset feeding point; historical watering data such as the watering amount, watering time, etc. at each preset watering point; and historical feeding data such as the execution time and execution amount of each feeding instruction recorded by the feeding module. After cleaning and formatting these data, they are integrated into a unified historical feeding data set to provide input for the subsequent prediction model.

[0127] Step S200, input the historical feeding data, the historical watering data and the historical feeding data into a pre-trained prediction model to predict the feeding status of all pigs in a future time period through the prediction model;

[0128] It should be noted that the pre-trained prediction model refers to a machine learning model that has been trained in advance using a large amount of data and can predict the feeding status of pigs in a future time period based on the input historical data; the feeding status in the future time period refers to the change situation of feeding-related indicators such as the feed intake and feeding frequency of pigs in a certain future time period predicted by the prediction model.

[0129] It can be understood that, since the pre-trained prediction model is used to process historical data and can predict the feeding status of pigs in a future time period, step S200 is performed, which can avoid the blindness and lag of manually adjusting feeding instructions in traditional methods, reduce the error caused by human intervention, and thus realize the advance prediction of the future feeding status through model prediction, providing a scientific basis for dynamically adjusting feeding instructions.

[0130] Exemplarily, the sorted historical feeding data set is input into a pre-trained machine learning prediction model, which can be a neural network model based on deep learning, such as LSTM (Long Short-Term Memory Network) or GRU (Gated Recurrent Unit Network), specifically for time series prediction. After receiving the input, the model outputs the prediction results of the feeding status of all pigs in a future time period through internal calculations and feature extraction, including the expected feed intake and feeding time distribution.

[0131] Step S300, adjust the feeding instruction according to the feeding status.

[0132] It can be understood that since the feeding instruction is adjusted in real time based on the prediction result, the feeding needs of pigs can be more accurately met. Therefore, performing step S300 can avoid the problem that the fixed feeding instruction cannot adapt to the actual demand changes of pigs, reduce feed waste and insufficient feeding of pigs, thereby realizing the dynamic optimization of the feeding instruction, improving the accuracy and efficiency of feeding, and further enhancing the economic benefits of pig breeding.

[0133] Exemplarily, the system automatically adjusts the generated feeding instruction according to the future feeding status output by the prediction model. For example, if the prediction result shows that the feed intake of pigs will increase during a certain period, the system will correspondingly adjust the feeding instruction to increase the feeding amount during that period; conversely, if the predicted feed intake decreases, the system will reduce the feeding amount. The adjusted feeding instruction is executed in real time through the feeding module to ensure that each pig obtains a feed supply that meets its actual needs. The whole process realizes automatic and intelligent control, reduces manual intervention, and improves the feeding efficiency and quality.

[0134] In this embodiment, through the intelligent feeding optimization of integrating historical data and machine learning prediction models, the static and one-sided nature of generating feeding instructions only based on the current posture recognition result is avoided, and the problems of insufficient or excessive feeding caused by the lack of historical data support and future prediction are reduced. The accurate prediction and dynamic adjustment of the feeding status of pigs are realized, the accuracy and efficiency of feeding are improved, and feed waste is reduced, thereby enhancing the economic benefits of pig breeding.

[0135] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 4 , the feeding instruction includes a feeding instruction and a water supply instruction, and step S24 may include steps S241 to S243:

[0136] Step S241, when the feeding desire is greater than the preset feeding threshold and the drinking desire is less than or equal to the preset water supply threshold, generate the feeding instruction and the water supply instruction according to the feeding desire, wherein the water supply instruction corresponds to the feeding instruction;

[0137] It should be noted that the feeding instruction refers to the instruction for controlling the coding motor in the feeding sub-module to feed, including parameters such as the feeding amount, speed, and time; the water supply instruction refers to the instruction for controlling the flow meter in the water supply sub-module to supply water, including parameters such as the water supply amount, flow rate, and time.

[0138] It can be understood that when the feeding desire of pigs is high while the drinking desire is not, it is necessary to generate corresponding feeding and watering instructions according to the feeding desire to ensure the palatability of the feed and the feeding needs of pigs. Therefore, performing step S241 can avoid excessive water supply when pigs do not need much water, resulting in waste of water resources and over-dilution of the feed, which affects the feeding effect of pigs. Thus, precise feeding according to the actual needs of pigs is achieved, ensuring the palatability and nutrient concentration of the feed, and improving the feed utilization rate and the growth efficiency of pigs.

[0139] Exemplarily, the system monitors the feeding and drinking desires of pigs in real time. When the feeding desire exceeds the preset feeding threshold while the drinking desire does not exceed the preset watering threshold, the system calculates the required amount of feed according to the feeding desire and generates a corresponding feeding instruction. At the same time, the system generates a watering instruction corresponding to the feeding instruction to ensure an appropriate mixing ratio of feed and water. The feeding instruction and the watering instruction are respectively transmitted to the feeding sub-module and the watering sub-module through the communication system to control the coded motor and the flow meter for precise feeding and watering.

[0140] Step S242, in the case where the feeding desire is greater than the preset feeding threshold and the drinking desire is greater than the preset watering threshold, generate the feeding instruction and the watering instruction according to the feeding desire, and adjust the watering instruction according to the drinking desire so that the adjusted watering instruction increases the water supply amount of the feeding module.

[0141] It can be understood that when both the feeding and drinking desires of pigs are high, in addition to generating feeding and watering instructions according to the feeding desire, it is also necessary to adjust the watering instruction according to the drinking desire to ensure that pigs obtain sufficient water. Therefore, performing step S242 can avoid insufficient water supply when pigs need more water, resulting in the unmet drinking needs of pigs, which affects their health and growth. Thus, dynamic adjustment according to the feeding and drinking needs of pigs is achieved, ensuring that pigs obtain sufficient and appropriate feed and water, and further improving the precision of feeding.

[0142] Exemplarily, in the case where both the feeding and drinking desires are high, the system first generates basic feeding and watering instructions according to the feeding desire. Then, the system dynamically adjusts the watering instruction according to the drinking desire to increase the water supply amount to meet the drinking needs of pigs. The adjusted watering instruction is transmitted to the watering sub-module to control the flow meter to increase the water supply amount, while the feeding instruction is transmitted to the feeding sub-module to control the coded motor for feeding. Through real-time monitoring and adjustment, it is ensured that pigs obtain sufficient and appropriate feed and water.

[0143] Step S243, when the feeding desire is less than or equal to a preset feeding threshold, use a preset auxiliary feeding instruction as the feeding instruction, where the auxiliary feeding instruction is used to control the feeding module to feed the induction feed.

[0144] It should be noted that the auxiliary feeding instruction is a special feeding instruction used to control the feeding module to feed the induction feed when the pig's feeding desire is low. The induction feed usually has higher attractiveness, such as feed with a stronger fragrance, better taste, or special feed added with attractants, aiming to stimulate the pig's appetite and induce it to eat. The auxiliary feeding instruction will specify the amount, time, and method of feeding the induction feed to ensure effective induction of the pig to eat.

[0145] It can be understood that when the pig's feeding desire is low, directly following the conventional feeding instruction may not effectively stimulate its appetite, resulting in feed waste and poor growth of the pig. Therefore, special measures need to be taken to induce the pig to eat to ensure it obtains sufficient nutrition. So, performing step S243 can avoid the problem of still feeding according to the conventional feeding instruction when the pig's feeding desire is low, reduce feed waste and the pig's resistance to feed, thereby improving the breeding efficiency.

[0146] In this embodiment, through precise feeding control based on dynamic threshold judgment and case-by-case processing, first set the preset thresholds for feeding and drinking, then compare the real-time monitored feeding desire and drinking desire with these thresholds, and generate and adjust the feeding instruction and drinking water instruction in three cases, avoiding the problem of inaccurate feeding caused by not distinguishing the specific situations of feeding and drinking needs. Directly generating the feeding instruction may not be able to adapt to the specific needs of pigs in different situations, resulting in a mismatch between the supply of feed and water, thus affecting the feeding effect and health of pigs, and realizing a precise response to the feeding and drinking needs of pigs. When the feeding desire is high and the drinking desire is not high, the palatability and nutrient concentration of the feed are ensured; when both the feeding desire and the drinking desire are high, the amount of drinking water is increased by adjusting the drinking water instruction to meet the pig's drinking water needs. This method improves the precision and flexibility of feeding and optimizes the utilization efficiency of feed and water.

[0147] Exemplarily, to help understand the implementation process of the pig feeding method obtained by combining this embodiment with the above-mentioned embodiment one, please refer to Figure 5 , Figure 5 A brief flowchart of a pig feeding method is provided, specifically:

[0148] Obtain the real-time monitoring video collected for the pigsty, perform pose recognition on the real-time monitoring video, and obtain the pose recognition result. Then, determine the feeding desire and drinking desire of all pigs according to the pose recognition result. Thus, when the feeding desire does not meet the standard, generate the first feeding instruction, that is, control the feeding module to feed the induced feed; when the feeding desire meets the standard but the drinking desire does not meet the standard, generate the second feeding instruction, that is, control the feeding module to feed and supply water in the normal proportion; when the feeding desire meets the standard and the drinking desire also meets the standard, generate the third feeding instruction, that is, control the feeding module to increase the water supply on the basis of feeding and supplying water in the normal proportion.

[0149] In addition, the feeding system for automatically feeding according to the feeding behavior of pigs further includes a central controller, a camera, and a network switch deployed with a pig feeding behavior recognition model. Among them, the central controller is connected to the network switch through a network cable, and all cameras are connected to the switch through network cables to network the central controller and all cameras. The central controller obtains the real-time monitoring video data of each camera. At the same time, the central controller is connected to all feeding devices through a control bus. Each camera corresponds to a feeding device, and one central controller can collect the video data of several pens of pigs, and adopts a time-sharing strategy to judge the feeding behavior of each pigsty.

[0150] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the pig feeding method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.

[0151] The present application also provides a pig feeding device. Please refer to Figure 6 , the pig feeding device includes:

[0152] The recognition module 10 is used to perform pose recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain the pose recognition result;

[0153] The generation module 20 is used to determine the feeding desire of all pigs according to the pose recognition result and generate a feeding instruction based on the feeding desire;

[0154] The transmission module 30 is used to transmit the feeding instruction to a preset feeding module to control the feeding module to feed and supply water.

[0155] Optionally, the recognition module 10 is further used for:

[0156] Perform pose recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain the pose category of each pig and the number of pigs corresponding to any pose category;

[0157] Generate a pose recognition result according to each pose category and the corresponding number of pigs.

[0158] Optionally, the feeding desire includes a foraging desire and a drinking desire, and the generating module 20 is further configured to:

[0159] Determine each target pig corresponding to the target pose category in the pose recognition result, where the target pose category conforms to a preset pose category;

[0160] Obtain a first distance between the head of any one of the target pigs and a preset foraging point, and a second distance between the head of any one of the target pigs and a preset drinking point;

[0161] Determine the foraging desire of all pigs according to each first distance, and determine the drinking desire of all pigs according to each second distance, where the first distance is negatively correlated with the foraging desire, and the second distance is negatively correlated with the drinking desire;

[0162] Generate a feeding instruction according to the foraging desire and the drinking desire.

[0163] Optionally, the generating module 20 is further configured to:

[0164] Screen out each target first distance within a preset foraging range among each first distance, and determine the corresponding number of first-index pigs based on the target first distances;

[0165] Determine the foraging desire of all pigs according to the ratio of the number of first-index pigs to the total number of all pigs.

[0166] Optionally, the generating module 20 is further configured to:

[0167] Screen out each target second distance within a preset drinking range among each second distance, and determine the corresponding number of second-index pigs based on the target second distances;

[0168] Determine the drinking desire of all pigs according to the ratio of the number of second-index pigs to the total number of all pigs.

[0169] Optionally, the feeding instruction includes a feeding instruction and a watering instruction, and the generating module 20 is further configured to:

[0170] In the case where the foraging desire is greater than a preset feeding threshold and the drinking desire is less than or equal to a preset watering threshold, generate the feeding instruction and the watering instruction according to the foraging desire, where the watering instruction corresponds to the feeding instruction;

[0171] When the feeding desire is greater than a preset feeding threshold value and the drinking desire is greater than a preset water supply threshold value, generate the feeding instruction and the water supply instruction according to the feeding desire, and adjust the water supply instruction according to the drinking desire, so that the adjusted water supply instruction increases the water supply amount of the feeding module.

[0172] Optionally, the feeding instruction includes a feeding instruction and a water supply instruction, the feeding module includes a preset feeding sub-module and a water supply sub-module, and the transmission module 30 is further configured to:

[0173] Transmit the feeding instruction to the feeding sub-module to control the coding motor in the feeding sub-module to feed based on the feeding instruction;

[0174] Transmit the water supply instruction to the water supply sub-module to control the flow meter in the water supply sub-module to supply water based on the water supply instruction.

[0175] Optionally, the adjustment module 40 in the pig feeding device is further configured to:

[0176] Obtain a historical feeding data set, where the historical feeding data set includes historical feeding data at a preset feeding point in the pigsty, historical water supply data at a preset drinking point, and historical feeding data of the feeding module;

[0177] Input the historical feeding data, the historical water supply data, and the historical feeding data into a pre-trained prediction model to predict the feeding status of all pigs in a future time period through the prediction model;

[0178] Adjust the feeding instruction according to the feeding status.

[0179] The pig feeding device provided by the present application adopts the pig feeding method in the above embodiment, and can solve the technical problems of how to avoid feed residue waste and feed rancidity of the porridge feeder. Compared with the prior art, the beneficial effects of the pig feeding device provided by the present application are the same as the beneficial effects of the pig feeding method provided by the above embodiment, and other technical features in the pig feeding device are the same as the features disclosed in the above embodiment method, and will not be described in detail here.

[0180] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the pig feeding method in the first embodiment above.

[0181] Next, refer to Figure 7, which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The shown electronic device is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0182] As Figure 7 shown, the electronic device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1002 or the program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be alternatively implemented or had.

[0183] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.

[0184] The electronic device provided by the present application adopts the pig feeding method in the above-mentioned embodiment, and can solve the technical problems of how to avoid feed waste and feed rancidity in the porridge feeder. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as those of the pig feeding method provided by the above-mentioned embodiment, and other technical features in the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.

[0185] It should be understood that the various parts disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0186] As mentioned above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0187] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the pig feeding method in the above-mentioned embodiment.

[0188] The computer-readable storage medium provided by the present application can be, for example, a USB flash drive, but is not limited to systems or devices of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0189] The above computer-readable storage medium can be included in an electronic device; it can also exist separately without being assembled into the electronic device.

[0190] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by an electronic device, the electronic device is caused to: perform pose recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain a pose recognition result; determine the feeding desire of all pigs according to the pose recognition result, and generate a feeding instruction based on the feeding desire; and transmit the feeding instruction to a preset feeding module to control the feeding module to perform feeding and water supply.

[0191] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0192] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutively represented blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0193] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.

[0194] The readable storage medium provided by this application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned pig feeding method, which can solve the technical problems of how to avoid feed waste and feed rancidity in the porridge feeder. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the pig feeding method provided by the above embodiments, and will not be elaborated here.

[0195] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the pig feeding method as described above.

[0196] The computer program product provided by the present application can solve the technical problems of how to avoid feed waste and feed rancidity in the porridge feeder. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the pig feeding method provided by the above embodiments, and will not be elaborated here.

[0197] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.

Claims

1. A pig feeding method, characterized in that, The pig feeding method includes: Performing pose recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain a pose recognition result; Determining the feeding desire of all pigs according to the pose recognition result, and generating a feeding instruction based on the feeding desire; Transmitting the feeding instruction to a preset feeding module to control the feeding module to feed and supply water.

2. The pig feeding method according to claim 1, characterized in that, The step of performing pose recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain a pose recognition result includes: Performing pose recognition on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain the pose category of each pig and the number of pigs corresponding to any pose category; Generating a pose recognition result according to each pose category and the corresponding number of pigs.

3. The pig feeding method according to claim 1, wherein, The feeding desire includes a foraging desire and a drinking desire. The step of determining the foraging desire of all pigs according to the pose recognition result and generating a feeding instruction based on the feeding desire includes: Determining each target pig corresponding to the target pose category in the pose recognition result, where the target pose category conforms to a preset pose category; Obtaining a first distance between the head of any one of the target pigs and a preset foraging point, and a second distance between the head of any one of the target pigs and a preset drinking point; Determining the foraging desire of all pigs according to each first distance, and determining the drinking desire of all pigs according to each second distance, where the first distance is negatively correlated with the foraging desire, and the second distance is negatively correlated with the drinking desire; Generating a feeding instruction according to the foraging desire and the drinking desire.

4. The pig feeding method according to claim 3, characterized in that, The step of determining the foraging desire of all pigs according to each first distance includes: Screening each target first distance within a preset foraging range among each first distance, and determining the corresponding number of first-index pigs based on each target first distance; Determining the foraging desire of all pigs according to the ratio of the number of first-index pigs to the total number of all pigs.

5. The pig feeding method according to claim 3, characterized in that, The step of determining the drinking desire of all pigs according to each second distance includes: Screening each target second distance within a preset drinking range among each second distance, and determining the corresponding number of second-index pigs based on each target second distance; Determining the drinking desire of all pigs according to the ratio of the number of second-index pigs to the total number of all pigs.

6. The pig feeding method according to claim 3, characterized in that, The feeding instruction includes a feeding instruction and a water supply instruction. The step of generating a feeding instruction according to the foraging desire and the drinking desire includes: In the case where the foraging desire is greater than a preset feeding threshold and the drinking desire is less than or equal to a preset water supply threshold, generating the feeding instruction and the water supply instruction according to the foraging desire, where the water supply instruction corresponds to the feeding instruction; In the case where the foraging desire is greater than a preset feeding threshold and the drinking desire is greater than a preset water supply threshold, generating the feeding instruction and the water supply instruction according to the foraging desire, and adjusting the water supply instruction according to the drinking desire so that the adjusted water supply instruction increases the water supply amount of the feeding module.

7. The pig feeding method according to claim 1, characterized in that, The feeding instruction includes a feeding material instruction and a water feeding instruction. The feeding module includes a preset feeding material sub-module and a water feeding sub-module. The step of transmitting the feeding instruction to the preset feeding module includes: Transmitting the feeding material instruction to the feeding material sub-module to control the coding motor in the feeding material sub-module to feed based on the feeding material instruction; Transmitting the water feeding instruction to the water feeding sub-module to control the flowmeter in the water feeding sub-module to feed water based on the water feeding instruction.

8. A pig feeding device, characterized in that, The pig feeding device includes: An identification module for performing posture identification on each pig in the pigsty based on the real-time monitoring video of the pigsty to obtain a posture identification result; A generation module for determining the feeding desire of all pigs according to the posture identification result and generating a feeding instruction based on the feeding desire; A transmission module for transmitting the feeding instruction to a preset feeding module to control the feeding module to feed and feed water.

9. An electronic device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the pig feeding method according to any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the pig feeding method according to any one of claims 1 to 7.