Method and system for analyzing village environment risk based on particle swarm optimization

By dynamically adjusting weights using particle swarm optimization and entropy weighting, combined with analytic hierarchy process and comprehensive scoring model, the problem of insufficient weight allocation in village environmental risk assessment is solved, achieving a more accurate and reliable risk assessment.

CN122048022APending Publication Date: 2026-05-15TECH CENT FOR SOIL AGRI & RURAL ECOLOGY & ENVIRONMENT MINIST OF ECOLOGY & ENVIRONMENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610156711.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-04
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing village environmental risk assessment methods are insufficient in responding to dynamic changes in regional environmental characteristics when allocating weights, leading to discrepancies between assessment results and actual conditions, especially when dealing with complex environmental systems.

Method used

The particle swarm optimization algorithm is used to optimize the expert scoring results. The first weight is obtained by combining the analytic hierarchy process (AHP) and the second weight is calculated by using the entropy weight method. By adjusting the parameters, the subjective and objective weights are integrated to construct a comprehensive weight. Finally, the sensitivity index of the village area is calculated based on the comprehensive scoring model.

Benefits of technology

This has improved the accuracy and reliability of village environmental risk assessment, made the weight allocation more scientific and reasonable, reflected the actual environmental characteristics, and enhanced the scientific nature and reliability of the risk assessment results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048022A_ABST
    Figure CN122048022A_ABST
Patent Text Reader

Abstract

The invention provides a village environment risk analysis method and system based on a particle swarm optimization algorithm, and relates to the technical field of environment risk assessment, and the method comprises the steps: building an index system through collecting environment basic data, a soil background value and historical pollution distribution data; utilizing a particle swarm algorithm to optimize an expert scoring result, and combining with an analytic hierarchy process to obtain a subjective weight; calculating an index information entropy by adopting an entropy weight method, and determining an objective weight based on a difference coefficient; after subjective and objective weights are fused through adjustment parameters, risk indexes are calculated through a comprehensive scoring model; and finally, determining a village environment risk level according to a preset level mapping table. According to the invention, the accuracy of village environment risk grading is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of environmental risk assessment technology, and in particular to a method and system for analyzing village environmental risks based on particle swarm optimization algorithm. Background Technology

[0002] Village environmental risk analysis is an important technical means in the field of environmental management. This method provides a basis for decision-making on environmental governance by systematically assessing the environmental elements of village areas, and has broad application prospects in rural revitalization and ecological protection.

[0003] The existing technology mainly uses a fixed-weight method for environmental risk assessment. First, the weight coefficients of each environmental factor are determined through expert consultation. Then, the weighted calculation is performed by combining on-site monitoring data. Finally, the risk level is divided according to the calculation results. The weight coefficients are usually determined by empirical values ​​or simple statistical methods.

[0004] However, existing methods mainly use static settings when allocating weights, which are insufficient to respond to dynamic changes in regional environmental characteristics. This leads to discrepancies between the assessment results and the actual situation, especially when dealing with complex environmental systems. Therefore, there is a technical problem in the existing technology that the accuracy of risk assessment needs to be improved. Summary of the Invention

[0005] This application provides a method and system for analyzing village environmental risks based on particle swarm optimization, in order to solve the problem of low accuracy in village environmental risk classification in the prior art.

[0006] To address the aforementioned technical problems, in a first aspect, this application provides a method for analyzing village environmental risks based on particle swarm optimization, comprising: Collect basic environmental data, soil background values, and spatial distribution data of historical pollution events in the village area; Based on the aforementioned environmental baseline data and soil background values, an indicator system for sensitive area delineation is constructed, comprising multiple indicators. Based on the spatial distribution data of the historical pollution events, the particle swarm optimization algorithm is used to dynamically adjust the relative importance of the indicators determined by the expert scoring method to obtain the target judgment matrix. Based on the target judgment matrix, the analytic hierarchy process is used to calculate the feature vector and normalize the feature vector to obtain the first weight of each indicator. The information entropy value of each indicator is calculated using the entropy weight method. Based on the information entropy value, the difference coefficient of each indicator is calculated. The second weight of each indicator is determined based on the difference coefficient. The first weight and the second weight are fused by a linear combination. An adjustment parameter is introduced during the fusion process to obtain the comprehensive weight of each indicator. Based on the comprehensive weight, the sensitivity index of the village area is calculated by a comprehensive scoring model. Based on the sensitivity index of the village area and a preset mapping table between the sensitivity index and the level, a classification process is performed to determine the environmental risk level of the village area.

[0007] Optionally, based on the spatial distribution data of the historical pollution events, a particle swarm optimization algorithm is used to dynamically adjust the relative importance assignments among the indicators determined by the expert scoring method to obtain a target judgment matrix. Based on the target judgment matrix, an analytic hierarchy process (AHP) is used to calculate eigenvectors and normalize the eigenvectors to obtain the first weight of each indicator, including: An initial judgment matrix is ​​obtained by using an expert scoring method, wherein the initial judgment matrix contains the assignment of relative importance among multiple indicators; Using the spatial distribution data of the aforementioned historical pollution events as a reference benchmark, an optimization objective function is established; Based on the optimization objective function, the particle swarm optimization algorithm is used to iteratively optimize the assignment of relative importance between indicators in the initial judgment matrix, and the optimized judgment matrix is ​​output. The optimized judgment matrix is ​​subjected to a consistency check to generate the target judgment matrix; Calculate the largest eigenvalue of the target judgment matrix, solve for the eigenvector corresponding to the largest eigenvalue, normalize the eigenvector, and obtain the first weight of each indicator.

[0008] Optionally, the step of using a particle swarm optimization algorithm to iteratively optimize the assignment of relative importance among indicators in the initial judgment matrix based on the optimization objective function, and outputting the optimized judgment matrix, includes: Initialize the particle swarm, wherein the relative importance assignments in the initial judgment matrix are encoded as the initial positions of the particles, and the initial velocities of the particles are generated; In each iteration, the fitness value corresponding to the current position of each particle is calculated using the optimization objective function based on position and velocity. In the first iteration, the position is the initial position and the velocity is the initial velocity. Compare the fitness value of each particle's current position with its historical best fitness value, and update the particle's best position accordingly. Compare the fitness value of all particles at their current positions with the best fitness value of the previous generation of the population, and update the best position of the population. Determine whether the preset maximum number of iterations has been reached or whether the change between the current generation and the previous generation's historical best fitness value is less than a preset change threshold. If not, then adjust the particle's velocity and direction based on the updated individual optimal position and the updated group optimal position, and update the particle's position; Repeat the above iterative process until the preset maximum number of iterations is reached or the change is less than the preset change threshold, and output the judgment matrix corresponding to the optimal position of the final group as the optimized judgment matrix.

