Self-Adaptive Edge Computing Architecture for Livestock Management: Leveraging IoT, AI, and a Dynamic Software Ecosystem

. The agricultural industry is encountering exceptional difficulties due to shifts in the macroeconomic landscape, and the prospects of the livestock sub-sector could be more precise. The elimination of subsidy payments due to agricultural policy changes resulting from Brexit poses a significant threat to farmers' financial stability and overall well-being, jeopardizing their enterprises and lives. Farmers must pursue adaptive tactics to endure the consequences of evolving socio-political situations. This research investigates the capabilities of Dynamic Software Ecosystem (DSE) as an analytical tool in the context of managing livestock within the farming sub-sector. In Smart Farming, using the Internet of Things (IoT) and Blockchain (BC) facilitates the monitoring of resources and ensures traceability across the value chain. This enables farmers to enhance their operational efficiency, disclose the source of their agricultural products, and assure customers about the output's caliber. This study introduces a platform that utilizes the IoT, Edge Computing, Artificial Intelligence (AI), and BC in Smart Farming settings. The Optimised Live Stock Management System (OLSMS) employs the Edge Computing Design to enable real-time monitoring of dairy animals and feed grain conditions. It guarantees the reliability and long-term viability of various production procedures. The efficiency of the Expert System is shown by its dependability rate of 92.3%, as determined by comparing its outcomes with those of a group of experts in raising livestock. The experimentation conducted on various scenarios has shown intriguing findings on implementing effective livestock management methods within certain environmental variables, such as weather and precipitation.


Introduction to Livestock Management
Under notable pressures, the agricultural sector faces considerable issues, particularly within the livestock sub-sector [1].Concerns have been voiced about farmers' financial stability and general well-being due to shifts in the macroeconomic environment, namely the changes in agriculture policy stemming from Brexit.The discontinuation of subsidy payments presents a considerable risk to businesses' livelihoods and long-term viability, requiring adaptive methods to traverse these dynamic socio-political circumstances.The crux of this difficulty lies in the need for efficient livestock management, a reliance that is increasingly dependent on sophisticated technology [2].
Implementing efficient livestock management practices is of utmost importance, as it not only plays a critical role in enhancing the financial viability of agricultural operations but also in safeguarding the welfare of animals, optimizing the usage of resources, and improving overall operational effectiveness.In this particular setting, the incorporation of contemporary technology becomes essential.The amalgamation of the Internet of Things (IoT) [3], Artificial Intelligence (AI) [4], and Edge Computing [5] has surfaced as a potent resolution.IoT sensors in livestock facilities enable the collection of diverse data, including animal behavior, temperature, and feed consumption.The real-time data is analyzed by AI algorithms, which can forecast disease outbreak occurrences or enhance the efficiency of feeding regimens.From a practical standpoint, this technique has shown noteworthy outcomes, as AI systems have demonstrated the capacity to improve livestock output by as much as 15% [6].This has led to a substantial enhancement in the overall economic feasibility of agricultural operations.
Edge computing is a paradigm that includes data processing near its source of origin.This approach is a valuable addition to the IoT and AI fields.Reducing data transport latency facilitates the timely execution of critical decisions [7].In livestock management, Edge Computing enables prompt action in response to identifying abnormal behavior in a cow.This timely intervention has the potential to avert health complications or enhance the efficiency of breeding cycles.The decreased latency also implies that judgments are executed with a diminished delay, a factor of utmost importance in upholding animal wellbeing [8].
Although traditional livestock management strategies have shown efficacy, they frequently must be revised to handle contemporary difficulties.The methodologies encounter challenges related to restricted data accessibility, delayed decision-making, and suboptimal resource allocation.Within the present context, the present study presents the notion of a Dynamic Software Ecosystem (DSE) as an analytical instrument within the domain of managing livestock [9].The ecosystem described utilizes the IoT, AI, and Edge Computing to provide a complete platform to enhance the efficiency and adaptability of handling livestock.This platform could significantly improve agricultural operations' management [19].
The primary contributions are listed below: • With an emphasis on data security using distributed ledger technologies, the study presents the Optimised Live Stock Management System (OLSMS), a livestock management tool with IoT, Edge, and Business Solution layers.
• OLSMS ensures data integrity and lowers cloud transfer costs by enabling real-time data processing, encryption, and smart contract execution. • The study uses fuzzy logic to create an expert system as a decision-support tool for complex livestock management procedures.
The following sections are organized in the given manner: The literature and research on livestock management are discussed in Section 2, emphasizing significant developments and approaches.Section 3 suggests the Optimised Livestock Management System (OLSMS), which integrates IoT, AI, and Edge Computing to facilitate real-time monitoring and decision-making in livestock farming [10].The experimental analysis and results are shown in Section 4, which also shows how successful and efficient the OLSMS is in different livestock management settings.The study's conclusion is included in Section 5, which summarizes the contributions made so far and discusses possible directions for future research using cutting-edge technology to manage cattle [20].

