Abstract

With the rapid development of China itself, the supply chain system has become an effective tool to enhance economic competitiveness, and the intelligent supply chain system integrates innovative technologies such as the Internet, the Internet of Things, cloud computing, and big data into the industrial supply chain management. The ant colony algorithm shows super flexibility 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. The improvements of the algorithm mainly 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 verification; the results can be obtained by verifying the results of the experiment closer to the optimal solution, and the efficiency of the algorithm is significantly improved. Therefore, 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.

1. 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. The ant colony algorithm is a new simulated evolutionary algorithm, which is an important algorithm for swarm intelligence in the field 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 effectively avoid optimization in local areas. The 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]. The origin of this concept is related to nature, mainly through the observation of insects in nature, such as ants, bees, etc. [3]. The 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. The 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]. There 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]. They 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. That 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]. Therefore, 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.

2. Awareness of the Content of the Study

2.1. 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]. They can quickly find the closest passage to food in complex environments. The 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. The 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]. The 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.

2.2. Theoretical 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.

The 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]. The 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. Then, the so-called intelligent supply chain is to use the Internet, the Internet of Things, 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]. The 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.

The 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. The decision-making layer makes the final decision based on the information received, as shown in Figure 1.

2.2.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.

2.2.2. Management

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

2.2.3. Application layer

The 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.

3. Optimization and Design of Supply Chain Paths

3.1. 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. This 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. The flowchart of the ant colony algorithm is summarized in Figure 2. It looks like this:

3.2. Analyze the Supply Chain Path

The 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]. The mathematical model of VRPTW is as follows:

Objective function:

represents its lowest cost.

The actual cargo capacity of vehicle k is less than the vehicle’s limit cargo capacity:

For each vehicle departing from the supply center:

The vehicle serves and completes the delivery of the designated user:

All vehicles complete the mission and return to the starting point:

The relationships between the variables are

Equation (7) is the time window that satisfies the user’s requirements:Formula V represents vertex set; represent user; represents intelligent supply chain supply center for agricultural products;E represents side set;K represents the total number of cars; represents the cost of transportation from user to user, ;------------------;q represents the weight of what the vehicle can hold; represents the user’s time window, ; represents the starting point of the delivery time of individual users; represents the end of the delivery period for individual users; represents the time when the vehicle arrives at the user; represents the time that the vehicle stays in the user.

3.3. Improve the Ant Colony Algorithm
3.3.1. Ant Colony Systems

(1)Set to a new constant; a random number is generated before ant k chooses a path; and if the node of the current k is i, then k moves from node to node, following the PP formula; the PP formula is as follows:∗(2)Global pheromone update for the shortest route is as the following formulas:In formula (9), p represents a pheromone evaporation parameter, . In Equation (10), indicates that the pheromone of the current route(i,j) increases through the loop; indicates that the best global route is found, .(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. The formula is as follows: ,

3.3.2. Maximum and Minimum Ant Colony System

(1) Improvements to the Search Path of Individual Ants. Set O, P, Q, W, and N as the user address because the, is . O, P, Q, and W and N are the radius formed by the user’s address. O is the starting point, and then, the selectable end points are P, N, and W, and Q cannot be used as the end point. Then, the probability of choosing O point to P, W, N, and other points is inversely proportional to the distance, and the closer the distance, the easier it is to choose the next one, as shown in 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. The 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. The 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) .

Maximum time difference TM:where is the end time and is the start time

Penalty function formula:where is the starting point of the delivery time period in the intelligent supply chain center, is the end point of the delivery time period in the intelligent supply chain center, and is the time at which the vehicle arrives at the user, .

The 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:

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. The ant colony iteration is divided into three stages, and the calculation formula is distributed in different stages, the formula is as follows:where is the current iteration position, and are the number of iterations, and is the maximum number of iterations. is the probability, 0.8 << 1.0< < 0.4 . The larger the 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 value, the smaller the 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. The flow of the improved ant colony algorithm is shown in Figure 4.

(5) The 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.(2)Initializes the taboo access table (list of allowed nodes and list of accessed nodes).(3)Calculate the ideal number of delivery vehicles (ant number).(4)Calculate the maximum number of vehicles allowed.(5)Set the global optimal vehicle load ratio, the global optimal single load ratio, and the default single load ratio.(2)Loop iterations until the maximum number of iterations is reached:(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: The 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. There may be multiple ants that meet the criteria. The roulette algorithm is used for selection. The 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.(c) If no ants find the next place to visit in consecutive P times, add an ant and traverse the remaining m times where there is no visit.(3)Iterate through all user locations and all ants reach their distribution destinations.(4)Calculate objective function value:(a) The total stroke of all ants is locally optimal.(b) Calculate the total stroke of all ants.(c) Determine whether it is the global optimal ant colony, and record the optimal ant colony and the shortest total distance.

3.3.3. 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. Then, the current information cable is updated as follows:where is the pheromone value of the path for the current colony, is the pheromone value propagated by other ants on the road they are walking, is the optimal solution of the filter path of the ant colony i corresponding to the sub-colony n, and indicates the optimal solution for the current ant colony.

The algorithm steps are shown in Figure 6, and the algorithm steps are as follows:(1)Initialize the system and generate x independent sub-ant 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. The 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)The 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.(3)Repeat (1)-(2), repeatedly executed.(4)After all sub-ant colonies complete n iterations, the global optimal ant colony is output.(5)End.

3.3.4. Parallel Ant Colony Algorithm Experiment

The parallel ant colony algorithm was experimented with to test its performance, and the data set was selected TSPLIB [24]. Set parameters: a = 1, b = 2, c = 0.95, G = 3, 4, 5, 6, 7, and M = 250. The experimental data are shown in Tables 2 and 3.

The parallel ant colony algorithm is measured according to the acceleration ratio and efficiency as follows:

The above equation represents the acceleration ratio formula, where is the parallel ant colony algorithm runtime and is the time it takes for a single machine to execute a serial algorithm.

The above equation represents the efficiency formula, where indicates how many hosts there are and indicates the efficiency of running the algorithm.

The acceleration of this algorithm is shown in Figure 7.

The experimental results from Figure 7 show the acceleration ratio and efficiency of the parallel ant colony test algorithm. The 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.

3.3.5. Improved Ant Colony Algorithm Experiments

The improved ant colony algorithm is experimental, the improved performance is tested, and the parameters a = 1, b = 2, and c = 0.95 are set, and the probability of each segment is C1 = 0.8 and C2 = 0.2, and the number of iterations is 250. The test sets are W20, M48, N30, and H225. The experimental results of the improved ant colony algorithm are shown in Table 4.

Therefore, 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.

4. Case Studies

4.1. Study Design

(1)The 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. The relationship between them is shown below.

4.2. Data Analysis and Processing

The 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 (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. The 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. There 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.

4.3. Data Results

The 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. That is, the optimal route for delivering goods by four vehicles available in Figures 9 and 10 is A-K-I-G-D-E-L-N-A, A-M-P-S-U-Q-A, A-O-Q-T-V-A, and A-H-F-C-B-J-A.

5. Conclusion

This 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. Through 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.(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

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

Conflicts of Interest

The authors declare that they have no conflicts of interest regarding this work.

Acknowledgments

This study was supported by the Cranberries Education Department of Hebei Province Research on Financing Efficiency and Countermeasures of Capital Market Supporting Technological Innovation Enterprises (SD2022096).