Image Processing Technology Based on Internet of Things in Intelligent Pig Breeding

In recent years, with the continuous innovation of the Internet of ,ings technology, the image processing technology in the Internet of,ings technology has become more and more mature. Automated pig raising will become the mainstream pig raising technology, making the research of image processing technology in the intelligent pig breeding face a change. It has become more and more important. ,e traditional pig raising model cannot provide a suitable growth and development environment for the pigs. ,e pigs are disturbed by diseases and environmental discomforts during the growth process, which increases the mortality of the pig breeding process and cannot provide consumers with a guarantee. In order to solve the problem of unfavorable factors during the growth of live pigs, this article uses image processing technology to analyze data through images obtained through automated monitoring and management, uses the system to conduct intelligent, digitized, and standardized management of pig breeding data, and reports to the corresponding. ,e control module issues instructions to improve the corresponding environmental information and realize the intelligent management of pig breeding. ,is article will use image processing technology to monitor the growth of pigs in intelligent pig breeding. Studies have shown that the use of image processing technology to realize the intelligent management of pig breeding can help pig farms to carry out manual management to improve production efficiency andmanagement efficiency.,emanagementmode of the pig industry has changed from fuzzy to refined.,e breeding cost of pig farms and a lot of manpower and material resources should be reduced, reducing the probability of pigs getting sick and the impact of the environment, reducing the mortality of pigs, improving their economic benefits, and providing consumers with a strong guarantee.


Introduction
tWith the continuous advancement of science and technology, intelligent breeding will become the main method of pig raising innovation. Strong productivity is the basic way of national economic growth, using the latest scientific and technological means and scientific methods to increase production, achieve the purpose of improving production efficiency, and effectively ensure people's daily demand for pork. Pork is the main meat product in China. As the number of pigs raised continues to increase, a lot of manpower and material resources need to be spent to ensure the living environment of the pigs and the prevention and control of diseases. At this time, the way of intelligent pig breeding should be timely. As a result, compared with traditional breeding methods, intelligent breeding greatly reduces the risk of breeding.
With the development of computers and the development of intelligent control theory, control and management automation technology continues to improve, and it has been developed rapidly in the world [1]. At present, the indoor facilities of modern foreign farms have developed to a relatively complete level, and some standards have been set. Augspurger et al. and others invented the fully automatic breeding pig production performance measurement system FIFR, which measures the weight and diet of sows and selects ideal breeding pigs from it [2]. Wu et al. proposed that the information of sows can be used for scientific feeding of sows at each stage of feeding and at the same time for estrus detection, as well as individual sows for different breeding conditions and litter [3]. Jiao et al. proposed that the characteristics of pig farm environmental monitoring and management are to maintain the pig farm environment and regulate the temperature, humidity, and air condition of the pig farm [4].
China's research on smart pig breeding is relatively late. At present, there is still a certain gap between China's technological level and the ability to adjust the self-developed measurement and control system and developed countries. e research on my country's overall environmental measurement and control technology has just begun, and some domestic experts and researchers have also developed some equipment and management systems. Izmailov proposed that the traceability of pigs should be converted from the traceability of central farm information to the traceability of decentralized breeding information, thereby expanding the scope of the traceability system [5]. Njock et al. proposed that, through the wireless network transmission in the data center, users can use their surrounding computers or mobile terminals to remotely manage the data center [6], so that the breeding environment information of poultry can be monitored in real time, and the breeding environment can be optimized according to the monitoring data [7].
In order to solve the problems of pig growth environment, health, diet, and other aspects, this paper uses image processing technology to obtain data such as pig growth environment and then judges through the system and then sends instructions to the corresponding control module to take corresponding measures. For example, the pig house is too dirty, and the system calls the cleaning pig house module to improve the pig house environment. In this paper, the establishment method of comparative reference method is used to establish an experimental group and a control group with 10 cubs in each group. e experimental group adopts intelligent breeding and the control group adopts the most primitive breeding method. e results showed that the weight gain of pigs in the experimental group was significantly faster than that of the control group, and the probability of infection was significantly lower than that of the control group. e main contributions of this article are comprehensive monitoring and management of pig breeding, breeding, breeding, slaughter, and other links to ensure consumer rights. Respond promptly, respond to major epidemics in time, and provide effective guarantee for the quality and safety of live pigs. Greatly reduce the labor cost and workload of employees, and improve data collection efficiency and data accuracy.

