Automatic pet feeding method and system based on machine vision

By receiving and processing pet automatic feeding instructions in the pet automatic feeding system, generating and transmitting feed pictures, and adjusting the picture resolution according to the sending fluency, the feeding delay problem caused by network congestion is solved, and the reliability and efficiency of automatic feeding is improved.

CN119559631AInactive Publication Date: 2025-03-04PETSNOWY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411617363.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing machine vision technology has network congestion and network fluctuations in pet automatic feeding systems, resulting in lost instructions or delayed feeding, which in turn makes the automatic feeding process uncertain and unreliable.

Method used

By receiving pet automatic feeding instructions, connect the shooting device to shoot the automatic feeding machine to generate feed pictures, and calculate the sending fluency in the feeding machine management system. If the fluency is below the threshold, return and resend low-resolution feed pictures to improve the efficiency and stability of data transmission.

Benefits of technology

It improves the degree of automation of pet feeding, enhances the efficiency and stability of automatic feeding equipment during data transmission, reduces the error rate, and ensures the reliability of the automatic feeding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559631A_ABST
    Figure CN119559631A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart home and Internet of Things, and provides an automatic pet feeding method and system based on machine vision, and the method comprises the steps: receiving an automatic pet feeding instruction, shooting a pre-constructed automatic feeding machine through a shooting device, generating a first feed picture, and transmitting the first feed picture to a feeding machine management system, when the feeding machine management system receives the first feed picture, calculating a flow packet and consumption time consumed by receiving the first feed picture, calculating the sending fluency of the first feed picture, and sending the first feed picture or the second feed picture from the feeding machine management system to the client management system; and calculating the path priority based on the feed data packet and the delay time, and obtaining the target feed by using the automatic feeding machine receiving the feed data packet to complete the automatic feeding of the pet. According to the invention, the automation degree of pet feeding can be improved, the efficiency and stability of automatic feeding equipment during data transmission are improved, and the error rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart home and Internet of Things technology, and in particular to a pet automatic feeding method, system, electronic device and computer-readable storage medium based on machine vision. Background Art

[0002] As the number of people keeping pets continues to increase, how to conveniently manage pets' diets has become an issue of increasing concern to pet owners. With the popularization of smart devices, the application of automated feeding systems in pet management has gradually increased.

[0003] At present, the development of Internet of Things technology and machine vision technology has provided technical support for the realization of automated feeding systems. Through the Internet of Things, the captured feed images can be transmitted to the control center for analysis in real time. At the same time, through image recognition and deep learning, the feed detection model of the control center can monitor the feed in the feeder in real time and perform intelligent feeding according to customer needs.

[0004] Although existing machine vision technology can realize automatic feeding of pets, when the control center receives feed images from multiple clients at the same time, network congestion or network fluctuations may occur, resulting in command loss or feeding delays, which in turn makes the automatic feeding process uncertain and unreliable. Therefore, how to regulate the transmission process of images and data to ensure the efficiency and stability of data transmission has become an urgent problem to be solved. Summary of the invention

[0005] The present invention provides a pet automatic feeding method based on machine vision and a computer-readable storage medium, the main purpose of which is to improve the automation level of pet feeding, improve the efficiency and stability of automatic feeding equipment during data transmission, and reduce the error rate.

[0006] To achieve the above object, the present invention provides a pet automatic feeding method based on machine vision, comprising:

[0007] Receive the pet automatic feeding instruction, take the time of receiving the pet automatic feeding instruction as the starting point and record the time in real time to obtain the delay time;

[0008] The pre-built photographing device is connected by using the pet automatic feeding instruction. When the photographing device is successfully connected, the pre-built automatic feeder is photographed by using the photographing device to generate a first feed picture, wherein the automatic feeder and the photographing device have data transmission functions with the pre-built feeder management system, and the feeder management system has data transmission functions with the pre-built customer management system, and the customer management system has a feed detection model embedded therein;

[0009] Sending the first feed picture to the feeding machine management system, when the feeding machine management system receives the first feed picture, calculating the traffic packets consumed and the consumption time for receiving the first feed picture;

[0010] The reference packet loss rate is obtained by using the feeder management system and the shooting equipment, and the sending fluency of the first feed picture is calculated according to the reference packet loss rate, the traffic packet and the consumption time;

[0011] Compare the sending fluency with a preset fluency threshold;

[0012] If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by using the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system again, wherein the resolution of the second feed picture is smaller than the first feed picture;

[0013] If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture;

[0014] When the feed does not exist in the first feed picture or the second feed picture, retrieving the feed data package from a pre-built customer database using the customer management system;

[0015] The path priority is calculated based on the feed data packet and the delay time, the target traffic path is confirmed based on the path priority, the feed data packet is sent to the automatic feeder through the target traffic path, and the automatic feeder that has received the feed data packet obtains the target feed to complete the automatic feeding of the pet.

[0016] Optionally, the step of obtaining a reference packet loss rate by using a feeder management system and a photographing device includes:

[0017] Use the camera to obtain the number of pictures sent in history;

[0018] Retrieving a historical received picture set in the feeding machine management system, wherein the historical received picture set includes n historical received pictures;

[0019] The image error tolerance rate is calculated using n historical received images, and the reference packet loss rate is calculated using the image error tolerance rate and the number of historical sent images. The calculation formula is as follows:

[0020]

[0021] Among them, P LR is the reference packet loss rate, P x is the image error tolerance, n xNumber of pictures sent for history.

[0022] Optionally, calculating the picture error tolerance rate by using n historically received pictures includes:

[0023] The image error tolerance is calculated according to the following formula:

[0024]

[0025] Among them, M i is the storage capacity of the i-th historical received picture among n historical received pictures, and M0 is the preset picture reference capacity.

[0026] Optionally, calculating the sending fluency of the first feed picture according to the reference packet loss rate, traffic packets and consumption time includes:

[0027] The transmission rate is calculated using the traffic packet and the consumption time. The calculation formula is as follows:

[0028]

[0029] Among them, v x is the transmission rate, M x is the traffic contained in the traffic package, T x is the consumption time, α is the preset rate coefficient, and β is the preset delay coefficient;

[0030] Calculate the sending smoothness based on the transmission rate and reference packet loss rate.

[0031] Optionally, calculating the sending fluency according to the transmission rate and the reference packet loss rate includes:

[0032] The sending fluency is calculated according to the following formula:

[0033] δ w =-(lnP LR )·(1+lnv x )

[0034] Among them, δ w For sending fluency.

