**2. Related Work**

The concept of digital twins can be applied in many areas. For example, for wind power plants, cloud-based technology integrates technological and commercial data into a single digital twin through augmented reality (AR) and applies to multiple wind power plants to realize real-time monitoring of power plants [3]. In manufacturing, Schleich et al. [2] propose a conceptual integrated reference model for design and manufacturing that provides the first theoretical framework for digital twins in industrial applications [2]. In addition, digital twins are also used for product prediction and health management. This method effectively utilizes the interaction mechanism and fusion data of digital twins [8].

In the field of agriculture, more and more farmers are committed to the establishment of intelligent farms. The concept of intelligent agriculture mainly includes sensors, tracking systems, innovative digital technologies, data analysis and so on. The application of modern digital technology to farms can improve the efficiency of farm managemen<sup>t</sup> [9,10]. More specifically, Yang et al. [7] come up with a digital farm managemen<sup>t</sup> system that can effectively track production. In particular, this system uses smartphones to collect data, this is an efficient solution for precise vegetable farm managemen<sup>t</sup> [7]

However, digital twins are rarely used on farms, there are only a few isolated cases. Digital twins are already being used in innovative internet-based applications, and digital twins can influence farm managemen<sup>t</sup> [4]. A digital disease managemen<sup>t</sup> system for dairy

cows has been established, which realizes the digital managemen<sup>t</sup> of dairy cows, systematic managemen<sup>t</sup> of basic information of dairy cows, health assessment, electronic medical records and disease prevention. This system can effectively manage the disease of cows on the dairy farm [23]. In [13], Wagner et al. [13] use machine learning to detect the health of cows and predict when they would behave. They use different algorithms in machine learning to predict the activity duration of cows, including the K-neighborhood algorithm, the LSTM algorithm, the H-24 algorithm, and so on. The K-nearest neighbour algorithm performs the best after analysis and comparison. However, their study needs to be based on a much larger data set and needs to take into account the circadian nature of activity rhythms.

In addition, the application of an LSTM neural network to the establishment of the digital twin model used on a farm is also rare, but it's been used in many other ways and has been very successful. Hu et al. [18] propose a hybrid time series prediction model based on global empirical mode decomposition, LSTM neural network and Bayesian optimization, and apply it to the establishment of the digital twin model. They use their digital twin models to predict wind speeds in wind turbines and wave heights in ocean structures. The results show that the proposed model can obtain accurate time series prediction [18]

Although the application of digital twins in farm managemen<sup>t</sup> is still in the early stage of development, it is not impossible to establish digital twins for each cow on this bovine disease digital managemen<sup>t</sup> system. With the establishment of digital twins, the cattle farm can become an autonomous, adaptive system in which intelligent digital twins can operate, decide and even learn without human on-site or remote intervention [4].

#### **3. Data Mining and Analysing**

This section primarily discusses the processing method of the data sets, i.e., the original data measured by sensors of the farm's IoT system. This data set is systematically treated in preparation for future use of the modelling. Particularly, the data sets of the cattle's states are analysed, and a digital twin model of the cattle is produced using these data sets. A vast amount of data may be used to evaluate the model's correctness, and the state of the cattle can then be predicted.