Image Processing Technology Based on
Internet of Things in Intelligent Pig Breeding 2.1. Internet of ings. e system of the Internet of ings is very complex. It includes various applications such as electronics, communications, computers, and agronomy. By using IoT technology for data collection and reception, reliable transmission, intelligent processing, and automatic control, various production and transmission links can be established. Wait for the complete follow-up [8,9].
However, if the network environment is different, its communication protocol may not be fully compatible [10]. Traditional wireless networks include mobile networks and  LAN wireless networks.  ese network communication  plans are aimed at point-to-point or multipoint-to-point  transmission and have higher communication goals and  measures. 2.1.1. IoT Architecture. e current IoT system model is not universal and lacks a complete system structure. When building an IoT system, you must consider network performance, such as scalability, reusability, and security. It is necessary to summarize the research results of the Internet of ings architecture and related theories and models of the wireless network architecture model. e main basis for designing and verifying the structure of the Internet of ings is still to simulate the actual scenarios of the Internet of ings, which should be combined with the existing examples of Internet of ings applications for summary and improvement. Understand the development direction of the Internet of ings. Finally, for different types of terminal equipment, it is necessary to consider related parameters, application technologies, and related standard specifications [11,12], and a specific plan for the needs of users and the implementation of their functions is required. According to most research results at home and abroad, the Internet of ings system is divided into perception layer, network layer, and application layer, as shown in Figure 1.
(1) Perception Layer. e perception layer is the lowest structure of the Internet of ings. At the sensory level, a large number of sensory nodes are distributed in the environment where the development of pigs and other areas should be monitored. ey are used for data collection, such as temperature and humidity, light intensity, and CO 2 concentration. At the same time, it analyzes, processes, and automatically manages the nodes and sends the sent data to the heterogeneous network [13,14]. Most of the information changes in the environment are continuous and simulated; although the information on the network is completely different, different types of sensor devices are required to process the types of information obtained [15]. In order to be able to locate and retrieve information, provide strong support for production and guidance [16].
(2) Transport Layer. e IoT layer acts as a bridge between the perception level and the application level. e relevant information collected from the perception level is wirelessly transmitted to the terminal device. Commonly used are IEEE802. 3 [17,18].
(3) Application Layer. Process the data transmitted by the network layer and send the results obtained after algorithm analysis to different systems [19], which facilitates the operation and use of end users, including production, management, and maintenance. Business activities, such as raw pork monitoring, production pork processing, traceability management, logistics management, disease detection, and other systems will increase raw pork production and reduce production costs.

Digital Image Processing
Technology. e displacement measurement method based on digital image processing is a noncontact displacement tracking method, and its cost is lower than the displacement meter, GPS, electronic total station, and laser interferometer [20]. e existing displacement tracking methods based on digital image processing are mainly divided into two categories, namely, digital image correlation methods and specific target tracking methods.
(1) Digital Image Correlation. e digital image correlation method, also known as the digital position correlation method, is an important method for monitoring distortion in the field of digital image processing. e basic principle is to take point images before and after the structure is deformed and divide the point images before the deformation into smaller subregions. When the subarea is small, each subarea can be regarded as rigid motion. Next, for each subregion, by selecting a specific correlation function for calculation, find the region in the distorted image with the highest correlation coefficient with the subregion and treat it as the new position of the subregion after deformation, and then perform shift. e number of partitions can be achieved [21,22]. If you need to calculate the displacement of the entire field, you can calculate the correlation of all subregions. e performance of the correlation function will directly affect the search accuracy and calculation speed of the digital image correlation method: where f() and g(), respectively, represent the gray value of each pixel position before and after distortion, and f m , g m , Δf, and Δg are concepts and mathematical formulas: (2) e advantages of the digital image correlation method are the algorithm is simple and easy to implement, the field of view is wide, the noncontact distortion tracking method is adopted, and the tracking accuracy is high. e disadvantage of the digital image correlation method is the essence of the method is to perform a large number of iterative calculations, and the calculation complexity is very high, especially when the image pixels are large, and the image correlation calculation amount will be abnormally large and cannot meet the requirements of tracking speed.
(2) Specific Target Tracking. As the name suggests, target tracking is to locate a specific target in each frame of an image to create a target trajectory. Place the calibration board on the target to be measured to compensate for the offset. After sampling the displacement of the calibration plate with a digital camera, you can know the displacement at this time. is is the method of tracking displacement through target tracking [23,24].
Compared with digital imaging technology, this target tracking technology is more suitable for tracking structure migration. e current weakness of this technology is mainly reflected in the unreasonable setting of monitoring targets. Some researchers use lasers and other light sources as monitoring targets [25], which not only has high requirements for the monitoring environment but also has a greater impact on the environment.