[0035] Optionally, the re-receiving the second feed picture sent again by the shooting device includes:

[0036] Among them, the shooting device has an embedded image compression system;

[0037] When the camera receives the first feed picture sent back, the camera re-photographs the automatic feeder to obtain an updated feed picture. The updated feed picture and the first feed picture are used to calculate the update ratio. The calculation formula is as follows:

[0038]

[0039] Among them, τ is the update ratio, M a To update the storage capacity of the feed image, M b is the storage capacity of the first feed image;

[0040] The network speed of the shooting device is monitored using a preset monitoring frequency to obtain a reference network speed set, wherein the reference network speed set includes m reference network speeds;

[0041] The m reference network speeds are used to calculate the reference network speed average, the reference network speed maximum and the reference network speed minimum, wherein the reference network speed average is the average value of the m reference network speeds, and the reference network speed maximum and the reference network speed minimum are the largest reference network speed and the smallest reference network speed among the m reference network speeds, respectively;

[0042] The network speed fluctuation weight is calculated using m reference network speeds, the average reference network speed, the maximum reference network speed, and the minimum reference network speed. The calculation formula is as follows:

[0043]

[0044] Among them, ε x is the network speed fluctuation weight, S max is the maximum reference network speed, S min is the minimum reference network speed, S i is the i-th reference network speed among m reference network speeds, is the average reference network speed, S0 is the preset theoretical maximum network speed;

[0045] The compression rate is calculated based on the reference network speed average, network speed fluctuation weight, update ratio, sending fluency and fluency threshold;

[0046] A compression operation is performed on the updated feed picture using the picture compression system and the compression ratio to obtain a second feed picture.

[0047] Optionally, the calculating of the compression rate according to the reference network speed average, the network speed fluctuation weight, the update ratio, the sending fluency and the fluency threshold includes:

[0048] The compression ratio is calculated according to the following formula:

[0049]

[0050] Among them, C R is the compression rate, and δ0 is the fluency threshold.

[0051] Optionally, the calculating of the path priority based on the feed data packet and the delay time includes:

[0052] The path priority is calculated according to the following formula:

[0053]

[0054] Among them, μ is the path priority, t Y is the delay time, M Y is the storage capacity of the feed data packet, M p is the preset reference storage capacity, and tanh is the hyperbolic tangent function.

[0055] Optionally, determining the target traffic path based on the path priority includes:

[0056] Query the flow path between the customer management system and the feeding machine management system to obtain p first flow paths, query the flow path between the feeding machine management system and the automatic feeding machine to obtain q second flow paths;

[0057] The following operation is performed on each of the p first flow paths:

[0058] querying the bandwidth of the first traffic path to obtain a first bandwidth, performing a load detection operation on the first traffic path to obtain a first load rate;

[0059] The first path score is calculated based on the first bandwidth and the first load ratio, and the calculation formula is as follows:

[0060] D p =H1×(1-U1)

[0061] Among them, D p is the first path score, H1 is the first bandwidth, and U1 is the first load rate;

[0062] Summarize the first path scores to obtain p first path scores, wherein the first path scores correspond to the first traffic paths one by one;

[0063] Acquire q second path scores based on the q second traffic paths, wherein the second path scores correspond one-to-one to the second traffic paths;

[0064] Using p first flow paths and q second flow paths to construct k optional flow paths, where k=p×q, and each optional flow path is formed by connecting one first flow path and one second flow path;

[0065] The following operations are performed for each of the k optional flow paths:

[0066] Calculate a comprehensive score using the first path score and the second path score corresponding to the optional traffic path, wherein the comprehensive score is the product of the first path score and the second path score;

[0067] Summarize the comprehensive scores to obtain k comprehensive scores, where the comprehensive scores correspond to the optional traffic paths one by one;

[0068] The k optional traffic paths are sorted in ascending order of comprehensive scores to obtain an optional traffic path sequence, wherein the optional traffic path sequence is as follows:

[0069] {Y1,Y2…Y k}

[0070] Among them, Y1, Y2 and Y k They represent the first, second and kth optional flow paths in the optional flow path sequence respectively;

[0071] The path priority is used to calculate the path level. The calculation formula is as follows:

[0072]

[0073] in, represents the rounding up operation, μ Y is the path level;

[0074] A target flow path is identified in a sequence of selectable flow paths based on the path ranking.

[0075] To achieve the above object, the present invention also provides a pet automatic feeding system based on machine vision, comprising:

[0076] A feed picture shooting module is used to receive a pet automatic feeding instruction, take the time of receiving the pet automatic feeding instruction as the starting point and record the time in real time to obtain a delay time, use the pet automatic feeding instruction to connect a pre-built shooting device, and when the shooting device is successfully connected, use the shooting device to shoot a pre-built automatic feeder to generate a first feed picture, wherein the automatic feeder and the shooting device have a data transmission function with the pre-built feeder management system, and the feeder management system has a data transmission function with the pre-built customer management system, and the customer management system has a feed detection model embedded in it;

[0077] A feed picture analysis module is used to send the first feed picture to the feeder management system. When the feeder management system receives the first feed picture, it calculates the traffic packets consumed and the consumption time for receiving the first feed picture, obtains the reference packet loss rate by using the feeder management system and the shooting device, and calculates the sending fluency of the first feed picture according to the reference packet loss rate, traffic packets and consumption time;

[0078] A feed model detection module is used to compare the sending fluency with a preset fluency threshold. If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by using the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system again, wherein the resolution of the second feed picture is smaller than the first feed picture. If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture;

[0079] The feed data transmission module is used to retrieve the feed data packet from the pre-built customer database using the customer management system when there is no feed in the first feed picture or the second feed picture, calculate the path priority based on the feed data packet and the delay time, confirm the target traffic path based on the path priority, send the feed data packet to the automatic feeder through the target traffic path, and use the automatic feeder that has received the feed data packet to obtain the target feed to complete the automatic feeding of the pet.

[0080] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0081] a memory storing at least one instruction; and

[0082] The processor executes the instructions stored in the memory to implement the above-mentioned automatic pet feeding method based on machine vision.

[0083] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned automatic pet feeding method based on machine vision.

