CN115409153A - Attention LSTM-based animal husbandry index prediction method and prediction system - Google Patents

Attention LSTM-based animal husbandry index prediction method and prediction system Download PDF

Info

Publication number
CN115409153A
CN115409153A CN202210943226.XA CN202210943226A CN115409153A CN 115409153 A CN115409153 A CN 115409153A CN 202210943226 A CN202210943226 A CN 202210943226A CN 115409153 A CN115409153 A CN 115409153A
Authority
CN
China
Prior art keywords
data set
data
missing
lstm
attention
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210943226.XA
Other languages
Chinese (zh)
Inventor
邵兵
曹福存
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Foidn Technology Co ltd
Original Assignee
Nanjing Foidn Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Foidn Technology Co ltd filed Critical Nanjing Foidn Technology Co ltd
Priority to CN202210943226.XA priority Critical patent/CN115409153A/en
Publication of CN115409153A publication Critical patent/CN115409153A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/70Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in livestock or poultry

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an attention LSTM-based animal husbandry index prediction method, which comprises the following steps of: collecting historical data of each index generated by livestock in the feeding process; judging whether the historical data has missing values or not, and classifying the historical data into a first complete data set and a missing data set; dividing and preprocessing the missing data set according to the proportion occupied by the missing values in the missing data set to obtain a second complete data set and a corrected data set; filling missing values in the corrected data set by using a data similarity filling method to obtain a third complete data set; and inputting the first complete data set, the second complete data set and the third complete data set into the model for calculation based on a pre-established LSTM attention neural network model, and outputting the prediction results of all indexes. The method solves the problem that the traditional LSTM can only extract sequence information along the time dimension, such as characteristics of weight and the like, but the information of feed utilization rate and the like can not extract effective characteristics, and improves the prediction precision.

Description

