Cow recognition method and device, electronic equipment and storage medium

CN116561660BActive Publication Date: 2026-08-18INNER MONGOLIA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310528082.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2026-08-18
Estimated Expiration
2043-05-10

AI Technical Summary

Technical Problem

[0003]本申请实施例的目的在于提供一种奶牛识别方法、装置、电子设备及存储介质,用以改善现有技术中通过图像对奶牛进行识别导致识别效率低的问题

Benefits of technology

[0034] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the first aspect above.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116561660B_ABST
    Figure CN116561660B_ABST
Patent Text Reader

Abstract

The application provides a dairy cow identification method and device, electronic equipment and storage medium, and relates to the technical field of computers. The method identifies dairy cows by obtaining behavior characteristic data of the dairy cows. Since the behavior characteristic data is one-dimensional data, the calculation time and data storage overhead are smaller than those of two-dimensional image data. Then, a random convolution kernel algorithm is used for feature extraction. Since the random convolution kernel algorithm uses only a convolution kernel for calculation and does not calculate convolution kernel parameters, the calculation overhead is very low. Finally, a classifier is used to classify and identify individual feature information to identify the identity information of the dairy cows, so that the identity of the dairy cows can be quickly identified, and the identification efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and storage medium for identifying dairy cows. Background Technology

[0002] In recent years, with the continuous development of computer technology, individual recognition technology based on computer vision has been widely used. In animal husbandry, in order to monitor dairy cows in pastures, neural network models are often used to identify them. However, this identification method requires the collection of a large amount of image information of dairy cows. Due to the complex structure of neural network models, feature extraction from images is often time-consuming, affecting recognition efficiency. Summary of the Invention

[0003] The purpose of this application is to provide a method, device, electronic device and storage medium for identifying dairy cows, so as to improve the problem of low identification efficiency caused by identifying dairy cows by images in the prior art.

[0004] In a first aspect, embodiments of this application provide a method for identifying dairy cows, the method comprising:

[0005] Obtain behavioral characteristic data of dairy cows;

[0006] The behavioral feature data are extracted using a random convolution kernel algorithm to obtain the individual feature information of the dairy cow;

[0007] The individual feature information is classified and identified using a classifier to obtain the identity information of the dairy cow.

[0008] In the above implementation process, dairy cows are identified by acquiring behavioral feature data. Since behavioral feature data is one-dimensional, it has lower computation time and data storage overhead compared to two-dimensional image data. Then, a random convolution kernel algorithm is used for feature extraction. Because the random convolution kernel algorithm only uses the convolution kernel for feature extraction and does not calculate the convolution kernel parameters, the computational overhead is very low. Finally, a classifier is used to classify and identify individual feature information to identify the identity information of dairy cows, thereby achieving rapid identification of dairy cows and greatly improving identification efficiency.

[0009] Optionally, the random convolution kernel algorithm is the MiniRocket algorithm, the Rocket algorithm, or the MultiRocket algorithm;

[0010] And / or, the classifier is a random forest classifier.

[0011] In the above implementation process, the algorithm described above can efficiently extract features, and the use of a leading regression classifier can achieve better recognition results.

[0012] Optionally, the step of using a classifier to classify and identify the individual feature information to obtain the identity information of the cow includes:

[0013] The individual feature information is filtered using a feature selection method to obtain the filtered individual feature information;

[0014] The individual feature information of the selected cows is classified and identified using a classifier to obtain the cow's identity information.

[0015] In the above implementation process, filtering features before recognition can effectively reduce the amount of data processing for the classifier and improve recognition efficiency.

[0016] Optionally, acquiring the behavioral characteristic data of dairy cows includes:

[0017] Behavioral data of the cows is acquired by a motion signal acquisition device worn around their necks. This data consists of neck vibration signals generated by the cows during various activities. This allows for data acquisition without affecting the cows' activity, making data collection more convenient.

[0018] Optionally, the step of using a classifier to classify and identify the individual feature information to obtain the identity information of the cow includes:

[0019] Multiple classifiers are used to classify and identify the individual feature information to obtain multiple corresponding identification results;