[0084] The present invention is to solve the problem described in the background technology. The present invention receives an automatic pet feeding instruction, takes the time of receiving the automatic pet feeding instruction as the starting point and records the time in real time to obtain a delay time. It can be seen that the embodiment of the present invention improves the automation level of pet feeding by automatically triggering the automatic pet feeding instruction, and records the time in real time, which is convenient for the subsequent calculation of the path priority, thereby optimizing the feeding time, and then uses the automatic pet feeding instruction to connect a pre-built shooting device. When the shooting device is successfully connected, the shooting device is used to shoot the pre-built automatic feeder to generate a first feed picture, wherein the automatic feeder and the shooting device have the function of data transmission with the pre-built feeder management system, and the feeder management system is connected to the pre-built customer The management systems have the function of data transmission, and the customer management system is embedded with a feed detection model. It can be seen that the embodiment of the present invention generates a first feed picture through a shooting device, which is convenient for the subsequent use of the feed detection model to determine whether there is feed in the automatic feeder, and sends the first feed picture to the feeder management system. When the feeder management system receives the first feed picture, it calculates the traffic packets and consumption time consumed by receiving the first feed picture. It can be seen that the embodiment of the present invention calculates the traffic packets and consumption time, which is convenient for the subsequent calculation of the sending fluency, thereby evaluating the network performance, and uses the feeder management system and the shooting device to obtain the reference packet loss rate. According to the reference packet loss rate, the traffic packets and the consumption time, the sending fluency of the first feed picture is calculated. It can be seen that the embodiment of the present invention implements The embodiment calculates the sending fluency by referring to the packet loss rate, traffic packets and consumption time, comprehensively evaluates the stability of the network when the first feed picture is sent, compares the sending fluency with the preset fluency threshold, and if the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by the feeder management system, and the second feed picture sent again by the shooting device is re-received by the feeder management system, wherein the resolution of the second feed picture is less than the first feed picture. It can be seen that the embodiment of the present invention compares the sending fluency with the preset fluency threshold. If the sending fluency is less than or equal to the fluency threshold, it means that the first feed picture is not suitable for continuing to be sent to the customer management system, and the picture resolution needs to be reduced, and then the second feed picture is re-sent, thereby The efficiency and stability of data transmission are improved, and the error rate is reduced. If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture. It can be seen that the embodiment of the present invention analyzes the first feed picture or the second feed picture through the machine vision technology of the feed detection model, automatically determines whether there is feed, and improves the automation degree of the feeding process. When there is no feed in the first feed picture or the second feed picture, the customer management system is used to retrieve the feed data packet from the pre-built customer database.The path priority is calculated based on the feed data packet and the delay time, the target flow path is confirmed based on the path priority, the feed data packet is sent to the automatic feeder through the target flow path, and the target feed is obtained by using the automatic feeder that has received the feed data packet to complete the automatic feeding of the pet. It can be seen that the embodiment of the present invention calculates the path priority through the storage capacity and delay time of the feed data packet, thereby matching the feed data packet corresponding to the path priority to the appropriate target flow path, optimizing the transmission path of the feed data packet, improving the data transmission efficiency and stability, and thus transmitting the feed data packet to the automatic feeder in a timely manner. Therefore, the present invention can improve the automation level of pet feeding, and improve the efficiency and stability of the automatic feeding equipment during data transmission, and reduce the error rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 A schematic diagram of a process flow of a pet automatic feeding method based on machine vision provided by an embodiment of the present invention;

[0086] Figure 2 A functional module diagram of a pet automatic feeding system based on machine vision provided by an embodiment of the present invention;

[0087] Figure 3 A schematic diagram of the structure of an electronic device for implementing the automatic pet feeding method based on machine vision provided by an embodiment of the present invention.

[0088] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0089] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0090] The embodiment of the present application provides a method for automatically feeding pets based on machine vision. The execution subject of the method for automatically feeding pets based on machine vision includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the method for automatically feeding pets based on machine vision can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0091] Reference Figure 1 FIG. 1 is a flow chart of a method for automatically feeding a pet based on machine vision according to an embodiment of the present invention. In this embodiment, the method for automatically feeding a pet based on machine vision includes:

[0092] S1. Receive an automatic pet feeding instruction, take the time of receiving the automatic pet feeding instruction as the starting point and record the time in real time to obtain a delay time.

[0093] It should be explained that the automatic pet feeding command is triggered by the monitoring equipment in the pet's living environment.

[0094] Exemplarily, the monitoring device is an infrared camera embedded with a pet detection model. When the pet detection model detects that a pet appears in an image captured by the infrared camera, an automatic pet feeding instruction is triggered. Optionally, a pre-trained neural network model is used as the pet detection model, and the technology of using the neural network model to detect whether a pet appears in an image captured by the infrared camera is prior art and will not be described in detail here.

[0095] It should be explained that the delay time refers to the time when the pet automatic feeding command is received as the starting point and the time is recorded in real time, with the recorded time as the end point, and the time value obtained by subtracting the starting point from the end point. For example, if the pet automatic feeding command is received at 8:00, then at 8:01, the delay time is 1 minute.

[0096] S2. Use the pet automatic feeding instruction to connect to the pre-built shooting device. When the shooting device is successfully connected, use the shooting device to shoot the pre-built automatic feeder to generate a first feed picture, wherein the automatic feeder and the shooting device have the function of data transmission with the pre-built feeder management system, and the feeder management system has the function of data transmission with the pre-built customer management system, and the customer management system has a built-in feed detection model.

[0097] It should be explained that the first feed picture is a picture obtained by taking a picture of the automatic feeder by a shooting device. The automatic feeder is an intelligent device that releases feed according to instructions. Optionally, the Nuoxue SNOW intelligent feeder is used as the automatic feeder, and the intelligent camera is used as the shooting device. The feeder management system is an APP or applet that controls the automatic feeder and the shooting device, and the APP or applet is located on the mobile phone. Optionally, the Nuoxue pet APP is used as the feeder management system. The customer management system is a software platform that integrates a feed detection model and a customer database. Optionally, the customer management system is located in a cloud server. The customer management system is used to receive and analyze data from the feeder management system, and feed the analysis results back to the feeder management system, and then control the automatic feeder through the feeder management system. For the specific application of the feed detection model and the customer database, please refer to the subsequent embodiments.

[0098] Exemplarily, when the shooting device captures the first feed picture, the first feed picture is sent to the Nuoxue Pet APP on the mobile phone, and then the first feed picture is transmitted to the cloud server through the Nuoxue Pet APP, and the feed detection model in the cloud server is used to detect the feed detection model.

[0099] S3. Send the first feed picture to the feeding machine management system. When the feeding machine management system receives the first feed picture, it calculates the traffic packets consumed and the consumption time for receiving the first feed picture.

[0100] For example, when the feeder management system receives the first feed picture, it records that a 100KB traffic packet is consumed during the transmission process, and records that the time consumed during the transmission process is 5 seconds, then the consumed time is 5 seconds.

