The Construction of Intelligent Supply Chain System for Agricultural Products Based on Improved Ant Colony Algorithm

With the rapid development of China itself, the supply chain system has become an eective tool to enhance economic competitiveness, and the intelligent supply chain system integrates innovative technologies such as the Internet, the Internet of ings, cloud computing, and big data into the industrial supply chain management. e ant colony algorithm shows super exibility and robustness at the level of optimizing many combination problems; the intelligent supply chain architecture of agricultural products is essentially the rational allocation of resources, which is a dynamic combination of resources and tasks that combines a variety of combinations to select the most appropriate and optimal performance. In this paper, the architecture of the intelligent supply chain of agricultural products is studied in combination with the improved ant colony algorithm, and some improvement strategies are adopted to avoid falling into local optimization or local convergence in order to avoid falling into local optimization or local convergence. e improvements of the algorithmmainly include the following: improving the path search of individual ants, improving the pheromone update strategy, improving the selection probability, and improving the dynamic growth mechanism of ants. In this paper, the VRPTW mathematical model, the dataset TSPLIB, and the operation data of the intelligent supply chain of agricultural products are used for test verication; the results can be obtained by verifying the results of the experiment closer to the optimal solution, and the eciency of the algorithm is signicantly improved. erefore, through the improvement and optimization of the ant colony algorithm, it is very suitable for solving and optimizing the intelligent supply chain system of agricultural products.


Introduction
In this paper, based on the construction of the intelligent supply chain system for agricultural products with the improved ant colony algorithm, the intelligent supply chain system construction of agricultural products is optimized by using the improved ant colony algorithm. e ant colony algorithm is a new simulated evolutionary algorithm, which is an important algorithm for swarm intelligence in the eld of intelligence theory [1]. It is an intelligent algorithm based on multiple agents with a hypothetical balancing mechanism; in fact, it is a random probability algorithm that is a global search algorithm that can e ectively avoid optimization in local areas. e swarm intelligence mentioned in the text is not a group of many individuals but is composed of individuals with simple intelligence working together to exhibit a complex intelligent behavioral characteristic [2]. e origin of this concept is related to nature, mainly through the observation of insects in nature, such as ants, bees, etc. [3]. e action behavior of an ant is extremely brief, and the number of behaviors is within 10 kinds, but hundreds or even tens of thousands of ants can get great wisdom by cooperating into a swarm of ants. e formation of a wisdom is inseparable from the transfer of information between them through pheromones [4]. A pheromone is a substance released by ants, and the main role of a pheromone is to identify where and where ants go. Let the latecomers choose the direction of walking according to the depth of the concentration of the pheromones according to their own pheromone identification and eventually reach the place where the food is [5]. When they first forage, there are no pheromones in the place where they are foraging, so as ants forage, they constantly coat their direction and route with a pheromone [6]. ere will be some ants to find food, and at this time, there are many paths from the cave to the food marked by pheromones, so know that the route of the ants is randomly distributed [7]. Hence, in a certain period of time, most ants have more ants than those who take a long road, so they leave behind a higher concentration of pheromones. On this basis, all ants have a strong direction indication, and more and more ants will converge on the shortest path between the two points [8]. ey have a clear organizational division of labor and mutual communication and information transmission; they can always find the shortest path between nests and food in complex environments; they interpret pheromones without vision to judge where they go and stay, and choose the direction where the pheromone concentration is strongest [9]; the pheromones they produce will become fainter and weaker with time. However, they can still make the right choices through judgments about pheromones.
at is, they have a high degree of structure, automatic optimization, feedback of information, and autocatalytic behavior [10]. Many of the businesses and individuals we come into contact with, and between businesses, support e-commerce technologies, while some are emerging companies that learn e-commerce process technologies and use the supply chain system between restructuring [11]. In the transactions between companies and companies, which include online transactions, online markets, and electronic markets, they were once called to follow the trend of the times, and they were all dominated by them at the level of world trade, and many companies were not profitable, but lost money [12]. However, in this case, many companies have learned e-commerce processes and networks to reorganize their supply chains and have succeeded, and these successful companies have never been sluggish in doing e-commerce, although they are very economical [13]. erefore, in the successful enterprise cases, it can be seen that the relationship between supply chain and e-commerce development also has great value and potential. In the process of competition between companies and companies, companies and individuals, individuals and individuals, online and offline, "intelligence" is also something that makes it more powerful, and the transition of all e-commerce to intelligence is also a very important step, that is, the intelligent supply chain [14]. Its intelligent dynamic supply chain network is based on the current trend of economy, industry, consumer market, etc., which has emerged and is about to occur a new type of logistics model, and some leading enterprises in China have entered this new model. For example, oTMS is based on the logic of "smart supply chain management network" [15], which has made the transportation management, procurement, and operation of some enterprises more flexible and transparent. For example, it can better deal with abnormal problems in the entire transportation process; it can cross some intermediaries to directly contact with more downstream transportation capacity, avoid the impact of transportation efficiency due to human or cooperative reasons, and so on. In a nutshell, it is the sinking of transportation capacity and the improvement of overall transportation efficiency and effectiveness [16]. All the improvements and optimizations based on technical algorithms are of great help to the architectural research of the intelligent supply chain of agricultural products.

