To address the computational challenges faced by edge devices using deep learning to process LiDAR point cloud data, this paper proposes a SLAM algorithm incorporating Top-K optimization to generate semantic descriptors and global semantic map for laser data efficiently. This approach aims to reduce computational complexity while enhancing processing speed. The algorithm extracts semantic information from LiDAR data, constructs two-dimensional semantic descriptors, and improves the robot's semantic understanding of its surrounding environment. In the loop closure detection phase, the algorithm identifies loop candidates by calculating the geometric and semantic similarities of the descriptors. It utilizes front-end odometry to stitch together subgraphs from these loop candidates, thereby detecting true loop closures. Finally, true loop closures add constraints in the factor graph, facilitating pose optimization. Experimental results show that this descriptor can match more loop closures without affecting accuracy. The algorithm enhances the pose estimation accuracy of the robot and generates global point cloud maps rich in semantic information. Under the influence of the Top-K strategy, the average inference time is reduced by 10.7%, and the memory usage decreases by 19.5% compared with before in the Network Inference module. This Top-K strategy significantly conserves computational resources for optimizing edge-device deep learning algorithms, particularly when processing LiDAR point cloud data. Additionally, it effectively reduces the computational load in practical applications while maintaining inference accuracy and efficiency.