[0009] Optionally, the step of calculating the information entropy value of each indicator using the entropy weight method, calculating the difference coefficient of each indicator based on the information entropy value, and determining the second weight of each indicator based on the difference coefficient includes: Obtain the raw data of the village area under each indicator, and perform standardization processing on the raw data to obtain standardized values; Based on the standardized values, the data distribution ratio of each sample under each indicator is calculated, and a fuzzy clustering analysis algorithm is introduced to preprocess the data distribution ratio. Calculate the information entropy value of each indicator based on the distribution ratio of the preprocessed data; Based on the information entropy value, the difference coefficient of each indicator is calculated, and the difference coefficient is corrected by an adaptive weighting mechanism. The second weight of each indicator is determined based on the corrected difference coefficient.

[0010] Optionally, the step of calculating the difference coefficients of each indicator based on the information entropy value and correcting the difference coefficients using an adaptive weighting mechanism includes: The initial difference coefficient is obtained by calculating the difference between the unit value and the information entropy value; Based on the frequency of occurrence, duration and scope of impact of each indicator in historical pollution events, the contribution weight of each indicator in the environmental risk assessment process is calculated. An adaptive weighting mechanism is used to nonlinearly combine the contribution weights with the initial difference coefficients to obtain the corrected difference coefficients.

[0011] Optionally, the step of fusing the first weight and the second weight through a linear combination, introducing an adjustment parameter during the fusion process to obtain the comprehensive weight of each indicator, and calculating the sensitivity index of the village area based on the comprehensive weight through a comprehensive scoring model, includes: Set adjustment parameters, which are determined based on the discriminative power of each indicator in historical pollution events; The first and second weights of each indicator are weighted according to the adjustment parameters to obtain the comprehensive weight of each indicator; The comprehensive weights and the original data of each indicator are input into the comprehensive scoring model, which includes an indicator score calculation module and a weight integration module. The indicator score calculation module performs standardized scoring on the raw data of each indicator to obtain the standardized score of each indicator. The environmental risk score is obtained by calculating the standardized scores of each indicator and their corresponding comprehensive weights through the weight integration module. Based on the environmental risk score, a sensitivity index is obtained.

[0012] Optionally, the step of constructing an indicator system for sensitive area delineation based on the environmental baseline data and the soil background values ​​includes: Obtain soil heavy metal data for village areas; Spatial interpolation is performed on the soil heavy metal data to generate a heavy metal distribution map of the village area; The heavy metal distribution map is divided into multiple grids, and the heavy metal index score of each grid is determined. An indicator system is constructed based on the aforementioned environmental baseline data, soil background values, and heavy metal index scores of the raster cells.

[0013] Secondly, this application provides a village environmental risk analysis system based on particle swarm optimization algorithm, comprising: The data acquisition module is used to collect basic environmental data, soil background values, and spatial distribution data of historical pollution events in the village area. A construction module is used to construct an indicator system for sensitive area delineation based on the environmental basic data and the soil background value. The indicator system includes multiple indicators. The adjustment module is used to dynamically adjust the relative importance of the indicators determined by the expert scoring method based on the spatial distribution data of the historical pollution events and the particle swarm optimization algorithm to obtain the target judgment matrix. Based on the target judgment matrix, the analytic hierarchy process is used to calculate the feature vector and normalize the feature vector to obtain the first weight of each indicator. The calculation module is used to calculate the information entropy value of each indicator using the entropy weight method, calculate the difference coefficient of each indicator based on the information entropy value, and determine the second weight of each indicator based on the difference coefficient. The fusion module is used to fuse the first weight and the second weight through a linear combination. An adjustment parameter is introduced during the fusion process to obtain the comprehensive weight of each indicator. Based on the comprehensive weight, the sensitivity index of the village area is calculated through a comprehensive scoring model. The determination module is used to perform grading based on the sensitivity index of the village area and a preset mapping table between the sensitivity index and the level, so as to determine the environmental risk level of the village area.

[0014] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the village environmental risk analysis method based on particle swarm optimization as described in the first aspect above.

