A Multi-Objective Permanent Basic Farmland Delineation Model Based on Hybrid Particle Swarm Optimization

: The delimitation of permanent basic farmland is essentially a multi-objective optimization problem. The traditional demarcation methods cannot simultaneously take into account the requirements of cultivated land quality and the spatial layout of permanent basic farmland, and it cannot balance the relationship between agriculture and urban development. This paper proposed a multi-objective permanent basic farmland delimitation model based on an immune particle swarm optimization algorithm. The general rules for delineating the permanent basic farmland were defined in the model, and the delineation goals and constraints have been formally expressed. The model introduced the immune system concepts to complement the existing theory. This paper describes the coding and initialization methods for the algorithm, particle position and speed update mechanism, and fitness function design. We selected Xun County, Henan Province, as the research area and set up control experiments that aligned with the different targets and compared the performance of the three models of particle swarm optimization (PSO), artificial immune algorithm (AIA), and the improved AIA-PSO in solving multi-objective problems. The experiments proved the feasibility of the model. It avoided the adverse effects of subjective factors and promoted the scientific rationality of the results of permanent basic farmland delineation.


Introduction
Over the past 60 years, the world has been undergoing rapid urbanization. Since the 1960s, the more rapid the economic development and the accelerated urbanization process in a region was, the more serious the decline in cultivated land was in the region [1][2][3][4][5]. In particular, some developing countries are facing the problems of population growth, increasing food demand, and limited agricultural production [6]. As a developing country with accelerating urbanization and industrialization in recent years, China has experienced rapid expansion in the urban construction area, and the loss in cultivated land area has also increased year by year. Today, China's basic national conditions are a large population, low per capita cultivated land resources, and insufficient resource reserves of cultivated land. To ensure food security and promote the development of modern agriculture, China has always attached great importance to the protection of farmland and began planning for basic farmland needs long ago. According to the requirements of the overall plan for national land area and the needs of the population, economy, and society, a certain percentage of the high-quality farmland on cultivated lands is zoned as a basic farmland protection area. For nearly 40 years, the issue of arable land protection has always been of paramount importance. The new land management law further upgrades basic farmland to permanent basic farmland [7]. Compared with basic farmland, permanent basic farmland has a more prominent status, stricter protections, a more stable spatial pattern, and a more important position and role in stabilizing food production. The new law will ensure that by 2020, China's basic farmland protection will take shape in a relatively complete, powerful, effective, and orderly manner to protect food security in China [8].
Currently, to solve the problem of cultivated land loss, countries around the world have conducted related research. Mazzocchi et al. [9] used sensitivity index of agricultural land (SIAL) to understand the relationship between urban planning and agricultural land and analyzed the potential risks of shifting from cultivated land to construction land. Through case studies, the tool showed that external factors unrelated to agricultural activities were the main drivers of this shift. Terres et al. [10] studied and evaluated the main drivers of farmland abandonment in the 27 member states of the European Union. Through analysis, these drivers mainly included lower farm stability and viability, smaller farm size, and a negative regional context. In South Korea, the United States, India, and China, some scholars [11][12][13][14][15][16] have confirmed through research that rapid urbanization has accelerated the transformation of agricultural land to non-agricultural land, increasing the loss of arable land.
With regard to the delineation of permanent basic farmland, scholars from various countries have carried out many studies and simultaneously deepened their understanding of basic farmland. In general, the delimitation process should take into account the status of land use and the existing land constraints. In addition, attempts should be made to allocate permanent basic farmland protection to land with complete infrastructure and good natural resource conditions. Cultivated land that is spatially concentrated and not easily occupied by urban or industrial development can maximize the comprehensive benefits of arable land protection. Therefore, this can be regarded as a multi-objective spatial optimization problem. Based on the existing research, the methods of delimiting permanent basic farmland can be divided into three categories. In the first category, permanent basic farmland is demarcated mainly through the allocation of administrative indicators, which only need to meet the quota quantity requirements. Although some simple guidelines are given in the legislation, allocations are usually made in a more casual manner due to the lack of quantitative standards and a scientifically effective framework [17]. The second category introduces scientific evaluation systems and model analysis methods. Yang et al. [18] selected indicators from site conditions, transportation locations, agricultural production, and spatial morphology, constructed a comprehensive multifactor evaluation system, and delineated permanent basic farmland based on the principle of optimal comprehensive score. Liu et al. [19] used an analytic hierarchy process (AHP) network combined with local spatial autocorrelation analysis of basic farmland to determine the index weights. Zhang et al. [20] combined the spatial analysis functions of ArcGIS and the improved land evaluation and site assessment (LESA) method. Cheng et al. [21] used mathematical morphological image processing and GIS analysis technology to establish an evaluation index system and develop an analysis model for spatial patterns of farmland morphology. Most of the comprehensive considerations have been based on the natural conditions [20,22], economic benefits [23], and utilization levels [20,24] of cultivated land. The above methods have improved the rigor and scientificity of the delineation of permanent basic farmland to some extent. However, the selection of most indicators and the weighting of indicators still have a certain degree of subjectivity, and their dependence on the indicator system is too strong to solve a multi-objective optimization problem. The third method uses artificial intelligence algorithms that have emerged in recent years. Liu et al. [25] combined remote sensing, GIS, and artificial immune systems (AIS) and made some modifications to traditional artificial intelligence algorithms to divide farmland protection areas under spatial constraints. Zeng et al. [26] established a decision model system through the technique for order preference by similarity to an ideal solution (TOPSIS) method and constraint factors and classified farmland according to the proximity of the cultivated land to the ideal solution. Ma et al. [27] searched for protected areas through a seed expansion algorithm and used human neural networks to predict the protection pressure of basic farmland. These attempts provided new directions for the delineation of permanent basic farmland.
In recent years, artificial intelligence algorithms have had great advantages in solving multiobjective spatial planning problems and have been successfully applied in problems such as land resource allocation [28][29][30][31][32][33], spatial pattern optimization [34][35][36][37][38][39][40], space selection [41][42][43], and land use zoning [44][45][46][47]. Among the artificial intelligence algorithms, particle swarm optimization (PSO) is a swarm intelligence algorithm that is inspired by bird foraging activities. As an evolutionary algorithm, PSO has the advantages of better ability to solve complex problems, higher convergence speed, and lower problem dimension. It is very suitable for high-dimensional spatial optimization problems, has a fast convergence speed, and can solve multi-objective optimization problems in multiple fields. However, the particle swarm algorithm has the disadvantages of premature convergence and the possibility of sinking into the local optima of a basic PSO algorithm when solving the spatial optimization problem [48]. The artificial immune algorithm (AIA) simulates the biological immune process and can ensure the diversity of individuals, help improve the global convergence ability of the particle swarm algorithm, and prevent particles from falling into the local optimal solution. Therefore, an improved particle swarm optimization algorithm is proposed to solve the multiobjective optimization problem of permanent basic farmland delimitation. Xun county, a major grain production base in Henan province, was chosen as the study area for this study. Section 2 introduces the study area and data acquisition and processing. Section 3 describes the methodology of a multiobjective optimization model of permanent basic farmland delimitation based on the hybrid PSO algorithm. It defines the general rules and objective function of permanent basic farmland delineation, as well as the formal representation of the constraints, and discusses the improvement of the PSO algorithm when combined with the artificial immune algorithm. In Section 4, we describe the controlled trials that emphasized different subobjectives and compare the performances of the three models (PSO, AIA, and improved AIA-PSO) in solving the problem of permanent basic farmland delineation. Finally, Section 5 concludes the paper.