[0101] S4. Obtain a reference packet loss rate using the feeder management system and the camera, and calculate the sending smoothness of the first feed picture according to the reference packet loss rate, traffic packets, and consumption time;

[0102] In detail, the method of obtaining a reference packet loss rate by using a feeder management system and a photographing device includes:

[0103] Use the camera to obtain the number of pictures sent in history;

[0104] Retrieving a historical received picture set in the feeding machine management system, wherein the historical received picture set includes n historical received pictures;

[0105] The image error tolerance rate is calculated using n historical received images, and the reference packet loss rate is calculated using the image error tolerance rate and the number of historical sent images. The calculation formula is as follows:

[0106]

[0107] Among them, P LR is the reference packet loss rate, P x is the image error tolerance, n x Number of pictures sent for history.

[0108] It should be explained that the number of historical sent pictures refers to the total number of pictures sent by the camera to the feeder management system in the previous period of time. The number of historical received pictures refers to the pictures received by the feeder management system from the camera in the previous period of time.

[0109] For example, if the picture sending system embedded in the shooting device reads that 30 pictures were sent to the feeder management system in the previous 30 days, the number of historical sent pictures is 30. All pictures received from the shooting device in the previous 30 days are retrieved in the feeder management system as the historical received picture set.

[0110] It should be explained that the reference packet loss rate reflects the probability of packet loss when the shooting device sends the first feed picture to the feeder management system. The higher the reference packet loss rate, the higher the probability of packet loss.

[0111] In detail, the calculation of the picture error tolerance rate using n historical received pictures includes:

[0112] The image error tolerance is calculated according to the following formula:

[0113]

[0114] Among them, M i is the storage capacity of the i-th historical received picture among n historical received pictures, and M0 is the preset picture reference capacity.

[0115] Generally speaking, the larger the storage capacity of the image when the camera sends the first feed image to the feeder management system, the easier it is to lose packets. Therefore, the image error tolerance rate reflects the degree of influence of the image storage capacity on the packet loss rate. The higher the image error tolerance rate, the smaller the influence of the image storage capacity on the packet loss rate. The image reference capacity is the storage capacity used as a reference set by the programmer who programs the feeder management system and is related to the model of the camera.

[0116] In detail, the calculation of the sending fluency of the first feed picture according to the reference packet loss rate, traffic packets and consumption time includes:

[0117] The transmission rate is calculated using the traffic packet and the consumption time. The calculation formula is as follows:

[0118]

[0119] Among them, v x is the transmission rate, M x is the traffic contained in the traffic package, T x is the consumption time, α is the preset rate coefficient, and β is the preset delay coefficient;

[0120] Calculate the sending smoothness based on the transmission rate and reference packet loss rate.

[0121] It should be explained that the transmission rate reflects the speed at which the shooting device transmits the first feed image to the feeder management system. The faster the transmission rate, the faster the transmission speed. The rate coefficient and delay coefficient are related to the network environment in which the shooting device is located, and are set by the programmer who programs the feeder management system.

[0122] In detail, the calculation of the sending fluency according to the transmission rate and the reference packet loss rate includes:

[0123] The sending fluency is calculated according to the following formula:

[0124] δw =-(lnP LR )·(1+lnv x )

[0125] Among them, δ w For sending fluency.

[0126] It should be explained that the sending fluency reflects the speed and stability of the first feed picture during the transmission process, that is, the higher the sending fluency, the faster and more stable the first feed picture is during transmission.

[0127] It should be understood that the embodiment of the present invention collects the first feed picture taken by the shooting device in advance through the feeder management system, and analyzes the sending fluency of the first feed picture, so as to avoid network congestion or packet loss when the first feed picture is transmitted to the customer management system, thereby reducing the control speed of the automatic feeding process.

[0128] S5. Compare the sending fluency with a preset fluency threshold.

[0129] It should be explained that the fluency threshold is related to the network environment in which the shooting device is located and is set by the programmer who programs the feeder management system.

[0130] S6. If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by using the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system again, wherein the resolution of the second feed picture is smaller than that of the first feed picture.

[0131] In detail, the re-receiving the second feed picture sent again by the shooting device includes:

[0132] Among them, the shooting device has an embedded image compression system;

[0133] When the camera receives the first feed picture sent back, the camera re-photographs the automatic feeder to obtain an updated feed picture. The updated feed picture and the first feed picture are used to calculate the update ratio. The calculation formula is as follows:

[0134]

[0135] Among them, τ is the update ratio, M a To update the storage capacity of the feed image, M b is the storage capacity of the first feed image;

[0136] The network speed of the shooting device is monitored using a preset monitoring frequency to obtain a reference network speed set, wherein the reference network speed set includes m reference network speeds;

[0137] The m reference network speeds are used to calculate the reference network speed average, the reference network speed maximum and the reference network speed minimum, wherein the reference network speed average is the average value of the m reference network speeds, and the reference network speed maximum and the reference network speed minimum are the largest reference network speed and the smallest reference network speed among the m reference network speeds, respectively;

[0138] The network speed fluctuation weight is calculated using m reference network speeds, the average reference network speed, the maximum reference network speed, and the minimum reference network speed. The calculation formula is as follows:

[0139]

[0140] Among them, ε x is the network speed fluctuation weight, S max is the maximum reference network speed, S min is the minimum reference network speed, S i is the i-th reference network speed among m reference network speeds, is the average reference network speed, S0 is the preset theoretical maximum network speed;

[0141] The compression rate is calculated based on the reference network speed average, network speed fluctuation weight, update ratio, sending fluency and fluency threshold;

[0142] A compression operation is performed on the updated feed picture using the picture compression system and the compression ratio to obtain a second feed picture.

[0143] It should be explained that the image compression system is a software in the shooting device that can compress the captured images. The updated feed image is the image obtained by the shooting device reshooting the automatic feeder. The update ratio is the ratio of the storage capacity of the updated feed image to the storage capacity of the first feed image. The reference network speed set consists of m reference network speeds, and the reference network speed is the network speed of the network to which the shooting device is connected. The network speed fluctuation weight reflects the degree of fluctuation of the network to which the shooting device is connected. The larger the network speed fluctuation weight, the higher the degree of fluctuation. The theoretical maximum network speed is set by the programmer who programs the feeder management system.

[0144] It should be understood that the technology of using the image compression system and compression rate to perform compression operations on the updated feed image is existing technology and will not be described in detail here.