[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the village environmental risk analysis method based on particle swarm optimization as described in the first aspect above.

[0016] This application provides a method for analyzing village environmental risk based on particle swarm optimization (PSO). The method includes: collecting basic environmental data, soil background values, and spatial distribution data of historical pollution events for the village area; constructing an indicator system for sensitive area delineation based on the basic environmental data and the soil background values, the indicator system including multiple indicators; dynamically adjusting the relative importance assignments among indicators determined by expert scoring using PSO based on the spatial distribution data of historical pollution events to obtain a target judgment matrix; calculating eigenvectors using analytic hierarchy process (AHP) and normalizing the eigenvectors to obtain the first weight of each indicator; calculating the information entropy value of each indicator using entropy weight method; calculating the difference coefficient of each indicator based on the information entropy value; determining the second weight of each indicator based on the difference coefficient; fusing the first weight and the second weight through linear combination, introducing adjustment parameters during the fusion process to obtain the comprehensive weight of each indicator; calculating the sensitivity index of the village area using a comprehensive scoring model based on the comprehensive weight; and performing grading processing based on the sensitivity index of the village area and a preset mapping table between the sensitivity index and levels to determine the environmental risk level of the village area.

[0017] The technical solution provided in this application has the following beneficial effects: The village environmental risk analysis method provided in this application constructs a complete assessment foundation by collecting multi-source environmental data and establishing an indicator system to achieve systematic assessment. Then, it uses the particle swarm optimization algorithm to optimize the expert scoring results and combines it with the analytic hierarchy process (AHP) to obtain the first weight, thereby improving the scientific nature of the subjective weight. At the same time, it uses the entropy weight method to calculate the second weight to ensure the objectivity of the weight allocation. Next, it integrates subjective and objective weights by adjusting parameters to make the weight allocation more reasonable. Finally, it calculates the risk index based on the comprehensive scoring model and completes the level classification, thereby improving the accuracy and reliability of the risk assessment.

[0018] Furthermore, in the process of determining the weights, an initial judgment matrix is ​​first obtained through expert scoring. Then, an optimization objective function is established based on the spatial distribution data of historical pollution events. The initial judgment matrix is ​​iteratively optimized using the particle swarm optimization algorithm. Next, a consistency check is performed on the optimized judgment matrix to generate the target judgment matrix. Finally, the eigenvectors of the target judgment matrix are calculated and normalized to obtain the first weight.

[0019] Furthermore, this weight determination method combines expert experience and algorithm optimization to ensure that the weight allocation retains professional judgment while conforming to the actual situation, thereby improving the reliability of risk assessment results.

[0020] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart illustrating a village environmental risk analysis method based on particle swarm optimization algorithm provided in this application embodiment; Figure 2 A flowchart illustrating the specific implementation of step 103 provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of a village environmental risk analysis system based on particle swarm optimization algorithm provided in an embodiment of this application. Detailed Implementation

[0023] In the field of village environmental risk assessment, existing methods mainly rely on expert experience to determine weight coefficients. This static weight allocation method is insufficient to respond to dynamic changes in environmental characteristics, resulting in deviations between the assessment results and the actual situation. This is especially evident when dealing with complex and ever-changing rural environmental systems. This limitation mainly stems from insufficient consideration of the spatiotemporal characteristics of environmental data during the weight determination process.

[0024] To address the aforementioned issues, this application proposes a village environmental risk analysis method based on particle swarm optimization (PSO). This method first constructs an assessment system by collecting basic environmental data, soil background values, and historical pollution distribution data. Then, it uses PSO to optimize expert scoring results to obtain subjective weights, while simultaneously calculating objective weights using the entropy weight method. Next, it integrates subjective and objective weights by adjusting parameters to form a comprehensive weight. Finally, it calculates a risk index and classifies risk levels based on a comprehensive scoring model. This method, through dynamic optimization of the weight allocation process, ensures that risk assessment retains expert experience while fully reflecting actual environmental characteristics. It effectively solves the problem of insufficient accuracy caused by a single weight setting in existing technologies, thus improving the scientific rigor and reliability of risk assessment results.

[0025] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] The core of this application is to provide a method for analyzing village environmental risks based on particle swarm optimization (PSO) algorithm. A flowchart of one specific implementation is shown below. Figure 1 As shown, the method includes: Step 101: Collect basic environmental data, soil background values, and spatial distribution data of historical pollution events in the village area.

[0027] In step 101, the basic environmental data includes basic information such as topographic features, water system distribution and population distribution. Soil background values ​​refer to the normal content range of various elements in uncontaminated natural soil. The spatial distribution data of historical pollution events records the location and impact range of previous pollution events.

[0028] In this embodiment of the application, basic environmental data is first collected through on-site survey and monitoring equipment, then soil background values ​​are obtained from the environmental monitoring department, and historical pollution event records are retrieved and their spatial distribution locations are determined. Finally, these three types of data are integrated to form a dataset.

[0029] Step 102: Based on the environmental baseline data and the soil background values, construct an indicator system for sensitive area delineation, the indicator system including multiple indicators.

[0030] In this embodiment, step 102 includes the following process: Step 1021: Obtain soil heavy metal data for the village area.

[0031] In step 1021, soil heavy metal data refers to the content values ​​of heavy metal elements such as lead, cadmium, and chromium in the soil obtained through sampling and testing.

[0032] In this embodiment of the application, soil samples are collected by setting up sampling points, and then the heavy metal content in the samples is analyzed using detection equipment to obtain soil heavy metal data for the village area.

[0033] In practical applications, 35 sampling points were set up at 500-meter intervals in a village area. After collecting surface soil samples, atomic absorption spectrometry was used to detect the content of lead, cadmium, and chromium, and the heavy metal concentration data of each sampling point were obtained. The lead content ranged from 15 to 145 mg / kg, the cadmium content ranged from 0.5 to 3.2 mg / kg, and the chromium content ranged from 25 to 180 mg / kg.

[0034] Step 1022: Perform spatial interpolation on the soil heavy metal data to generate a heavy metal distribution map of the village area.

[0035] In step 1021, the heavy metal distribution map is an image that reflects the continuous spatial variation of heavy metal content.

[0036] In this embodiment of the application, the Kriging interpolation method is used to process the heavy metal data of discrete sampling points. The processing procedure is as follows: by calculating the spatial autocorrelation characteristics, a continuously distributed heavy metal content map is generated.

[0037] In practical applications, lead content data from 35 sampling points were input into a geographic information system. Kriging interpolation parameters were set, including a range of 800 meters, a nugget value of 0.15, and a sill value of 0.85. A lead content distribution map with a resolution of 10 meters × 10 meters was generated. The map showed that the lead content was higher in the northern part of the village, reaching 120-145 mg / kg, while the content was lower in the southern part, ranging from 15-50 mg / kg.

[0038] Step 1023: Divide the heavy metal distribution map into multiple grids and determine the heavy metal index score for each grid.

[0039] In step 1021, a grid refers to dividing a continuous distribution map into regular grid cells, and the heavy metal index score is an evaluation value assigned based on the heavy metal content level.

[0040] In this embodiment of the application, the heavy metal distribution map is divided into square grids of the same size, and then a score is calculated according to the heavy metal content value in each grid according to a preset scoring standard.

[0041] In practical applications, the lead content distribution map is divided into 1250 10m × 10m grids. The scoring criteria are set as follows: 1 point for lead content below 50 mg / kg, 3 points for 50-100 mg / kg, 5 points for 100-150 mg / kg, and 7 points for more than 150 mg / kg. The lead content index score of each grid is calculated. The grids in the northern region mostly score 5 points, while the grids in the southern region mostly score 1 point.

[0042] Step 1024: Construct an indicator system based on the environmental baseline data, the soil background value, and the heavy metal index scores of the raster cells.

[0043] In step 1021, the indicator system is an evaluation framework consisting of multiple environmental indicators and their scoring rules.

[0044] In this embodiment of the application, an evaluation system containing multiple levels of indicators is established by integrating various elements in the basic environmental data, the reference benchmark provided by the soil background value, and the heavy metal index score.