Ideological Background of Ant Colony Algorithm.
From 1990 to 1999, Italian scholars in the process of studying ant foraging found that an ant's behavior was simple, but it reflected intelligent behavior in group performance [17]. ey can quickly find the closest passage to food in complex environments. e emergence of this phenomenon has led scholars to further study the foraging process of ants and found that they produce a pheromone substance in the process of foraging, and they can reach the food site through the nearest route through the interpretation and analysis of this substance. e walking route of the ant foraging indicates the best way and the best solution to the problem, and where they pass, the route formed constitutes the spatial route from the nest to the food, and the solution space to solve the problem [18]. e shorter the road, the higher the concentration of pheromones, so the longer the concentration of pheromones will be higher and higher, and later ants will choose this route to forage forward, and the walking route at this time is the optimal solution to the problem.

eoretical Basis of Intelligent Supply
Chain for Agricultural Products. Agricultural products mainly refer to crops, animal husbandry, fisheries, and other products, mainly tobacco, tea, edible mushrooms, melons, fruits, vegetables, flowers, seedlings, and so on. Tobacco: A product made from a variety of tobacco leaf processing. Mao tea: Tea made by processing young shoots plucked from tea trees. Edible mushrooms: Natural or artificially cultivated edible mushrooms. Melons, fruits, and green foods: Such as watermelon, cabbage, sweet potatoes, and so on. e supply chain is a functional chain that connects suppliers, manufacturers, distributors, and end users, from supporting the production of components to end products to shipping products to consumers through distribution networks [17]. e business philosophy of support chain management is to look for an overall optimization of the supply chain from the perspective of the consumer and from the perspective of the company. Successful supply chain management can coordinate and integrate all supply chain activities, resulting in a seamless integration process. en, the so-called intelligent supply chain is to use the Internet, the Internet of ings, cloud computing, big data, and other innovative technologies into the industrial supply chain management so that enterprises can achieve intelligent, digital, networked, and automated management [19]. e intelligent supply chain empowers the logistics industry, can reduce the cost of logistics enterprises, and is conducive to the establishment of their own core competitiveness to cross the express transport as an example: Across the express transport, this logistics company has long begun to lay out the intelligent supply chain, across the express transport through the role of technology and data, people, vehicles, and goods; after strict management and control and careful operation, we finally found the best punctuality, service, and cost standards greatly improve the transportation efficiency so that the majority of users have the ultimate experience. e intelligent supply chain mainly includes three structures: decision-making level, management level, and application layer. Among them, the intelligent supply chain center interacts with the console data, and the data of the intelligent supply chain center will also enter the sales intelligence application, analyze the operation data, form an auxiliary decision-making basis, and provide feedback layer by layer for auxiliary decision-making, and finally return to the console. e decision-making layer makes the final decision based on the information received, as shown in Figure 1.

Decision-Making Layer.
From the receipt of the first order, to the analysis and forecasting, to the coordination of the supply chain (that is, the console controls all the links in the supply chain), the console is the best choice.

Management.
Manage and coordinate the intelligent supply chain architecture to provide effective support for the operation of the supply chain.

Application layer.
e data generated by the intelligent supply chain during operation will be submitted to the sales intelligent application system for data processing, and feedback will be put forward to the supply chain center according to the analysis of user characteristics and marketing data and then submitted to the console.