Overview of The Study Area
To verify the feasibility of the model, we selected Xun County as the research area. The study area (35°26'00" ~ 35°50′42″N, 114°14′52″ ~ 114°45′12″E) is located in northern Henan Province and eastern Hebi city and has an area of 954.98 km 2 ( Figure 1). The geographical location of Xun County is shown in Figure 1. The county has 9 townships, 476 villages, and 78,711.18 hectares of agricultural land, of which 70,994.60 hectares are arable land. The county's overall topography is relatively flatmost of the areas are plains, and there are some hills and valleys in the west. Xun County has a provincial-level modern agricultural industrial park with an annual grain output of more than 1 million tons. It has been said since ancient times that "Li Yang harvest can take care of everyone".

Data Processing
The purpose of delimiting the permanent basic farmland is to select arable land with high soil quality to facilitate farming and ensure that the area is protected and not easily occupied by urban expansion. The main influencing factors include infrastructure conditions, field conditions, soil fertility, and location conditions. This study needed data that included arable land quality, land use conditions, topography, climate, water conservancy and transportation conditions, etc., as shown in Table 1. To ensure the consistency of the data, the coordinate system of each layer in the study area was projected into CGCS2000_3_Degree_GK_Zone_38 using ArcGIS 10.2. The vector data were converted into raster data, and the corresponding values of the different influencing factors of the same raster cell were obtained. To ensure that the grid unit size was moderate, 100 × 100 was used as the minimum grid unit. The total number of grid units in the study area was 98,360, of which the number of cultivated land units was 73,122. Then, the raster cells were encoded to add fields to store the corresponding data and allow for numerical mapping. The spatial data of the main impact factors are shown in Figure 2.

Objective Functions
Permanent basic farmland delineation was based on the local natural endowment and was combined with the area constraints, farming environment, and site conditions to optimize the selection of cultivated land units. To achieve the final delineation of the permanent basic farmland protection area, which can achieve the objectives of having better arable land quality and complete infrastructure, being centralized and continuous, and not being easily occupied, this study set the target system for the permanent basic farmland delineation model as the following three subobjectives: the land suitability objective, land continuity objective, and land stability objective.
Land suitability objective: The quality of cultivated land is a combination of factors such as natural conditions, economic factors, and water conservancy facilities of cultivated land, and is one of the important reference standards for the delineation of permanent basic farmland.
This article refers to the requirements in the " Regulation for Gradation on Agriculture Land Quality (GB/T 28407-2012)" a and "Cultivated Land Quality in Henan Province in the Annual Update Evaluation Work Training Materials", which is provided by the Department of Natural Resources of Henan Province, and according to the " Cultivated Land Quality Analysis Report of Xun County in 2018", which is provided by the Natural Resources Bureau of Xun County. Henan Province's cultivated land use index was divided into 19 grades, with Grade 1 being the highest grade. The corresponding land use of Xun County was 5, 6, 7, and 8. For the convenience of calculation, the cultivated land use equalization was mapped to the range of [0,1] to obtain , as shown in Table  2. Based on this value and the decision variable of the selected grid cell, the overall suitability could be calculated. Since this model used grid spatial data, there were two possibilities for the decision state of each land grid unit. = 1 indicated that the grid cell was selected. If the cell was not selected, = 0. Therefore, it was only necessary to calculate the unit in which the decision variable was 1. The use of to represent the objective of land suitability can be described as Formula (1).
In the formula, is the total number of grid rows, is the total number of grid columns, and and are the values of the row and column. The purpose of the land suitability objective is to maximize the value of as much as possible. The cultivated land units with better conditions in various aspects in the study area were classified into basic farmland protection areas.
Land continuity objective: Spatial continuity refers to the proximity of the spatial locations of the different farmland units selected for basic farmland within the same area. Scattered basic farmland affects the farmland's efficiency in cultivation, fertilization, and transportation, increases labor costs, and is detrimental to food production. In addition, contiguous lands require less infrastructure and other services to facilitate management. To avoid fragmentation of the overall pattern of basic farmland, this study calculated the degree of continuous land use of the basic farmland with Formula (2). In the formula, is the sum of the perimeter of the delineated permanent basic farmland. When the defined area is circular, the permanent basic farmland is the most concentrated, and the minimum perimeter can be calculated. Conversely, if the selected units are far apart, the perimeter is the largest, and this value is .
can indicate the degree of concentration of land in the study area. The larger the difference between and is, the smaller the perimeter sum of the permanent basic farmland, and the larger the is, the higher the continuity of the selected basic farmland.
Land stability objective: Land stability can be understood as the possibility that land will not be occupied or misappropriated within a certain period of time. In recent years, a large number of people and resources have flowed into cities and towns, which has led to the rapid expansion of cities and towns into the surrounding areas, that has a negative impact on the stability of surrounding farmland. The cultivated land near the town center and the main transportation roads are subject to more occupation pressure due to low development costs and convenient transportation. However, the protection of cultivated land should not restrict the development of the local economy. In the delineation process, this was used as a negative factor to improve the stability of permanent basic farmland.
As in Formula (3), the land development potential of each unit in the grid depended on the Euclidean distance between the grid unit and the nearest road, railway, highway, and town center, which are expressed in the formula as , , , and , respectively. The corresponding weights , , , and respectively, satisfy + + + = 1 and normalize to , which is convenient for subsequent calculations, such as in Formula (4). The study assigned 0.3, 0.1, 0.1, and 0.5 to , , , and respectively, according to the road levels, impacts, and occupation possibilities [49].
where the maximum and minimum values that can reach are and , respectively. The larger the values of , , , and are in Formula (4), the farther the unit is from nearby towns and transportation centers, and the larger the corresponding value of , which indicates that the land unit is more stable and more suitable for being classified as permanent basic farmland. The sum of the product of and the decision variable can represent the land stability , as shown in Formula (5): In summary, it is clear that the delineation of the permanent basic farmland is a multi-objective optimization problem. For the above three subobjectives, the model chooses a linear weighting method to process the objective function ( ) , as shown in Formula (6). Max{} refers to the maximum value of the linear weighting function in parentheses.

Constraints on the total area of selected cultivated land
The target of the permanent basic farmland protection provided to Xun County by the general utilization plan for land and space in Hebei city was 60,246.67 hectares, with a protection rate of 84.86%.
indicates the total farmland area selected in Xun County, which must satisfy Formula (7), where is the area of each land unit.
2. Land use constraints Due to the historical rules of land use conversion, it is difficult to convert urban construction land into agricultural land, and it cannot be used as an alternative permanent basic farmland. For this model, the spatial units of urban construction land were eliminated in advance and were not involved in the model calculation.

Constraints on topographical conditions
According to the "notice on strengthening and improving the protection of permanent basic farmland" of the Ministry of Natural Resources, when the slope of the cultivated land is ≥ 25°, the slope is too steep, which greatly limits the use of such cultivated land. It is necessary to gradually return steeply sloped farmland to forest and grass. For this type of land, the model marks it as = 0.9, with the average slope value of the unit represented by , as shown in Formula (8):

Urban boundary constraints
Prioritizing eligible cultivated land at the borders of cities and towns into permanent basic farmland can help cities rationalize their spatial layout, promote urbanization in an orderly manner, and save land resources while also allowing full utilization of the basic farmland's multiple functions of protecting natural ecology, optimizing spatial structure, reducing urban pollution, and beautifying the urban environment. We used to represent the distance from the land unit to the nearest road and to represent the distance between the unit and the nearest town center. In the calculation of and for each land unit and weighting of the sum, as in Formula (9), the smaller the value was, the greater the probability that the corresponding land unit would be classified as permanent basic farmland. According to the possibilities and impacts of construction land expansion, we assigned 0.3 and 0.7 to and , respectively [49].

Particle Encoding and Initialization
Each particle in the PSO is considered a candidate solution for the permanent basic farmland delineation problem. The particle guides its own position and speed continuously according to the best position of the individual particle it passes through and the global best position experienced by the entire group. To facilitate the determination and updated location of the particle's subsequent decision variables, binary coding and real number coding were used, respectively.
There were only two possible values for each candidate unit in the raster data. Binary coding was used to mark whether the grid cell was selected as permanent basic farmland. As shown in Figure  3. If the cell was not involved in the calculation, it was marked as "null" (represented by N in the figure 3). For the positions and velocities of the particles, the encoding method of the particles is shown in Figure 3(b). In addition, this model defines a particle structure, which contains not only information about the delineation scheme but also information about the particle fitness, the particle's current position, the individual best position, and the global best position, as shown in Figure 3(c).
(a) Before coding (b) After encoding Global best location Personal best location When the particles were initialized, if particles were generated completely randomly, some restricted land units could be selected into permanent basic farmland. Therefore, during the initialization process, it was necessary to consider the limitation of the introduced constraint conditions and use a random mode with a constraint to initialize the particles.
In Section 3.2, when the unit slope was greater than 25°, we used Code = 0.9 to mark the restricted land unit. When the particle starts to initialize, the value of the decision variable is determined according to Code . First, the randint() random function was used to generate , which is a random number between 0 and 1. If = 1, a random was generated again in the same way. If > , = 1 , otherwise, = 0 . If = 0 , then = 0 . With this method of generating random numbers, the probability of > was very small, and the probability that the unit was selected into permanent basic farmland will be reduced accordingly.

Particle Position and Velocity Update
During the search process, particles continuously update their speed and position according to the individual optimal solution and the global optimal solution. ( ) represents the speed of the particle at the t-th iteration, and ( ) represents the position of the particle at the t-th iteration. The updated formula is expressed in Formula (10). In the formula, ω( ) is the dynamic inertia weight, and are the acceleration constants, that is, the individual learning factors and social learning factors of the particles, and are the independent random numbers between [0,1], and ( ) and ( ) are the individual optimal solutions and global optimal solution of the particles.
where ω is the set maximum weight value of ω( ), ω is the set minimum weight value, is the maximum number of iterations, is the current number of iterations, and they jointly determine ω (t). In general, ω( ) changes linearly and gradually. In this way, the global search ability of the algorithm was strengthened in the early stages of the iteration, and the local search ability was more focused in the later stages. As the number of iterations increases, ω( ) gradually decreases, and the impact of the speed of the previous iteration on the current speed is smaller.
Due to the different coding methods of the model for the particle position and decision variables, the updated particle cannot be guaranteed to be 0 or 1, so it was necessary to improve the position update mechanism. Therefore, the fuzzy function ( ) was introduced. Since the value of is 0 or 1 is determined by the speed, the fuzzy function ( ) as expressed as shown in Formula (11), and the position update formula was changed to Formula (12): where is a random number between 0 and 1. According to the above formula, the value range of ( + 1) is controlled to {0,1}. In the binary algorithm, can be regarded as the probability. If the value of the probability is 1, the value of the probability of 1 − is 0. The probability change of the particles can be expressed as Formula (13): For any particle in the model, was set as the maximum speed to prevent particles from flying out of the search area, which was also in the allowable probability range of the binary representation algorithm. By calculation, when > 10, ( ) < 4.53 × 10 , then the position update of the algorithm was meaningless. Through the calculation of ( ), to ensure that the position of the particles can be changed, is set to 6, at this time, 0.0025 < < 0.9975.

Improvement of PSO with the Artificial Immune Algorithm
Particles are randomly assigned initial positions and initial velocities during the initialization process and continuously update their individual optimal positions and global optimal positions during the search process. This leads to the particles tending to be identical, which reduces the diversity, and they fall into a local optimal solution. The artificial immune algorithm is an intelligent search algorithm inspired by the biological immune system [50]. Its biggest feature is that it has a strong global search ability and can maintain the diversity of antibodies, introducing immune system concepts into particle swarm optimization and using its diverse generation and maintenance mechanism of the immune system to overcome the premature convergence problem of particle swarm optimization. In the course of immunization, the selection of effective antibodies depends on the affinity between the antibody and the antigen. Through the "survival of the fittest" mechanism, antibodies with high affinity in the cloned population participate in reproduction and mutation, while the antibodies with low affinity are inhibited and gradually discarded with each iteration. Based on this immune principle, probability was used to represent the selection probability of the i-th particle, and the formula is as follows: where N is the number of particles generated by the particle swarm algorithm, and N is the number of new randomly generated particles.
To ensure the diversity of particles and the generation of new antibodies, the model performed immune cross-operation on the two antibodies and combines the best retention strategies to obtain better antibodies. As shown in Figure 4, two parent antibodies are selected in the particle population: particle A (P (A) in Figure 4) and particle B (P (B) in Figure 4). Since it is a replacement operation of a certain area between two particles, the same area is randomly selected in the two particles, and cross-replacement is performed to obtain new particles, P′(A) and P′(B). The fitness values of the parent antibody and the child antibody are calculated separately. If the fitness value of the hybridized child antibody is greater than the corresponding parent antibody, the corresponding parent antibody is replaced with the child antibody. Otherwise, it is not updated.  The particle updating in the particle swarm algorithm depends on the individual optimal solution to a large extent and the global optimal solution experienced by the particle, but the accuracy of this one-way search is not ideal. To cause the particles to more comprehensively search for optimal solutions, we chose to improve the particle speed updating formula according to the individual optimal solution of the first N particles with the best fitness value in the population, such as Formula (15), which effectively improved the accuracy of the algorithm search.

Fitness Function Design
PSO uses the fitness function to judge whether a particle is good or bad. A higher fitness value indicates that the particle is closer to the optimal solution. Under the various constraints, to solve the multi-objective optimization problem of permanent basic farmland delimitation, not only do the three functions for the subobjectives of land suitability, land continuity, and land stability need to be combined, but also the constraints, such as the size of the protected area and the boundaries of cities and towns, must be considered. Therefore, this model uses the most commonly used external penalty functions to deal with the constraints of permanent basic farmland delineation, which is transformed into a part of the objective function, which becomes an unconstrained optimization problem. The external penalty function is expressed in Formula (16): In Formula (16), and are positive penalty coefficients, and ( ) and ( ) are functions of the inequality constraint ( ) and the equality constraint ℎ ( ), respectively. Generally, and in the formula take values of 1 or 2.

Flow of AIA-PSO Model
Based on the above ideas and the construction of the permanent basic farmland objective function and the constraint condition system combined with the introduction of artificial immune concepts, and the particle swarm algorithm to improve the particle speed and location update strategy when solving the permanent basic farmland demarcation problem, the overall flowchart is shown in Figure 5.

Setting PSO Model Parameters
The parameters of the permanent basic farmland delineation model based on the particle swarm algorithm mainly included particle size , maximum iterations , inertial weight , acceleration constants and , random numbers and , and maximum particle velocity . Among these, the inertia weight depended on its maximum value ω , minimum value ω , and maximum number of iterations, . We referred to the typical parameter values of PSO proposed by Carlisle and Dozier [51] to set the main parameters of this model. The specific settings are shown in Table 3. To eliminate land that was not suitable for basic farmland in advance and improve the calculation efficiency of the model, we reclassified the grid cells into six categories: cultivated land, other agricultural land, unused land, urban and rural construction land, transportation land, and water areas. During the model initialization process, the construction land and land units that did not meet the basic site conditions were preprocessed. These land units were not considered during the model operation.

Comparison of the Different Schemes
This model needs to be comprehensively considered from three aspects of land suitability, continuity, and stability. The weight coefficients corresponding to the subobjective functions were set in advance. To explore the difference in the impact of different weighting schemes on the delineation results of the permanent basic farmland protection areas, this paper set up three sets of optimization schemes based on three subobjective functions: quality assurance schemes (weight ratio of 8:1:1), spatial optimization schemes (weight ratio of 1:8:1), layout stability schemes (weight ratio of 1:1:8), as well as multiple sets of control experiments. 1. Comparative analysis with quality assurance schemes Because the quality assurance comparison plan focused on optimizing the quality of cultivated land, scheme A sets the target weight of land suitability to 0.8, and the other two target functions had a weight of 0.1. Since permanent basic farmland should be high-quality agricultural land, and therefore the suitability of the weight cannot be 0, scheme D was set to only consider the suitability of land in extreme cases, and its weight was set to 1.00. In schemes E and F, the land continuity target and the land stability target were given higher weight values. In comparison with scheme A, the ratio of schemes E and F was set to 2:1:1. Scheme H balanced the three goals and assigned weight factors with a ratio of approximately 1:1:1. The above weight distribution schemes are shown in Table 4, and the experimental results of the objective function values of each subfunction are shown in Table 5. It can be seen from scheme D that when only the land suitability target was considered, reached a maximum value of 39,353.9, but the land continuity and land stability index were low. In a comparison of scheme A with schemes D, E, and H, as the continuity and stability weights increased, their corresponding function values increased by up to 14.88% and 7.06%, respectively. At the same time, the suitability values decreased by up to 11.09%, and the average level decreased from 6.17 to 6.52. The land suitability goals drive particles to choose land units with higher grades, but these land units were not necessarily continuous. However, some cultivated lands with higher grades were closer to urban roads, so as the weight ratio changed, the suitability index gradually decreased, and continuity and stability improved accordingly.

Comparative analysis of the spatial optimization schemes
In the spatial optimization comparison schemes, the focus was on the degree of continuity of the cultivated land, so scheme B set the weight of land continuity to 0.8, and the other two objective function weights to 0.1. In scheme F, based on the emphasis on continuity, the weights of land suitability and land stability were increased to analyze the impact of the change in weight on the continuity index. The above weighting scheme is shown in Table 6, and the running result of each subobjective function is shown in Table 7. Scheme B was the spatial optimization scheme set in this study, and the land continuity index reached 0.9646. In a comparison of scheme B with schemes F and H, as the suitability and stability weights increased, the corresponding objective function values increased by up to 3.43% and 6.31% respectively, and the continuity of the land decreased by up to 5.64%. The continuous objective guides particles towards the area with concentrated space, but it inevitably falls into land with poor cultivated land quality or adjacent urban area activity, which leads to a decrease in the land suitability objective and cultivated land stability. A typical area in the study area was selected for observation and analysis, as shown in Figure 6. As the weight of the continuous target gradually increased, this area also produced a more obvious concentrated continuous effect.

Comparative analysis of the layout stability schemes
The layout stability comparison scheme mainly analyzed whether the cultivated land in the permanent basic farmland protection area could remain stable for a long time without being occupied. Therefore, in scheme C, the land stability parameter was set to 0.8, and the remaining two objective function weights were also set to 0.1. Schemes G and H were compared with scheme C to analyze the impacts of changes in the land suitability and continuity weights on the stability. On the basis of emphasizing the stability coefficient, the weights of the first two were increased to analyze their impact. The weighting schemes are shown in Table 8, and the running results of the objective values of each subobjective function are shown in Table 9. Scheme C was the best layout stability scheme set in this article, and the stability index reached 49,230.57 for the study period. Comparing scheme C with schemes G and H, as the weights of suitability and continuity increase, their corresponding values increase by 4.71% and 10.02% respectively, and the stability decreased by up to 9%. The stability objective guides particles away from the areas with developed transportation and densely populated cities and towns, thereby avoiding the possibility of occupation of cultivated land, but these areas may conflict with the other two objectives. Increasing the stability weight moves particles far away from towns and roads, but this contradicts the town boundary constraints, and the two restrict each other.
Two groups of typical areas were selected in the study area: the periphery of the town and the periphery of the main traffic road. Among these, the areas marked in pink are urban areas, and the areas marked in dark gray are road areas (shown in Figure 7). From the results of scheme D (with a stability weight of 0), scheme H (with a stability weight of 0.33), scheme G (with a stability weight of 0.5), and scheme C (with a stability weight of 0.8), it can be seen that when the stability weight values are small, the movement of the particle is more dependent on the quality of the land. At the same time, due to the limitation of urban boundaries, the selected farmland mostly gathered around cities and roads. As the weight of stability gradually increases, the selected area gradually moves away from the towns and roads, which has the effect of moving away from urban traffic and reducing the possibility of encroachment. In summary, the difference in objective function values produced by the different weight combinations were more obvious. The experiment reflected that the three subobjective functions of the model were mutually restricted. Decision makers can weigh the allocation coefficients according to the need to obtain a suitable result for a specific decision.

Analysis of the Impact of Improvement on the Model
To analyze the impact of the introduction of immune system concepts on the model and to compare the efficiency of particle swarm optimization (PSO), artificial immune algorithm (AIA), and immune particle swarm optimization (AIA-PSO) in solving multi-objective optimization problems, this study conducted experiments from the aspects of model convergence ability, optimization ability, and stabilization ability.

Convergence ability of the model
To compare the efficiency of the three models in solving the problem of permanent basic farmland delineation, the experimental results were compared by using multiple test values. Since scheme H was a balanced solution of three subobjective functions, we used this scheme for the experiments. At the same time, considering that the results had a certain randomness, the three models were run 100 times each, and the average number of iterations and the average convergence times were calculated, as shown in Table 10, and the corresponding convergence curve was plotted as shown in Figure 8.  As seen from the graph and table, the AIA-PSO model required the lowest number of iterations, but the calculation took longer. In terms of the convergence speed, AIA required the most iterations, while AIA-PSO had the lowest number of iterations on average. This showed that PSO had a faster optimization speed compared to the AIA. The introduction of immune system concepts further improved the optimization speed of the AIA-PSO model. From the perspective of running time, the running time required by AIA-PSO was much longer than those of the other two models. This was because it increased the immune process of the AIA during the running process and improved the particle positioning and speed update mechanism, which greatly increased the complexity of the calculation, thereby consuming more time. In general, compared with PSO and AIA, AIA-PSO had a higher convergence efficiency and faster optimization speed, so the loss of time was acceptable.

Optimization ability of the model
To compare the optimization capabilities of the three models for the three subobjectives when solving the multi-objective optimization problem, the following experiments were performed in this study: scheme H was still used, and three models were used to solve the three subobjective functions 100 times, and the optimal value results were recorded and averaged, as shown in Table 11. It can be seen through comparison of the average values in the table that for the three subobjective functions, the optimization ability of the AIA was better than that of PSO, and the AIA-PSO model had also improved to a certain extent after the introduction of immune system concepts . Especially under the two subobjectives of stability and stability, the optimization ability of AIA-PSO exceeded the PSO and AIA models, and the solving ability was significantly improved. Compared with the PSO model, the average objective function values calculated by AIA-PSO increased by 3.36%, 5.04%, and 4.68%, respectively.

Stability of the model
To analyze the stability of the three models, we still chose scheme H, ran the three models 100 times each, calculated the optimal solution of the three subobjective functions under the three models, and plotted the result curve, as shown in Figure 9. The mean and standard deviation were then calculated, as shown in Table 12.  According to the above calculation results, compared with the average value, the three subobjective function values of the AIA-PSO model were higher than those of the PSO, which indicates that the addition of immune system concepts strengthens the global search ability of the original algorithm, and the optimization ability was better. However, it can be seen from the standard deviations that those of the AIA and AIA-PSO were higher than that of PSO, indicating that the two models were more volatile and that the algorithm was less stable than PSO. From the result curve drawn in Figure 9, we can see more clearly that the stabilization ability of the AIA-PSO model was less effective at solving basic farmland delineation problems than PSO but was more effective than the AIA. The addition of immune operations improved the problem of the PSO falling into a local optimal solution but reduced the stability of the model. Although AIA's optimization ability was higher than that of PSO, the stability of the model is also an important indicator that cannot be ignored when solving multi-objective problems. The AIA-PSO model combined the stability of the PSO and the global search ability of the AIA and can obtain more satisfactory calculation results.

Analysis of the Pattern of Permanent Basic Farmland in Xun County
In combination with the comprehensive needs of the model, we chose the abovementioned scheme H to delimit the permanent basic farmland in Xun County. According to the results of the experiment, the area of permanent basic farmland selected by each township and its corresponding grade were counted and recorded. Figure 10 shows the results of the delineation of permanent basic farmland in Xun County. The demarcation results of the permanent basic farmland in Xun County are shown in Table 13. Due to the randomness of the particle swarm algorithm in searching for a solution space, the distribution of particles becomes more spatially dispersed. After introducing constraint conditions that consider the continuity and stability goals, although the final delineation scheme of the experiment still had some unsatisfactory spatial areas, the overall continuity was already satisfactory. In terms of quality assurance, due to the guidance of the land suitability objective function, the delineated permanent basic farmland had a specific approach to higher-level farmland. Almost all level five cultivated land and level six cultivated land were classified as permanent basic farmland. In terms of the spatial continuity, the concentrations of land and contiguous land around the neighboring towns and near traffic roads were poor in the study area. The cultivated land in these areas is mostly fragmented and disconnected, so it was not classified as permanent basic farmland. In terms of the stability of the spatial pattern, the land stability objective conflicted with the land use constraints in Section 3.2. The cultivated land around the towns with dense roads played a role in controlling the further expansion of the urbanization to a certain extent, and the remaining areas avoided the township center and the surrounding roads. The experimental results not only ensured the quality of the cultivated land but also ensured the continuous extent and long-term stability of the cultivated land. It can be seen from the data that Shantang town, Tunzi town, and Xinzhen town had the largest cultivated land area selected for permanent basic farmland. The selected cultivated land area of these three towns was more than 8000 hectares. The three towns all had flat topography, and the cultivated land was contiguous. However, there were problems with insufficient irrigation facilities and traffic congestion. In addition, in some areas of Shantang town and Xinzhen town, the cultivated land had a long cultivation distance, and the quality of cultivated land was low. The irrigation facilities in Weixian town were also lacking, and the protection of cultivated land was poor. Chengguan town is the seat of the Xun County government and is surrounded by Liyang town. It is the county's political center and economic core. The large inflow of population and rapid economic growth have led to the rapid expansion of Chengguan town and complicated roads, so no cultivated land was selected as permanent basic farmland. The results showed that the area designated in Xun County for permanent basic farmland was 60,265.27 hectares, which met the protection target of 60,246.67 hectares. The land had an average grade of 6.32 and a protection rate of 84.89% was achieved, which was 18.6 hectares more than planned.
The permanent basic farmland delimitation model based on the hybrid particle swarm optimization algorithm comprehensively considered the land conditions, spatial patterns, development potential, and other factors, along with constraints such as the area, land use, and terrain, so that the delineation results were able to meet the requirements of optimal farmland quality. The model guaranteed the characteristics of a concentrated and continuous spatial pattern and improved the long-term stability of basic farmland protection areas, effectively guaranteeing regional food security.

Conclusions
Permanent basic farmland is the basic guarantee of China's food security and an important part of China's strategic security measures. Permanent basic farmland delineation is essentially a multiobjective spatial optimization problem. In this study, based on the three subobjectives of land suitability, land continuity, and land stability, and with the use of particle swarm optimization, the artificial immune algorithm was introduced, and immune operations were added to the algorithm flow. A permanent basic farmland delineation model based on a hybrid particle swarm optimization algorithm was constructed, and the model was verified with Xun County of Henan Province as the research area.
1. The results of the experimental comparative analysis showed that there were conflicts between land suitability, land continuity, and land stability. The improvement in the value of any one subobjective function was at the expense of the other two subobjective values. The corresponding weights , , and were allocated according to the specific decision objectives to obtain a more satisfactory delineation scheme. 2. With the increase in the weights and corresponding to the continuity and stability in the experiment, the consistency target guided the particles to find the area where the spatial concentration was formed and gradually produced a more obvious concentration effect. The stability objective caused the selected area to gradually move away from towns and roads from the periphery of the town, reducing the possibility of land occupation due to the renewed expansion of the town. 3. The PSO algorithm has a strong spatial search ability and global optimization ability to solve multi-objective problems. Combined with the spatial processing capabilities of GIS, which reduced manual intervention and improves work efficiency, it has strong operability and provides a favorable guarantee of permanent basic farmland demarcation results and quality. 4. The global search capability of the artificial immune algorithm was used to compensate for the shortcomings of particle swarm optimization, which easily falls into a local optimal solution. A hybrid particle swarm optimization algorithm was constructed to improve the efficiency of the model. Compared with the original model, the number of iterations was reduced by 34.2%, and the optimization ability of the three subobjective functions was increased by 3.36%, 5.04%, and 4.68%. However, the improved AIA-PSO had 2.4 times the running time of PSO and had large fluctuations.

Conflicts of Interest:
The authors declare there is no conflicts of interest regarding the publication of this paper.