[0145] In detail, the compression rate is calculated according to the reference network speed average, network speed fluctuation weight, update ratio, sending fluency and fluency threshold, including:

[0146] The compression ratio is calculated according to the following formula:

[0147]

[0148] Among them, C R is the compression rate, and δ0 is the fluency threshold.

[0149] It should be explained that the compression rate refers to the ratio of the compression of the update feed picture by the image compression system. For example, if the compression rate is 50%, the storage capacity required for the update feed picture is 2 megabytes, then the storage capacity required for the compressed second feed picture is 1 megabyte.

[0150] It should be understood that the greater the network speed fluctuation weight, the greater the network fluctuation, the lower the sending fluency, which means the lower the stability of the image transmission process. Therefore, the greater the network speed fluctuation weight and the lower the sending fluency, the greater the probability of errors in the transmission process. Therefore, it is necessary to further increase the compression ratio and reduce the storage capacity of the second feed image to reduce the probability of errors in the transmission process.

[0151] S7. If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture.

[0152] Optionally, a pre-trained neural network model is used as the feed detection model, and the technology of detecting whether there is feed in an image by using the neural network model is prior art and will not be described in detail here.

[0153] S8. When there is no feed in the first feed picture or the second feed picture, the feed data package is retrieved from a pre-built customer database using the customer management system.

[0154] It is understandable that the customer management system can identify the customer corresponding to the shooting device that took the first feed picture or the second feed picture by identifying the file information of the first feed picture or the second feed picture, and then retrieve the feed data package pre-set by the customer in the customer database according to the customer information. After sending the feed data package to the automatic feeder, the target feed can be obtained.

[0155] It should be explained that the customer database is a database storing a plurality of feed data packages preset by customers. For the specific application of the feed data package, please refer to the subsequent embodiments.

[0156] S9. Calculate the path priority based on the feed data packet and the delay time, confirm the target traffic path based on the path priority, send the feed data packet to the automatic feeder through the target traffic path, use the automatic feeder that has received the feed data packet to obtain the target feed, and complete the automatic feeding of the pet.

[0157] It should be explained that the feed data packet is an instruction set consisting of multiple instructions related to releasing feed. The automatic feeder can read the instruction set through its own feed control system and execute the instructions in the instruction set, for example: controlling the type, quantity and frequency of released feed, etc., and using the feed released by the automatic feeder according to the instruction set as the target feed.

[0158] It should be understood that the feed control system is pre-programmed software in the automatic feeder, and the technology by which the automatic feeder can read the instruction set through its own feed control system and execute the instructions in the instruction set is prior art and will not be described in detail here.

[0159] In detail, the calculation of the path priority based on the feed data packet and the delay time includes:

[0160] The path priority is calculated according to the following formula:

[0161]

[0162] Among them, μ is the path priority, t Y is the delay time, M Y is the storage capacity of the feed data packet, M p is the preset reference storage capacity, and tanh is the hyperbolic tangent function.

[0163] It should be explained that the path priority reflects the priority of transmitting the feed data packet, and the larger the path priority, the higher the priority. The reference storage capacity is determined by the average storage capacity of all feed data packets in the customer database.

[0164] It should be understood that since the delay time refers to the time of receiving the pet's automatic feeding instruction as the starting point and the real-time recording of the time, and the recorded time as the end point, the time value is obtained by subtracting the end point from the starting point. Therefore, the longer the delay time, the longer the customer's pet has to wait for the automatic feeder to produce food. In order to reduce the waiting time, it is necessary to give priority to the transmission of feed data packets with longer delay times.

[0165] In detail, the step of determining the target traffic path based on the path priority includes:

[0166] Query the flow path between the customer management system and the feeding machine management system to obtain p first flow paths, query the flow path between the feeding machine management system and the automatic feeding machine to obtain q second flow paths;

[0167] The following operation is performed on each of the p first flow paths:

[0168] querying the bandwidth of the first traffic path to obtain a first bandwidth, performing a load detection operation on the first traffic path to obtain a first load rate;

[0169] The first path score is calculated based on the first bandwidth and the first load ratio, and the calculation formula is as follows:

[0170] D p =H1×(1-U1)

[0171] Among them, D p is the first path score, H1 is the first bandwidth, and U1 is the first load rate;

[0172] Summarize the first path scores to obtain p first path scores, wherein the first path scores correspond to the first traffic paths one by one;

[0173] Acquire q second path scores based on the q second traffic paths, wherein the second path scores correspond one-to-one to the second traffic paths;

[0174] Using p first flow paths and q second flow paths to construct k optional flow paths, where k=p×q, and each optional flow path is formed by connecting one first flow path and one second flow path;

[0175] The following operations are performed for each of the k optional flow paths:

[0176] Calculate a comprehensive score using the first path score and the second path score corresponding to the optional traffic path, wherein the comprehensive score is the product of the first path score and the second path score;

[0177] Summarize the comprehensive scores to obtain k comprehensive scores, where the comprehensive scores correspond to the optional traffic paths one by one;

[0178] The k optional traffic paths are sorted in ascending order of comprehensive scores to obtain an optional traffic path sequence, wherein the optional traffic path sequence is as follows:

[0179] {Y1,Y2…Y k}

[0180] Among them, Y1, Y2 and Y k They represent the first, second and kth optional flow paths in the optional flow path sequence respectively;

[0181] The path priority is used to calculate the path level. The calculation formula is as follows:

[0182]

[0183] in, represents the rounding up operation, μ Y is the path level;

[0184] A target flow path is identified in a sequence of selectable flow paths based on the path ranking.

[0185] It should be explained that a traffic path refers to the path through which data is transmitted from one node to another in the network. The first traffic path is the path through which data is transmitted between the customer management system and the feeding machine management system. The second traffic path is the path through which data is transmitted between the feeding machine management system and the automatic feeding machine.

[0186] Generally speaking, there are usually multiple traffic paths between two nodes for data transmission, and the technology for querying the traffic path between the customer management system and the feeder management system and the technology for querying the traffic path between the feeder management system and the automatic feeder are existing technologies and will not be repeated here.

[0187] It should be explained that the first bandwidth refers to the maximum amount of data that can pass through the first traffic path per unit time. For example, if the maximum amount of data that can pass through per second is 2M, then the bandwidth is 2Mbps. The first load rate refers to the ratio of the amount of data currently transmitted on the first traffic path to the first bandwidth.

[0188] Optionally, SolarWinds is used to query the bandwidth of the first traffic path and perform load detection operations on the first traffic path. The technology for querying the bandwidth of the first traffic path and the technology for performing load detection operations on the first traffic path are both existing technologies and will not be repeated here.