[0020] The multiple identification results are voted on, and the final identification result obtained by the vote is determined as the identity information of the cow.

[0021] In the above implementation process, using multiple classifiers for classification and recognition can further improve the recognition accuracy.

[0022] Optionally, after obtaining the cow's identity information, the process further includes:

[0023] If the cow's identity information is not in the pre-stored identity information database, the cow is identified as suspicious, and an alarm message is sent to the administrator terminal. This allows for timely detection of suspicious situations involving cows, thereby ensuring their safety.

[0024] Optionally, after obtaining the individual characteristic information of the cow, the method further includes:

[0025] If the cow's identity information is not in the pre-stored identity information database, then auxiliary identification information is obtained;

[0026] Based on the auxiliary identification information, determine whether the cow is a suspicious cow;

[0027] If so, an alarm message will be output to the administrator terminal.

[0028] In the above implementation process, using auxiliary identification information to further verify whether a cow is a suspicious cow can improve the accuracy of identifying suspicious cows.

[0029] Secondly, embodiments of this application provide a dairy cow identification device, the device comprising:

[0030] The feature acquisition module is used to acquire behavioral feature data of dairy cows;

[0031] The feature extraction module is used to extract features from the behavioral feature data using a random convolution kernel algorithm to obtain the individual feature information of the dairy cow;

[0032] The identification module is used to classify and identify the individual feature information using a classifier to obtain the identity information of the dairy cow.

[0033] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method provided in the first aspect above are performed.

[0034] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the first aspect above.

[0035] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A flowchart illustrating a method for identifying dairy cows provided in this application embodiment;

[0038] Figure 2 This is a schematic diagram of behavioral characteristic data of a dairy cow provided in an embodiment of this application;

[0039] Figure 3 A structural block diagram of a dairy cow identification device provided in an embodiment of this application;

[0040] Figure 4 This is a schematic diagram of the structure of an electronic device for performing a cow identification method, provided as an embodiment of this application. Detailed Implementation

[0041] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0042] It should be noted that the terms "system" and "network" in the embodiments of this invention can be used interchangeably. "Multiple" refers to two or more; therefore, in the embodiments of this invention, "multiple" can also be understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / ", unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0043] This application provides a method for identifying dairy cows. This method acquires behavioral feature data of dairy cows. This behavioral feature data is one-dimensional, which, compared to two-dimensional image data, has lower computation time and data storage overhead. Then, a random convolution kernel algorithm is used to extract features from the behavioral feature data to obtain individual cow feature information. This algorithm only uses the convolution kernel for feature extraction, without calculating the kernel parameters. Therefore, there is no parameter learning process, allowing computation to be performed using low-power computing devices with very low time overhead. Finally, a classifier is used to classify and identify the individual feature information to identify the dairy cow's identity, thereby achieving rapid identification of dairy cows and greatly improving identification efficiency.

[0044] Please refer to Figure 1 , Figure 1 A flowchart of a dairy cow identification method provided in this application embodiment, the method including the following steps:

[0045] Step S110: Obtain behavioral characteristic data of dairy cows.

[0046] Because there are many dairy cows on the ranch, it is necessary to identify each cow in order to monitor them. In this embodiment of the application, in order to reduce the amount of computation, the cows are identified by acquiring behavioral feature data. Since behavioral feature data is one-dimensional data, it can effectively reduce the computational cost compared to two-dimensional image data.

[0047] Behavioral data can include a cow's feed intake at different times, its activity level (such as walking time, rest time, and walking distance), and rumination time. These behavioral data will form certain patterns over a long period of time and can reflect the cow's behavioral habits, so they can be used to distinguish between different cows. This behavioral data can be collected by corresponding sensors.

[0048] Compared to cameras for image acquisition, sensors have the characteristics of low power consumption, can be worn by cows for a long time, and require no maintenance, allowing for continuous daily use. Compared to cameras, their equipment cost is lower. Therefore, this application eliminates the need for cameras to acquire images, thus saving equipment costs.

[0049] Step S120: Use the random convolution kernel algorithm to extract features from the behavioral feature data to obtain individual feature information of the cows.