Literature Analysis
The literature review part comprehensively examines prior scholarly investigations in livestock management.This encompasses various topics, including conventional approaches and integrating contemporary technologies like the IoT and AI.The objective is to explore how these advancements have been used to tackle the many obstacles encountered within the agricultural industry.This study aims to comprehend the dynamic nature of livestock management methods thoroughly.
Aquilani et al. (2022) introduced a novel approach, which involves the integration of a Global Positioning System (GPS) with Precision Livestock Farming (PLF) tracking (GPS-PLF) and Environmental Monitoring with PLF (EM-PLF) technologies specifically designed for livestock systems that rely on pasture-based management [11].The GPS-PLF system offers live animal monitoring capabilities, while the EM-PLF system is designed to assess temperature, humidity, and fodder quality.The experimental findings showed that the implementation of GPS-PLF resulted in a notable decrease of 30% in animal dispersion.Additionally, the usage of EM-PLF exhibited a significant improvement of 20% in fodder consumption.These advancements contributed to the enhancement of livestock well-being and the optimization of resource efficiency.
Zhang et al. proposed an approach known as Black Soldier Fly Larvae (BSFL) Management (BSFLM) that is used for the effective management of livestock and poultry waste [12].BSFL showed a significant reduction in manure volume by 75% while concurrently exhibiting a 30% increase in nutritional content.The proposed methodology offers a viable approach to reducing waste sustainably, effectively minimizing environmental consequences, and promoting the recycling of nutrients.
Barzan et al. performed a comprehensive meta-analysis on a worldwide scale to investigate the impact of Livestock Grazing (LG) on bird populations [13].Their findings revealed a decrease of 20% in bird abundance and a fall of 15% in species richness.The limitations LG imposes on avian variety and population size suggest the possibility of ecological consequences in grazed regions.
Zhu et al. proposed a set of strategies known as Integrated Livestock Sector Nitrogen Pollution Abatement (ILSNPA) in China [14].These approaches generated a notable decrease of 25% in Nitrogen Pollution (NP) levels while simultaneously leading to a 15% enhancement in crop yields.The ILSNPA initiative provides a positive outcome for human and ecological well-being by effectively tackling the intertwined issues of nutrient pollution and food security within the livestock industry.
Ma et al. have devised a noncontact system, known as the Noncontact Body Temperature Prediction System (NBTPS), specifically designed for monitoring and predicting the body temperature of livestock animals [15].The National Bovine Temperature Prediction System (NBTPS) used Infrared Thermography (IRT) and machine learning techniques to successfully forecast the body temperature of cattle, achieving a strong correlation coefficient of 0.92.This technological advancement facilitates animal health management, assisting in the early diagnosis of diseases.
The study by Joly et al. developed a novel approach called Adaptive Decision-Making on Stocking Rates (ADS) for livestock systems susceptible to climatic shocks [16].The study conducted by ADS revealed a decrease of 20% in livestock losses during severe weather conditions.The implementation of ADS resulted in enhanced system resilience, promoting the adoption of sustainable methods in livestock production.
Bai et al. analyzed the stability of decoupling Livestock Greenhouse Gas Emissions (LGHGE) from economic development in the Tibetan highland [17].The study's findings revealed a fluctuating decoupling pattern, as seen by the decoupling index values ranging , 050 (2024) BIO Web of Conferences MSNBAS2023 https://doi.org/10.1051/bioconf/20248205010 10 82 from 0.6 to 1.2.This suggests that there exists a multifaceted association between economic growth and LGHGE.
Li et al. examined the factors influencing farmers' inclination to use animal dung as a resource [18].The study's findings revealed that many variables, including economic considerations, the availability of technology, and government assistance, significantly impacted farmers' inclination to adopt techniques related to the usage of manure resources.This adoption promoted sustainable waste management within the livestock farming industry.
Examining existing research on livestock management uncovers various obstacles and problems, such as the need for improved disease surveillance, optimization of resource usage, and the promotion of environmental stability.This has led to the investigation of modern technologies as potential solutions to these difficulties.

