Abstract:AutoCAD, as a commonly used computer-aided drafting software tool, is widely applied in engineering fields. In practical drafting tasks, it is often necessary to efficiently and accurately match graphical objects with manually annotated textual information. This matching problem can be abstracted as a combinatorial optimization problem of the shortest distance between two sets of objects. Although dynamic programming, greedy algorithms, and nearest neighbor methods are commonly used to solve such problems, the problem of high algorithmic complexity is still faced. Therefore, a simulated annealing algorithm based on a modified Hausdorff distance is proposed. By employing an enhanced calculation method of Hausdorff distance combined with the probabilistic search characteristics of the simulated annealing algorithm, an approximate optimal solution to the matching problem is obtained. Through a series of comparative algorithm experiments, the effectiveness and accuracy of the proposed method are verified. The experimental results indicate that the algorithm can significantly improve the precision and computational efficiency of graphic-text matching, which is suitable for the practical engineering drafting tasks.