[0050] The random convolution kernel algorithm has efficient feature computation capabilities. It is essentially similar to a shallow convolutional neural network, without nonlinear activation, dilation, or any complex structure of deep learning networks, so it can quickly extract a large number of features.

[0051] Among them, random convolution kernel algorithms can be MiniRocket, Rocket, or MultiRocket algorithms. These algorithms only use convolution kernels for calculation when extracting features, which is equivalent to convolution calculation, without learning convolution kernel parameters. Therefore, the parameters have a certain degree of randomness. However, the computational cost is greatly reduced because there is no parameter learning process. It can be calculated using only low-power computing devices, and the time cost is extremely low, so it can greatly save the time of feature extraction.

[0052] When using the random convolution kernel algorithm for feature extraction, the cow behavior feature data can first be processed by Fast Fourier Transform to obtain the corresponding frequency domain data of the cow behavior features. Then, the time domain data and the frequency domain data of the cow behavior features are concatenated to obtain the total behavior feature data. Finally, the random convolution kernel algorithm is used to extract the features of the concatenated behavior feature data and input it into the classifier.

[0053] Step S130: Use a classifier to classify and identify individual feature information to obtain the identity information of the dairy cow.

[0054] After obtaining the individual characteristics of the cows, the individual characteristics can be input into a classifier. This classifier is obtained through pre-training, so it can classify and identify the cows based on their individual characteristics, thereby obtaining the cows' identity information, such as their identifier, breed, and sex.

[0055] In some implementations, the classifier can be a random forest classifier. The main idea of ​​a random forest is to randomly sample a subset of samples and features. Each classification tree generated by this randomization process is independent of the others, and each tree randomly extracts features from all the features of the samples, thus avoiding overfitting. Compared to a single classification tree, a random forest can significantly improve prediction accuracy without significantly increasing computational load. This is because a random forest combines several randomized weak classifiers into a strong classifier that solves a single problem. The results of the weak classifiers are voted on or averaged to obtain the final result of the strong classifier, resulting in higher overall model accuracy, stronger generalization, and improved stability. Of course, other classifiers can also be used to identify cows, such as logistic regression, support vector machines, softmax function classification, and ridge regression classifiers.

[0056] In the above implementation process, dairy cows are identified by acquiring behavioral feature data. Since behavioral feature data is one-dimensional, it has lower computation time and data storage overhead compared to two-dimensional image data. Then, a random convolution kernel algorithm is used for feature extraction. Because the random convolution kernel algorithm only uses the convolution kernel for feature extraction and does not calculate the convolution kernel parameters, the computational overhead is very low. Finally, a classifier is used to classify and identify individual feature information to identify the identity information of dairy cows, thereby achieving rapid identification of dairy cows and greatly improving identification efficiency.

[0057] Based on the above embodiments, when acquiring the behavioral characteristic data of dairy cows, the behavioral characteristic data of dairy cows can also be acquired by an activity signal acquisition device worn on the neck of the dairy cow. In this case, the behavioral characteristic data is the neck vibration signal generated by the dairy cow under various activity behaviors.

[0058] Each cow can be pre-loaded with an activity signal collector around its neck, allowing behavioral data to be collected without causing stress. The uniqueness and immutability of this behavioral data when mapped onto the cow can provide a more effective way to identify its identity.

[0059] The activity signal collector can collect behavioral characteristic data of dairy cows 24 hours a day. To facilitate subsequent identification, the collected data can be preprocessed to reduce noise and redundancy. For example, the collected behavioral characteristic data can be divided into data samples for 24-hour periods based on the collection time, and redundancy processing can be performed. Since the activity signal collector typically collects data at 8Hz, it can collect 480 data points per minute, and its measured voltage range is [0, 4095]. Therefore, its average statistical value can be taken, theoretically yielding a maximum of 1440 average statistical data points. However, due to potential collection errors and data transmission loss, the actual number of data points obtained may be less than 1440. These data can then be used as behavioral characteristic data input into a random convolution kernel algorithm for feature extraction.

