A data visualization analysis system for sheep breeding growth monitoring
By using data collection, difference analysis and outlier analysis modules in sheep breeding growth monitoring to calculate individual growth differences and outlier characteristic indicators, and adjusting the hyperplane of the support vector machine model, the analysis accuracy caused by high outlier characteristics of sheep in the flock is solved. Lower problems and improve the accuracy of health status monitoring.
Patent Information
- Application Number
- CN202410994411.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-24
AI Technical Summary
In the existing technology, the high outlier characteristics of sheep in the flock lead to inaccurate hyperplane selection of the support vector machine model, thereby reducing the accuracy of visual analysis of sheep breeding growth monitoring.
The health status and growth data of sheep are obtained through the data acquisition module, the difference analysis module calculates individual growth difference indicators, the outlier analysis module performs cluster analysis to obtain outlier characteristic indicators, and the classification optimization module adjusts the superstructure of the support vector machine model based on these indicators. plane to improve the accuracy of health status monitoring.
It improves the accuracy of visual analysis of sheep breeding growth monitoring, reduces the impact of outlier characteristics on the selection of hyperplanes in sheep health monitoring, and enhances the ability to monitor sheep health.
Smart Images

Figure CN118520365B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of support vector machine analysis, and in particular to a data visualization analysis system for sheep breeding growth monitoring. Background Art
[0002] Visual analysis of sheep breeding growth monitoring can improve the efficiency and accuracy of farm management. Through visualization technology, farmers can monitor key indicators such as the growth status, health status and feeding environment of sheep, so as to make more accurate management decisions; among them, monitoring the growth status and health status of sheep can help to timely discover health problems of sheep, improve treatment effects and reduce breeding costs, and ultimately improve the economic benefits of the farm.
[0003] The existing method constructs a hyperplane of the support vector machine model through the health status of sheep in the flock under different growth conditions, i.e. healthy or unhealthy, to classify the health status of the sheep, that is, one side of the hyperplane is the data of healthy sheep in the flock, and the other side is the data of unhealthy sheep in the flock; however, if there is a large difference in the growth conditions of some sheep in the flock from the rest of the sheep, that is, the data of some sheep have a high outlier characteristic, it is easy to make the hyperplane selection inaccurate, which in turn leads to a low accuracy rate of visual analysis of sheep breeding growth monitoring. Summary of the invention
[0004] In order to solve the technical problem that the sheep in the flock have high outlier characteristics, which makes the hyperplane selection inaccurate and thus leads to low accuracy of visual analysis of sheep breeding growth monitoring, the purpose of the present invention is to provide a data visualization analysis system for sheep breeding growth monitoring. The technical scheme adopted is as follows:
[0005] The present invention proposes a data visualization analysis system for sheep breeding growth monitoring, the system comprising:
[0006] The data acquisition module is used to obtain the health status and different types of growth data of each sheep in the sheep flock to be tested, and construct the data point of each sheep from the growth data of each sheep; divide the sheep in the sheep flock to be tested into two status categories based on the health status; and select one sheep from the sheep flock to be tested as the target sheep;
[0007] A difference analysis module is used to obtain the individual growth difference index of the target sheep according to the difference in health status between the target sheep and other sheep, the difference in growth data of each type, and the degree of confusion of growth data of each type of all sheep;
[0008] An outlier analysis module is used to cluster the data points of all sheep respectively with each element in the distance set of the target sheep as the clustering radius, and obtain the outlier characteristic index of the target sheep according to the individual growth difference index and the number of data points of the sheep corresponding to the data points in the cluster to which the data points of the target sheep belong under all elements in the distance set;
[0009] The classification optimization module is used to construct the original hyperplane in the support vector machine model based on the position distribution of the data points of the sheep in the two status categories; re-obtain the optimal hyperplane according to the result after the distance from the data point of each sheep to the original hyperplane is adjusted by the outlier feature index, and complete the training of the support vector machine model; and use the trained support vector machine model to monitor the health status of new sheep.
[0010] Furthermore, the method for obtaining the individual growth difference index of the target sheep includes:
[0011] Setting a status label value of the health status of each sheep; obtaining a first control sheep of the target sheep; taking the average of the absolute values of the differences between the status label values of the target sheep and all the first control sheep as the individual difference index of the target sheep;
[0012] Select a characteristic type from all types to obtain a second control sheep of the target sheep; obtain a growth difference index of the target sheep according to the difference in growth data of each characteristic type between the target sheep and all its second control sheep, and the degree of confusion of the growth data of each characteristic type;
[0013] According to the growth difference index and the individual difference index, the individual growth difference index of the target sheep is obtained.
[0014] Furthermore, the method for obtaining the growth difference index of the target sheep includes:
[0015] The information entropy of the growth data of each characteristic type of the target sheep and all its second control sheep is recorded as the initial health impact of each characteristic type on the target sheep; the initial health impact is normalized to obtain the final health impact of each characteristic type on the target sheep;
[0016] The cumulative sum of the differences in growth data of each characteristic type between the target sheep and all its second control sheep is recorded as the difference degree of each characteristic type of the target sheep;
[0017] The growth difference index of the target sheep is obtained according to the final health impact degree and the difference degree of all characteristic types of the target sheep.
[0018] Furthermore, the method for obtaining the outlier characteristic index of the target sheep includes:
[0019] Select an element from the distance set of the target sheep and record it as the target distance. Use the target distance as the clustering radius to cluster the data points of all the sheep in the sheep flock to be tested to obtain a number of clusters under the target distance. The cluster to which the target sheep belongs is recorded as the target cluster under the target distance.
[0020] The cumulative sum of the individual growth difference indicators of the sheep corresponding to the data points in the target cluster at the target distance is recorded as the comprehensive difference indicator of the target cluster at the target distance; the local outlier degree of the target cluster at the target distance is obtained according to the number of data points in the target cluster at the target distance and the comprehensive difference indicator; the cumulative sum of the local outlier degrees of the target cluster under all elements in the distance set of the target sheep is negatively correlated and normalized to obtain the outlier characteristic indicator of the target sheep.
[0021] Furthermore, the method of re-obtaining the optimal hyperplane according to the result of adjusting the distance from each sheep data point to the original hyperplane by the outlier feature index to complete the training of the support vector machine model includes:
[0022] The distance from the data point of each sheep to the original hyperplane is weighted by using the outlier characteristic index of each sheep in the sheep flock to be tested, so as to obtain the corrected distance from the data point of each sheep in the sheep flock to the original hyperplane; and the optimal hyperplane is re-obtained by using the corrected distance.
[0023] Furthermore, the method for obtaining the distance set of the target sheep includes:
[0024] The distance set of the target sheep is constructed by the distances between the data points of different sheep containing the state category of the target sheep.
[0025] Furthermore, the method for clustering all the sheep data points is a DBSCAN algorithm.
[0026] Further, each type of growth data of the target sheep is equal to that of each of the first control sheep.
[0027] Furthermore, the method of normalizing the initial health impact to obtain the final health impact of each feature type on the target sheep includes:
[0028] Based on the initial health impacts of all feature types on the target sheep, the initial health impact of each feature type is normalized to obtain the final health impact of each feature type on the target sheep.
[0029] Furthermore, the method for obtaining the growth difference index of the target sheep according to the final health impact degree and the difference degree of all characteristic types of the target sheep includes:
[0030] The product of the final health impact degree and the difference degree of each characteristic type of the target sheep is used as the local index of each characteristic type of the target sheep; the cumulative sum of the local indexes of all characteristic types of the target sheep is calculated and recorded as the growth difference index of the target sheep.
[0031] The present invention has the following beneficial effects:
[0032] In an embodiment of the present invention, the difference in health status between the target sheep and the remaining sheep considers the difference in the target sheep from individual factors; the difference in growth data of each type between the target sheep and the remaining sheep, and the degree of confusion of the growth data of each type of all sheep consider the difference in the target sheep from the growth process factors, so that the obtained individual growth difference index can more accurately reflect the position accuracy of the data point of the target sheep; in order to analyze the outlier characteristics of the data point of the target sheep, different clustering radii are set, and the data points of all sheep in the sheep flock to be tested are clustered respectively, the number of data points in the cluster to which the data point of the target sheep belongs reflects the degree of outlier of the data point of the target sheep, and the position accuracy of these data points is considered in combination with the individual growth difference index of the data points in the cluster to which the data point of the target sheep belongs, so as to further improve the reliability of the outlier characteristics of the data point of the target sheep; according to the result of the distance from the data point of each sheep to the original hyperplane after the outlier characteristic index is adjusted, the optimal hyperplane is re-obtained, the influence of the outlier characteristics of the sheep data point on the selection of the optimal hyperplane is reduced, the accuracy of the trained support vector machine model in monitoring the health status of the sheep is improved, and the accuracy of the visual analysis of the sheep breeding growth monitoring is increased. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A system block diagram of a data visualization analysis system for sheep breeding growth monitoring provided by an embodiment of the present invention;
[0035] Figure 2 A system structure diagram for obtaining individual growth difference indicators of each sheep provided by an embodiment of the present invention;
[0036] Figure 3 A schematic diagram of a computer device for a data visualization and analysis device for sheep breeding growth monitoring provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the data visualization analysis system for sheep breeding growth monitoring proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0038] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0039] The following is a detailed description of a data visualization analysis system for sheep breeding growth monitoring provided by the present invention in conjunction with the accompanying drawings.
[0040] Embodiment 1:
[0041] See also Figure 1 , which shows a system block diagram of a data visualization analysis system for sheep breeding growth monitoring provided by an embodiment of the present invention, the system includes: a data acquisition module 100, a difference analysis module 200, an outlier analysis module 300, and a classification optimization module 400.
[0042] The data acquisition module 100 is used to obtain the health status and different types of growth data of each sheep in the sheep flock to be tested, and construct the data point of each sheep from the growth data of each sheep; divide the sheep in the sheep flock to be tested into two status categories based on the health status; and select any sheep from the sheep flock to be tested as the target sheep.
[0043] Specifically, the health status and different types of growth data of each sheep in the sheep flock to be tested are measured, and the data point of each sheep is constructed from all types of growth data of each sheep, and each sheep has only one data point. There are two health statuses of sheep: healthy and unhealthy. Based on the health status of the sheep, all the sheep in the sheep flock to be tested are divided into healthy categories and unhealthy categories, wherein the sheep in the healthy category are healthy sheep in the sheep flock to be tested, and the sheep in the unhealthy category are unhealthy sheep in the sheep flock to be tested.
[0044] In the embodiment of the present invention, all types of growth data include: age, breed, weight, height, body length, feed type and feed consumption; in other embodiments of the present invention, other types of growth data related to the growth status of sheep can also be selected. The more sheep in the sheep flock to be tested, the better. In this embodiment, there are at least 200 sheep in the sheep flock to be tested. The implementer can set it according to the specific situation.
[0045] The difference analysis module 200 is used to obtain the individual growth difference index of the target sheep according to the difference in health status between the target sheep and other sheep, the difference in growth data of each type, and the degree of confusion of growth data of each type of all sheep.
[0046] In the process of constructing the hyperplane in the support vector machine using the position distribution of data points of sheep in two status categories in the sheep flock to be tested, the outlier characteristics and position accuracy of the data points affect the accuracy of the hyperplane selection.
[0047] The difference in health status between the target sheep and the rest of the sheep considers the difference in the target sheep from the perspective of individual factors; the difference in growth data of each type between the target sheep and the rest of the sheep reflects the difference in growth data of each type during the growth process of the sheep; the degree of confusion of growth data of each type of all the sheep reflects the degree of influence of each type on the health of the sheep during the growth process; these two factors consider the difference in the target sheep from the perspective of the growth process. The accuracy of all types of growth data of the target sheep is judged by using the differences in individual factors and growth process factors of the target sheep. The more accurate the growth data of all types of the target sheep is, the higher the accuracy of the location of the data points of the target sheep is.
[0048] See also Figure 2 , which shows a system structure diagram for obtaining individual growth difference indicators of each sheep provided by an embodiment of the present invention, the system includes: an individual difference analysis unit 210, a growth difference analysis unit 220, and a comprehensive difference analysis unit 230.
[0049] Individual difference analysis unit 210: used to set the status label value of the health status of each sheep; obtain the first control sheep of the target sheep; and take the average of the absolute values of the differences between the status label values of the target sheep and all its first control sheep as the individual difference index of the target sheep.
[0050] The health status of two sheep with equal growth data of all types should also be the same. If the health status of the two sheep is different, there are individual differences between the two sheep. In order to analyze the degree of individual differences of sheep, first, the state label value of the health status of each sheep is set, and the state label values of different health status are not equal; in the embodiment of the present invention, the health status of the sheep has two types: healthy and unhealthy. If the sheep is healthy, the state label value of the sheep is set to 1, and if the sheep is unhealthy, the state label value of the sheep is set to 0.
[0051] Secondly, the embodiment of the present invention selects sheep in the tested sheep flock whose growth data of all types are equal to those of the target sheep as the first control sheep of the target sheep; when the growth factors, i.e., all types of growth data are the same, the difference in health status between the target sheep and its first control sheep is caused by individual factors of the sheep.
[0052] If the health status of the target sheep is different from that of the majority of the first control sheep, the possibility that the above difference is caused by the individual factors of the target sheep is greater, and the individual difference between the target sheep and its first control sheep is greater, then the individual difference index of the target sheep is greater; if the health status of the target sheep is the same as that of the majority of the first control sheep, the individual factors of the target sheep and its first control sheep are closer, and the individual difference between the target sheep is smaller, then the individual difference index is smaller.
[0053] Growth difference analysis unit 220: used to select a characteristic type from all types to obtain a second control sheep of the target sheep; and obtain a growth difference index of the target sheep according to the difference in growth data of each characteristic type between the target sheep and all its second control sheep, and the degree of confusion of the growth data of each characteristic type.
[0054] Because the number of sheep in the flock to be tested is limited, the number of the first control sheep of the target sheep is not large; when the number of the first control sheep is small, it may lead to inaccurate and unreliable data analysis, resulting in deviations in the individual difference indicators of the target sheep. In order to improve the accuracy of the individual difference analysis of the target sheep, the inherent changes of the sheep during the growth process are considered. Under normal circumstances, the weight, height and body length of the sheep of the same age and the same sex fed with the same feed should be relatively close during the growth process. Therefore, in the embodiment of the present invention, three types of weight, height and body length are selected as feature types; and the second control sheep of the target sheep is selected from the flock to be tested. The target sheep and its second control sheep have the same feed type, gender and age, and the implementer can set them according to the specific situation.
[0055] It is known that the weight, height and body length of sheep of the same sex and age fed with the same feed should be relatively close during the growth process, so the growth data of each characteristic type of the target sheep and its second control sheep should be relatively close. The greater the difference in growth data of each characteristic type between the target sheep and its second control sheep, it means that the growth data of this characteristic type is relatively different during the growth process of the sheep; the more chaotic the growth data of each characteristic type between the target sheep and its second control sheep, the greater the impact of this characteristic type on the health of the sheep during the growth process; at the same time, combined with the individual difference degree of the target sheep, that is, the individual difference index, the analysis is performed to improve the accuracy of the difference analysis of the target sheep.
[0056] Preferably, in some possible implementation modes of the embodiments of the present invention, the method for obtaining the growth difference index of the target sheep includes: recording the information entropy of the growth data of each characteristic type of the target sheep and all its second control sheep as the initial health impact of each characteristic type on the target sheep; normalizing the initial health impact to obtain the final health impact of each characteristic type on the target sheep; adding the differences between the growth data of each characteristic type of the target sheep and all its second control sheep, respectively, and recording it as the difference of each characteristic type of the target sheep; and obtaining the growth difference index of the target sheep based on the final health impact and the difference of all the characteristic types of the target sheep.
[0057] It should be noted that statistical indicators such as information entropy, standard deviation and variance can reflect the degree of confusion of information. In other embodiments of the present invention, information entropy can be replaced by standard deviation or variance. In an embodiment of the present invention, based on the initial health impact of all feature types on the target sheep, the initial health impact of each feature type is normalized to obtain the final health impact of each feature type on the target sheep; in other embodiments of the present invention, normalization methods such as Sigmoid function, function conversion, maximum and minimum normalization can be used for normalization processing, which is not limited here.
[0058] If the initial health impact and difference of each characteristic type on the target sheep are greater, it means that the growth data of the characteristic type is more different during the growth of the sheep. The more obvious the difference between the target sheep and its second control sheep during the growth process, the greater the growth difference index. Considering the differences of all characteristic types on the target sheep during the growth process, the growth difference index of the target sheep is obtained. Therefore, the initial health impact and difference are positively correlated with the growth difference index. Since the final health impact is the result of normalization of the initial health impact, the final health impact is positively correlated with the growth difference index.
[0059] In an embodiment of the present invention, the method for obtaining the growth difference index is as follows: the product of the final health impact degree and the difference degree of each characteristic type of the target sheep is used as the local index of each characteristic type of the target sheep; the cumulative sum of the local indexes of all characteristic types of the target sheep is calculated and recorded as the growth difference index of the target sheep. In a specific implementation of the embodiment of the present invention, taking the target sheep Q as an example, the growth difference index of the target sheep is expressed by the formula:
[0060] ;
[0061] In the formula, is the growth difference index of the target sheep; E is the number of species of characteristic types; is the initial health impact of the e-th characteristic type on the target sheep; It is the cumulative sum of the initial health impacts of all feature types on the target sheep; is the final health impact of the e-th characteristic type on the target sheep; N is the total number of the second control sheep of the target sheep; The growth data of the e-th characteristic type of the target sheep; The growth data of the e-th characteristic type of the n-th second control sheep of the target sheep; is the difference of the e-th characteristic type of the target sheep; is the local index of the e-th characteristic type of the target sheep; is the absolute value function.
[0062] It should be noted that when the final health impact When the value is larger, the growth data of the e-th characteristic type changes more during the growth of the sheep, and the growth difference index The larger the When the value is larger, the growth data of the e-th characteristic type will be more different in the growth process of the target sheep compared with the second control sheep of the target sheep, and the growth difference index The bigger.
[0063] Comprehensive difference analysis unit 230: used to obtain the individual growth difference index of the target sheep according to the growth difference index and the individual difference index.
[0064] The individual difference index considers the difference of the target sheep from the individual factors, and the growth difference index considers the difference of the target sheep from the growth process. If the individual difference index and the growth difference index of the target sheep are larger, the difference between the target sheep and the rest of the sheep in terms of individual factors and growth process is more obvious, and the larger the individual growth difference index, the less accurate the growth data of all types of the target sheep, and the lower the position accuracy of the data points of the target sheep; therefore, the individual difference index and the growth difference index are both positively correlated with the individual growth difference index. In the embodiment of the present invention, the product of the growth difference index of the target sheep and the individual difference index is used as the individual growth difference index of the target sheep.
[0065] In the embodiment of the present invention, the correlation between the individual difference index and the growth difference index and the individual growth difference index may also be constructed through other basic mathematical operations, which will not be limited or elaborated herein.
[0066] The outlier analysis module 300 is used to cluster the data points of all sheep respectively with each element in the distance set of the target sheep as the clustering radius, and obtain the outlier characteristic index of the target sheep according to the individual growth difference index and the number of data points corresponding to the data points in the cluster cluster to which the data points of the target sheep belong under all elements in the distance set.
[0067] The data points of sheep in each state category in the flock to be tested are clustered and distributed. There are fewer data points distributed around the data points with obvious outlier characteristics. In order to analyze the outlier characteristics of the target sheep's data points, different clustering radii are set to cluster the data points of all sheep in the flock to be tested. When the clustering radius is small, if the number of data points in the cluster to which the target sheep's data points belong is small, the outlier characteristics of the target sheep are more obvious. When the position accuracy of the data points in the cluster to which the target sheep's data points belong is high, the outlier characteristics of the target sheep are more accurate. In order to improve the accuracy of the hyperplane selection, the possibility of data points with obvious outlier characteristics as support vectors should be reduced.
[0068] In the embodiment of the present invention, the position accuracy of the data points of the sheep is presented by the individual growth difference index, and the number of data points in the cluster to which the data points belong presents the degree of outlier of the data points of the sheep. The above two factors are analyzed comprehensively to improve the accuracy of the outlier characteristic index analysis of the data points of the sheep.
[0069] Selecting the cluster radius is an important step in analyzing the outlier characteristics of data points; preferably, in the embodiment of the present invention, the distance set of the target sheep is constructed by the distances between the data points of different sheep in the state category including the target sheep. In other embodiments of the present invention, different values can be randomly set to form the distance set of the target sheep.
[0070] As an example, if the target sheep is healthy, then for the sheep in the healthy category in the flock to be tested, the Euclidean distance between the data points of each pair of sheep is obtained, and the data points of all the sheep in the healthy category are traversed, and the distances between the data points of each pair of sheep in the healthy category constitute the distance set of the target sheep.
[0071] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining the outlier characteristic index is as follows: any element is selected from the distance set of the target sheep and recorded as the target distance, the target distance is used as the clustering radius, the data points of all the sheep in the sheep flock to be tested are clustered, and several cluster clusters under the target distance are obtained, and the cluster cluster to which the target sheep belongs is recorded as the target cluster under the target distance; the cumulative sum of the individual growth difference indexes of the sheep corresponding to the data points in the target cluster under the target distance is recorded as the comprehensive difference index of the target cluster under the target distance; according to the number of data points in the target cluster under the target distance and the comprehensive difference index, the local outlier degree of the target cluster under the target distance is obtained; the cumulative sum of the local outlier degrees of the target cluster under all elements in the distance set of the target sheep is negatively correlated and normalized to obtain the outlier characteristic index of the target sheep. In the embodiment of the present invention, the DBSCAN algorithm is selected to cluster the data points of all the sheep in the sheep flock to be tested, wherein the DBSCAN algorithm is a well-known technology and will not be described in detail here.
[0072] In a specific implementation of the embodiment of the present invention, the outlier characteristic index is expressed by the formula:
[0073] ;
[0074] In the formula, is the outlier characteristic index of the target sheep; T is the total number of elements in the distance set of the target sheep; is the number of data points in the target cluster under the tth element in the distance set of the target sheep; is the individual growth difference index of the sheep corresponding to the kth data point in the target cluster under the tth element in the distance set of the target sheep; is the comprehensive difference index of the target cluster under the tth element in the distance set of the target sheep; is the local outlier degree of the target cluster under the tth element in the distance set of the target sheep; exp is an exponential function with the natural constant e as the base. If it is greater than 0, the exp function is used to process the negative correlation. The value range is between 0 and 1, and the exp function is used to implement The negative correlation is normalized.
[0075] It should be noted that when The smaller the value is, the smaller the outlier feature of the target sheep data point is. The tth element in the distance set of the target sheep is used as the clustering radius. After clustering the data points of all the sheep in the tested sheep flock, the smaller the number of data points in the cluster to which the target sheep belongs, that is, the target cluster. This indicates that the outlier feature of the target sheep data point is more obvious, and the outlier feature index is The larger the value, the smaller the probability that the target sheep’s data point will be selected as the support vector. The smaller the The smaller it is, the more accurate the position of the data point in the target cluster under the tth element in the distance set of the target sheep is, and the more accurate the outlier feature analysis of the target sheep data point is. The larger it is, the more obvious and accurate the outlier characteristics of the target sheep are.
[0076] The method for obtaining the outlier characteristic index of each sheep in the sheep flock to be tested is the same as the method for obtaining the outlier characteristic index of the target sheep, which is equivalent to replacing the target sheep with each sheep in the sheep flock to be tested.
[0077] The classification optimization module 400 is used to construct the original hyperplane in the support vector machine model based on the position distribution of the data points of the sheep in the two status categories; re-obtain the optimal hyperplane according to the result after adjusting the distance from the data point of each sheep to the original hyperplane by the outlier feature index, and complete the training of the support vector machine model; and use the trained support vector machine model to monitor the health status of new sheep.
[0078] Based on the position distribution of the data points of the sheep in the two state categories, the original hyperplane in the support vector machine model is constructed. The method of obtaining the hyperplane in the support vector machine is well known to those skilled in the art and will not be described in detail here.
[0079] Because the outlier characteristics of the sheep data points affect the accuracy of the hyperplane selection, the outlier characteristic index of each sheep in the tested flock is used to adjust the distance from the data point of each sheep to the original hyperplane, reduce the probability of data points with higher outlier characteristics being selected as support vectors, and increase the probability of data points with lower outlier characteristics being selected as support vectors; the specific method is: increase the distance from the data points with larger outlier characteristics to the original hyperplane, reduce the distance from the data points with smaller outlier characteristics to the original hyperplane, and reduce the influence of the data points with more obvious outlier characteristics on the reconstructed hyperplane.
[0080] The distance from the data point of each sheep to the original hyperplane is weighted by using the outlier characteristic index of each sheep in the sheep flock to be tested, and the corrected distance from the data point of each sheep to the original hyperplane is obtained; when the outlier characteristic index of the sheep is smaller, the distance from the data point of the sheep to the original hyperplane is reduced, and the distance from the data point of the sheep to the original hyperplane is smaller; when the outlier characteristic index of the sheep is larger, the distance from the data point of the sheep to the original hyperplane remains unchanged, and the distance from the data point of the sheep to the original hyperplane is larger, thereby realizing adaptive change of the distance from the data point of the sheep to the original hyperplane based on the outlier characteristic index. The corrected distance from the data point of each sheep in the sheep flock to the original hyperplane is re-optimized by the Lagrange multiplier method, and the parameters of the hyperplane are re-determined to obtain the optimal hyperplane, and the training of the support vector machine model is completed. The trained support vector machine model can more accurately complete the classification of the health status of the sheep.
[0081] By inputting the seven types of growth data of new sheep except the sheep flock to be tested into the trained support vector model, the health status of the new sheep can be accurately divided. It should be noted that the seven types of growth data of each sheep in the sheep flock to be tested are the same as those of the new sheep except the sheep flock to be tested, that is, the age, breed, weight, height, body length, feed type and feed consumption of the new sheep except the sheep flock to be tested need to be collected.
[0082] So far, the present invention is completed.
[0083] In summary, in an embodiment of the present invention, the individual growth difference index of the target sheep is obtained according to the difference in health status between the target sheep and the rest of the sheep and the difference in growth data of each type; the data points of all the sheep are clustered with each element in the distance set of the target sheep as the radius, and the outlier characteristic index of the target sheep is obtained according to the individual growth difference index and the number of data points of the data points corresponding to the data points in the cluster to which the data points of the target sheep belong; the distance from the data points of each sheep to the original hyperplane is adjusted using the outlier characteristic index, the optimal hyperplane is re-obtained, and the health status of the sheep is detected using it. The present invention uses the outlier characteristic index of the sheep to adjust the original hyperplane, reduce the influence of the outlier characteristics of the sheep on the selection of the hyperplane, and improve the accuracy of the optimal hyperplane for visual analysis of sheep breeding growth monitoring.
[0084] Embodiment 2:
[0085] Figure 3 A computer device schematic diagram of a data visualization analysis device for sheep breeding growth monitoring provided by an embodiment of the present invention. For example, Figure 3 As shown, the computer device includes: a memory 501, a processor 502, and a computer program 503 stored in the memory 501 and running on the processor 502, wherein when the processor 502 executes the computer program 503, the computer device can execute any one of the data visualization analysis systems for sheep breeding growth monitoring introduced above.
[0086] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to execute a data visualization analysis system for sheep breeding growth monitoring provided in an embodiment of the present application.
[0087] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0088] It should be understood that the device provided in this embodiment is used to execute the above-mentioned data visualization analysis system for sheep breeding growth monitoring, and thus can achieve the same effect as the above-mentioned implementation method.
[0089] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the actions of the device. The storage module may be used to support the device to execute mutual program codes, etc.
[0090] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits disclosed in the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0091] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0092] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A data visualization analysis system for sheep breeding growth monitoring, characterized in that: The system includes: The data acquisition module is used to obtain the health status and different types of growth data of each sheep in the sheep flock to be tested, and construct the data point of each sheep from the growth data of each sheep; divide the sheep in the sheep flock to be tested into two status categories based on the health status; and select one sheep from the sheep flock to be tested as the target sheep; A difference analysis module is used to obtain the individual growth difference index of the target sheep according to the difference in health status between the target sheep and other sheep, the difference in growth data of each type, and the degree of confusion of growth data of each type of all sheep; An outlier analysis module is used to cluster the data points of all sheep respectively with each element in the distance set of the target sheep as the clustering radius, and obtain the outlier characteristic index of the target sheep according to the individual growth difference index and the number of data points of the sheep corresponding to the data points in the cluster to which the data points of the target sheep belong under all elements in the distance set; The classification optimization module is used to construct the original hyperplane in the support vector machine model based on the position distribution of the data points of the sheep in the two status categories; re-obtain the optimal hyperplane according to the result after the distance from the data point of each sheep to the original hyperplane is adjusted by the outlier feature index, and complete the training of the support vector machine model; and use the trained support vector machine model to monitor the health status of new sheep; The method for obtaining the outlier characteristic index of the target sheep comprises: Select an element from the distance set of the target sheep and record it as the target distance. Use the target distance as the clustering radius to cluster the data points of all the sheep in the sheep flock to be tested to obtain a number of clusters under the target distance. The cluster to which the target sheep belongs is recorded as the target cluster under the target distance. The cumulative sum of the individual growth difference indexes of the sheep corresponding to the data points in the target cluster at the target distance is recorded as the comprehensive difference index of the target cluster at the target distance; the local outlier degree of the target cluster at the target distance is obtained according to the number of data points in the target cluster at the target distance and the comprehensive difference index; the cumulative sum of the local outlier degrees of the target cluster under all elements in the distance set of the target sheep is negatively correlated and normalized to obtain the outlier characteristic index of the target sheep; The outlier characteristic index of the target sheep Q is expressed as follows: ; In the formula, It is the outlier characteristic indicator of the target sheep; is the total number of elements in the distance set of the target sheep; is the number of data points in the target cluster under the tth element in the distance set of the target sheep; is the individual growth difference index of the sheep corresponding to the kth data point in the target cluster under the tth element in the distance set of the target sheep; is the comprehensive difference index of the target cluster under the tth element in the distance set of the target sheep; is the local outlier degree of the target cluster under the tth element in the distance set of the target sheep; exp is an exponential function with the natural constant e as the base.
2. A data visualization analysis system for sheep breeding growth monitoring according to claim 1, characterized in that: The method for obtaining the individual growth difference index of the target sheep comprises: Setting a status label value of the health status of each sheep; obtaining a first control sheep of the target sheep; taking the average of the absolute values of the differences between the status label values of the target sheep and all the first control sheep as the individual difference index of the target sheep; Select a characteristic type from all types to obtain a second control sheep of the target sheep; obtain a growth difference index of the target sheep according to the difference in growth data of each characteristic type between the target sheep and all its second control sheep, and the degree of confusion of the growth data of each characteristic type; According to the growth difference index and the individual difference index, the individual growth difference index of the target sheep is obtained.
3. A data visualization analysis system for sheep breeding growth monitoring according to claim 2, characterized in that: The method for obtaining the growth difference index of the target sheep includes: The information entropy of the growth data of each characteristic type of the target sheep and all its second control sheep is recorded as the initial health impact of each characteristic type on the target sheep; the initial health impact is normalized to obtain the final health impact of each characteristic type on the target sheep; The cumulative sum of the differences in growth data of each characteristic type between the target sheep and all its second control sheep is recorded as the difference degree of each characteristic type of the target sheep; Obtaining the growth difference index of the target sheep according to the final health impact degree and the difference degree of all characteristic types of the target sheep; The method for obtaining the growth difference index of the target sheep according to the final health impact degree and the difference degree of all characteristic types of the target sheep includes: The product of the final health impact degree and the difference degree of each characteristic type of the target sheep is used as the local index of each characteristic type of the target sheep; the cumulative sum of the local indexes of all characteristic types of the target sheep is calculated and recorded as the growth difference index of the target sheep; The growth difference index of target sheep Q is expressed by the formula: ; In the formula, It is the growth difference index of the target sheep; is the number of feature types; is the initial health impact of the e-th characteristic type on the target sheep; It is the cumulative sum of the initial health impacts of all feature types on the target sheep; is the final health impact of the e-th characteristic type on the target sheep; N is the total number of the second control sheep of the target sheep; The growth data of the e-th characteristic type of the target sheep; The growth data of the e-th characteristic type of the n-th second control sheep of the target sheep; is the difference of the e-th characteristic type of the target sheep; is the local index of the e-th characteristic type of the target sheep; is the absolute value function.
4. A data visualization analysis system for sheep breeding growth monitoring according to claim 1, characterized in that: The method of re-obtaining the optimal hyperplane according to the result of adjusting the distance from each sheep data point to the original hyperplane through the outlier feature index to complete the training of the support vector machine model includes: The distance from the data point of each sheep to the original hyperplane is weighted by using the outlier characteristic index of each sheep in the sheep flock to be tested, so as to obtain the corrected distance from the data point of each sheep in the sheep flock to the original hyperplane; and the optimal hyperplane is re-obtained by using the corrected distance.
5. A data visualization analysis system for sheep breeding growth monitoring according to claim 1, characterized in that: The method for obtaining the distance set of the target sheep includes: The distance set of the target sheep is constructed by the distances between the data points of different sheep containing the state category of the target sheep.
6. A data visualization analysis system for sheep breeding growth monitoring according to claim 1, characterized in that: The method for clustering all the sheep data points is the DBSCAN algorithm.
7. A data visualization analysis system for sheep breeding growth monitoring according to claim 2, characterized in that: The growth data of each type of the target sheep and each of the first control sheep thereof are equal.
8. The data visualization analysis system for sheep breeding growth monitoring according to claim 3 is characterized in that: The method of normalizing the initial health impact to obtain the final health impact of each feature type on the target sheep comprises: Based on the initial health impacts of all feature types on the target sheep, the initial health impact of each feature type is normalized to obtain the final health impact of each feature type on the target sheep.