Standard Ant Colony
Algorithm. Assume more ants, study related problems, and then have them parallel. After each ant completes a journey, it releases pheromones during the journey, and the pheromone content is proportional to the quality of the solution [20]. Ant paths choose a random local search strategy based on the initial pheromone amount (provided the initial pheromone amount is equal) after considering the distance between two points. is improves the pheromone of the periphery and makes it easier to choose follow-up actions. Each ant can only take the legal route when all the ants run out to find them and they will start to have the autonomy to update all the pheromones. New ant colonies conduct new searches for updated pheromones that include alternatives to the original pheromones and improved their methods. If the predetermined steps are happening or stalling (all the ants have chosen the same path and the answer has not changed), then the algorithm succeeds, and the current best solution is considered the best solution to the problem. e flowchart of the ant colony algorithm is summarized in Figure 2. It looks like this:

Analyze the Supply Chain
Path. e logistics characteristics of the intelligent supply chain of agricultural products include a variety of models, unfilled, multi-target, vehicle path problems, time windows, and other characteristics. VRP (VRPTW) with a time window is more suitable for the actual situation of intelligent supply chains for agricultural products [21]. e mathematical model of VRPTW is as follows: Objective function: represents its lowest cost. e actual cargo capacity of vehicle k is less than the vehicle's limit cargo capacity: (2) For each vehicle departing from the supply center: e vehicle serves and completes the delivery of the designated user: k j�1 y jk � 1, j � 1, 2, · · · , n. (4) All vehicles complete the mission and return to the starting point: e relationships between the variables are n i�0 X ijk � y jk , j � 1, 2, · · · , n; k � 1, 2, · · · , K, n j�0 X ijk � y ik , i � 1, 2, · · · , n; k � 1, 2, · · · , K.
Equation (7) is the time window that satisfies the user's requirements: Formula V represents vertex set; v 1 , v 2 , · · · , v n represent user; v 0 represents intelligent supply chain supply center for agricultural products; E represents side set; K represents the total number of cars; C ij represents the cost of transportation from user to w i represents the time that the vehicle v i stays in the user.

Ant Colony Systems
(1) Set to a new constant; a random number is generated before ant k chooses a path; and if the q 0 q 0 ∈ [0, 1)qq 0 ∈ [0, 1) node of the current k is i, then k moves from node to node, following ij the PP formula; the PP formula is as follows: * (2) Global pheromone update for the shortest route is as the following formulas: , If the global optimal path includes path(i, j),  In formula (9), p represents a pheromone evaporation parameter, pp ∈ (0, 1). In Equation (10), Δτ ij indicates that the pheromone of the current route(i,j) increases through the loop; L best indicates that the best global route is found, Δτ ij L best . (3) In addition, local pheromones are also being upgraded and improved, and ants move from node i to node j, and the route they pass, representing constants, refers to the concentration of pheromones on the initial path, adjustable. e formula is as follows: (i, j)τ 0 ξξ ∈ (0, 1),  Figure 3, starting from O, P may be preferred as the next point.
Taking a one-day agricultural product order in a certain area as the sample data, the number of users is about 2270, the number of ants in the population is 26, and the number of iterations is 360. e sample data were performed 40 times, and the time and path length of the first 20 improvements and the last 20 improvements of the experiment were averaged, respectively. e results are shown in Table 1.
Hence, from Table 1, we can see that the improved ant colony algorithm is converging at a faster rate.
(2) Improve Pheromones. In order to get a better and better solution, add a penalty function to improve pheromone updates based on (delivery time) t i .
Maximum time difference TM: where ET i is the end time and ST i is the start time ET i ST i Penalty function formula: where ST i is the starting point of the delivery time period in the intelligent supply chain center, ET i is the end point of the delivery time period in the intelligent supply chain center, and t i is the time at which the vehicle arrives at the user, v i . e purpose of the penalty function formula is to accelerate the convergence of the ant colony without affecting the optimization ability of the pheromone.
Pheromone calculation formula: Begin Initialize the pheromone amount on each edge 10 Is the end condition satisfied?
Each ant was randomly selected from a starting point

Mobile Information Systems
It indicates that the longer it exceeds the window, the smaller the cumulative value of this path, the lower the chance of choosing it.
(3) Improve the Selection Probability. e ant colony iteration is divided into three stages, and the calculation formula is distributed in different stages, the formula is as follows: P � c1, 0 < n i < n j , c2, n j < n i < n k , c1, n k < n i < n max , where n i is the current iteration position, n i and n k are the number of iterations, and n max is the maximum number of iterations. P is the probability, 0.8 << c1 1.0< < 0.4 c2. e larger the P value, the more the ants are acting on the same path, resulting in a very similar path; the optimal solution cannot be found; and the smaller the P value, the smaller the P value, indicating that the ants do not walk on one path but spread out to expand the walking range, but the disadvantage is that the convergence rate is slower.
(4) Growth Mechanism. When the ant colony algorithm is applied to the intelligent supply chain architecture of agricultural products, it will be limited by the impact of intelligent supply chain logistics of agricultural products, and the calculation formula is as follows: where D represents the total amount of agricultural goods waiting for distribution, Q is the load capacity of a single distribution vehicle in the intelligent supply chain center for agricultural products, K is the total number of theoretical distribution vehicles in the intelligent supply chain center of agricultural products. e flow of the improved ant colony algorithm is shown in Figure 4.