[0060] Of course, the data collection time can be more than 24 hours. To make the recognition results more accurate, behavioral feature data over a longer period of time can be collected. To reduce the amount of data calculation, behavioral feature data over a shorter period of time can also be collected.

[0061] Additionally, when the behavioral characteristic data is the vibration signal generated by the cow's neck due to vibration, it can be converted into peak-to-peak data. For example, using a one-minute time interval, all peak-to-peak values ​​within each minute can be counted. Then, based on the different ranges of the peak-to-peak values, the data can be divided into seven segments with peak-to-peak ranges of 25-50, 50-100, 100-200, 200-350, 350-550, 550-750, and above 750. The number of peak-to-peak values ​​falling within each segment can be counted, and the peak-to-peak values ​​can be plotted as a curve. Figure 2 As shown.

[0062] exist Figure 2 In this process, the original single-dimensional data was transformed into peak-to-peak data and then expanded to seven dimensions, thus enriching the content of the cow's behavioral characteristics data and facilitating the next step of feature extraction.

[0063] Based on the above embodiments, since behavioral feature data is a high-dimensional feature, it imposes a great restriction on the selection of subsequent classifiers. Therefore, feature selection methods can be used to filter individual feature information first to obtain filtered individual feature information, and then a classifier can be used to classify and identify the filtered individual feature information to obtain the identity information of the dairy cow.

[0064] The feature selection method here can be to remove features with low variance. Generally, the variance of a feature can be determined by whether it diverges. If a feature does not diverge, for example, if its variance is close to 0, it means that the samples are basically indistinguishable on this feature, and this feature is not very useful for distinguishing the samples. The smaller the variance of a feature, the less obvious the variation of that feature is. Features with less obvious variation are not very useful for identifying cows, so these features can be deleted.

[0065] For example, a variance threshold can be set to delete individual feature information with a variance less than or equal to the threshold, and the remaining individual feature information becomes the filtered individual feature information. Alternatively, individual feature information with a variance greater than the variance threshold can be used as the filtered individual feature information. This variance threshold can be obtained by repeatedly obtaining a subset of individual feature information, then selecting the median variance value as the variance threshold. This can eliminate approximately half of the features, significantly reducing the number of features and dimensionality, thus allowing for the application of more widely used classification algorithms. Simultaneously, it enhances the generalization ability of the classifier and reduces overfitting.

[0066] In the above implementation process, filtering features before recognition can effectively reduce the amount of data processing for the classifier and improve recognition efficiency.

[0067] In some implementations, since the features extracted by random convolution kernel algorithms such as the MiniRocket algorithm are high-dimensional features, in order to improve the processing efficiency of the classifier, a relevant dimensionality reduction method can be used to reduce the dimensionality of the features before inputting the individual feature information into the classifier. In this embodiment, Linear Discriminant Analysis (LDA) can be used for dimensionality reduction. This method is not only a supervised data dimensionality reduction method but also an effective feature extraction method. Its dimensionality reduction idea is to project high-dimensional pattern samples onto a relatively low-dimensional optimal discriminant vector space. To achieve functions such as extracting classification information and compressing the dimensionality of the feature space, the projection ensures that the pattern samples have the specific characteristics of maximizing inter-class distance and minimizing intra-class distance in the new subspace, that is, the pattern has optimal separability in this space. Using this method, the projected pattern samples can maximize the inter-class scatter matrix and minimize the intra-class scatter matrix. The specific steps of Linear Discriminant Analysis are to define the "inter-class scatter matrix" and the "intra-class scatter matrix," and obtain the maximization target by calculating the covariance and the maximum value of the matrix.

[0068] The LDA dimensionality reduction algorithm can be used to reduce the dimensionality of high-dimensional features extracted by the random convolution kernel algorithm. For example, the original 9996-dimensional feature quantity can be transformed into 39-dimensional feature quantity, thereby significantly reducing the training time and recognition time of the classifier caused by the large number of features, and effectively improving the model training efficiency and recognition efficiency.