[0189] It should be explained that the first path score and the second path score respectively reflect the amount of currently unoccupied bandwidth of the first traffic path and the second traffic path. The higher the first path score and the second path score, the more currently unoccupied bandwidth of the first traffic path and the second traffic path.

[0190] It is understandable that the method for obtaining q second path scores based on q second traffic paths is the same as the method for obtaining first path scores using p first traffic paths, and will not be described in detail here.

[0191] For example, if there are 4 first flow paths and 5 second flow paths, each time the feed data packet passes through the first flow path, it can be selected from the 5 second flow paths. Therefore, the feed data packet is transmitted from the customer management system to the feeder management system and then to the automatic feeder. There are a total of 4×5=20 optional flow paths to choose from.

[0192] It should be explained that the main function of the path level is to match the feed data packet corresponding to the path priority with the optional traffic path in the optional traffic path sequence.

[0193] Exemplarily, if the path priority is 42%, k is 20, and the path level is 9, then the 9th optional flow path in the optional flow path sequence is selected as the target flow path.

[0194] The present invention is to solve the problem described in the background technology. The present invention receives an automatic pet feeding instruction, takes the time of receiving the automatic pet feeding instruction as the starting point and records the time in real time to obtain a delay time. It can be seen that the embodiment of the present invention improves the automation level of pet feeding by automatically triggering the automatic pet feeding instruction, and records the time in real time, which is convenient for the subsequent calculation of the path priority, thereby optimizing the feeding time, and then uses the automatic pet feeding instruction to connect a pre-built shooting device. When the shooting device is successfully connected, the shooting device is used to shoot the pre-built automatic feeder to generate a first feed picture, wherein the automatic feeder and the shooting device have the function of data transmission with the pre-built feeder management system, and the feeder management system is connected to the pre-built customer The management systems have the function of data transmission, and the customer management system is embedded with a feed detection model. It can be seen that the embodiment of the present invention generates a first feed picture through a shooting device, which is convenient for the subsequent use of the feed detection model to determine whether there is feed in the automatic feeder, and sends the first feed picture to the feeder management system. When the feeder management system receives the first feed picture, it calculates the traffic packets and consumption time consumed by receiving the first feed picture. It can be seen that the embodiment of the present invention calculates the traffic packets and consumption time, which is convenient for the subsequent calculation of the sending fluency, thereby evaluating the network performance, and uses the feeder management system and the shooting device to obtain the reference packet loss rate. According to the reference packet loss rate, the traffic packets and the consumption time, the sending fluency of the first feed picture is calculated. It can be seen that the embodiment of the present invention implements The embodiment calculates the sending fluency by referring to the packet loss rate, traffic packets and consumption time, comprehensively evaluates the stability of the network when the first feed picture is sent, compares the sending fluency with the preset fluency threshold, and if the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by the feeder management system, and the second feed picture sent again by the shooting device is re-received by the feeder management system, wherein the resolution of the second feed picture is less than the first feed picture. It can be seen that the embodiment of the present invention compares the sending fluency with the preset fluency threshold. If the sending fluency is less than or equal to the fluency threshold, it means that the first feed picture is not suitable for continuing to be sent to the customer management system, and the picture resolution needs to be reduced, and then the second feed picture is re-sent, thereby The efficiency and stability of data transmission are improved, and the error rate is reduced. If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture. It can be seen that the embodiment of the present invention analyzes the first feed picture or the second feed picture through the machine vision technology of the feed detection model, automatically determines whether there is feed, and improves the automation degree of the feeding process. When there is no feed in the first feed picture or the second feed picture, the customer management system is used to retrieve the feed data packet from the pre-built customer database.The path priority is calculated based on the feed data packet and the delay time, the target flow path is confirmed based on the path priority, the feed data packet is sent to the automatic feeder through the target flow path, and the target feed is obtained by using the automatic feeder that has received the feed data packet to complete the automatic feeding of the pet. It can be seen that the embodiment of the present invention calculates the path priority through the storage capacity and delay time of the feed data packet, thereby matching the feed data packet corresponding to the path priority to the appropriate target flow path, optimizing the transmission path of the feed data packet, improving the data transmission efficiency and stability, and thus transmitting the feed data packet to the automatic feeder in a timely manner. Therefore, the present invention can improve the automation level of pet feeding, and improve the efficiency and stability of the automatic feeding equipment during data transmission, and reduce the error rate.

[0195] like Figure 2 , which is a functional module diagram of a machine vision-based automatic pet feeding system provided in one embodiment of the present invention.

[0196] The automatic pet feeding system 100 based on machine vision of the present invention can be installed in an electronic device. According to the functions to be implemented, the automatic pet feeding system 100 based on machine vision can include a feed picture shooting module 101, a feed picture analysis module 102, a feed model detection module 103 and a feed data transmission module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.

[0197] The feed picture shooting module 101 is used to receive the pet automatic feeding instruction, take the time of receiving the pet automatic feeding instruction as the starting point and record the time in real time to obtain the delay time, use the pet automatic feeding instruction to connect the pre-built shooting device, and when the shooting device is successfully connected, use the shooting device to shoot the pre-built automatic feeder to generate the first feed picture, wherein the automatic feeder and the shooting device have the function of data transmission with the pre-built feeder management system, the feeder management system has the function of data transmission with the pre-built customer management system, and the customer management system has a feed detection model embedded in it;

[0198] The feed picture analysis module 102 is used to send the first feed picture to the feeder management system. When the feeder management system receives the first feed picture, it calculates the traffic packets consumed and the consumption time for receiving the first feed picture, obtains the reference packet loss rate by using the feeder management system and the shooting device, and calculates the sending fluency of the first feed picture according to the reference packet loss rate, the traffic packets and the consumption time;

[0199] The feed model detection module 103 is used to compare the sending fluency with a preset fluency threshold. If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system, wherein the resolution of the second feed picture is smaller than the first feed picture. If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture;

[0200] The feed data transmission module 104 is used to retrieve a feed data packet from a pre-built customer database using a customer management system when there is no feed in the first feed image or the second feed image, calculate a path priority based on the feed data packet and a delay time, confirm a target traffic path based on the path priority, send the feed data packet to an automatic feeder through the target traffic path, and use the automatic feeder that has received the feed data packet to obtain the target feed, thereby completing automatic feeding of the pet.

[0201] In detail, each module in the automatic pet feeding system 100 based on machine vision in the embodiment of the present invention is used in the same manner as described above. Figure 1 The technical means are the same as the automatic pet feeding method based on machine vision described in, and can produce the same technical effects, so I will not go into details here.