Proposed Optimised Live Stock Management System
The present study presents a holistic approach to livestock management, incorporating the IoT, AI, and Edge Computing for continuous monitoring and informed decision-making in real-time.The primary objective is to improve cattle welfare, optimize resource consumption, and promote efficient operations, all while tackling the limitations associated with conventional management approaches.This study aims to transform cattle farming operations by using cutting-edge technologies.

Global edge computing architecture
The present research utilizes the first presented edge computing framework, including three primary levels: IoT, Edge, and Business Solutions.Figure 1 illustrates the Global Edge Computation Architecture (GECA) and its respective tiers.Distributed Ledger Technology (DLTs) are a prominent aspect of GECA as to their capacity to offer a high degree of security throughout the whole design, including the loT Layer, the foundational layer.This enables the encryption of sensor-generated data and its transmission to the subsequent layer for analysis.
• IoT Layer The IoT Level can receive data from many sensor networks that differ in their standards.A group of entities called oracles are included inside the IoT layer.These oracles are intermediates, facilitating data exchange among IoT gadgets and the blockchain.The procedure starts when the IoT devices transmit information to the diviners for validation.The GECA oracles use the SHA-256 algorithm to process the produced data, creating a hash value.This hash value is then recorded inside the blockchain.After undergoing verification, the data is transmitted to the blockchain, where it will be utilized in the execution of smart agreements.The RSA technique encrypts data intended for transmission to the Edge Nodes.The Edge node uses the SHA-256 technique to create a hash value for the received information.This hash value is matched with the one recorded in the blockchain, ensuring the integrity of the data by detecting any unauthorized modifications.The created hashes must remain consistent since this serves as a means of verifying the accuracy of the content.
• Edge layer The Edge layer effectively oversees a business's vital technical resources and operations, ensuring real-time management and execution of various activities.The intermediate layer of the design, situated in proximity to the Edge nodes, is responsible for orchestrating, tracking, and upgrading the technical infrastructure.One crucial step in the data handling pipeline is the pretreatment of data obtained from the IoT level.This preprocessing stage serves the purpose of filtering out specific data points that are intended to be delivered to the cloud.Data management is carried out via cost-effective microprocessors such as Raspberry Pi or Orange Pi to streamline the integration of the IoT and Edge layers.This approach fosters an open framework that encompasses accessible entrance and exit points.These doors provide the seamless connection of devices to detectors and the efficient management of loT device systems, spanning from the foundational layer to the transmission of gathered information to the Edge level.An additional significant characteristic of the Edge level is its ability to facilitate the operation of Edge gadgets that integrate machine learning methodologies, thereby enabling various processes, including statistics, to be executed on the Edge level of this design.This functionality leads to a reduction in prices and the amount of information moved to the cloud.
• Business solution layer The Business Solution level is responsible for the execution of business intelligence products and services, and it also handles the ultimate storing of the processed information for decision-making.The platform facilitates the execution of storage procedures in public cloud environments, such as commercial computers, and exclusive cloud environments, such as organization data centers.The methodological approach consists of three steps: simulation construction, postsimulation conversation, and conducting five conversations with other livestock producers, as shown in Figure 2. The rationale for selecting this strategy is based on the opportunity to develop a DSE livestock modeling at Colclough farm, which provides a tangible means to investigate the efficacy of DSE as a tool for managing a farm.The post-simulation discussion provides Joseph with an opportunity to engage in critical reflection on both the procedure and the framework itself.It allows for further exploration and expansion of the simulation results and the validation of the model.The first phase used the program to model two livestock procedures: cutting and dipping.This software was chosen because of its capability to generate DSE simulations and its established reputation within the simulation field.In the second stage, a conversation was conducted to verify the algorithm and provide more insights into the applications of the program.This analysis offers a further understanding of the contextual difficulties encountered in the industry, examining possible obstacles to the diffusion of software and equipment and offering an indicator of the tool's potential usefulness to other farmers.

