Sheep body size measurement method, device, equipment and medium based on cloud-edge collaboration
Through the cloud-edge collaboration method, the body size of black goats is measured using image acquisition, edge recognition and cloud computing platform, which solves the problems of large measurement errors, inaccurate nonlinear dimensions and excessive bandwidth occupied by data transmission, and achieves efficient and accurate weight prediction.
Patent Information
- Application Number
- CN202311663422.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-12-05
AI Technical Summary
Existing methods for measuring the body size of black goats have problems such as large measurement errors, low accuracy in nonlinear dimension measurement, difficulty in determining body size parameters that affect weight, and excessive bandwidth occupied by data transmission.
A cloud-edge collaboration method is adopted to obtain sheep images through image acquisition equipment, edge recognition equipment performs feature recognition and three-dimensional reconstruction, and the cloud computing platform performs multivariate regression analysis and weight prediction, reducing data transmission volume and improving measurement accuracy and efficiency.
It is possible to measure the body size traits of multiple sheep without contacting the sheep, improve the accuracy of nonlinear size measurement, reveal the impact of body size parameters on weight, reduce network bandwidth usage, and improve the accuracy and efficiency of weight prediction.
Smart Images

Figure CN117502289B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of animal husbandry measurement technology, and in particular to a sheep body size measurement method, device, equipment and medium based on cloud-edge collaboration. Background Art
[0002] With the development of animal husbandry and advancements in science and technology, research on methods for measuring livestock body size traits is gaining increasing attention. Studying the relationship between body size traits and weight provides a reference for scientific and rational breeding planning and technical support for livestock and poultry management. While some progress has been made in measuring body size traits in black goats, the following issues remain: Most existing methods for measuring body size traits in black goats are based on machine vision technology, which results in large measurement errors in practical applications; current research focuses primarily on linear dimensions such as height and length, while measuring curved, nonlinear dimensions such as the back and tail is not accurate enough; It is currently difficult to determine the body size parameters that influence weight based on the relationship between body size traits and weight in black goats; and the large amount of data collected during the measurement process causes the existing measurement architecture to consume excessive bandwidth when transmitting large amounts of data. Summary of the Invention
[0003] The present invention provides a sheep body size measurement method, device, equipment and medium based on cloud-edge collaboration to solve the above-mentioned technical problems of large measurement errors, low measurement accuracy of non-linear dimensions, difficulty in determining body size parameters that affect weight, and excessive bandwidth occupied by transmitted data.
[0004] In one embodiment of the present application, the present application provides a sheep body size measurement method based on cloud-edge collaboration, including: acquiring multiple sheep images in a livestock farm, and transmitting each of the sheep images to an edge recognition device, wherein each of the sheep images is acquired based on multiple acquisition times by image acquisition devices at different acquisition points in the livestock farm; performing feature recognition on each of the sheep images by the edge recognition device to obtain the sheep body size traits corresponding to each of the acquisition times of each sheep, and transmitting each of the sheep body size traits to a cloud computing platform; performing a multiple regression analysis on sheep weight and multiple sheep body size parameters based on all the sheep body size traits of each sheep by the cloud computing platform to obtain a multiple linear regression equation for each sheep, and performing a path analysis on each multiple linear regression equation based on all the sheep body size traits of each sheep to obtain a weight-body size influence result for each sheep; and performing a first weight prediction on each sheep by the cloud computing platform based on each multiple linear regression equation and each weight-body size influence result to obtain each first predicted weight.
[0005] In one embodiment of the present application, a multiple regression analysis is performed on sheep weight and multiple sheep body size parameters based on all sheep body size traits of each sheep to obtain a multiple linear regression equation for each sheep, including: using the sheep weight as the dependent variable and each of the sheep body size parameters as multiple independent variables to obtain an initial multiple linear relationship for each sheep; and performing linear fitting on each initial multiple linear relationship based on all sheep body size traits corresponding to each sheep to obtain a multiple linear regression equation for each sheep.
[0006] In one embodiment of the present application, a path analysis is performed on each multiple linear regression equation based on all body size traits of each sheep to obtain a weight-body size influence result for each sheep, including: performing a second weight prediction based on each multiple linear regression equation and multiple body size trait parameters of all body size traits of each sheep to obtain multiple second predicted weights of each sheep; determining a phenotypic correlation array for each sheep based on all the second predicted weights of each sheep and all the body size traits of each sheep; establishing a path coefficient equation group corresponding to each phenotypic correlation array; solving the coefficients of each path coefficient equation group based on all the body size traits of each sheep to obtain a target path coefficient for each sheep; and using the target path coefficient as the weight-body size influence result.
[0007] In one embodiment of the present application, the edge recognition device performs feature recognition on each of the sheep images to obtain the body size characteristics of each sheep corresponding to each acquisition time, including: performing edge recognition on each of the sheep images based on a preset edge detection algorithm to obtain initial contour data; performing sheep feature extraction on the initial contour data based on a preset feature extraction algorithm to obtain intermediate contour data; if the number of sheep features in the intermediate contour data is less than a preset number of features, transmitting the multiple sheep images corresponding to the intermediate contour data as images to be reconstructed to the cloud computing platform, so that the cloud computing platform performs three-dimensional reconstruction of the sheep based on the images to be reconstructed and acquisition points of the images to be reconstructed to obtain the body size characteristics of the sheep, wherein the acquisition points include acquisition positions and acquisition angles; if the number of sheep features in the intermediate contour data is greater than or equal to the preset number of features, determining the intermediate contour data as target contour data; and determining the body size characteristics of each sheep corresponding to each acquisition time based on the feature line size data and feature line position data in the target contour data; wherein the preset edge detection algorithm and the preset feature extraction algorithm are configured in the edge recognition device.
[0008] In one embodiment of the present application, after obtaining each first predicted weight, the method further includes: obtaining the measured body size trait of each sheep; comparing each measured body size trait with the body size trait of each sheep to obtain each identification deviation data; fitting each correction formula based on each identification deviation data; and correcting each predicted weight based on each correction formula to obtain each corrected weight.
[0009] In one embodiment of the present application, before performing a multiple regression analysis on sheep weight and multiple sheep body size parameters based on all the body size traits of each sheep through the cloud computing platform, the method further includes: calculating the standard deviation of all the body size traits of each sheep respectively to obtain multiple body size trait standard deviations; filtering at least one of abnormal values, missing values and repeated values in each of the body size traits of the sheep according to the standard deviation of each of the body size traits; and using the filtered sheep body size traits as the sheep body size traits.
[0010] In one embodiment of the present application, the present application provides a sheep body size measurement device based on cloud-edge collaboration, including: an acquisition module, configured to acquire multiple sheep images from a livestock farm and transmit each of the sheep images to an edge recognition device, wherein each of the sheep images is acquired based on multiple acquisition times by image acquisition devices at different acquisition points in the livestock farm; an identification module, configured to perform feature recognition on each of the sheep images through the edge recognition device, obtain the sheep body size traits corresponding to each of the acquisition times for each sheep, and transmit each of the sheep body size traits to a cloud computing platform; an analysis module, configured to perform multiple regression analysis on sheep weight and multiple sheep body size parameters based on all the sheep body size traits of each sheep through the cloud computing platform, obtain a multiple linear regression equation for each sheep, and perform path analysis on each multiple linear regression equation based on all the sheep body size traits of each sheep to obtain a weight-body size influence result for each sheep; and a prediction module, configured to perform a first weight prediction for each sheep based on each multiple linear regression equation and each weight-body size influence result through the cloud computing platform, to obtain each first predicted weight.
[0011] In one embodiment of the present application, the apparatus further comprises: a cloud computing platform, a plurality of image acquisition devices, and a plurality of edge recognition devices; the image acquisition device is used to acquire images of sheep and transmit them to the edge recognition device; the edge recognition device is used to perform feature recognition on the sheep images, obtain body size characteristics of the sheep, and transmit them to the cloud computing platform; the cloud computing platform is used to perform a first weight prediction for each sheep based on a multiple linear regression equation obtained from the body size characteristics of the sheep and a weight-body size influence result, to obtain each first predicted weight; each of the image acquisition devices is respectively connected to an edge recognition device, and each of the edge recognition devices is respectively connected to the cloud computing platform.
[0012] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the electronic device implements the sheep body size measurement method based on cloud-edge collaboration as described in any of the above embodiments.
[0013] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the sheep body size measurement method based on cloud-edge collaboration as described in any of the above embodiments.
[0014] Beneficial effects of embodiments of the present invention: The present invention provides a sheep body size measurement method, device, equipment and medium based on cloud-edge collaboration. The embodiments of the present invention obtain multiple sheep body size traits by performing feature recognition on each sheep image, thereby realizing the simultaneous measurement of sheep body size traits of multiple sheep without contacting the sheep, and improving the measurement accuracy of nonlinear dimensions. By establishing a multiple linear regression equation corresponding to sheep weight and each sheep body size parameter, and performing path analysis on the multiple linear regression equation, the degree of influence of each sheep body size parameter on the sheep weight is revealed, and the first weight prediction is performed by combining the weight-body size influence result and the weight-body size influence result, thereby improving the prediction accuracy. In the embodiments of the present invention, the sheep images collected by multiple image acquisition devices are transmitted to the edge recognition device, feature recognition is performed on the edge recognition device to obtain the sheep body size traits, and data analysis and first weight prediction are performed based on the sheep body size traits on the cloud computing platform, thereby reducing the amount of data transmission and the amount of network bandwidth occupied.
[0015] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0017] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied;
[0018] Figure 2A schematic diagram of a process for measuring sheep body size based on cloud-edge collaboration according to an embodiment of the present application is shown;
[0019] Figure 3 A block diagram of a sheep body size measurement device based on cloud-edge collaboration according to an embodiment of the present application is shown;
[0020] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.
[0022] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0023] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0024] See also Figure 1 , Figure 1 Schematic diagram showing an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied. Figure 1As shown, the system architecture may include multiple image acquisition devices 101, edge recognition devices 102, and a cloud computing platform 103. Multiple images of sheep at different locations on a livestock farm are collected by the multiple image acquisition devices 101 and transmitted to the edge recognition device 102. The edge recognition device 102 performs feature recognition on each sheep image to obtain the body size characteristics of each sheep at multiple acquisition times, and transmits each body size characteristic to the cloud computing platform 103. The cloud computing platform 103 performs a multiple regression analysis on the sheep weight and multiple body size parameters based on each body size characteristic of each sheep to obtain a multiple linear regression equation for each sheep. Path analysis is then performed on each multiple linear regression equation based on each body size characteristic of each sheep to obtain a weight-body size effect result for each sheep. The cloud computing platform 103 performs a first weight prediction on each sheep based on each multiple linear regression equation and each weight-body size effect result to obtain each first predicted weight.
[0025] Among them, multiple sheep images at different collection points and different collection times of the livestock farm are collected by multiple image collection devices 101, and are transmitted to the edge recognition device 102; the edge recognition device 102 performs feature recognition on each sheep image to obtain the sheep body size traits corresponding to each collection time of each sheep, and transmits each sheep body size trait to the cloud computing platform 103; the cloud computing platform 103 performs a multiple regression analysis on the sheep weight and multiple sheep body size parameters based on all the sheep body size traits of each sheep to obtain a multiple linear regression equation for each sheep, and performs a path analysis on each multiple linear regression equation based on all the sheep body size traits of each sheep to obtain a weight-body size influence result for each sheep; the cloud computing platform 103 performs a first weight prediction on each sheep according to each multiple linear regression equation and each weight-body size influence result to obtain each first predicted weight.
[0026] Among the related technologies, most existing methods for measuring the body dimensions of black goats are based on machine vision technology, but in actual applications, there are large measurement errors. Current research mainly focuses on linear dimensions such as the height and length of black goats, and the measurement of curved nonlinear dimensions such as the back and tail of black goats is not accurate enough. It is currently difficult to determine the body dimension parameters that affect weight based on the relationship between the body dimension traits of black goats and their weight. A large amount of data is collected during the measurement of the body dimensions of black goats, and the existing measurement architecture occupies too much bandwidth when transmitting large amounts of data.
[0027] In order to solve the above technical problems, the present application provides a sheep body size measurement method, device, equipment and medium based on cloud-edge collaboration. The implementation details of the technical solution of the embodiment of the present application are elaborated in detail below.
[0028] See also Figure 2 , Figure 2 The figure shows a flow chart of a sheep body size measurement method based on cloud-edge collaboration according to an embodiment of the present application. Figure 2 As shown, in an exemplary embodiment, the sheep body size measurement method based on cloud-edge collaboration includes at least steps S210 to S240, which are described in detail as follows:
[0029] Step S210 , obtaining multiple sheep images from a livestock farm, and transmitting each sheep image to an edge recognition device.
[0030] Among them, the images of each sheep are collected by image acquisition equipment at different collection points in the livestock farm based on multiple collection times.
[0031] In one embodiment of the present application, a livestock farm includes multiple wireless communication base stations. With each wireless communication base station as the center, multiple image acquisition devices are installed at different acquisition points. Each wireless communication base station is equipped with an edge recognition device, and images of each sheep at different acquisition times are transmitted to the edge recognition device through the wireless communication base station.
[0032] In one embodiment of the present application, the image acquisition device includes a camera.
[0033] In step S220 , feature recognition is performed on each sheep image by an edge recognition device to obtain the body size characteristics of each sheep corresponding to each collection time, and the body size characteristics of each sheep are transmitted to a cloud computing platform.
[0034] In one embodiment of the present application, feature recognition is performed on each sheep image by an edge recognition device to obtain the sheep body size characteristics corresponding to each collection time of each sheep, including: performing edge recognition on each sheep image based on a preset edge detection algorithm to obtain initial contour data; performing sheep feature extraction on the initial contour data based on a preset feature extraction algorithm to obtain intermediate contour data; if the number of sheep features in the intermediate contour data is less than a preset feature number, transmitting the plurality of sheep images corresponding to the intermediate contour data as images to be reconstructed to a cloud computing platform, so that the cloud computing platform performs three-dimensional reconstruction of the sheep based on the images to be reconstructed and collection points of the images to be reconstructed to obtain the sheep body size characteristics, where the collection points include collection positions and collection angles; if the number of sheep features in the intermediate contour data is greater than or equal to the preset feature number, determining the intermediate contour data as target contour data; and determining the sheep body size characteristics corresponding to each sheep at each collection time based on feature line size data and feature line position data in the target contour data; wherein the preset edge detection algorithm and the preset feature extraction algorithm are configured in the edge recognition device.
[0035] In one embodiment of the present application, a preset edge detection algorithm in an edge recognition device detects the edge contours of a sheep image to obtain initial contour data. Because this initial contour data may include edge contours of troughs, pillars, and other features unrelated to the sheep, it is necessary to filter this initial contour data. This filtering, based on a preset feature extraction algorithm, removes data unrelated to the sheep's features and uses data associated with the sheep as intermediate contour data. This reduces data volume, improves data quality, and reduces the load on the cloud computing platform.
[0036] In one embodiment of the present application, sheep tend to congregate closely together, which can result in significant occlusion of their body parts. If a sheep image contains significant occlusion or poor image quality, resulting in a low number of sheep features in the intermediate contour data, the corresponding multiple sheep images can be transmitted as images to be reconstructed to a cloud computing platform. The cloud computing platform then performs a three-dimensional reconstruction of the sheep based on the images, obtaining a three-dimensional model of the sheep. The body dimensions of the sheep can then be extracted based on the three-dimensional model. The present application's measurement method using three-dimensional sheep reconstruction is not limited by image quality or occlusion.
[0037] In one embodiment of the present application, the characteristic line size data includes the characteristic line width and the characteristic line length, and the characteristic line position data includes the characteristic line angle and the relative position relationship between the characteristic lines.
[0038] In one embodiment of the present application, the body size traits of sheep include at least weight traits and body size trait parameters, and the body size trait parameters include body height, body length, chest circumference, tube circumference, cross height, rump length, chest depth, abdominal circumference, front hoof length and hind hoof length.
[0039] In one embodiment of the present application, data transmission between the edge recognition device and the cloud computing platform is achieved through wireless communication base stations and cloud servers, enabling real-time monitoring and rapid data transmission. The collaborative work between the cloud computing platform and the edge recognition device enables high real-time and accurate sheep size measurement based on cloud-edge collaboration. Real-time data transmission and local preprocessing by the edge recognition device reduce data processing latency and enable timely detection and handling of anomalies in the edge device. Local preprocessing includes edge recognition, sheep feature extraction, and determination of sheep size traits.
[0040] Step S230: Perform a multiple regression analysis on the sheep weight and multiple sheep body size parameters based on all the sheep body size traits of each sheep through the cloud computing platform to obtain a multiple linear regression equation for each sheep, and perform a path analysis on each multiple linear regression equation based on all the sheep body size traits of each sheep to obtain a weight-body size influence result for each sheep.
[0041] In one embodiment of the present application, before performing a multiple regression analysis on sheep weight and multiple sheep body size parameters based on all the body size traits of each sheep through a cloud computing platform, the method further includes: calculating the standard deviation of all the body size traits of each sheep respectively to obtain multiple body size trait standard deviations; filtering at least one of abnormal values, missing values and repeated values in the body size traits of each sheep according to the standard deviation of each body size trait; and using the filtered sheep body size trait as the sheep body size trait.
[0042] In one embodiment of the present application, after receiving a plurality of sheep body size traits, the cloud computing platform performs data cleaning on each sheep body size trait according to the body size trait standard deviation of each sheep body size trait, removes outliers, missing values and duplicate values, and improves the quality and accuracy of the data.
[0043] In one embodiment of the present application, a multiple regression analysis is performed on sheep weight and multiple sheep body size parameters based on all sheep body size traits of each sheep to obtain a multiple linear regression equation for each sheep, including: taking sheep weight as the dependent variable and taking each sheep body size parameter as multiple independent variables to obtain an initial multiple linear relationship for each sheep; and performing linear fitting on each initial multiple linear relationship according to all sheep body size traits corresponding to each sheep to obtain a multiple linear regression equation for each sheep.
[0044] In one embodiment of the present application, the relationship between body size and growth and development is demonstrated by a multiple linear regression equation.
[0045] In one embodiment of the present application, a path analysis is performed on each multiple linear regression equation based on all body size traits of each sheep to obtain a weight-body size influence result for each sheep, including: performing a second weight prediction based on each multiple linear regression equation and multiple body size trait parameters of all body size traits of each sheep to obtain multiple second predicted weights of each sheep; determining a phenotypic correlation array for each sheep based on all the second predicted weights of each sheep and all the body size traits of each sheep; establishing a path coefficient equation group corresponding to each phenotypic correlation array; solving the coefficients of each path coefficient equation group based on all the body size traits of each sheep to obtain a target path coefficient for each sheep; and using the target path coefficient as the weight-body size influence result.
[0046] In one embodiment of the present application, the target path coefficient is used to reveal the main body size factors that affect body weight, and the direct or indirect effects corresponding to each body size factor.
[0047] In one embodiment of the present application, the target path coefficient obtained through path analysis characterizes the degree to which each body size trait parameter affects the weight trait. Compared to traditional manual and sensor measurement methods, the image processing-based automated measurement method in this application can be performed without contacting the sheep, reducing interference with the sheep. Furthermore, image processing technology enables simultaneous measurement of multiple sheep, improving measurement efficiency.
[0048] Step S240 , performing a first weight prediction for each sheep according to each multivariate linear regression equation and each weight-body size influence result through the cloud computing platform to obtain each first predicted weight.
[0049] In one embodiment of the present application, the regression coefficient of each multivariate linear regression equation is corrected according to each target path coefficient, and the first weight of each sheep is predicted using each corrected multivariate linear regression equation.
[0050] In one embodiment of the present application, after obtaining each first predicted weight, the method further includes: obtaining the measured body size trait of each sheep; comparing each measured body size trait with the body size trait of each sheep to obtain each identification deviation data; fitting each correction formula based on each identification deviation data; and correcting each predicted weight based on each correction formula to obtain each corrected weight.
[0051] In one embodiment of the present application, before capturing images of sheep using an image acquisition device, the sheep's body dimensions are measured using traditional manual methods to obtain measured body dimensions. By comparing the measured body dimensions with the sheep's body dimensions obtained through image recognition, a correction formula representing the relationship between the measured data and the recognized data is derived to correct the first predicted weight, thereby improving measurement accuracy.
[0052] In one embodiment of the present application, each first predicted weight, each sheep body size trait, and each weight-body size effect result are displayed based on the collection time and different livestock farms, and at least one of a display chart and a display report is generated.
[0053] In one embodiment of the present application, at least one of a display chart and a display report is displayed through a data visualization platform to monitor the growth and development status of sheep, providing reliable data support for sheep breeding and reproduction.
[0054] See also Figure 3 , Figure 3 The block diagram of a sheep body size measurement device based on cloud-edge collaboration according to an embodiment of the present application is shown. The device can be applied to Figure 1The device may also be applicable to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applicable.
[0055] like Figure 3 As shown, a sheep body size measurement device 300 based on cloud-edge collaboration according to an embodiment of the present application includes: an acquisition module 301, an identification module 302, an analysis module 303 and a prediction module 304.
[0056] The acquisition module 301 is used to acquire multiple sheep images on the farm and transmit each sheep image to the edge recognition device. Each sheep image is acquired by image acquisition devices at different acquisition points in the farm based on multiple acquisition times.
[0057] Identification module 302 is used to perform feature recognition on each sheep image through edge recognition equipment, obtain the body size characteristics of each sheep corresponding to each collection time, and transmit the body size characteristics of each sheep to the cloud computing platform;
[0058] Analysis module 303 is configured to perform a multiple regression analysis on sheep weight and multiple sheep size parameters based on all the sheep size traits of each sheep through a cloud computing platform to obtain a multiple linear regression equation for each sheep, and perform a path analysis on each multiple linear regression equation based on all the sheep size traits of each sheep to obtain a weight-body size effect result for each sheep;
[0059] The prediction module 304 is used to perform a first weight prediction for each sheep according to each multivariate linear regression equation and each weight-body size influence result through the cloud computing platform to obtain each first predicted weight.
[0060] In one embodiment of the present application, a sheep body size measurement device based on cloud-edge collaboration further includes a cloud computing platform, multiple image acquisition devices, and multiple edge recognition devices. The image acquisition device is used to acquire images of sheep and transmit them to the edge recognition device; the edge recognition device is used to perform feature recognition on the sheep images to obtain the sheep's body size traits and transmit them to the cloud computing platform; the cloud computing platform is used to predict a first weight for each sheep based on the multivariate linear regression equation obtained from the sheep's body size traits and the weight-body size influence results, thereby obtaining each first predicted weight; each image acquisition device is respectively connected to an edge recognition device, and each edge recognition device is respectively connected to the cloud computing platform.
[0061] It should be noted that the sheep body size measurement device based on cloud-edge collaboration provided in the above embodiment and the sheep body size measurement method based on cloud-edge collaboration provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In actual application, the device provided in the above embodiment is a sheep body size measurement device based on cloud-edge collaboration. The functions can be distributed to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0062] An embodiment of the present application also provides an electronic device, including: one or more processors; a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the electronic device implements the sheep body size measurement method based on cloud-edge collaboration provided in the above-mentioned embodiments.
[0063] See also Figure 4 , Figure 4 The following is a schematic diagram showing the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application. Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0064] like Figure 4 As shown, computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 402 or programs loaded from storage unit 408 into random access memory (RAM) 403, such as executing the methods in the above embodiments. Various programs and data required for system operation are also stored in RAM 403. CPU 401, ROM 402, and RAM 403 are connected to each other via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0065] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read therefrom can be installed into the storage section 408 as needed.
[0066] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the various functions defined in the system of the present application are executed.
[0067] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0068] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned 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 box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0069] The units involved in the embodiments described in the present application can be implemented by software or by hardware, and the units described can also be set in a processor. The names of these units do not constitute a limitation on the units themselves under certain circumstances. Therefore, the technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present application.
[0070] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When executed by a computer processor, the computer program causes the computer to perform the sheep body measurement method based on cloud-edge collaboration provided in each of the above embodiments. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device.
[0071] In the above embodiments, unless otherwise specified, the use of serial numbers such as "first" and "second" to describe common objects only indicates that they refer to different instances of the same object, rather than indicating that the objects being described must adopt a given order, whether in time, space, sorting or any other way.
[0072] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, any equivalent modifications or alterations accomplished by a person of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.
Claims
1. A sheep body size measurement method based on cloud-edge collaboration, characterized in that: The method comprises: Acquire multiple sheep images on a livestock farm, and transmit each of the sheep images to an edge recognition device, wherein each of the sheep images is acquired by image acquisition devices at different acquisition points on the livestock farm based on multiple acquisition times; Performing feature recognition on each of the sheep images by the edge recognition device to obtain the body size characteristics of each sheep corresponding to each collection time, and transmitting the body size characteristics of each sheep to the cloud computing platform; Performing a multiple regression analysis on sheep weight and multiple sheep body size parameters based on all the sheep body size traits of each sheep through the cloud computing platform to obtain a multiple linear regression equation for each sheep, and performing a path analysis on each multiple linear regression equation based on all the sheep body size traits of each sheep to obtain a weight-body size influence result for each sheep; Performing a first weight prediction on each sheep according to each multivariate linear regression equation and each weight-body size influence result through the cloud computing platform to obtain each first predicted weight; The edge recognition device is used to perform feature recognition on each of the sheep images to obtain the body size characteristics of each sheep corresponding to each of the collection times, including: Performing edge recognition on each of the sheep images based on a preset edge detection algorithm to obtain initial contour data; Extracting sheep features from the initial contour data based on a preset feature extraction algorithm to obtain intermediate contour data; If the number of sheep features in the intermediate contour data is less than a preset number of features, transmitting a plurality of sheep images corresponding to the intermediate contour data as images to be reconstructed to the cloud computing platform, so that the cloud computing platform performs three-dimensional reconstruction of the sheep based on the images to be reconstructed and acquisition points of the images to be reconstructed to obtain body size characteristics of the sheep, wherein the acquisition points include acquisition positions and acquisition angles; If the number of sheep features in the intermediate contour data is greater than or equal to the preset number of features, the intermediate contour data is determined as the target contour data; Determine the body size traits of each sheep corresponding to each of the collection times according to the characteristic line size data and the characteristic line position data in the target outline data; Wherein, the preset edge detection algorithm and the preset feature extraction algorithm are configured in the edge recognition device.
2. The sheep body size measurement method based on cloud-edge collaboration according to claim 1 is characterized in that: Based on all the body size traits of each sheep, a multiple regression analysis was performed on the sheep weight and multiple body size parameters, and the multiple linear regression equations for each sheep were obtained, including: Taking the weight of the sheep as the dependent variable and the body size parameters of each sheep as multiple independent variables, an initial multivariate linear relationship for each sheep is obtained; Each initial multivariate linear relationship was linearly fitted according to all the body size traits of each sheep, and the multivariate linear regression equation of each sheep was obtained.
3. The sheep body size measurement method based on cloud-edge collaboration according to claim 2 is characterized in that: Based on the path analysis of each multivariate linear regression equation based on all the body size traits of each sheep, the weight-body size effect results of each sheep were obtained, including: Performing a second weight prediction based on each multivariate linear regression equation and multiple body size trait parameters of all sheep in each sheep to obtain multiple second predicted weights for each sheep; determining a phenotypic correlation array for each sheep based on all second predicted weights of each sheep and all body size traits of each sheep; Establish the path coefficient equation group corresponding to each phenotype correlation array; Solve the coefficients of each path coefficient equation group based on all the body size traits of each sheep to obtain the target path coefficient of each sheep; The target path coefficient is taken as the result of the weight-body size effect.
4. The sheep body size measurement method based on cloud-edge collaboration according to any one of claims 1 to 3, characterized in that: After obtaining each first predicted weight, it also includes: Obtain the measured body size traits of each sheep; Compare each measured body size trait with each sheep's body size trait to obtain each identification deviation data; Fit each correction formula according to each identification deviation data; Each first predicted weight is corrected according to each correction formula to obtain each corrected weight.
5. The sheep body size measurement method based on cloud-edge collaboration according to any one of claims 1 to 3, characterized in that: Before performing a multiple regression analysis on the sheep weight and multiple sheep body size parameters based on all the sheep body size traits of each sheep through the cloud computing platform, the method further includes: Calculate the standard deviation of all body size traits of each sheep separately to obtain multiple body size trait standard deviations; filtering at least one of abnormal values, missing values and repeated values in each of the body size traits of the sheep according to the standard deviation of each of the body size traits; The filtered sheep body size traits are used as sheep body size traits.
6. A sheep body size measurement device based on cloud-edge collaboration, characterized in that: The device comprises: An acquisition module is used to acquire multiple sheep images on the livestock farm and transmit each of the sheep images to an edge recognition device, wherein each of the sheep images is acquired by image acquisition devices at different acquisition points on the livestock farm based on multiple acquisition times; The recognition module is used to perform feature recognition on each of the sheep images through the edge recognition device to obtain the body size characteristics of each sheep corresponding to each collection time, and transmit the body size characteristics of each sheep to the cloud computing platform; wherein, the feature recognition on each of the sheep images through the edge recognition device to obtain the body size characteristics of each sheep corresponding to each collection time includes: performing edge recognition on each of the sheep images based on a preset edge detection algorithm to obtain initial contour data; performing sheep feature extraction on the initial contour data based on a preset feature extraction algorithm to obtain intermediate contour data; if the number of sheep features in the intermediate contour data is less than the preset number of features, then extracting the intermediate contour data. A plurality of sheep images corresponding to the data are transmitted as images to be reconstructed to the cloud computing platform, so that the cloud computing platform performs three-dimensional reconstruction of the sheep according to the images to be reconstructed and the acquisition points of the images to be reconstructed to obtain the body size characteristics of the sheep, wherein the acquisition points include acquisition positions and acquisition angles; if the number of sheep features in the intermediate contour data is greater than or equal to a preset number of features, the intermediate contour data is determined as the target contour data; the body size characteristics of each sheep corresponding to each acquisition time are determined according to the feature line size data and feature line position data in the target contour data; wherein the preset edge detection algorithm and the preset feature extraction algorithm are configured in the edge recognition device; an analysis module, configured to perform a multiple regression analysis on sheep weight and a plurality of sheep body size parameters based on all the body size traits of each sheep through the cloud computing platform to obtain a multiple linear regression equation for each sheep, and perform a path analysis on each multiple linear regression equation based on all the body size traits of each sheep to obtain a weight-body size influence result for each sheep; The prediction module is used to perform a first weight prediction for each sheep according to each multivariate linear regression equation and each weight-body size influence result through the cloud computing platform to obtain each first predicted weight.
7. The sheep body size measurement device based on cloud-edge collaboration according to claim 6 is characterized in that: The apparatus further comprises: a cloud computing platform, a plurality of image acquisition devices, and a plurality of edge recognition devices; The image acquisition device is used to collect images of sheep and transmit them to the edge recognition device; The edge recognition device is used to perform feature recognition on the sheep image, obtain the sheep's body size characteristics, and transmit them to the cloud computing platform; The cloud computing platform is used to perform a first weight prediction for each sheep based on the multiple linear regression equation obtained from the sheep's body size traits and the weight-body size influence result to obtain each first predicted weight; Each of the image acquisition devices is connected to an edge recognition device, and each of the edge recognition devices is connected to the cloud computing platform.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the sheep body size measurement method based on cloud-edge collaboration as described in any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the sheep body size measurement method based on cloud-edge collaboration as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Weight evaluation system based on computer vision technology and implementation method
CN112862757A
Sheep three-dimensional body size parameter automatic detection device and detection method based on double-visual-angle depth camera
CN116182736A