Solving the multiplication problem of a large language model system using a graph-based method