[0045] In practical applications, an indicator system is constructed that includes 5 primary indicators and 12 secondary indicators. The primary indicators include soil heavy metal pollution indicator with a weight of 0.3, hydrological environment indicator with a weight of 0.25, population and social indicator with a weight of 0.2, topography and geomorphology indicator with a weight of 0.15, and land use indicator with a weight of 0.1. Each primary indicator has corresponding secondary indicator scoring rules, forming a complete evaluation framework.

[0046] This application establishes a scientific and comprehensive environmental risk assessment system through a systematic indicator construction process, providing a reliable basis for subsequent risk level classification.

[0047] Step 103: Based on the spatial distribution data of the historical pollution events, the particle swarm optimization algorithm is used to dynamically adjust the relative importance of the indicators determined by the expert scoring method to obtain the target judgment matrix. Based on the target judgment matrix, the analytic hierarchy process is used to calculate the eigenvectors and normalize the eigenvectors to obtain the first weight of each indicator.

[0048] In this embodiment, step 103 includes the following process, such as... Figure 2 As shown: Step 1031: Obtain an initial judgment matrix by using expert scoring, wherein the initial judgment matrix contains the assignment of relative importance among multiple indicators.

[0049] In step 1031, the initial judgment matrix is ​​a mathematical table that records the results of the comparison of the relative importance of each environmental risk indicator, where the matrix elements represent the importance of one indicator relative to another.

[0050] In this embodiment of the application, an initial judgment matrix is ​​constructed based on the scoring results of environmental experts on the indicators in the indicator system.

[0051] In practical application, four experts compared five environmental risk indicators pairwise, using a 1-9 scale for scoring. These five indicators included soil heavy metal pollution, hydrological environment, population and society, topography, and land use. For example, soil heavy metal pollution was assigned a value of 3 (slightly important) relative to the hydrological environment, while the hydrological environment was assigned a value of 2 (slightly important) relative to the population and society. A fifth-order initial judgment matrix was then constructed. For example, the specific formula for the initial judgment matrix is: ;in, This represents the initial judgment matrix. Indicators relative to indicators Importance ratio The eigenvector represents the first eigenvector. One portion, The eigenvector represents the first eigenvector. Each component.

[0052] Step 1032: Using the spatial distribution data of the historical pollution events as a reference benchmark, establish an optimization objective function.

[0053] In step 1032, the optimization objective function is a mathematical expression used to evaluate the merits of the judgment matrix. Its value reflects the degree of agreement between the risk distribution derived from the judgment matrix and the distribution of historical pollution events.

[0054] In this embodiment, an optimization objective function is established by calculating the spatial correlation between the risk distribution map obtained by the judgment matrix and the historical pollution event distribution map. This function can be a weighted summation function or other types of functions. It should be noted that this embodiment does not specifically limit the specific expression used for the function, and it can be set according to the actual situation.

[0055] In practical applications, based on the spatial distribution data of 50 historical pollution events in the past five years, an optimization objective function is established as the spatial correlation coefficient between the risk distribution map and the historical pollution event distribution map. The formula for calculating the spatial correlation coefficient is the Pearson correlation coefficient formula, which is used to measure the degree of consistency between the two spatial distributions.

[0056] Step 1033: Based on the optimization objective function, use the particle swarm optimization algorithm to iteratively optimize the assignment of relative importance between indicators in the initial judgment matrix, and output the optimized judgment matrix.

[0057] Step 1033 may specifically include the following steps: A1: Initialize the particle swarm, wherein the relative importance assignments in the initial judgment matrix are encoded as the initial positions of the particles, and the initial velocities of the particles are generated.

[0058] In step A1, the particle swarm is the set of basic units in the optimization algorithm that simulates the collective foraging behavior of a flock of birds. Each particle represents a potential solution to the optimization problem. The initial position refers to the starting coordinates of the particle in the search space, which is encoded by the relative importance assignment in the initial judgment matrix. The initial velocity refers to the direction and step size of the particle's movement during the search process, which is randomly generated at the beginning of the algorithm.

[0059] In this embodiment of the application, the 10 relative importance values ​​in the initial judgment matrix are first arranged in order to form a particle position vector, and then the initial velocity vector of each particle is randomly generated.

[0060] In practical applications, the 10 values ​​in the initial judgment matrix are encoded as position vectors [3, 2, 1, 4, 1, 2, 3, 1, 2, 3]. At the same time, the initial velocities of 20 particles are randomly generated, and each component of the velocity vector takes a random value between -0.5 and +0.5.

[0061] A2: In each iteration, based on position and velocity, the fitness value corresponding to the current position of each particle is calculated using the optimization objective function. In the first iteration, the position is the initial position and the velocity is the initial velocity.

[0062] In step A2, the fitness value is a numerical indicator used to evaluate the quality of the particle's current position. It is calculated by optimizing the objective function and reflects the degree of matching between the current judgment matrix and the distribution of historical pollution events.

[0063] In this embodiment, a risk distribution map is calculated based on the judgment matrix corresponding to the current position of the particle, and then the spatial correlation coefficient between the distribution map and the historical pollution event distribution map is calculated as the fitness value by optimizing the objective function.

[0064] In practical applications, if the spatial correlation coefficient between the risk distribution map calculated from the judgment matrix corresponding to a certain particle position and the historical pollution event distribution map is 0.68, then the fitness value of that particle is 0.68.

[0065] A3: Compare the fitness value of each particle's current position with its historical best fitness value, and update the particle's best position.

[0066] In step A3, the individual's historical best fitness value refers to the best fitness value reached by a single particle in each iteration, which is obtained by recording the best performance of each particle in the search process; the individual's optimal position refers to the position coordinates corresponding to the particle when it reaches the individual's historical best fitness value.

[0067] In this embodiment, the current fitness value of each particle is compared with its historical best fitness value. If the current value is better, the individual's best position is updated to the current position.

[0068] In practical applications, if a particle's current fitness value of 0.68 is greater than its historical best fitness value of 0.65, then the particle's individual best position is updated to its current position.

[0069] A4: Compare the fitness value corresponding to the current position of all particles with the best fitness value of the previous generation of the population, and update the best position of the population.

[0070] In step A4, the swarm's historical best fitness value refers to the best fitness value reached by all particles in the entire particle swarm during each iteration, which is obtained by comparing the individual historical best fitness values ​​of all particles; the swarm's optimal position refers to the particle position coordinates corresponding to when the swarm reaches the swarm's historical best fitness value.

