This paper investigates music education, where an efficient and accurate performance evaluation system in the piano teaching and performance ecosystem is increasingly becoming an essential tool for improving teaching quality and performance level. The objective evaluation of students’ performance skills can be achieved by carefully analyzing piano performances using the network flow optimization technique. This technique optimizes the performance evaluation system’s audio recognition ability by analyzing the piano audio signal and solving the multi-constraint nonlinear optimization problem in a limited time domain. This paper establishes a network flow optimization model, applies the multi-constraint nonlinear optimization technique, and combines the non-negative matrix decomposition and dynamic time regularization algorithm to analyze the piano performance for experiments. After optimization processing, hundreds of piano audio samples were collected, and the audio recognition accuracy was improved by 20%. By optimizing and processing the audio signals from the network stream, the evaluation system could detect polyphony more accurately and track the musical score effectively, improving accuracy and efficiency. Using the non-negative matrix decomposition algorithm, the accuracy of detecting polyphony can reach 85%, while the dynamic temporal regularization algorithm can match the position of the musical score with 95% accuracy. The accuracy of piano performance evaluation is optimized by this network flow optimization method, providing new technical means for music education, and promoting the quality of teaching and performance.