[0069] In addition, the random convolution kernel algorithm model and classifier can be trained in advance. For example, a large amount of behavioral feature data of dairy cows can be collected in advance. As described in the above embodiment, behavioral feature data of dairy cows can be collected 24 hours a day. The collected data is divided into data samples for 24-hour periods according to the collection time, and redundancy processing is performed on the data. Since the activity signal collector has a collection frequency of 8Hz and collects 480 data points per minute, its measured voltage range is [0, 4095]. Therefore, its mean statistic can be taken, and the calculation formula is as follows:

[0070]

[0071] Where Y represents the mean statistic, and N represents the number of data items collected. i This indicates the measured voltage value.

[0072] This yields a maximum of 1440 data points per cow. These data from multiple cows can then be used to construct a training dataset. Each data point in the training dataset is in the form of (x, y), where x has at most 1440 values, which can be denoted as (x1, x2, ..., xy). 1440 Let y be the label of x, a discrete variable with multiple possible values. For example, if the label is an identifier for a cow, and there are 40 cows, then y can have 40 values. In this way, data from the training dataset can be input into the random convolution kernel algorithm model to train the model.

[0073] In some implementations, to facilitate data processing by the algorithm model, the training data can be standardized before being input into the random convolution kernel algorithm model. For example, taking the behavioral characteristic data of 40 dairy cows collected over 60 days, data with a length less than 1000 characters can be removed. Although theoretically the activity signal collector should collect 1440 data points per day (24 hours), due to external environmental and communication factors, the actual number of data points obtained is mostly less than 1440. Therefore, removing extreme data prevents interference with subsequent processing. Then, the mean and variance of the behavioral characteristic data for each cow over 60 days can be calculated and Z-score standardized. The same standardization process is applied to the behavioral characteristic data of other cows.

[0074] The standardized behavioral feature data can then be input into a random convolution kernel algorithm model for training. The MiniRocket algorithm can be selected as the random convolution kernel algorithm model, which can be used to efficiently extract features for subsequent classifier use.

[0075] In some implementations, the convolution kernel parameters of the MiniRocket algorithm model can be set as follows: (1) a one-dimensional convolution kernel; (2) a convolution kernel length of 9; (3) convolution kernel weights of {-1, 2}; (4) a convolution kernel bias randomly generated based on sampling of the convolution output; (5) a convolution kernel padding value set to 0, with half of the generated features using padding and the other half not using padding; (6) generated features of PPV (positive percentage value). Here, Z is the convolution output value, n represents the number of generated features (e.g., the default number of generated features is 9996), and PPV represents the number of feature values ​​greater than 0 among the n features.

[0076] The MiniRocket algorithm model can extract individual feature information of 9996 cows, which can then be input into a classifier for training.

[0077] Of course, before inputting the individual feature information into the classifier for training, feature selection methods can be used to filter the individual feature information. For example, the number of features can be reduced to 39 using the LDA dimensionality reduction algorithm mentioned above. This results in a smaller number of high-quality features after feature selection, enabling real-time monitoring of individual dairy cows and achieving high accuracy in individual dairy cow identification with relatively low computational cost. The filtered individual feature information is then input into the classifier for classification and identification. The filtering process can be referred to the relevant descriptions in the above embodiments, and will not be elaborated further here for the sake of brevity.

[0078] In this embodiment, dairy cows are classified and identified based on a random convolution kernel algorithm and a random forest classifier. Behavioral feature data from 40 dairy cows within a 60-minute timeframe were collected, and the following experimental results were obtained:

[0079]

[0080] Precision, also known as accuracy, is an evaluation metric for prediction results. It represents the percentage of truly positive samples out of the total number of predicted positive samples. The specific formula is as follows:

[0081] TP refers to the number of samples that the model predicts as positive and that are actually positive, while FP refers to the number of samples that the model predicts as negative but are actually positive.

[0082] Recall, also known as the full sample count, is an evaluation metric for the original sample. It represents the percentage of samples that were actually positive but were predicted to be positive. The specific formula is as follows:

[0083] Wherein, TP refers to the number of samples that are actually positive and are predicted to be positive, and FN refers to the number of samples that are actually positive but are predicted to be negative.