[0202] like Figure 3 , is a schematic diagram of the structure of an electronic device for implementing a pet automatic feeding method based on machine vision provided by an embodiment of the present invention.

[0203] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a program for an automatic pet feeding method based on machine vision.

[0204] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may be used not only to store application software and various types of data installed in the electronic device 1, such as the code of the automatic pet feeding method program based on machine vision, but also to temporarily store data that has been output or is to be output.

[0205] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as a pet automatic feeding method program based on machine vision, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0206] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0207] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0208] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0209] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0210] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0211] The program of the automatic pet feeding method based on machine vision stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0212] Receive the pet automatic feeding instruction, take the time of receiving the pet automatic feeding instruction as the starting point and record the time in real time to obtain the delay time;

[0213] The pre-built photographing device is connected by using the pet automatic feeding instruction. When the photographing device is successfully connected, the pre-built automatic feeder is photographed by using the photographing device to generate a first feed picture, wherein the automatic feeder and the photographing device have data transmission functions with the pre-built feeder management system, and the feeder management system has data transmission functions with the pre-built customer management system, and the customer management system has a feed detection model embedded therein;

[0214] Sending the first feed picture to the feeding machine management system, when the feeding machine management system receives the first feed picture, calculating the traffic packets consumed and the consumption time for receiving the first feed picture;

[0215] The reference packet loss rate is obtained by using the feeder management system and the shooting equipment, and the sending fluency of the first feed picture is calculated according to the reference packet loss rate, the traffic packet and the consumption time;

[0216] Compare the sending fluency with a preset fluency threshold;

[0217] If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by using the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system again, wherein the resolution of the second feed picture is smaller than the first feed picture;

[0218] If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture;

[0219] When the feed does not exist in the first feed picture or the second feed picture, retrieving the feed data package from a pre-built customer database using the customer management system;

[0220] The path priority is calculated based on the feed data packet and the delay time, the target traffic path is confirmed based on the path priority, the feed data packet is sent to the automatic feeder through the target traffic path, and the automatic feeder that has received the feed data packet obtains the target feed to complete the automatic feeding of the pet.

[0221] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0222] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0223] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0224] Receive the pet automatic feeding instruction, take the time of receiving the pet automatic feeding instruction as the starting point and record the time in real time to obtain the delay time;

[0225] The pre-built photographing device is connected by using the pet automatic feeding instruction. When the photographing device is successfully connected, the pre-built automatic feeder is photographed by using the photographing device to generate a first feed picture, wherein the automatic feeder and the photographing device have data transmission functions with the pre-built feeder management system, and the feeder management system has data transmission functions with the pre-built customer management system, and the customer management system has a feed detection model embedded therein;

[0226] Sending the first feed picture to the feeding machine management system, when the feeding machine management system receives the first feed picture, calculating the traffic packets consumed and the consumption time for receiving the first feed picture;

[0227] The reference packet loss rate is obtained by using the feeder management system and the shooting equipment, and the sending fluency of the first feed picture is calculated according to the reference packet loss rate, the traffic packet and the consumption time;

[0228] Compare the sending fluency with a preset fluency threshold;

[0229] If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by using the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system again, wherein the resolution of the second feed picture is smaller than the first feed picture;

[0230] If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture;

[0231] When the feed does not exist in the first feed picture or the second feed picture, retrieving the feed data package from a pre-built customer database using the customer management system;

[0232] The path priority is calculated based on the feed data packet and the delay time, the target traffic path is confirmed based on the path priority, the feed data packet is sent to the automatic feeder through the target traffic path, and the automatic feeder that has received the feed data packet obtains the target feed to complete the automatic feeding of the pet.

[0233] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and actual implementation may have other division methods.

[0234] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0235] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0236] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0237] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A pet automatic feeding method based on machine vision, characterized in that: The method comprises: Receive the pet automatic feeding instruction, take the time of receiving the pet automatic feeding instruction as the starting point and record the time in real time to obtain the delay time; The pre-built photographing device is connected by using the pet automatic feeding instruction. When the photographing device is successfully connected, the pre-built automatic feeder is photographed by using the photographing device to generate a first feed picture, wherein the automatic feeder and the photographing device have data transmission functions with the pre-built feeder management system, and the feeder management system has data transmission functions with the pre-built customer management system, and the customer management system has a feed detection model embedded therein; Sending the first feed picture to the feeding machine management system, when the feeding machine management system receives the first feed picture, calculating the traffic packets consumed and the consumption time for receiving the first feed picture; The reference packet loss rate is obtained by using the feeder management system and the shooting equipment, and the sending fluency of the first feed picture is calculated according to the reference packet loss rate, the traffic packet and the consumption time; Compare the sending fluency with a preset fluency threshold; If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by using the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system again, wherein the resolution of the second feed picture is smaller than the first feed picture; If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture; When the feed does not exist in the first feed picture or the second feed picture, retrieving the feed data package from a pre-built customer database using the customer management system; The path priority is calculated based on the feed data packet and the delay time, the target traffic path is confirmed based on the path priority, the feed data packet is sent to the automatic feeder through the target traffic path, and the automatic feeder that has received the feed data packet obtains the target feed to complete the automatic feeding of the pet.

2. The automatic pet feeding method based on machine vision according to claim 1, characterized in that: The method of obtaining a reference packet loss rate by using a feeding machine management system and a photographing device includes: Use the camera to obtain the number of pictures sent in history; Retrieving a historical received picture set in the feeding machine management system, wherein the historical received picture set includes n historical received pictures; The image error tolerance rate is calculated using n historical received images, and the reference packet loss rate is calculated using the image error tolerance rate and the number of historical sent images. The calculation formula is as follows: Among them, P LR is the reference packet loss rate, P x is the image error tolerance, n x Number of pictures sent for history.

3. The automatic pet feeding method based on machine vision as claimed in claim 2, characterized in that: The calculating of the picture error tolerance rate by using n historical received pictures includes: The image error tolerance is calculated according to the following formula: Among them, M i is the storage capacity of the i-th historical received picture among n historical received pictures, and M0 is the preset picture reference capacity.

4. The automatic pet feeding method based on machine vision as claimed in claim 3, characterized in that: The calculating the sending fluency of the first feed picture according to the reference packet loss rate, the traffic packet and the consumption time includes: The transmission rate is calculated using the traffic packet and the consumption time. The calculation formula is as follows: Among them, v x is the transmission rate, M x is the traffic contained in the traffic package, T x is the consumption time, α is the preset rate coefficient, and β is the preset delay coefficient; Calculate the sending smoothness based on the transmission rate and reference packet loss rate.

