As a basic problem of mathematical problem solving,relational representation has attracted much attention.However,for the solving problems with function,because of the complexity of function relationship and the diversity of expression,it is beyond the scope of existing problem-solving and poses new challenges for the domain.Aiming at this problem,this paper proposes a relation-based automatic solving algorithm.The relation representation was extended to meet the needs of function relation representation and calculation.The relations were extracted from the text and graph by improving the syntactic and semantic model and the proposed graph relation pattern.The function relation was identified and extracted according to the model definition of function.The function relation and quantity relation were substituted equally to get the solution result by eliminating extra parameters.Compared with the baseline method based on the solving framework on the collected dataset,the proposed algorithm can achieve better results,effectively completing 83%of the problem understanding and 66%of the correct answer rate.