[0084] The Kappa coefficient (k), calculated based on the confusion matrix, ranges from -1 to 1, and is generally greater than 0. It is commonly used for consistency testing. In classification problems, consistency refers to the agreement between the model's predictions and the actual classification results. The calculation formula is:

[0085]

[0086] in,

[0087] The F1 score is the harmonic mean of precision and recall, ranging from 1 to 0. The formula for its calculation is:

[0088]

[0089] The experimental results above show that the combination of MiniRocket algorithm, LDA dimensionality reduction algorithm, and random forest algorithm in this embodiment of the application can achieve a high recognition accuracy for identifying dairy cows.

[0090] Based on the above embodiments, in order to more accurately identify the identity information of dairy cows, multiple classifiers can be used to classify and identify individual feature information to obtain multiple corresponding identification results. Then, the multiple identification results are voted on, and the final identification result obtained by the vote is determined as the identity information of the dairy cow.

[0091] The multiple classifiers can be of the same type, such as three random forest classifiers, or they can be of different types, such as two random forest classifiers and one support vector machine. Since the classification result of a single classifier may be inaccurate, using multiple classifiers can improve the accuracy of the recognition result.

[0092] The voting here refers to majority rule; if a majority of classifiers produce the same result, then that result is considered the cow's identity information. Of course, if the results from different classifiers are inconsistent, then the result of a specific classifier can be designated as the cow's identity information, such as using the result of a random forest classifier.

[0093] In addition, multiple random convolution kernel algorithms can be used. For example, the behavioral feature data of dairy cows can be input into the MiniRocket algorithm, Rocket algorithm, and MultiRocket algorithm respectively. These three algorithms can be used to extract individual feature information of dairy cows, so that more individual feature information can be extracted, so that more data can be used for dairy cow identification and the identification accuracy can be improved.

[0094] Based on the above embodiments, in order to monitor dairy cows, after obtaining the cow's identity information, it is also possible to determine whether the cow is a suspicious cow based on the cow's identity information, such as whether the cow's identity information exists in the identity information database. If the cow's identity information is not in the pre-stored identity information database, then the cow is determined to be a suspicious cow, and the cow may have been illegally replaced. At this time, an alarm message can be output to the administrator terminal.

[0095] This involves pre-building an identity information database based on the identity information of all dairy cows in the ranch. This identity information refers to the cow's identifier; for example, if there are 40 cows, there will be 40 identifiers, with each cow corresponding to a unique identifier. After obtaining the cow's identity information in this way, if a cow's identity information is identifier 10, the database can be searched to see if that identifier exists. If it exists, it means the cow has not been replaced; if it does not exist, it means the cow may have been illegally replaced.

[0096] Understandably, if a cow is illegally replaced and is not a cow from the ranch, the classifier may classify it as "other" instead of a specific identifier. In this case, it means that the classifier cannot identify the cow's identity, and the identity information of "other" cannot be found in the identity information database. Therefore, it can be considered that the cow has been illegally replaced.

[0097] This method allows administrators to remotely monitor dairy cows. If a cow is illegally replaced, the administrator will be notified via an alarm notification, and will also know which cow was replaced. Alternatively, other methods can be used to determine which cow was replaced, such as identifying all cows. If the identification results do not include the cow's identity information in the database (i.e., missing identity information exists), the identity of the replaced cow can be determined.

[0098] Based on the above embodiments, if the classifier obtains the identification result as "other", it may be that the classifier's identification result is inaccurate. That is, when the cow's identity information is not in the pre-stored identity information database, in order to further verify the cow's identity information, auxiliary identification information can be obtained, and then the auxiliary identification information can be used to determine whether the cow is a suspicious cow. If so, an alarm message is output to the administrator terminal.

[0099] Among them, auxiliary identification information can be the cow's physiological characteristics, such as body temperature, age, height, feeding patterns, activity level, etc. This information can also be collected by sensors. If the cow's identity cannot be identified by combining this information, the cow can be identified as a suspicious cow. If the cow's identity is further determined by combining this information, the cow is determined not to be a suspicious cow.