Fig. 2. Work process
Five interviews were conducted with livestock executives, forming the basis of stage three of the study.The participants in the conversation were presented with a series of inquiries about the prevailing political environment, specifically concerning their comprehension and comprehension of the policy alterations following Brexit.They were probed about their strategic decision-making in anticipated situations, such as the cessation of subsidy settlements, and their overall attitudes towards software for computers and farming uses.The purpose of conducting those interviews was to address the second research question, which aimed to get a broader perspective on the industry-the interviews aimed to explore general views and understanding of changes in laws and feelings towards farm technology.
• Stage 1: simulation To construct a simulation model using the ARENA program, an examination of the two methods of farming, namely shearing and dipping, was conducted.Two site visits were conducted at Colclough farms in the summertime of 2022 to observe the various activities.A systematic observation was conducted, documenting the precise actions of the two procedures, the required assets, and the duration of every step.The primary objective is to get exact input data to execute the model, assuring that the resulting simulation model closely resembles the actual process in real-world scenarios.A procedure map was generated, outlining the structure and layout of the simulation inside the program.Joseph delineated the paramount procedures, namely completion duration, optimal staffing levels, and cost, which he deemed necessary.The components have the potential to be included in the framework as Key Performance Indicators (KPIs), which are classified into three categories: cost, efficiency, and velocity.
• Stages 2&3: Qualitative Methodology The qualitative technique comprises a dual-phase interview process.The initial conversation involves Joseph providing a post-simulation discussion to engage in a reflective analysis of the simulation expertise, delving further into the outcomes, and exploring the potential use of the utilized technology within the manufacturing industry.The post-interview simulation was at the farm charge.Joseph had access to a computer to see the simulated and analyze the statistical outputs connected to the KPIs.The subsequent round of qualitative discussions included engaging with additional livestock management operating within the same geographic area of West Yorkshire.This study aimed to assess the potential for broader adoption of DSE among cattle producers and explore its practical applications.The primary objective of the conversations is to contribute to the investigation of the second study topic, which pertains to comprehending the present political environment, examining views about forthcoming policies, and delving further into the embrace of agricultural machinery.This endeavor is grounded on the existing body of knowledge within rural investigations.

Development of the expert system
The Fuzzy Logic (FL) paradigm enables the representation of a system being studied by including input and output variables using Fuzzy Sets, which are expressed using language concepts.The FL system is constructed using the Mamdani type, which comprises three distinct phases.The initial phase involves fuzzification, which entails visualizing the input parameters using Fuzzy Sets.The subsequent stage is the deduction system, which encompasses the principles of deduction derived from a set of Fuzzy Sets associated with the input factors.Lastly, the second phase involves visually illustrating the outcomes using Fuzzy Sets.

Fig. 3. Livestock management system
The Fuzzy Mamdani paradigm is shown in the diagram presented in Figure 3.The Fuzzy Logic paradigm enables the representation of a system being studied by analyzing input and output factors using Fuzzy Sets, which linguistic words can represent.The Fuzzy framework for this framework has six input factors and three outcomes.It encompasses a total of 243 inference rules.The model was constructed using Matlab® and the Fuzzy instrument, which serves as the interface for developing the expert system.This section provides a comprehensive description of the incoming and output factors and the deductive methods used by the framework.The simulation of this professional of experts involves considering , 050 (2024) BIO Web of Conferences MSNBAS2023 https://doi.org/10.1051/bioconf/20248205010 10 82 nine linguistic factors, both input and output, each associated with its corresponding Fuzzy Sets and given a specific value.The presented study introduces an innovative livestock managing system integrating IoT, AI, and Edge Computing.The primary objective is to provide real-time surveillance and decision-making capabilities.This methodology's primary goal is to enhance cattle welfare and maximize resource exploitation, tackling significant obstacles encountered in conventional methods.The study aims to revolutionize cattle production by using cuttingedge technology solutions.