[0071] In this embodiment, the particle with the best fitness value is selected from all particles, and its fitness value is compared with the best historical fitness value of the population. If it is better, the best position of the population is updated.

[0072] In practical applications, if a particle's fitness value of 0.75 is greater than the population's historical best fitness value of 0.72, then the population's best position is updated to that particle's position.

[0073] A5: Determine whether the preset maximum number of iterations has been reached or whether the change between the current generation and the previous generation's historical best fitness value is less than the preset change threshold.

[0074] In step A5, the maximum number of iterations is the preset upper limit of the number of times the algorithm can run, the change amount refers to the difference between the historical best fitness values ​​of two adjacent generations of the population, and the preset change threshold is the critical value for judging the convergence of the algorithm. In this embodiment of the application, the value of the preset change threshold is not specifically limited, but can be set according to the actual situation.

[0075] In this embodiment of the application, it is checked whether the number of iterations reaches 100, or whether the change in the optimal fitness value of the population is less than 0.001.

[0076] A6: If not, adjust the particle's velocity and direction based on the updated individual optimal position and the updated group optimal position, and update the particle's position.

[0077] In step A6, the velocity refers to the speed and direction of the particle's movement in the search space, and the direction refers to the trend of the particle's position update.

[0078] In this embodiment, the new velocity of the particle is calculated based on the individual optimal position and the group optimal position, and then the particle position is updated based on the new velocity.

[0079] In practical applications, the new velocity of each particle is calculated based on the individual optimal position and the group optimal position. The new velocity is determined by the current velocity, the difference between the individual optimal position and the current position, and the difference between the group optimal position and the current position. Then, the position of each particle is updated based on the calculated new velocity, so that the particle moves towards a better solution region.

[0080] A7: Repeat the above iterative process until the preset maximum number of iterations is reached or the change is less than the preset change threshold, and output the judgment matrix corresponding to the optimal position of the final group as the optimized judgment matrix.

[0081] In step A7, the final optimal position of the population refers to the coordinates corresponding to the historical optimal position of the population when the algorithm terminates, and the optimized judgment matrix refers to the combination of judgment matrix assignments obtained by decoding the final optimal position of the population.

[0082] In practical applications, after 100 iterations, the optimal fitness value of the population reaches 0.83, with a change of less than 0.001. The optimized judgment matrix is ​​assigned the values ​​[2.8, 1.9, 0.4, 3.7, 0.6, 1.8, 2.9, 0.3, 1.7, 2.8].

[0083] Step 1034: Perform a consistency check on the optimized judgment matrix to generate the target judgment matrix.

[0084] In step 1034, the target judgment matrix is ​​the final judgment matrix that passes the consistency test and meets the requirements.

[0085] In this embodiment of the application, the consistency index and consistency ratio of the optimized judgment matrix are calculated. If the consistency ratio is less than 0.1, the matrix is ​​accepted as the target judgment matrix; otherwise, the optimization is returned.

[0086] In practical applications, the optimized judgment matrix yields a consistency ratio of 0.08, which is less than the threshold requirement of 0.1. Therefore, this matrix is ​​selected as the target judgment matrix for subsequent calculations. The formula for calculating the consistency index is: ,in, Here, 'o' represents the consistency index, and 'o' represents the order of the judgment matrix. This represents the largest eigenvalue of the judgment matrix; the formula for calculating the consistency ratio is: ,in, This represents the random consistency index.

[0087] Step 1035: Calculate the largest eigenvalue of the target judgment matrix, solve for the eigenvector corresponding to the largest eigenvalue, normalize the eigenvector, and obtain the first weight of each index.

[0088] In step 1035, the largest eigenvalue is the main eigenvalue of the target judgment matrix, and the eigenvector is the vector corresponding to the largest eigenvalue.

[0089] In this embodiment, the eigenvalues ​​and eigenvectors of the target judgment matrix are first solved, the eigenvector corresponding to the largest eigenvalue is selected, and then the eigenvector is normalized to obtain the weights of each index.

[0090] In practical applications, for example, the largest eigenvalue of the target judgment matrix is ​​5.245. After normalization, the first weights of each indicator are 0.42 for soil heavy metal pollution, 0.28 for hydrological environment, 0.15 for population and society, 0.10 for topography and land use, and 0.05 for land use.

[0091] This application optimizes the algorithm to dynamically adjust the assignment of the judgment matrix, making the weight determination process more scientific and reasonable, and improving the accuracy of risk assessment.

[0092] Step 104: Calculate the information entropy value of each indicator using the entropy weight method, calculate the difference coefficient of each indicator based on the information entropy value, and determine the second weight of each indicator based on the difference coefficient.

[0093] In this embodiment, step 104 includes the following process: Step 1041: Obtain the original data of the village area under each indicator, and perform standardization processing on the original data to obtain standardized values.

[0094] In step 1041, raw data refers to the actual measured values ​​of each environmental risk indicator obtained through on-site monitoring and investigation.

[0095] In this embodiment of the application, monitoring data of various environmental risk indicators are collected, and the data are transformed to the range of 0 to 1 using the min-max normalization method.

[0096] In practical applications, the data from 35 sampling points for soil heavy metal pollution indicators ranged from 10 to 150 mg / kg, which was then analyzed using a standardized formula. The standardized values ​​are obtained, where Represents standardized values. This represents the original sampled values ​​of soil heavy metal pollution indicators. This represents the minimum value of the sampled data. This represents the maximum value of the sampled data; for example, a content of 85 mg / kg is standardized to 0.54. The specific process is as follows: .

[0097] Step 1042: Based on the standardized values, calculate the data distribution ratio of each sample under each indicator, and introduce a fuzzy clustering analysis algorithm to preprocess the data distribution ratio.

[0098] In step 1042, the data distribution ratio refers to the proportion of a single sample value in the total of all sample values ​​of the corresponding indicator; a sample refers to a monitoring point or survey unit set up in the village area for each environmental risk indicator, wherein each sample represents an environmental data collection point at a specific location in the village area.

[0099] In this embodiment, the proportion of each sample value to the total value of each indicator is first calculated, and then fuzzy clustering is used to classify the proportion data. The formula for calculating the data distribution proportion is: ,in, Indicates the first The sample at the th The proportion under each indicator The total number of samples.