(5) e Improved Ant Colony Algorithm Flow and the Algorithm Flow
(1) Start: (1) Read the set of orders to be issued, and get the basic information of the associated users, such as quantity, longitude and latitude. In the ant colony algorithm, user location is equated with city. (1) Initialize the basic parameters of this iteration.
(2) Start traversing addresses until you traverse all addresses. (a) Select the next appropriate location in turn.
Selection principle: e appropriate place is one of the sets of the next location that the ant's current node can reach, and the amount of goods in that location is less than the remaining load of the ant. ere may be multiple ants that meet the criteria. e roulette algorithm is used for selection. e more pheromones, the easier it is to choose. (b) When the ant finds the next suitable place, update the relevant information of the ant, record the information of the place, increase the load of the ants, and mark the place as a place that has been visited. colony, and record the optimal ant colony and the shortest total distance.

Parallel Ant Colony Algorithm.
Each colony uses a parallel algorithm to match their best solution. After the colony obtains the optimal solution, the other ants plot the resolution information on the receiver [22]. In the queue, regularly extract information from the queue, compare them with the most feasible local solutions, analyze the saved path information, and update the local information system. When the optimal path of other colonies deviates from the current colony path, other colonies are considered "filter paths" [23], as shown in Figure 5.
As can be seen from Figure 5, the colony has gone through the class A (A-B-C-D-E route). According to the best solutions and rules of other ant colonies, all pheromones on the road section are optimized for FB and DN roads to increase the possibility of choosing other roads. en, the current information cable is updated as follows: where τ i ′ is the pheromone value of the path for the current colony, τ i is the pheromone value propagated by other ants on the road they are walking, L n is the optimal solution of the filter path of the ant colony i corresponding to the subcolony n, and L 0 indicates the optimal solution for the current ant colony. e algorithm steps are shown in Figure 6, and the algorithm steps are as follows: (1) Initialize the system and generate x independent subant colonies with the same basic information. (2) X sub-colonies operate independently in parallel, and the number of iterations of each sub-colony is n, d � 0, C � 0. e specific steps are as follows: (1) For sub-ant colonies I, the number of iterations C � C + 1, each ant in the colony in turn enters the search path on the network and updates the pheromones. Record the optimal solution of the colony and the ants with the shortest path of the optimal ant (row). (2) e number of iterations of sub-colony I satisfies the condition of dividing n by M � 0, and then the number of iterations is passed to the optimal ant information artificial intelligence (including its optimal path and attached pheromones) in other colony m-order operations. (3) Repeat steps (1)-(2) until C � n, exit the cycle, and wait for the other sub-colonies.
(3) At the same time, sub-colony I is responsible for receiving and processing the optimal colony spread by other sub-colonies, as follows: (1) Write the optimal ant AK that receives the ant colony broadcast K to the ant queue Li. (2) Take the earliest ant AK from the ant queue Li, calculate the differential path according to the calculation method, and update the pheromone matrix of sub-colony I. (4) After all sub-ant colonies complete n iterations, the global optimal ant colony is output. (5) End.
e experimental data are shown in Tables 2 and 3. e parallel ant colony algorithm is measured according to the acceleration ratio and efficiency as follows: e above equation represents the acceleration ratio formula, where T p is the parallel ant colony algorithm runtime and T 1 is the time it takes for a single machine to execute a serial algorithm.
e above equation represents the efficiency formula, where P indicates how many hosts there are and E p indicates the efficiency of running the algorithm. e acceleration of this algorithm is shown in Figure 7. e experimental results from Figure 7 show the acceleration ratio and efficiency of the parallel ant colony test algorithm. e acceleration ratio is 0.97 at a minimum and 3.25 at its largest. Obviously, if the problem data increase, the progress will also be greatly improved. When the amount of problem data is greater, the parallel ant colony algorithm can be used, which can greatly shorten the time. Using the parallel ant colony algorithm suggested in this paper for a large number of problems, setting reasonable initialization parameters will help greatly improve better acceleration efficiency.