Analog Image
Processing. Analog image processing includes optical lens processing, photography, and TV production, which are all real-time processing. Its processing speed is fast and can work in parallel. In theory, the speed of analog image processing can reach the speed of light. e disadvantages are low precision, control flexibility, almost no crisis function, and nonlinear processing function [26,27].

Artificial Intelligence.
Relying on deep learning and big data, the development of artificial intelligence has entered a new era. e reason why the achievements of artificial intelligence are "panicked" is that they have trained their own experience models through a large amount of sample data research and completed further in-depth learning of selfplay and self-communication on this basis. In order to train himself to obtain more precise reaction and processing capabilities, he reached a higher level of evolutionary system upgrade [28].

Main Characteristics of Artificial Intelligence.
It is people-oriented, serving the people. Artificial intelligence is actually a system based on computer hardware and programs written by humans and works according to specific logic and algorithms [29]. Artificial intelligence is designed and manufactured by humans and must serve humans. According to human design, it can recognize the environment and produce corresponding emergency behaviors and can interact with people. e design of an artificial intelligence system must be able to perceive, perceive, smell, touch, and test the five human touch senses through language, words, expressions, and actions.
It has adaptability, learning ability, evolutionary repetition, and connection expansion. Artificial intelligence systems must have the ability to adapt to the environment and the ability to learn independently. It has the ability to adjust corresponding parameters, data, and tasks in real time according to environmental changes.

Existing Artificial Intelligence Technology.
e main research technologies of artificial intelligence are expert systems, natural language understanding, machine learning, distributed artificial intelligence, machine learning, and pattern recognition. In recent years, the rapid development of computer hardware technology has led to a significant increase in computer performance. e global popularity of the Internet has provided large databases of big data technology and deep learning technology, which has led to the further development of two technologies. Artificial intelligence happened. It has rapid development and is widely used in family life, medicine and health, transportation, and other fields; various industries are actively exploring how to use artificial intelligence technology to solve industry problems, and education is no exception [30].

Intelligent Breeding.
e system mainly collects basic information about pigs in the pig industry. Complete the identification of individual piglets in the herd, and obtain accurate information about individual piglets and relevant data about the piglet's diet, including the number of ear tags, feeding frequency, and feeding speed.
In the decision analysis part, the feed intake curve and the pig growth model curve are drawn based on the basic information collected from the pigs. e system determines the feed intake of piglets, the type of feed consumed, and the proportion of each category according to the model curve. Control the growth curve of piglets more scientifically [31,32]. e automatic decision-making system of live pigs will automatically identify the piglets they may need to eat, feed them automatically, and urge breeders to take the next step and take the next step. e pig raising monitor and control unit monitors the pig raising environment in detail and creates a false alarm mechanism. e piglets that may be suffering from diseases can be controlled in time, which will benefit the growth and development of other piglets. rough this mechanism, the traditional method of capturing Chinese captives can be changed, and the semirandom method of piglets can be completed through the integrated monitoring system. is can not only improve the quality of young pork but also control the living environment of melon young [33]. is will also help us to improve the efficiency of pig raising more effectively. At the same time, real-time monitoring of the environment of the pig farm can provide a good growth environment for the growth and development of piglets.

Information Management.
Information management must reflect the progress and dynamics of the project in the fastest and most flexible way,and record the occurrences and problems in a timely manner. Information is only effective when it is delivered to people who need it and have a strong topicality.
erefore, it is necessary to provide useful information to relevant departments and personnel in the fastest and most effective way, which becomes the basis for decision-making, management, and control. In order to ensure the accuracy of the information, the original information must be reliable [34]. Only reliable original information can process accurate information. When collecting and sorting out original data, information workers must adopt an attitude of seeking truth from facts, transcending subjective arbitrariness, and carefully verifying the original data so that it can accurately reflect the true situation. In this research, images are collected by monitoring equipment, transmitted to the system, and then processed from the system communication database, and then the corresponding control units are instructed to change their respective living environments.
Database management technology is used to manage animal information in a specific environment. In actual production, information system management can be completed by analyzing data and formulating a logical production plan [35]. In the process of raising pigs, it is important to preserve better feed and pollution, feed pigs automatically, save manpower and material resources, and use individual differences to manage the galaxy. At the same time, the production data of each group of animals and poultry used to select seeds can be recorded and stored. In the past, American researchers created the FeedLogic system to feed and produce pigs. e system can monitor the production status of pigs, dynamically adjust the feed supply of pigs, and use remote computers to control the feeding of pigs, thereby improving the feed conversion efficiency and nutritional level [36].

Experimental Research on Image Processing
Technology Based on Internet of Things in Intelligent Pig Breeding