Simulation Analysis and Outcomes
The study used the very effective DSE simulation tool ARENA, which is well recognized for its precision in simulating complex systems.In the summer of 2022, a comprehensive examination of operations such as shearing and dipping was conducted during two separate trips to Colclough farm.These visits resulted in the collection of meticulous data about the duration of these activities and the resources they necessitated.The comprehensive gathering of data led to the development of a simulation framework that accurately replicates real-world operations, exhibiting a high level of accuracy in capturing essential measurements such as the average time required for shearing (about 8 minutes per sheep), the length of dipping (roughly 10 minutes per sheep), and the use of resources (2 personnel per activity).The model offers a dependable framework for conducting comprehensive analysis and facilitating informed decision-making in managing livestock.The hardware configuration used in this simulation entails the utilization of affordable microprocessors such as Raspberry Pi and Orange Pi.This choice ensures the adoption of an accessible and economical architecture for data processing and administration.The findings of Required Employees (number) for different livestock management techniques are shown in Figure 5.This measure shows how many workers are required to complete a specific job.Based on needs seen during simulations, it is computed.PLF, BSFL, LG, ILSNPA, NBTPS, ADS, and LGHGE need an average of 28 workers, 35 employees, 32 employees, 42 employees, and 31 employees, respectively.The planned OLSMS drastically lowers this requirement to an average of 20 employees.The OLSMS continuously reduces the labor needed, demonstrating its effectiveness in managing the workforce for cattle.The Productivity Improvement (%) findings for the different livestock management techniques are shown in Figure 6.The percentage gain in efficiency that is attained is called productivity improvement.Based on improvements seen throughout simulations, it is computed.The results indicate that PLF has improved by 16.22% on average, BSFL by 15.84%, LG by 14.43%, ILSNPA by 17.03%, NBTPS by 17.1%, ADS by 15.73%, LGHGE by 14.19%, and the proposed OLSMS by an astounding 20.22% enhancement.The OLSMS improves livestock management productivity, as demonstrated by its constant outperformance over other approaches.

Conclusion and Future Scope
Managing livestock is of utmost importance in guaranteeing the welfare and efficiency of agricultural operations.The integration of contemporary technologies such as the IoT, AI, and a Dynamic Software Ecosystem has become crucial, given their significant significance.The suggested Optimized Livestock Management System (OLSMS) is a complete solution.OLSMS integrates many advanced features, including precision monitoring, adaptive decision-making, and non-contact temperature monitoring, to optimize and improve several aspects of livestock management.The simulation results illustrate the OLSMS system's effectiveness.These metrics include a completion time of 11.87 hours, an average requirement of 20 employees, a productivity improvement of 20.22%, a cost reduction of $1138.30,and a simulation model accuracy of 96.23%.The results demonstrate the ability of OLSMS to save operating time, maximize staff utilization, promote productivity, minimize expenses, and improve the accuracy of simulated models.This results in a robust framework for the management of livestock.Despite these accomplishments, persistent difficulties still need to be addressed.Ongoing problems are posed by the need to address concerns about data security, provide a smooth interface with current systems, and adapt to varied livestock habitats.The future potential of OLSMS is in the continual improvement of the system via technical improvements, enhancing its applicability in many livestock contexts, and promoting cooperation among academics, practitioners, and technologists to drive breakthroughs in sustainable livestock management techniques.

Fig. 1 .
Fig. 1.Global edge computing systemFigure1illustrates the primary constituents of the Business answer layer, which include Analytics, Cloud administration, Authentication, Knowledge foundation, and Application Programming Interface (API).Using the Knowledge base element facilitates the implementation of social machines.This allows for establishing Virtual Associations of Advisors or developing decision-making systems that rely on data obtained from loT devices.This element is enhanced by orchestrating Cloud-based activities that offer the essential methods for the supplies, tracking, and upgrading resources utilized flexibly and elastically.The Authentication element provides two methods for verifying additional users/nodes of GECA-based services or structures: non-permissioned or permissioned blockchains.The central authorized entity inside the cloud functions as the first node and principal controller of the permissioned blockchain.The first governing entity, the primary administrative node, mines the inaugural block, during which it determines the operational regulations.3.2Dynamic software solution

Fig. 4 .
Fig. 4. Completion time assessment results The findings of Completion Time (hours) for different livestock management techniques are shown in Figure 4.The completion time, expressed in hours, is the time needed to do a

Fig. 7 .Fig. 8 .
Fig. 7. Cost assessment results The Cost Reduction ($) findings for different livestock management techniques are shown in Figure 7. Cost reduction is the amount of money saved due to the simulation.PLF, BSFL, LG, ILSNPA, NBTPS, ADS, and LGHGE all show average cost reductions of $1228.51,$1365.89,$1271.43,$1420.68,and $1345.73,respectively.The OLSMS shows an average cost decrease of $1138.3.The OLSMS routinely performs better than other approaches, demonstrating how well it lowers livestock management expenses.