Improved Ant Colony Algorithm Experiments.
e improved ant colony algorithm is experimental, the improved performance is tested, and the parameters a � 1,  Table 4. erefore, from the data in Table 2, it can be concluded that this algorithm is superior to several other algorithms, that is, the improvement of the ant colony algorithm is effective.

Study Design
(1) e intelligent supply chain center purchases the procurement strategy and tactics of agricultural products according to the improved ant colony algorithm to improve the competitive advantage of the market, and the details of its procurement strategy are as follows: From Table 5, it can be obtained that the procurement difficulty and IOR are low, and the supply chain tactics can be used to purchase, and as shown in Table 6, the supply chain strategy can be used to maximize profits. (2) According to Table 5, an experimental agricultural product intelligent supply chain center distributes  goods to 21 customers, known customer locations and the demand for goods; there are 4 identical transport vehicles in the agricultural product intelligent supply chain center; and the supply chain center is set up as node 1. e relationship between them is shown below.

Data Analysis and
Processing. e experiment was solved by using the improved ant colony algorithm, and the parameters a � 2.0 (a represents the degree of attention of the pheromones left on each path), b � 5.0 (representing visibility, guiding the importance of the path in the process of ant selection and optimization), and c � 0.2 (refers to the degree coefficient of pheromone volatilization), W � 100 � 200 NC MAX (the maximum number of iterations), the number of ant ants y � 15, the total number of vehicles K � 4, the number of customer nodes T � 21, and supply chain center is node 1.
e results obtained are shown in Table 7. From Table 6, it can be seen that the shortest path searched before and after the improved ant colony algorithm is basically the same, but there are differences in time. ere    Figure 7: Parallel ant colony algorithm experiment acceleration ratio trend plot. The improved To improve the former Figure 8: Compares the results before and after ten consecutive runs to improve.
is not much difference between the length obtained before and after the improved ant colony algorithm shown in Figure 8, but the optimal path obtained by searching for the improved ant colony algorithm is relatively stable to 380.94 km before the improvement.

Data
Results. e best solution according to the improved ant colony algorithm is to distribute the goods in four vehicles, with a total distance of 380.94 km (the optimal path obtained from Figure 8). Figures 9 and 10 are shown below. Figures 9 and 10 show the optimal result graph obtained after improving the pheromone exertion coefficient in the improved ant colony algorithm. at is, the optimal route for delivering goods by four vehicles available in

Conclusion
is paper is based on the research on the intelligent supply chain architecture of agricultural products based on the improvement of the ant colony algorithm, through the upgrading and improvement of the global pheromone of the ant colony system, the improvement of the path analysis and research of the largest and smallest ant colony system, and the improvement of the filtering algorithm for the selection of the path that is not the optimal path in the parallel ant colony algorithm, and finally the experiment is carried out on the entire intelligent supply chain architecture after the overall improvement of the ant colony algorithm, and the experiment starts from the procurement of agricultural products in the intelligent supply chain center (source) to screen various agricultural products in digital form. rough the use of the improved ant colony algorithm intelligent supply chain system, the cost, sales, logistics, and other aspects of the purchased agricultural products are analyzed and decided, and the optimal procurement method and optimal logistics and transportation path are obtained. It can be concluded that the improvement of the ant colony algorithm for the intelligent supply chain of agricultural products is feasible, whether it is from the procurement of agricultural products to derive the optimal procurement scheme, or in the supply chain warehouse for intelligent delivery and receipt of goods for the supply chain center to save costs; especially, in the delivery and distribution link, the optimization of the logistics path not only reduces the mileage, but also further reduces the cost, greatly improving the delivery efficiency. Although this paper has achieved some results in the study of the intelligent supply chain based on the improved ant colony algorithm, we can also combine the following aspects to conduct deeper research and application: (1) Combine with big data technology to improve the comprehensive management capability of the intelligent supply chain of agricultural products. The shortest distance The average distance  The user Intelligent supply chain center A Figure 9: Results of the distribution route optimization problem.
(2) Use the dynamic capability perspective to make full use of the resources embodied in the structure of the intelligent supply chain of agricultural products and integrate and upgrade the intelligent supply chain architecture of agricultural products.

Data Availability
e experimental data used to support the findings of this study are available from the corresponding author upon request.

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