Test Subject.
is study mainly selected X pig farms, two pig houses with similar environments, and 20 healthy piglets of the same breed into two groups. ey are the experimental group and the control group. e experimental group adopts advanced intelligent breeding technology, and the control group adopts original artificial breeding technology. e weight and health status of pigs are collected every 3 days for later data comparison and analysis. Among them, the experimental group needs to check the monitoring equipment, feeding equipment, and sprinkler equipment, regularly to prevent equipment damage from affecting the experimental results, and tries to ensure the survival of the piglets as much as possible. e control group arranges staff to raise regularly and clean regularly. To ensure the validity of the data and the accuracy and reliability of the experiment, the live pig is the main source of the data. rough this experiment, you can explore the advantages and disadvantages of intelligent farming over artificial farming, and you can also see what role image recognition technology plays in intelligent farming.

RBPMF-EPCA Algorithm Experiment.
In order to verify the robustness of the RBPMF-EPCA algorithm under different attack strengths and different attack types, the experiment selected the filling scale 3% and 5% and the attack scale 1%, 2%, 5%, 8%, 10%, and 15%; the attack type is average attack, random attack, and fuzzy attack as the attack overview. In order to verify the robustness of the algorithm, make the experiment more convincing and better explain the effect of the experiment; this paper chooses three more classic robust recommendation algorithms as the comparison experiment, as follows MMF: based on M estimation matrix factorization algorithm, LTSMF: matrix factorization algorithm based on minimum truncated squares, and VarSelect SVD: robust collaborative recommendation algorithm. Good recommendation accuracy has always been the primary goal pursued by the recommendation system. is article will first analyze and compare the recommendation accuracy of each algorithm. is paper chooses RMSE as the index to evaluate the accuracy of the recommendation system.

Experimental Data Collection.
In the intelligent pig breeding system, the basic information of pigs from slaughter to slaughter to slaughter is stored, relevant data are grouped according to user needs, and relevant query, data entry, and modification interfaces are provided according to the logical structure of the system. is article uses Mysql database technology, and the following are the advantages and functions of Mysql database: (1) Mysql database is an open-source relational data management system. When transaction processing is not required, Mysql is the best choice for information management. (2) ere is no limit to the number of people accessing the database at the same time. (3) High security, providing users with multiple authentication methods to connect to the data system, while providing encryption procedures. Users can encrypt data files without modifying the host development program to meet basic data security requirements. (4) Compared with other databases, the amount of database information that can be stored is more, and the maximum amount of information that can be stored can reach 50 million. (5) It has good running speed and is currently the fastest database system on the market. (6) Good portability, simple, and effective user power adjustment. (7) Compared with other large databases, debugging, management, and optimization are relatively simple. Because the design of Mysql database is consistent with the design of Pig management system database, this system chooses Mysql database as the development of Pig information management database.

Gather Data.
During the experiment, data were collected regularly on the weight of all pigs in the experimental group and the control group, the environment of the pig house, and the health of the pigs every 3 days. Table 1 is a comparison of the 27-day average weight of pigs in the experimental group and the control group (health and environment: 1 means good and 0 means bad).
In this way, we have a more intuitive, comprehensive, and in-depth understanding of the status quo of all aspects of intelligent farming, combined with relevant literature and information, and put forward some targeted related suggestions and countermeasures based on the actual situation.

Analysis Based on the Average Weight Gain of Pigs in 27
Days. e contrast and positioning accuracy of the image are enhanced, and the difficulty of image processing is reduced. e method of extracting the S value from the HSL model is used to realize the image gray-scale processing. e image is divided into blocks to detect the feature points, and the threshold is automatically selected in each block. e obtained feature point area is controllable, the number is controllable, and the overall distribution is uniform. Collect Mathematical Problems in Engineering 5 data on the body weight of pigs every 3 days and find the average value, as shown in Figure 2. It can be seen intuitively from Figure 2 that the experimental group grew from 39.8 kg through the intelligent pig image processing system to 64.7 kg, and the control group grew from 40.1 kg through the traditional artificial breeding method to 59.7 kg, which can be seen intuitively e growth rate of the experimental group was significantly better than that of the control group. e image processing technology based on the Internet of ings has achieved certain success in the research of intelligent pig breeding. It can also be seen that the growth of pigs raised by intelligent breeding technology is significantly better than artificial breeding. With the increasing maturity of technology, the intelligent pig image processing system can greatly reduce labor costs and personnel workload and improve data collection efficiency and data accuracy.