5. The automatic pet feeding method based on machine vision as claimed in claim 4, characterized in that: The calculating of the sending fluency according to the transmission rate and the reference packet loss rate includes: The sending fluency is calculated according to the following formula: δ w -(lnP LR )·(1+ln v x ) Among them, δ w For sending fluency.

6. The automatic pet feeding method based on machine vision as claimed in claim 5, characterized in that: the re-receiving of the second feed picture sent again by the shooting device, include: Among them, the shooting device has an embedded image compression system; When the camera receives the first feed picture sent back, the camera re-photographs the automatic feeder to obtain an updated feed picture. The updated feed picture and the first feed picture are used to calculate the update ratio. The calculation formula is as follows: Among them, τ is the update ratio, M a To update the storage capacity of the feed image, M b is the storage capacity of the first feed image; The network speed of the shooting device is monitored using a preset monitoring frequency to obtain a reference network speed set, wherein the reference network speed set includes m reference network speeds; The m reference network speeds are used to calculate the reference network speed average, the reference network speed maximum and the reference network speed minimum, wherein the reference network speed average is the average value of the m reference network speeds, and the reference network speed maximum and the reference network speed minimum are the largest reference network speed and the smallest reference network speed among the m reference network speeds, respectively; The network speed fluctuation weight is calculated using m reference network speeds, the average reference network speed, the maximum reference network speed, and the minimum reference network speed. The calculation formula is as follows: Among them, ε x is the network speed fluctuation weight, S max is the maximum reference network speed, S min is the minimum reference network speed, S i is the i-th reference network speed among m reference network speeds, is the average reference network speed, S0 is the preset theoretical maximum network speed; The compression rate is calculated based on the reference network speed average, network speed fluctuation weight, update ratio, sending fluency and fluency threshold; A compression operation is performed on the updated feed picture using the picture compression system and the compression ratio to obtain a second feed picture.

7. The automatic pet feeding method based on machine vision as claimed in claim 6, characterized in that: The compression rate is calculated according to the reference network speed average, network speed fluctuation weight, update ratio, sending fluency and fluency threshold, including: The compression ratio is calculated according to the following formula: Among them, C R is the compression rate, and δ0 is the fluency threshold.

8. The automatic pet feeding method based on machine vision as claimed in claim 7, characterized in that: The calculating of path priority based on feed data packets and delay time includes: The path priority is calculated according to the following formula: Among them, μ is the path priority, t Y is the delay time, M Y is the storage capacity of the feed data packet, M p is the preset reference storage capacity, and tanh is the hyperbolic tangent function.

9. The automatic pet feeding method based on machine vision as claimed in claim 8, characterized in that: The determining of the target traffic path based on the path priority includes: Query the flow path between the customer management system and the feeding machine management system to obtain p first flow paths, query the flow path between the feeding machine management system and the automatic feeding machine to obtain q second flow paths; The following operation is performed on each of the p first flow paths: querying the bandwidth of the first traffic path to obtain a first bandwidth, performing a load detection operation on the first traffic path to obtain a first load rate; The first path score is calculated based on the first bandwidth and the first load ratio, and the calculation formula is as follows: D p =H1×(1-U1) Among them, D p is the first path score, H1 is the first bandwidth, and U1 is the first load rate; Summarize the first path scores to obtain p first path scores, wherein the first path scores correspond to the first traffic paths one by one; Acquire q second path scores based on the q second traffic paths, wherein the second path scores correspond one-to-one to the second traffic paths; Using p first flow paths and q second flow paths to construct k optional flow paths, where k=p×q, and each optional flow path is formed by connecting one first flow path and one second flow path; The following operations are performed for each of the k optional flow paths: Calculate a comprehensive score using the first path score and the second path score corresponding to the optional traffic path, wherein the comprehensive score is the product of the first path score and the second path score; Summarize the comprehensive scores to obtain k comprehensive scores, where the comprehensive scores correspond to the optional traffic paths one by one; The k optional traffic paths are sorted in ascending order of comprehensive scores to obtain an optional traffic path sequence, wherein the optional traffic path sequence is as follows: {Y1,Y2…Y k } Among them, Y1, Y2 and Y k They represent the first, second and kth optional flow paths in the optional flow path sequence respectively; The path priority is used to calculate the path level. The calculation formula is as follows: in, represents the rounding up operation, μ Y is the path level; A target flow path is identified in a sequence of selectable flow paths based on the path ranking.

10. A pet automatic feeding system based on machine vision, characterized in that: The system comprises: A feed picture shooting module is used to receive a pet automatic feeding instruction, take the time of receiving the pet automatic feeding instruction as the starting point and record the time in real time to obtain a delay time, use the pet automatic feeding instruction to connect a pre-built shooting device, and when the shooting device is successfully connected, use the shooting device to shoot a pre-built automatic feeder to generate a first feed picture, wherein the automatic feeder and the shooting device have a data transmission function with the pre-built feeder management system, and the feeder management system has a data transmission function with the pre-built customer management system, and the customer management system has a feed detection model embedded in it; A feed picture analysis module is used to send the first feed picture to the feeder management system. When the feeder management system receives the first feed picture, it calculates the traffic packets consumed and the consumption time for receiving the first feed picture, obtains the reference packet loss rate by using the feeder management system and the shooting device, and calculates the sending fluency of the first feed picture according to the reference packet loss rate, traffic packets and consumption time; A feed model detection module is used to compare the sending fluency with a preset fluency threshold. If the sending fluency is less than or equal to the fluency threshold, the first feed picture is transmitted back to the shooting device by using the feeder management system, and the second feed picture sent again by the shooting device is received by the feeder management system again, wherein the resolution of the second feed picture is smaller than the first feed picture. If the sending fluency is greater than the fluency threshold, or the feeder management system successfully receives the second feed picture, the first feed picture or the second feed picture is sent from the feeder management system to the customer management system, and the feed detection model in the customer management system is used to detect whether there is feed in the first feed picture or the second feed picture; The feed data transmission module is used to retrieve the feed data packet from the pre-built customer database using the customer management system when there is no feed in the first feed picture or the second feed picture, calculate the path priority based on the feed data packet and the delay time, confirm the target traffic path based on the path priority, send the feed data packet to the automatic feeder through the target traffic path, and use the automatic feeder that has received the feed data packet to obtain the target feed to complete the automatic feeding of the pet.