[0100] In practical applications, the standardized value of 0.54 for a certain sample in the soil heavy metal pollution index is 0.0188 out of the total standardized value of 28.7 for all 35 samples of the index. By setting three class centers through fuzzy clustering, the membership degree of each sample to each class is calculated, and the class corresponding to the largest membership degree is taken as the final classification.

[0101] Step 1043: Calculate the information entropy value of each indicator based on the distribution ratio of the preprocessed data.

[0102] In step 1043, the information entropy value is an indicator reflecting the degree of data dispersion; a higher entropy value indicates a more uniform data distribution. The formula for calculating the information entropy value is as follows: ,in, Indicates the first Information entropy of each indicator.

[0103] In this embodiment of the application, the information entropy value of each indicator is calculated using the information entropy formula based on the distribution ratio of the preprocessed data.

[0104] Step 1044: Based on the information entropy value, calculate the difference coefficient of each indicator, and use an adaptive weighting mechanism to correct the difference coefficient.

[0105] Step 1044 may specifically include the following steps: B1: The initial difference coefficient is obtained by calculating the difference between the unit value and the information entropy value.

[0106] In step B1, the unit value refers to the numerical value 1, which serves as the benchmark value for calculating the difference coefficient.

[0107] In this embodiment, the initial difference coefficient is obtained by subtracting the information entropy value of each indicator from 1. For example, the formula for calculating the initial difference coefficient is: ,in Indicates the first The initial difference coefficients of each indicator.

[0108] In practical applications, the initial difference coefficient corresponding to the soil heavy metal pollution index information entropy value of 0.92 is 1 minus 0.92, which equals 0.08.

[0109] B2: Calculate the contribution weight of each indicator in the environmental risk assessment process based on the frequency of occurrence, duration and scope of impact of each indicator in historical pollution events.

[0110] In step B2, the frequency of occurrence is the proportion of times the indicator appears in historical pollution events, the duration refers to the average duration of the pollution event, and the scope of impact refers to the spatial range of the pollution event's impact. Environmental risk assessment is a comprehensive assessment process for the environmental pollution risks that a village area may face, and it is established based on historical pollution event data and the analysis results of various indicators.

[0111] In this embodiment of the application, the frequency, duration and scope of impact of each indicator in historical pollution events are statistically analyzed, and the contribution weight is obtained by weighted calculation. This embodiment of the application does not limit the expression of the weighting formula, and can be set accordingly according to the actual situation.

[0112] B3: An adaptive weighting mechanism is adopted to nonlinearly combine the contribution weights with the initial difference coefficients to obtain the corrected difference coefficients.

[0113] In this embodiment of the application, the contribution weight and the initial difference coefficient are combined by exponential weighting. This embodiment of the application does not limit the expression of the exponential weighting method, and can be set accordingly according to the actual situation.

[0114] Step 1045: Determine the second weight of each indicator based on the corrected difference coefficient.

[0115] In step 1045, the second weight is an objective weight determined based on data characteristics.

[0116] In this embodiment, the correction difference coefficients of each indicator are normalized to obtain the second weight. The formula for calculating the second weight is: ,in For the first The second weight of each indicator Indicates the first The adjusted coefficient of variation for each indicator.

[0117] This application uses a data-driven weighting calculation method, combined with the actual impact of historical pollution events, to make the weighting allocation more objective and reasonable, thereby improving the scientific nature of risk assessment.

[0118] Step 105: The first weight and the second weight are fused by linear combination. An adjustment parameter is introduced during the fusion process to obtain the comprehensive weight of each indicator. Based on the comprehensive weight, the sensitivity index of the village area is calculated by a comprehensive scoring model.

[0119] In this embodiment, step 105 includes the following process: Step 1051: Set adjustment parameters, which are determined based on the discrimination ability of each indicator in historical pollution events.

[0120] In step 1051, the adjustment parameter is a coefficient used to balance subjective weights and objective weights.

[0121] Discriminative ability refers to the ability to distinguish between polluted and unpolluted areas. The process of determining discriminative ability is achieved by calculating the data differences of each environmental risk indicator in areas where historical pollution events have occurred and areas where they have not occurred. Specifically, this can be manifested by analyzing the numerical distribution characteristics of each indicator in the two regions and evaluating the discriminative ability of each indicator based on the magnitude of the distribution difference. Indicators with more obvious distribution differences are considered to have stronger discriminative ability.

[0122] In this embodiment of the application, the discrimination capability is determined by analyzing the data differences of each indicator in areas where historical pollution events occurred and in non-polluted areas, and then adjustment parameters are set.

[0123] In practical applications, the average value of soil heavy metal pollution index in polluted areas is 120 mg / kg, and the average value in non-polluted areas is 35 mg / kg. The discrimination ability is calculated as the difference coefficient between the two average values ​​of 0.85, and the adjustment parameter is the normalized value of the discrimination ability of 0.22.

[0124] Step 1052: Calculate the weighted average of the first and second weights of each indicator according to the adjustment parameters to obtain the comprehensive weight of each indicator.

[0125] In step 1052, the comprehensive weight is the final weight value that integrates subjective and objective weights.

[0126] In this embodiment, the first weight and the second weight are linearly combined according to the adjustment parameter to calculate the comprehensive weight. The relevant description of the linear combination can be found in related technologies; therefore, this embodiment does not limit the formula used for the linear combination.

[0127] In practical applications, with the first weight of soil heavy metal pollution index being 0.42 and the second weight being 0.5616, the weighted calculation is performed according to the adjustment parameter of 0.22, and the comprehensive weight is 0.22×0.42+(1-0.22)×0.5616=0.512.

[0128] Step 1053: Input the comprehensive weight and the original data of each indicator into the comprehensive scoring model, which includes an indicator score calculation module and a weight integration module.

[0129] In step 1053, the comprehensive scoring model is a mathematical model used to calculate the environmental risk score. The indicator score calculation module is responsible for converting the raw data into standard scores, and the weight integration module is responsible for combining the scores and weights to calculate the total score.

[0130] In this embodiment of the application, a comprehensive scoring model containing two functional modules is established for processing environmental risk assessment calculations.

[0131] Step 1054: The raw data of each indicator is standardized and scored using the indicator score calculation module to obtain the standardized score of each indicator.

