ObjectiveFarmland consolidation for agricultural mechanization in hilly and mountainous areas can alter the landscape pattern, elevation, slope and microgeomorphology of cultivated land. It is of great significance to assess the ecological risk of cultivated land to provide data reference for the subsequent farmland consolidation for agricultural mechanization. This study aims to assess the ecological risk of cultivated land before and after farmland consolidation for agricultural mechanization in hilly and mountainous areas, and to explore the relationship between cultivated land ecological risk and cultivated land slope.MethodsTwenty counties in Tongnan district of Chongqing city was selected as the assessment units. Based on the land use data in 2010 and 2020 as two periods, ArcGIS 10.8 and Excel software were used to calculate landscape pattern indices. The weights for each index were determined by entropy weight method, and an ecological risk assessment model was constructed, which was used to reveal the temporal and spatial change characteristics of ecological risk. Based on the principle of mathematical statistics, the correlation analysis between cultivated land ecological risk and cultivated land slope was carried out, which aimed to explore the relationship between cultivated land ecological risk and cultivated land slope.Results and DiscussionsComparing to 2010, patch density (PD), division (D), fractal dimension (FD), and edge density (ED) of cultivated land all decreased in 2020, while meant Patch Size (MPS) increased, indicating an increase in the contiguity of cultivated land. The mean shape index (MSI) of cultivated land increased, indicating that the shape of cultivated land tended to be complicated. The landscape disturbance index (U) decreased from 0.97 to 0.94, indicating that the overall resistance to disturbances in cultivated land has increased. The landscape vulnerability index (V) increased from 2.96 to 3.20, indicating that the structure of cultivated land become more fragile. The ecological risk value of cultivated land decreased from 3.10 to 3.01, indicating the farmland consolidation for agricultural mechanization effectively improved the landscape pattern of cultivated land and enhanced the safety of the agricultural ecosystem. During the two periods, the ecological risk areas were primarily composed of low-risk and relatively low-risk zones. The area of low-risk zones increased by 6.44%, mainly expanding towards the northern part, while the area of relatively low-risk zones increased by 6.17%, primarily spreading towards the central-eastern and southeastern part. The area of moderate-risk zones increased by 24.4%, mainly extending towards the western and northwestern part, while the area of relatively high-risk zones decreased by 60.70%, with some new additions spreading towards the northeastern part. The area of high-risk zones increased by 16.30%, with some new additions extending towards the northwest part. Overall, the ecological safety zones of cultivated relatively increased. The cultivated land slope was primarily concentrated in the range of 2° to 25°. On the one hand, when the cultivated land slope was less than 15°, the proportion of the slope area was negatively correlated with the ecological risk value. On the other hand, when the slope was above 15°, the proportion of the slope area was positively correlated with the ecological risk value. In 2010, there was a highly significant correlation between the proportion of slope area and ecological risk value for cultivated land slope within the ranges of 5° to 8°, 15° to 25°, and above 25°, with corresponding correlation coefficients of 0.592, 0.609, and 0.849, respectively. In 2020, there was a highly significant correlation between the proportion of slope area and ecological risk value for cultivated land slope within the ranges of 2° to 5°, 5° to 8°, 15° to 25°, and above 25°, with corresponding correlation coefficients of 0.534, 0.667, 0.729, and 0.839, respectively.ConclusionsThe assessment of cultivated land ecological risk in Tongnan district of Chongqing city before and after the farmland consolidation for agricultural mechanization, as well as the analysis of the correlation between ecological risk and cultivated land slope, demonstrate that the farmland consolidation for agricultural mechanization can reduce cultivated land ecological risk, and the proportion of cultivated land slope can be an important basis for precision guidance in the farmland consolidation for agricultural mechanization. Considering the occurrence of moderate sheet erosion from a slope of 5° and intense erosion from a slope of 10° to 15°, and taking into account the reduction of ecological risk value and the actual topographic conditions, the subsequent farmland consolidation for agricultural mechanization in Tongnan district should focus on areas with cultivated land slope ranging from 5° to 8° and 15° to 25°.