[0100] Alternatively, auxiliary identification information can also include image information of the cow. Combining image information with cow identification can achieve higher recognition accuracy. For example, if it is determined that the cow's identity information is not in the pre-stored identity information database, the cameras in the pasture can be controlled to capture images of the cow, such as omnidirectional image capture. Then, a convolutional neural network model can be used to identify the cow's identity based on the image. If the recognition result of the convolutional neural network model is still "other", then the cow can be determined to be a suspicious cow, possibly replaced, and then an alarm message can be output to the administrator terminal.

[0101] Of course, if the recognition result output by the convolutional neural network model exists in the identity information database, it can be determined that the cow is not a suspicious cow. However, at this time, a prompt message can also be output to the administrator terminal, so that the administrator can confirm it again through other means to further improve the accuracy of recognition.

[0102] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a dairy cow identification device 200 provided in an embodiment of this application. The device 200 can be a module, program segment, or code on an electronic device. It should be understood that this device 200 is similar to the one described above. Figure 1 The method implementation corresponds to this and can be executed. Figure 1 The various steps involved in the method embodiment and the specific functions of the device 200 can be found in the description above. To avoid repetition, detailed descriptions are omitted here.

[0103] Optionally, the device 200 includes:

[0104] Feature acquisition module 210 is used to acquire behavioral feature data of dairy cows;

[0105] The feature extraction module 220 is used to extract features from the behavioral feature data using a random convolution kernel algorithm to obtain the individual feature information of the dairy cow;

[0106] The identification module 230 is used to classify and identify the individual feature information using a classifier to obtain the identity information of the dairy cow.

[0107] Optionally, the random convolution kernel algorithm is the MiniRocket algorithm, the Rocket algorithm, or the MultiRocket algorithm;

[0108] And / or, the classifier is a random forest classifier.

[0109] Optionally, the identification module 230 is used to filter the individual feature information using a feature selection method to obtain the filtered individual feature information; and to classify and identify the filtered individual feature information using a classifier to obtain the identity information of the dairy cow.

[0110] Optionally, the feature acquisition module 210 is used to acquire behavioral feature data of the cow by means of an activity signal collector worn on the cow's neck, wherein the behavioral feature data is the neck vibration signal generated by the cow under various activity behaviors.

[0111] Optionally, the identification module 230 is used to classify and identify the individual feature information using multiple classifiers to obtain multiple corresponding identification results; and to vote on the multiple identification results to determine the final identification result obtained by voting as the identity information of the cow.

[0112] Optionally, the device 200 further includes:

[0113] The suspicious cow identification module is used to determine that a cow is a suspicious cow if its identity information is not in a pre-stored identity information database, and to output an alarm message to the administrator terminal.

[0114] Optionally, the device 200 further includes:

[0115] The suspicious cow identification module is used to obtain auxiliary identification information if the cow's identity information is not in the pre-stored identity information database; determine whether the cow is a suspicious cow based on the auxiliary identification information; if so, output an alarm message to the administrator terminal.

[0116] It should be noted that those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0117] Please refer to Figure 4 , Figure 4 This is a schematic diagram of an electronic device for performing a cow identification method, provided in an embodiment of this application. The electronic device may include: at least one processor 310, such as a CPU; at least one communication interface 320; at least one memory 330; and at least one communication bus 340. The communication bus 340 is used to establish direct communication between these components. In this embodiment, the communication interface 320 is used for signaling or data communication with other node devices. The memory 330 may be a high-speed RAM or a non-volatile memory, such as at least one disk storage device. Optionally, the memory 330 may also be at least one storage device located remotely from the aforementioned processor. The memory 330 stores computer-readable instructions. When these computer-readable instructions are executed by the processor 310, the electronic device performs the aforementioned... Figure 1 The method and process are shown.

[0118] Understandable. Figure 3 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown. Figure 3 The components shown can be implemented using hardware, software, or a combination thereof.

[0119] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs the following... Figure 1 The method process executed by the electronic device in the illustrated method embodiment.

[0120] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as: acquiring behavioral feature data of dairy cows; using a random convolution kernel algorithm to extract features from the behavioral feature data to obtain individual feature information of the dairy cows; and using a classifier to classify and identify the individual feature information to obtain the identity information of the dairy cows.