Attention LSTM-based animal husbandry index prediction method and prediction system
Technical Field
The invention belongs to the technical field of 5G mobile communication and signal processing, and particularly relates to a livestock raising index prediction method and system based on attention LSTM.
Background
Animal husbandry is an extremely important link for exchanging materials between human beings and the nature, is one of components of agriculture, and is a two-large support for agricultural production in parallel with planting industry. The traditional breeding mode of animal husbandry pays huge cost for detecting various indexes of the bred animals every year. The method has the advantages that the indexes of the livestock are efficiently and reliably predicted by using an artificial intelligence technology, so that people can be helped to optimize the management of the cultured animals, and meanwhile, the cost is effectively reduced.
The traditional LSTM model neural network can only extract sequence information along a time dimension, such as characteristics of weight and the like, while information such as feed utilization rate and the like cannot accurately extract effective characteristics from other historical characteristic data, and because a large amount of missing value and abnormal value data exist in data acquired by various human factors, equipment and the like, the prediction precision is low during index prediction.
In addition, for the filling of missing data in data preprocessing, the traditional solution is mean filling, mode filling, median filling, hot card filling, cold card filling, regression filling, multiple interpolation, etc. However, in the daily monitoring process, along with the accumulation of data, the calculation process of the calculation method is complex, and the calculation amount is huge.
Therefore, for the data missing problem, a machine learning algorithm is used to perform the filling process, for example:
(1) The KNN algorithm is used for filling missing data, however, the algorithm needs to search K neighbors for sample points in each test set, in the algorithm execution process, in order to calculate the distance between a current sample to be classified and each sample point in a training set, the algorithm needs to traverse the whole training set, the time cost is huge, and especially when the number of the training set sample points or the test set sample points is huge.
(2) When the euclidean distance is adopted for data filling, the accuracy and reliability of the filled data object are insufficient under the condition that the sample points are scattered.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a livestock raising index prediction method and an estimation system based on attention LSTM, aiming at solving the following technical problems in the prior art:
(1) The traditional LSTM model neural network can only extract sequence information along a time dimension, such as characteristics of weight and the like, and information of feed utilization rate and the like cannot accurately extract effective characteristics from other historical characteristic data, so that the prediction accuracy of prediction indexes is low.
(2) In the prior art, an algorithm for solving the problem of data loss is accurate in calculation, but the calculation amount is huge; or where the calculations are relatively simple but less accurate.
The invention is realized by adopting the following technical scheme:
an attention LSTM-based livestock raising index prediction method comprises the following steps:
collecting historical data generated by livestock in a feeding process, wherein the historical data comprises index parameters;
judging whether the historical data has missing values or not, and classifying the historical data into a first complete data set and a missing data set;
dividing and preprocessing the missing data set according to the proportion occupied by the missing values in the missing data set to obtain a second complete data set and a corrected data set;
filling missing values in the corrected data set by using a data similarity filling method to obtain a third complete data set;
and inputting the first complete data set, the second complete data set and the third complete data set into the model for calculation based on a pre-established LSTM attention neural network model, and outputting the prediction results of all indexes.
In order to optimize the technical scheme, the specific measures adopted further comprise:
further, the historical data comprises livestock data and feeding data, and index parameters of the livestock data comprise weight, age in days and back muscle thickness; the index parameters of the feeding data comprise feed utilization rate and feed feeding frequency.
Further, according to the proportion occupied by the missing values in the missing data set, the missing data set is divided and preprocessed to obtain a second complete data set and a modified data set, and the method specifically comprises the following steps:
calculating the ratio of the missing values to the missing data set;
if the proportion is smaller than the set value, deleting the data corresponding to the missing value in the missing data set to obtain a second complete data set;
if the proportion is larger than the set value, the data is divided into correction data sets.
Further, the filling of missing values is performed on the corrected data set by using a data similarity filling method to obtain a third complete data set, which specifically includes:
acquiring a complete data set, wherein the complete data set comprises m data objects, and the data objects comprise n attributes;
the weights of the attributes are calculated from the data objects in the complete data set,
Figure DEST_PATH_IMAGE002
Figure DEST_PATH_IMAGE004
Figure DEST_PATH_IMAGE006
Figure DEST_PATH_IMAGE008
wherein:
Figure DEST_PATH_IMAGE010
denotes the first
Figure DEST_PATH_IMAGE012
The variance of the individual attributes, m represents the number of data objects in the complete data set,
Figure DEST_PATH_IMAGE014
is shown as
Figure DEST_PATH_IMAGE016
Data object of
Figure 464947DEST_PATH_IMAGE012
The value of the one or more attributes is,
Figure DEST_PATH_IMAGE018
denotes the first
Figure 709983DEST_PATH_IMAGE012
The average value of the individual attributes is,
Figure DEST_PATH_IMAGE020
is shown as
Figure 755300DEST_PATH_IMAGE012
The correlation between one attribute and the other attributes,
Figure DEST_PATH_IMAGE022
denotes the first
Figure 976940DEST_PATH_IMAGE016
An attribute and
Figure 525733DEST_PATH_IMAGE012
the correlation coefficient between the individual attributes is,
Figure DEST_PATH_IMAGE024
denotes the first
Figure 676092DEST_PATH_IMAGE012
The amount of information that an individual attribute contains,
Figure DEST_PATH_IMAGE026
denotes the first
Figure 474284DEST_PATH_IMAGE012
A weight value of each attribute;
the similarity between the data objects is calculated,
Figure DEST_PATH_IMAGE028
Figure DEST_PATH_IMAGE030
Figure DEST_PATH_IMAGE032
wherein:
Figure DEST_PATH_IMAGE034
which is indicative of the parameters of the adjustment,
Figure DEST_PATH_IMAGE036
represent
Figure DEST_PATH_IMAGE038
And with
Figure DEST_PATH_IMAGE040
In the first placejThe minimum value of the absolute value difference over the attributes,
Figure DEST_PATH_IMAGE042
represent
Figure 423916DEST_PATH_IMAGE038
And with
Figure 623954DEST_PATH_IMAGE040
In the first placejThe maximum value of the absolute value difference over the attributes,
Figure DEST_PATH_IMAGE044
represent
Figure 148476DEST_PATH_IMAGE038
And with
Figure 433964DEST_PATH_IMAGE040
In the first placejThe degree of similarity between the attributes is determined,
Figure DEST_PATH_IMAGE046
to represent
Figure 218247DEST_PATH_IMAGE038
And
Figure 272791DEST_PATH_IMAGE040
the degree of similarity of (a) to (b),
Figure 437056DEST_PATH_IMAGE038
indicating that the 0 th data object has attribute missing,
Figure 475419DEST_PATH_IMAGE040
representing a data object with complete attributes;
selecting the front part of the complete data set according to the similaritykComplete data objects, which are similar to the data object for which there is a loss of attributes, computing a fill value,
Figure DEST_PATH_IMAGE048
wherein:
Figure DEST_PATH_IMAGE050
representing data objects
Figure 547280DEST_PATH_IMAGE038
Missing attributes
Figure DEST_PATH_IMAGE052
Is determined by the estimated value of (c),
Figure DEST_PATH_IMAGE054
is shown as
Figure 49806DEST_PATH_IMAGE016
Of a complete data object
Figure 119393DEST_PATH_IMAGE052
The value of the attribute(s) is (are),kindicating the number of data;
and filling the filling values into the corresponding missing values in the corrected data set to obtain a third complete data set.
Further, before inputting the first complete data set, the second complete data set, and the third complete data set into the model for calculation and outputting the prediction result of each index based on the pre-established LSTM attention neural network model, the method further includes establishing an LSTM attention neural network model, specifically:
collecting sample data of livestock in the breeding process;
establishing a neural network model comprising an input layer, an LSTM layer, an Attention layer and an output layer, and initializing the neural network model;
determines a weighting coefficient allocation mechanism of the Attention layer,
Figure DEST_PATH_IMAGE056
Figure DEST_PATH_IMAGE058
Figure DEST_PATH_IMAGE060
wherein:
Figure DEST_PATH_IMAGE062
a value of the probability distribution of attention is represented,
Figure DEST_PATH_IMAGE064
the representation of the learnable parameter is,
Figure DEST_PATH_IMAGE066
the weight parameter is represented by a weight value,
Figure DEST_PATH_IMAGE068
the output vector representing the LSTM layer, b the bias coefficients,
Figure DEST_PATH_IMAGE070
representing the output value of the Attention layer at the time t;
the output mechanism of the output layer is set,
Figure DEST_PATH_IMAGE072
wherein:y t the value of the predicted output is represented,w o a matrix of weights is represented by a matrix of weights,b o a deviation vector is represented.
According to another aspect of the invention, the invention provides an attention LSTM based stockbreeding index prediction system, the system comprising:
the data acquisition module is used for acquiring historical data of each index generated in the livestock breeding process;
the data processing module is used for judging whether the historical data has missing values or not and classifying the historical data into a first complete data set and a missing data set;
the data filling module is used for filling missing values in the corrected data set by using a data filling method of data similarity to obtain a third complete data set;
and the calculation module is used for inputting the first complete data set, the second complete data set or the third complete data set into the model for calculation based on a pre-established LSTM attention neural network model and outputting the prediction result of each index.
Further, the system further comprises a modeling unit for establishing an LSTM attention neural network model, wherein the establishing an LSTM attention neural network model comprises:
collecting sample data of livestock in the feeding process;
establishing a neural network model comprising an input layer, an LSTM layer, an Attention layer and an output layer, and initializing the neural network model;
determining a weighting coefficient distribution mechanism of an Attention layer;
and setting an output mechanism of the output layer.
According to another aspect of the present invention, the present invention provides a network side server, including at least one processor;
and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method of any one of claims 1-5.
The invention has the beneficial effects that:
compared with the prior art, the animal husbandry index prediction method based on attention LSTM solves the problems that the conventional LSTM can only extract sequence information along the time dimension, such as weight and other features, and the information such as feed utilization rate cannot accurately extract effective features from other historical feature data, and improves prediction accuracy.
Meanwhile, the data similarity filling method is utilized, the K similar data objects are searched for data filling, errors caused by data point distribution in the KNN algorithm are reduced, the accuracy of filling data is improved, meanwhile, the complexity of calculation simulation is greatly reduced, and the calculation time is shortened.
Drawings
Fig. 1 is a flowchart of a livestock index prediction method based on attention LSTM according to a first embodiment of the present invention.
Fig. 2 is a flowchart of the operation provided by the first embodiment of the present invention.
Fig. 3 is a flowchart of the LSTM attention neural network model according to the first embodiment of the present invention.
Fig. 4 is a block diagram of a system for predicting animal husbandry index based on attention LSTM according to a second embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a network-side server according to a third embodiment of the present invention.
Detailed Description
In order to clarify the technical solutions and operating principles of the present invention, the present invention is further described in detail with reference to the accompanying drawings and specific embodiments, and it should be noted that, without conflict, any combination between the embodiments described below or between the technical features may form a new embodiment.
First embodiment
The invention provides a livestock raising index prediction method based on attention LSTM, which comprises the following steps:
s1: collecting historical data generated by livestock in the feeding process, wherein the historical data comprises index parameters;
specifically, the historical data comprises livestock data and feeding data, and index parameters of the livestock data comprise weight, age in days and back muscle thickness; the index parameters of the feeding data comprise feed utilization rate and feed feeding frequency.
S2: judging whether the historical data has a missing value or not, and classifying the historical data into a first complete data set and a missing data set;
specifically, the missing value is the absence of a certain index parameter.
S3: and dividing and preprocessing the missing data set according to the occupied proportion of the missing values in the missing data set to obtain a second complete data set and a corrected data set.
S31: calculating the ratio of missing values to missing data sets;
s32: if the proportion is smaller than the set value, deleting the data corresponding to the missing value in the missing data set to obtain a second complete data set;
s33: if the proportion is larger than the set value, the data is divided into a correction data set.
S4: and filling missing values in the corrected data set by using a data similarity filling method to obtain a third complete data set.
S41: obtaining a complete data set, denoted as
Figure DEST_PATH_IMAGE074
The complete data set contains m data objects, each data object contains n attributes, and the attribute set of the 0 th data object is represented as
Figure DEST_PATH_IMAGE076
Wherein the complete data set may comprise a number of animals for which data acquisition is required, e.g. the first pig is marked
Figure DEST_PATH_IMAGE078
The attribute set of the related index parameters of the boar is shown in
Figure 487795DEST_PATH_IMAGE078
The above.
S42: the weights of the attributes are calculated from the data objects in the complete data set,
Figure DEST_PATH_IMAGE080
Figure DEST_PATH_IMAGE004A
Figure DEST_PATH_IMAGE006A
Figure DEST_PATH_IMAGE008A
wherein:
Figure 989446DEST_PATH_IMAGE010
denotes the first
Figure 284161DEST_PATH_IMAGE012
The variance of the individual attributes, m represents the number of data objects in the complete data set,
Figure 586966DEST_PATH_IMAGE014
is shown as
Figure 272026DEST_PATH_IMAGE016
Data object of
Figure 951269DEST_PATH_IMAGE012
The value of the individual attributes is,
Figure 38173DEST_PATH_IMAGE018
denotes the first
Figure 511880DEST_PATH_IMAGE012
The average value of the individual attributes is,
Figure 746552DEST_PATH_IMAGE020
is shown as
Figure 901590DEST_PATH_IMAGE012
The correlation between an individual attribute and other attributes,
Figure 905318DEST_PATH_IMAGE022
is shown as
Figure 319900DEST_PATH_IMAGE016
An attribute and
Figure 776289DEST_PATH_IMAGE012
the correlation coefficient between the individual attributes is,
Figure DEST_PATH_IMAGE082
denotes the first
Figure 531755DEST_PATH_IMAGE012
The amount of information that an individual attribute contains,
Figure 124411DEST_PATH_IMAGE026
is shown as
Figure 143182DEST_PATH_IMAGE012
A weight value of the individual attribute;
s43: the similarity between the data objects is calculated,
Figure DEST_PATH_IMAGE028A
Figure DEST_PATH_IMAGE030A
Figure DEST_PATH_IMAGE032A
wherein:
Figure 712966DEST_PATH_IMAGE034
which is indicative of the adjustment parameter(s),
Figure 537703DEST_PATH_IMAGE036
to represent
Figure 453706DEST_PATH_IMAGE038
And
Figure 440117DEST_PATH_IMAGE040
in the first placejThe minimum value of the absolute value difference on the attribute,
Figure 871098DEST_PATH_IMAGE042
to represent
Figure 171629DEST_PATH_IMAGE038
And with
Figure 270035DEST_PATH_IMAGE040
In the first placejThe maximum value of the absolute value difference over the attributes,
Figure 161768DEST_PATH_IMAGE044
to represent
Figure 283308DEST_PATH_IMAGE038
And
Figure 449847DEST_PATH_IMAGE040
in the first placejThe degree of similarity between the attributes is determined,
Figure 871601DEST_PATH_IMAGE046
to represent
Figure 403077DEST_PATH_IMAGE038
And with
Figure 307185DEST_PATH_IMAGE040
The degree of similarity of (a) to (b),
Figure 215098DEST_PATH_IMAGE038
indicating that the 0 th data object has attribute missing,
Figure 756938DEST_PATH_IMAGE040
representing a data object with complete properties.
S44: selecting the front part of the complete data set according to the similaritykComplete data objects, which are similar to the data objects for which there is a loss of attributes, computing a fill value,
Figure DEST_PATH_IMAGE048A
wherein:
Figure 787211DEST_PATH_IMAGE050
representing data objects
Figure 680081DEST_PATH_IMAGE038
Missing attributes
Figure 126106DEST_PATH_IMAGE052
Is determined by the estimated value of (c),
Figure 522452DEST_PATH_IMAGE054
is shown as
Figure 458047DEST_PATH_IMAGE016
Of a complete data object
Figure 775896DEST_PATH_IMAGE052
The value of the attribute(s) is (are),kindicating the number of data;
s45: and filling the filling values into the corresponding missing values in the corrected data set to obtain a third complete data set.
S5: and establishing an LSTM attention neural network model.
Specifically, the method comprises the following steps: the LSTM attention neural network model combines an LSTM attention mechanism with a neural network model, and assigns corresponding weights to different information through information distribution probability, so that the prediction precision can be improved.
S51: collecting sample data of livestock in the breeding process;
establishing a neural network model comprising an input layer, an LSTM layer, an Attention layer and an output layer, and initializing the neural network model;
s52: determines a weighting coefficient allocation mechanism of the Attention layer,
Figure DEST_PATH_IMAGE056A
Figure DEST_PATH_IMAGE058A
Figure DEST_PATH_IMAGE060A
wherein:
Figure 182868DEST_PATH_IMAGE062
the value of the probability distribution of attention is represented,
Figure 964880DEST_PATH_IMAGE064
the representation of the learnable parameter is,
Figure 9059DEST_PATH_IMAGE066
the weight parameter is represented by a weight value,
Figure 610942DEST_PATH_IMAGE068
represents the output vector of the LSTM layer, b represents the bias coefficient,
Figure 461086DEST_PATH_IMAGE070
the output value of the Attention layer at the time t is represented;
s53: the output mechanism of the output layer is set,
Figure DEST_PATH_IMAGE072A
wherein:y t the value of the predicted output is represented,w o a matrix of weights is represented by a matrix of weights,b o a deviation vector is represented.
S6: and inputting the first complete data set, the second complete data set and the third complete data set into the model for calculation based on a pre-established LSTM attention neural network model, and outputting the prediction results of all indexes.
The following is a prediction process of a certain pig in a certain farm by adopting the prediction method in the scheme, table 1 shows the relevant historical data of the certain pig in the certain farm, and table 2 is a prediction result of comparing the prediction method with the scheme in the relevant prior art.
The livestock index prediction method based on attention LSTM can better extract data characteristics compared with the traditional LSTM, can calculate missing values more accurately compared with a KNN filling method, can use less sample size and shorter time, and can make more accurate prediction.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
Second embodiment:
as shown in fig. 4, a second embodiment of the present invention provides an attention LSTM based stockbreeding index prediction system, comprising,
the data acquisition module 201 is used for acquiring historical data of each index generated by livestock in the feeding process;
the data processing module 202 is configured to determine whether the historical data has a missing value, and classify the historical data into a first complete data set and a missing data set;
the data filling module 203 is configured to perform missing value filling on the corrected data set by using a data filling method of data similarity to obtain a third complete data set;
the calculation module 204 inputs the first complete data set, the second complete data set, or the third complete data set into the model for calculation based on a pre-established LSTM attention neural network model, and outputs a prediction result of each index.
Preferably, the system further comprises a modeling module 205 for building an LSTM attention neural network model, wherein the building the LSTM attention neural network model comprises:
collecting sample data of livestock in the breeding process;
establishing a neural network model comprising an input layer, an LSTM layer, an Attention layer and an output layer, and initializing the neural network model;
determining a weighting coefficient distribution mechanism of an Attention layer;
and setting an output mechanism of the output layer.
It should be understood that the present embodiment is a system example corresponding to the first embodiment, and the present embodiment may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related technical details mentioned in the present embodiment can also be applied to the first embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
The third embodiment:
as shown in fig. 5, a third embodiment of the present invention provides a network side server, including: at least one processor 301; and a memory 302 communicatively coupled to the at least one processor; wherein the memory 302 stores instructions executable by the at least one processor 301 to cause the at least one processor 301 to perform one of the above-described LSTM-based animal husbandry index prediction methods.
The memory 301 and the processor 301 are coupled by a bus, which may comprise any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 301 and the memory 301. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, etc., which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 301 is transmitted over a wireless medium through an antenna, which further receives the data and transmits the data to the processor 301.
The processor 301 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 301 may be used to store data used by processor 301 in performing operations.
The foregoing are embodiments of the present invention and are not intended to limit the scope of the invention to the particular forms set forth in the specification, which are set forth in the claims below, but rather are to be construed as the full breadth and scope of the claims, as defined by the appended claims, as defined in the appended claims, in order to provide a thorough understanding of the present invention. It should be noted that, for those skilled in the art, without departing from the structure of the present invention, several changes and modifications can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicability of the patent. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.