[0132] In step 1054, the standardized score is a score value obtained by transforming the original data according to a preset rule.

[0133] In the embodiments of this application, a piecewise function method is used to convert the original data of each indicator into a score ranging from 0 to 1.

[0134] In practical applications, the soil heavy metal pollution index content of 85 mg / kg is converted to 0.5 points according to the segmented scoring standard, the hydrological environmental index density of 0.6 is converted to 0.6 points, and other indicators are calculated to obtain their respective scores in the same way.

[0135] Step 1055: The standardized scores of each indicator and their corresponding comprehensive weights are calculated using the weight integration module to obtain the environmental risk score.

[0136] In step 1055, the environmental risk score is a comprehensive numerical value that reflects the degree of environmental risk in the region.

[0137] In this embodiment of the application, the environmental risk score is obtained by multiplying the standardized scores of each indicator by their corresponding comprehensive weights and then summing the results.

[0138] In practical applications, the environmental risk score is the sum of the products of each score and its weight. When the standardized scores of the five indicators are 0.5, 0.6, 0.7, 0.4, and 0.8, and the corresponding comprehensive weights are 0.512, 0.452, 0.483, 0.376, and 0.417, respectively, the environmental risk score is: .

[0139] Step 1056: Based on the environmental risk score, obtain the sensitivity index.

[0140] In step 1056, the sensitivity index is the final indicator value used to characterize the degree of regional environmental risk sensitivity.

[0141] In this embodiment, the environmental risk score is used as the sensitivity index output. The formula for calculating the sensitivity index is as follows: ,in Indicates the sensitivity index. Indicates the first The overall weight of each indicator Indicates the first The scores of each indicator.

[0142] In practical applications, environmental risk scoring It is directly used as a sensitivity index for the village area.

[0143] This application employs a scientific weighting and comprehensive scoring process to ensure that environmental risk assessment results consider both expert experience and data characteristics, thereby improving the accuracy and practicality of the assessment results.

[0144] Step 106: Based on the sensitivity index of the village area and the preset mapping table between the sensitivity index and the level, perform classification processing to determine the environmental risk level of the village area.

[0145] In step 106, the level refers to the level divided according to the degree of environmental risk, which is used to characterize the degree of regional environmental sensitivity; the mapping table is a reference table that records the correspondence between the sensitivity index interval and the level, and is determined by the equal frequency segmentation method.

[0146] In this embodiment of the application, the range of the sensitivity index is first determined according to a preset mapping table, and then the range corresponding to the index is matched with the level in the mapping table to finally determine the environmental risk level of the village area.

[0147] Figure 3 A schematic diagram of the structure of a village environmental risk analysis system based on particle swarm optimization algorithm provided in this application embodiment is shown below. Figure 3 As shown, the detailed implementation section describes: The data acquisition module 31 is used to collect basic environmental data, soil background values, and spatial distribution data of historical pollution events in the village area.

[0148] The construction module 32 is used to construct an indicator system for sensitive area delineation based on the environmental basic data and the soil background value. The indicator system includes multiple indicators.

[0149] The adjustment module 33 is used to dynamically adjust the relative importance of the indicators determined by the expert scoring method based on the spatial distribution data of the historical pollution events using the particle swarm optimization algorithm to obtain the target judgment matrix. Based on the target judgment matrix, the analytic hierarchy process is used to calculate the feature vector and normalize the feature vector to obtain the first weight of each indicator.

[0150] The calculation module 34 is used to calculate the information entropy value of each indicator using the entropy weight method, calculate the difference coefficient of each indicator based on the information entropy value, and determine the second weight of each indicator based on the difference coefficient.

[0151] The fusion module 35 is used to fuse the first weight and the second weight through a linear combination. During the fusion process, an adjustment parameter is introduced to obtain the comprehensive weight of each indicator. Based on the comprehensive weight, the sensitivity index of the village area is calculated through a comprehensive scoring model.

[0152] The determination module 36 is used to perform classification processing based on the sensitivity index of the village area and a preset mapping table between the sensitivity index and the level, so as to determine the environmental risk level of the village area.

[0153] The village environmental risk analysis system based on particle swarm optimization algorithm in this application is used to implement the aforementioned village environmental risk analysis method based on particle swarm optimization algorithm. Therefore, the specific implementation of the village environmental risk analysis system based on particle swarm optimization algorithm can be found in the embodiment section of the village environmental risk analysis method based on particle swarm optimization algorithm above. The specific implementation can be referred to the description of the corresponding embodiment, and will not be repeated here.

[0154] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the village environmental risk analysis method based on particle swarm optimization algorithm described above.

[0155] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described methods for analyzing village environmental risks based on particle swarm optimization.

[0156] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory, random access memory, portable hard drives, magnetic disks, or optical disks.

[0157] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the village environmental risk analysis method based on particle swarm optimization algorithm.

[0158] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0159] The above provides a detailed description of the village environmental risk analysis method and system based on particle swarm optimization (PSO) algorithm provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A method for analyzing village environmental risks based on particle swarm optimization, characterized in that, include: Collect basic environmental data, soil background values, and spatial distribution data of historical pollution events in the village area; Based on the aforementioned environmental baseline data and soil background values, an indicator system for sensitive area delineation is constructed, comprising multiple indicators. Based on the spatial distribution data of the historical pollution events, the particle swarm optimization algorithm is used to dynamically adjust the relative importance of the indicators determined by the expert scoring method to obtain the target judgment matrix. Based on the target judgment matrix, the analytic hierarchy process is used to calculate the feature vector and normalize the feature vector to obtain the first weight of each indicator. The information entropy value of each indicator is calculated using the entropy weight method. Based on the information entropy value, the difference coefficient of each indicator is calculated. The second weight of each indicator is determined based on the difference coefficient. The first weight and the second weight are fused by a linear combination. An adjustment parameter is introduced during the fusion process to obtain the comprehensive weight of each indicator. Based on the comprehensive weight, the sensitivity index of the village area is calculated by a comprehensive scoring model. Based on the sensitivity index of the village area and a preset mapping table between the sensitivity index and the level, a classification process is performed to determine the environmental risk level of the village area.