[0121] In summary, the embodiments of this application provide a method, apparatus, electronic device, and storage medium for identifying dairy cows. It identifies dairy cows by acquiring behavioral feature data. Since behavioral feature data is one-dimensional, it has lower computation time and data storage overhead compared to two-dimensional image data. Then, a random convolution kernel algorithm is used for feature extraction. Because the random convolution kernel algorithm only uses the convolution kernel for calculation without calculating the kernel parameters, the computational overhead is very low. Finally, a classifier is used to classify and identify individual feature information to identify the identity information of the dairy cows, thereby achieving rapid identification of dairy cows and greatly improving identification efficiency.

[0122] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0123] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0124] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0125] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0126] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for identifying dairy cows, characterized in that, The method includes: Obtain behavioral characteristic data of dairy cows; The behavioral feature data are extracted using a random convolution kernel algorithm to obtain the individual feature information of the dairy cow; The individual feature information is classified and identified using a classifier to obtain the identity information of the dairy cow; The random convolution kernel algorithm is the MiniRocket algorithm, Rocket algorithm, or MultiRocket algorithm, and the classifier is a random forest classifier. The acquisition of dairy cow behavioral characteristic data includes: Behavioral characteristic data of the cow is acquired by an activity signal acquisition device worn on the cow's neck. The behavioral characteristic data is the neck vibration signal generated by the cow under various activity behaviors. Using a set time period as a time window, extract the peak-to-peak data of the neck vibration signal within the time window; The extracted peak-to-peak data is divided according to multiple preset amplitude intervals, and the number of peak-to-peak values ​​falling into each amplitude interval is counted to obtain the multidimensional feature vector corresponding to the time window.

2. The method according to claim 1, characterized in that, The step of using a classifier to classify and identify the individual feature information to obtain the identity information of the dairy cow includes: The individual feature information is filtered using a feature selection method to obtain the filtered individual feature information; The individual feature information of the selected cows is classified and identified using a classifier to obtain the cow's identity information.

3. The method according to claim 1, characterized in that, The step of using a classifier to classify and identify the individual feature information to obtain the identity information of the dairy cow includes: Multiple classifiers are used to classify and identify the individual feature information to obtain multiple corresponding identification results; The multiple identification results are voted on, and the final identification result obtained by the vote is determined as the identity information of the cow.

4. The method according to claim 1, characterized in that, After obtaining the cow's identity information, the process also includes: If the cow's identity information is not in the pre-stored identity information database, the cow is determined to be a suspicious cow, and an alarm message is output to the administrator terminal.

5. The method according to claim 1, characterized in that, After obtaining the individual characteristic information of the dairy cow, the process further includes: If the cow's identity information is not in the pre-stored identity information database, then auxiliary identification information is obtained; Based on the auxiliary identification information, determine whether the cow is a suspicious cow; If so, an alarm message will be output to the administrator terminal.

6. A dairy cow identification device, characterized in that, The device includes: The feature acquisition module is used to acquire behavioral feature data of dairy cows; The feature extraction module is used to extract features from the behavioral feature data using a random convolution kernel algorithm to obtain the individual feature information of the dairy cow; The identification module is used to classify and identify the individual feature information using a classifier to obtain the identity information of the dairy cow; The random convolution kernel algorithm is the MiniRocket algorithm, Rocket algorithm, or MultiRocket algorithm, and the classifier is a random forest classifier. Specifically, the feature acquisition module is used to acquire behavioral feature data of the cow by using an activity signal collector worn on the cow's neck. The behavioral feature data is the neck vibration signal generated by the cow under various activity behaviors. The module extracts the peak-to-peak data of the neck vibration signal within a set time window. The extracted peak-to-peak data is divided according to multiple preset amplitude intervals, and the number of peak-to-peak values ​​falling into each amplitude interval is counted to obtain the multidimensional feature vector corresponding to the time window.

7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, perform the method as described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it performs the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Electroencephalogram resting state identity authentication method and device using single-guide device

    CN110135285A

  • Dairy cow image information collecting and processing method and system

    CN112189588A