The traditional A* algorithm faces the challenges of low search efficiency and large node extension range in the field of path planning. These directly restrict the overall performance of the algorithm. In this study, we aimed to improve the search efficiency and path planning quality of the A* algorithm in complex and large-scale environments through a series of optimisation measures, including the innovation of weight design, flexible adjustment of the search neighbourhood, improvement of the heuristic function, and optimisation of the node selection strategy. Specifically, this study innovatively introduces the local obstacle rate as the core index of weight design, and it dynamically adjusts the weights according to the change of the obstacle rate during the node movement process, which effectively reduces the search space and significantly improves the search speed. At the same time, according to the real-time change of the local obstacle rate, this study dynamically adjusts the range of the search neighbourhood, so that the algorithm can choose the optimal search strategy according to different environmental information. In terms of the improvement of the heuristic function, this study adopted the diagonal distance as the benchmark for cost estimation, and it innovatively introduces the angle coefficient to reflect the complexity of path turning, thus providing the algorithm with a more accurate guidance for the search direction. In addition, this study optimises the node selection method by drawing on the idea of simulated annealing, which eliminates the need to calculate and compare all possible surrogate values during the node selection process, thus significantly reducing the running time of the algorithm. The results of the simulation experiments fully verify the effectiveness and practicality of the improved algorithm. Compared with the traditional A* algorithm, the improved algorithm achieved significant optimisation in terms of the average running time, the number of expansion nodes, and the path length, with the average running time shortened by 84%, the number of expansion nodes reduced by 94%, and the path length also shortened by 2.3%.