Path planning is a critical factor in the successful performance of navigation tasks. This paper proposes a novel approach for indoor map partitioning and global path-planning preprocessing. The proposed algorithm aims to enhance the efficiency of path planning tasks by eliminating irrelevant areas. In view of the deformation problem encountered in the original indoor map partitioning method, initially, the contour detection algorithm is employed to identify and eliminate obstacles. Subsequently, the FAST algorithm is utilized to detect key points. These key points are then subjected to filtering and clustering using the K-means algorithm. Based on the 8-neighborhood characteristics, door points and inflection points within the room are selected. A clustering algorithm is employed to retain the door points, which are subsequently connected to form door line segments through averaging and filtering procedures. This process ensures the closure of the sub-room. Finally, the connected domain function is employed to extract the sub-room map, thereby completing the map partitioning process. Based on the sub-room map centroid coordinate point data obtained from the partitioning, two combinations are used as the starting point and the end point, respectively, and the A* algorithm is employed to calculate and store all path information from the starting point to the end point. Based on the sub-room map obtained through partitioning and the stored path information, the path is traversed to eliminate irrelevant areas, thereby achieving the preprocessing of global path planning. The simulation results showed that the A*, Bi-A*, JPS, Dijkstra, PRM, and RRT algorithms increased their rates by 18.2%, 43.6%, 20.5%, 31.9%, 29.1%, and 29.7%, respectively.