2. The method according to claim 1, characterized in that, Based on the spatial distribution data of the historical pollution events, a particle swarm optimization algorithm is used to dynamically adjust the relative importance assignments among the indicators determined by the expert scoring method, resulting in a target judgment matrix. Based on this target judgment matrix, an analytic hierarchy process (AHP) is used to calculate eigenvectors and normalize them to obtain the first weight of each indicator, including: An initial judgment matrix is ​​obtained by using an expert scoring method, wherein the initial judgment matrix contains the assignment of relative importance among multiple indicators; Using the spatial distribution data of the aforementioned historical pollution events as a reference benchmark, an optimization objective function is established; Based on the optimization objective function, the particle swarm optimization algorithm is used to iteratively optimize the assignment of relative importance between indicators in the initial judgment matrix, and the optimized judgment matrix is ​​output. The optimized judgment matrix is ​​subjected to a consistency check to generate the target judgment matrix; Calculate the largest eigenvalue of the target judgment matrix, solve for the eigenvector corresponding to the largest eigenvalue, normalize the eigenvector, and obtain the first weight of each indicator.

3. The method according to claim 2, characterized in that, The step involves iteratively optimizing the assignment of relative importance among indicators in the initial judgment matrix using a particle swarm optimization algorithm based on the objective function, and outputting an optimized judgment matrix, including: Initialize the particle swarm, wherein the relative importance assignments in the initial judgment matrix are encoded as the initial positions of the particles, and the initial velocities of the particles are generated; In each iteration, the fitness value corresponding to the current position of each particle is calculated using the optimization objective function based on position and velocity. In the first iteration, the position is the initial position and the velocity is the initial velocity. Compare the fitness value of each particle's current position with its historical best fitness value, and update the particle's best position accordingly. Compare the fitness value of all particles at their current positions with the best fitness value of the previous generation of the population, and update the best position of the population. Determine whether the preset maximum number of iterations has been reached or whether the change between the current generation and the previous generation's historical best fitness value is less than a preset change threshold. If not, then adjust the particle's velocity and direction based on the updated individual optimal position and the updated group optimal position, and update the particle's position; Repeat the above iterative process until the preset maximum number of iterations is reached or the change is less than the preset change threshold, and output the judgment matrix corresponding to the optimal position of the final group as the optimized judgment matrix.

4. The method according to claim 1, characterized in that, The process involves calculating the information entropy value of each indicator using the entropy weight method, calculating the difference coefficient of each indicator based on the information entropy value, and determining the second weight of each indicator based on the difference coefficient, including: Obtain the raw data of the village area under each indicator, and perform standardization processing on the raw data to obtain standardized values; Based on the standardized values, the data distribution ratio of each sample under each indicator is calculated, and a fuzzy clustering analysis algorithm is introduced to preprocess the data distribution ratio. Calculate the information entropy value of each indicator based on the distribution ratio of the preprocessed data; Based on the information entropy value, the difference coefficient of each indicator is calculated, and the difference coefficient is corrected by an adaptive weighting mechanism. The second weight of each indicator is determined based on the corrected difference coefficient.

5. The method according to claim 4, characterized in that, The step of calculating the difference coefficients of each indicator based on the information entropy value and correcting the difference coefficients using an adaptive weighting mechanism includes: The initial difference coefficient is obtained by calculating the difference between the unit value and the information entropy value; Based on the frequency of occurrence, duration and scope of impact of each indicator in historical pollution events, the contribution weight of each indicator in the environmental risk assessment process is calculated. An adaptive weighting mechanism is used to nonlinearly combine the contribution weights with the initial difference coefficients to obtain the corrected difference coefficients.

6. The method according to claim 1, characterized in that, The process of fusing the first weight and the second weight through a linear combination, introducing adjustment parameters during the fusion process to obtain the comprehensive weight of each indicator, and calculating the sensitivity index of the village area based on the comprehensive weight through a comprehensive scoring model includes: Set adjustment parameters, which are determined based on the discriminative power of each indicator in historical pollution events; The first and second weights of each indicator are weighted according to the adjustment parameters to obtain the comprehensive weight of each indicator; The comprehensive weights and the original data of each indicator are input into the comprehensive scoring model, which includes an indicator score calculation module and a weight integration module. The indicator score calculation module performs standardized scoring on the raw data of each indicator to obtain the standardized score of each indicator. The environmental risk score is obtained by calculating the standardized scores of each indicator and their corresponding comprehensive weights through the weight integration module. Based on the environmental risk score, a sensitivity index is obtained.

7. The method according to claim 1, characterized in that, The indicator system for sensitive area delineation, based on the aforementioned environmental baseline data and soil background values, includes: Obtain soil heavy metal data for village areas; Spatial interpolation is performed on the soil heavy metal data to generate a heavy metal distribution map of the village area; The heavy metal distribution map is divided into multiple grids, and the heavy metal index score of each grid is determined. An indicator system is constructed based on the aforementioned environmental baseline data, soil background values, and heavy metal index scores of the raster cells.

8. A village environmental risk analysis system based on particle swarm optimization algorithm, characterized in that, include: The data acquisition module is used to collect basic environmental data, soil background values, and spatial distribution data of historical pollution events in the village area. A construction module is used to construct an indicator system for sensitive area delineation based on the environmental basic data and the soil background value. The indicator system includes multiple indicators. The adjustment module is used to dynamically adjust the relative importance of the indicators determined by the expert scoring method based on the spatial distribution data of the historical pollution events and the particle swarm optimization algorithm to obtain the target judgment matrix. Based on the target judgment matrix, the analytic hierarchy process is used to calculate the feature vector and normalize the feature vector to obtain the first weight of each indicator. The calculation module is used to calculate the information entropy value of each indicator using the entropy weight method, calculate the difference coefficient of each indicator based on the information entropy value, and determine the second weight of each indicator based on the difference coefficient. The fusion module is used to fuse the first weight and the second weight through a linear combination. An adjustment parameter is introduced during the fusion process to obtain the comprehensive weight of each indicator. Based on the comprehensive weight, the sensitivity index of the village area is calculated through a comprehensive scoring model. The determination module is used to perform grading based on the sensitivity index of the village area and a preset mapping table between the sensitivity index and the level, so as to determine the environmental risk level of the village area.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the village environmental risk analysis method based on particle swarm optimization as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the analysis method for village environmental risks based on the particle swarm optimization algorithm as described in any one of claims 1 to 7.