Claims (8)

1. An attention LSTM-based livestock raising index prediction method is characterized by comprising the following steps:
collecting historical data of each index generated by livestock in the feeding process;
judging whether the historical data has missing values or not, and classifying the historical data into a first complete data set and a missing data set;
dividing and preprocessing the missing data set according to the proportion occupied by the missing values in the missing data set to obtain a second complete data set and a corrected data set;
filling missing values in the corrected data set by using a data similarity filling method to obtain a third complete data set;
and inputting the first complete data set, the second complete data set and the third complete data set into the model for calculation based on a pre-established LSTM attention neural network model, and outputting the prediction results of all indexes.
2. The attention LSTM based animal husbandry index prediction method according to claim 1, wherein the historical data comprises livestock data and feeding data, and the index parameters of the livestock data comprise weight, age, dorsal muscle thickness; the index parameters of the feeding data comprise feed utilization rate and feed feeding frequency.
3. A method for animal husbandry index prediction based on attention LSTM as claimed in claim 2, wherein the missing data set is divided and preprocessed according to the ratio of the missing values in the missing data set to obtain a second complete data set and a modified data set, specifically:
calculating the ratio of the missing values to the missing data set;
if the proportion is smaller than the set value, deleting the data corresponding to the missing value in the missing data set to obtain a second complete data set;
if the proportion is larger than the set value, the data is divided into correction data sets.
4. The attention LSTM-based animal husbandry index prediction method according to claim 3, wherein the data similarity filling method is used to fill the missing values into the corrected data set to obtain a third complete data set, specifically:
acquiring a complete data set, wherein the complete data set comprises m data objects, and the data objects comprise n attributes;
the weights of the attributes are calculated from the data objects in the complete data set,
Figure 199773DEST_PATH_IMAGE002
Figure 271634DEST_PATH_IMAGE004
Figure 711843DEST_PATH_IMAGE006
Figure 578168DEST_PATH_IMAGE008
wherein:
Figure DEST_PATH_IMAGE009
is shown as
Figure 838248DEST_PATH_IMAGE010
The variance of the individual attributes, m represents the number of data objects in the complete data set,
Figure DEST_PATH_IMAGE011
denotes the first
Figure 681176DEST_PATH_IMAGE012
Data object of
Figure 975892DEST_PATH_IMAGE010
The value of the individual attributes is,
Figure DEST_PATH_IMAGE013
is shown as
Figure 747538DEST_PATH_IMAGE010
The average value of the individual attributes is,
Figure 760494DEST_PATH_IMAGE014
is shown as
Figure 377420DEST_PATH_IMAGE010
The correlation between one attribute and the other attributes,
Figure DEST_PATH_IMAGE015
denotes the first
Figure 57800DEST_PATH_IMAGE012
An attribute and
Figure 734769DEST_PATH_IMAGE010
the correlation coefficient between the individual attributes is,
Figure 703862DEST_PATH_IMAGE016
is shown as
Figure 921217DEST_PATH_IMAGE010
The amount of information that an individual attribute contains,
Figure DEST_PATH_IMAGE017
is shown as
Figure 160830DEST_PATH_IMAGE010
A weight value of the individual attribute;
the similarity between the data objects is calculated,
Figure DEST_PATH_IMAGE019
Figure DEST_PATH_IMAGE021
Figure DEST_PATH_IMAGE023
wherein:
Figure 867755DEST_PATH_IMAGE024
which is indicative of the adjustment parameter(s),
Figure DEST_PATH_IMAGE025
to represent
Figure 324144DEST_PATH_IMAGE026
And with
Figure DEST_PATH_IMAGE027
In the first placejThe minimum value of the absolute value difference on the attribute,
Figure 814032DEST_PATH_IMAGE028
represent
Figure 937845DEST_PATH_IMAGE026
And
Figure 956617DEST_PATH_IMAGE027
in the first placejThe maximum value of the absolute value difference over the individual attributes,
Figure DEST_PATH_IMAGE029
to represent
Figure 213153DEST_PATH_IMAGE026
And
Figure 506731DEST_PATH_IMAGE027
in the first placejThe degree of similarity in the individual attributes,
Figure 422735DEST_PATH_IMAGE030
to represent
Figure 674724DEST_PATH_IMAGE026
And with
Figure 308968DEST_PATH_IMAGE027
The degree of similarity of (a) to (b),
Figure 406237DEST_PATH_IMAGE026
indicating that the 0 th data object has attribute missing,
Figure 239064DEST_PATH_IMAGE027
representing a data object with complete attributes;
according to the similarity, before selecting the complete data setkComplete data objects, which are similar to the data objects for which there is a loss of attributes, computing a fill value,
Figure 599638DEST_PATH_IMAGE032
wherein:
Figure DEST_PATH_IMAGE033
representing data objects
Figure 314653DEST_PATH_IMAGE026
Missing attributes
Figure 153296DEST_PATH_IMAGE034
Is determined by the estimated value of (c),
Figure DEST_PATH_IMAGE035
is shown as
Figure 138832DEST_PATH_IMAGE012
Of a complete data object
Figure 670308DEST_PATH_IMAGE034
The value of the attribute(s) is (are),kindicating the number of data;
and filling the filling values into the corresponding missing values in the corrected data set to obtain a third complete data set.
5. The method as claimed in claim 4, further comprising establishing an LSTM attention neural network model before inputting the first complete data set or the second complete data set or the third complete data set into the LSTM attention neural network model based on the pre-established LSTM attention neural network model for calculating and outputting the predicted result of each index, specifically:
collecting sample data of livestock in the feeding process;
establishing a neural network model comprising an input layer, an LSTM layer, an Attention layer and an output layer, and initializing the neural network model;
determines a weight coefficient allocation mechanism of the Attention layer,
Figure DEST_PATH_IMAGE037
Figure DEST_PATH_IMAGE039
Figure DEST_PATH_IMAGE041
wherein:
Figure 138198DEST_PATH_IMAGE042
the value of the probability distribution of attention is represented,
Figure DEST_PATH_IMAGE043
the representation of the learnable parameter is,
Figure 577270DEST_PATH_IMAGE044
a weight parameter is represented that is a function of,
Figure DEST_PATH_IMAGE045
represents the output vector of the LSTM layer, b represents the bias coefficient,
Figure 915847DEST_PATH_IMAGE046
the output value of the Attention layer at the time t is represented;
the output mechanism of the output layer is set,
Figure 618224DEST_PATH_IMAGE048
wherein:y t a value representing the predicted output value is indicated,w o a matrix of weights is represented by a matrix of weights,b o a deviation vector is represented.
6. An attention LSTM based stockbreeding index prediction system, the system comprising:
the data acquisition module is used for acquiring historical data of each index generated in the livestock breeding process;
the data processing module is used for judging whether the historical data has missing values or not and classifying the historical data into a first complete data set and a missing data set;
the data filling module is used for filling missing values in the corrected data set by using a data filling method of data similarity to obtain a third complete data set;
and the calculation module is used for inputting the first complete data set, the second complete data set and the third complete data set into the model for calculation based on a pre-established LSTM attention neural network model and outputting the prediction results of all indexes.
7. The LSTM attention based stockbreeding index prediction system of claim 6, further comprising a modeling module for building an LSTM attention neural network model, wherein the building of the LSTM attention neural network model comprises:
collecting sample data of livestock in the feeding process;
establishing a neural network model comprising an input layer, an LSTM layer, an Attention layer and an output layer, and initializing the neural network model;
determining a weighting coefficient distribution mechanism of an Attention layer;
and setting an output mechanism of the output layer.
8. A network side server is characterized in that: comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method of any one of claims 1-5.
CN202210943226.XA 2022-08-08 2022-08-08 Attention LSTM-based animal husbandry index prediction method and prediction system Pending CN115409153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210943226.XA CN115409153A (en) 2022-08-08 2022-08-08 Attention LSTM-based animal husbandry index prediction method and prediction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210943226.XA CN115409153A (en) 2022-08-08 2022-08-08 Attention LSTM-based animal husbandry index prediction method and prediction system