Analysis of the Impact of Live Pig's Living Environment on
Health. In the analysis and design of the intelligent pig raising management system, we have learned a lot of important information through interviews with pig farmers. By systematically analyzing and judging the information provided by pig farmers, we have come to the main requirements and main design points of the system.
Plot the relationship between health and living environment data collected in 27 days, as shown in Figure 3. It can be objectively seen that health and living environment are closely related. When the living environment declines, live pigs gradually become infected with diseases. It can be concluded that intelligent breeding can greatly reduce the probability of pigs being infected with diseases.

Analysis Based on the Accuracy of the Information
Obtained by Image Recognition 4.3.1. Image Recognition Technology for Accuracy Analysis of Feed Information. e monitoring equipment of the experimental group collects the information about insufficient feed and sends it to the system. e system calls the database gallery to judge the insufficient feed and calls the feeding function. Here, we analyze the accuracy of image recognition technology. Since there will be workers checking the feeding equipment on a regular basis, here is a random sample of one day, and the feeding equipment is checked every two hours to obtain a data plot, as shown in Figure 4. e system performs database comparison, and the image recognition technology has an accuracy of 95% for feed information. As long as the feed is bottomed out and the monitoring equipment collects the data, the system compares the data, that is, calls the feeding function.
ere is no need to worry about the feed. Pigs will naturally eat when they are hungry. e remaining deviation is caused by imperfect data collected by the monitoring system. is aspect is also an area that can be improved. For example, the data collected by two monitoring devices are used for double judgment.

Image Recognition Technology for Accuracy Analysis of Living Environment Information.
e monitoring equipment of the experimental group collected information on the presence or absence of pig excrement on the ground and passed it into the system. e system called the database library to judge whether there was any pig excrement and called the cleaning function. Here, we analyze the accuracy of image recognition technology. As the experimental group will have workers regularly check the cleanliness of the pig house floor, here is a random sampling of one day, every two hours to check the cleanliness of the pig house floor and at the same time compare the plot with the control group (cleanliness score 1-10: 0 is the best and 10 is the worst), as shown in Figure 5.
e system performs database comparisons, and the accuracy of image recognition technology for living environment information has reached 99%. As long as there is excrement monitoring equipment on the ground of the pig house to collect data, the system compares the data and calls the cleaning function. It can be seen that the image recognition technology has reached a high standard for the accuracy of living environment information and can basically ensure the cleanliness of the pig house.

Analysis of Experimental Group and Control Group.
We collect and draw data on the manpower, material resources, and cost issues of the experimental group and the control group, as shown in Table 2.
It can be seen from Table 2 that the experimental group spends less manpower and material resources, but it needs to spend a lot of money to install monitoring equipment and systems and this is a once-and-for-all method, just pay attention to regular maintenance, and the control group spends more manpower and material resources. e cost is not much. In terms of the benefits     Mathematical Problems in Engineering 7

Conclusions
e pig raising environment has a vital influence on the growth and development of pigs. e pig farm has been collected and adapted to the environment to achieve the best pig raising environment and improve animal welfare. At the same time, the basic conditions for live pigs from slaughter and feed vaccine entry and exit to exit are calculated and converted into electronic files to provide data support for pork safety and report healthy pig breeds. According to the actual needs of the pig farm, a high-definition network camera was selected to monitor the living conditions of the pigs in the pig farm, and an online monitoring platform was created so that the administrator can check the situation of the pig farm at any time. e growth of pigs raised through intelligent breeding technology is significantly better than artificial breeding. As the technology matures, the intelligent pig image processing system can greatly reduce labor costs and personnel workload and improve data collection efficiency and data accuracy. e design is only based on the preliminary exploration of the intelligent pig breeding management system. Although some results have been achieved, there is still a big gap between the goals of fully intelligent replication. With the development of environmental information nodes for pig farms and breeding pigs, the general humidity should be relatively high and node humidity should be increased to improve the stability and lifespan of the nodes. In the complex environment of pig farms, other environments need to be studied and more accurate environmental information parameters are needed to raise pigs. is article is just a simple statistic about the total number and consumption of pigs. It can also be used for each pig. It can measure the daily consumption of pigs so that big data analysis can be used to simulate the daily consumption of pigs, achieve more precise catering goals, and improve economic efficiency.
is article uses image recognition technology to study the role of intelligent breeding and closely monitor and manage pig reproduction, reproduction, reproduction, and slaughter. rough this system, relevant production companies and health management departments can track the source and production process of live pigs to determine the purchase process and the development process of live pigs. At the same time, the system provides comprehensive and relevant data and information from breeding pigs to slaughter pigs, thereby improving worker management and consumer confidence, providing rapid response and timely treatment of major epidemics, and providing quality and quality an effective guarantee. Safe pig raising: improving pig breeding information and quality not only improves the efficiency of the intelligent management system but also contributes to the formation of animal husbandry information.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.