Publications (1)

Publication Number Publication Date
CN115409153A true CN115409153A (en) 2022-11-29

Family

ID=84159273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210943226.XA Pending CN115409153A (en) 2022-08-08 2022-08-08 Attention LSTM-based animal husbandry index prediction method and prediction system

Country Status (1)

Country Link
CN (1) CN115409153A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116956747A (en) * 2023-08-28 2023-10-27 西湾智慧(广东)信息科技有限公司 Method for building machine learning modeling platform based on AI (advanced technology attachment) capability
CN117828373A (en) * 2024-03-05 2024-04-05 四川省医学科学院·四川省人民医院 Missing data filling method and system based on set partitioning and self-supervision learning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116956747A (en) * 2023-08-28 2023-10-27 西湾智慧(广东)信息科技有限公司 Method for building machine learning modeling platform based on AI (advanced technology attachment) capability
CN117828373A (en) * 2024-03-05 2024-04-05 四川省医学科学院·四川省人民医院 Missing data filling method and system based on set partitioning and self-supervision learning

Similar Documents

Publication Publication Date Title
CN109816221B (en) Project risk decision method, apparatus, computer device and storage medium
CN115409153A (en) Attention LSTM-based animal husbandry index prediction method and prediction system
US11650968B2 (en) Systems and methods for predictive early stopping in neural network training
CN115018021B (en) Machine room abnormity detection method and device based on graph structure and abnormity attention mechanism
WO2021129086A1 (en) Traffic prediction method, device, and storage medium
CN108959187A (en) A kind of variable branch mailbox method, apparatus, terminal device and storage medium
CN111666494B (en) Clustering decision model generation method, clustering processing method, device, equipment and medium
CN108734321A (en) A kind of short-term load forecasting method based on the Elman neural networks for improving ABC algorithms
CN112614133B (en) Three-dimensional pulmonary nodule detection model training method and device without anchor point frame
CN112614011B (en) Power distribution network material demand prediction method and device, storage medium and electronic equipment
EP4187213A1 (en) Rgb-d-based ai system for inferring weight of livestock, and computer-readable medium having recorded thereon computer program for providing same
CN114896067B (en) Automatic generation method and device of task request information, computer equipment and medium
Parameswari et al. Machine learning approaches for crop recommendation
CN117094611A (en) Quality safety traceability management method and system for food processing
CN113516275A (en) Power distribution network ultra-short term load prediction method and device and terminal equipment
CN109886721A (en) A kind of pork price forecasting system algorithm
CN111461378A (en) Power grid load prediction method and device
CN109657907B (en) Quality control method and device for geographical national condition monitoring data and terminal equipment
CN110929849B (en) Video detection method and device based on neural network model compression
CN110502715B (en) Click probability prediction method and device
CN111768021A (en) Order price adjustment method, device, server and storage medium
CN115514621B (en) Fault monitoring method, electronic device and storage medium
CN118336698A (en) Wind power prediction method and device based on transfer learning and storage medium
CN113542276B (en) Method and system for detecting intrusion target of hybrid network
CN117992834B (en) Data analysis method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination