A flow sensor is designed based on resistance-type differential pressure flow (RDPF) method, and the flow data is measured during a coal gangue paste-filling process. The measurement error characteristics of a RDPF sensor are analyzed. Periodic and aperiodic errors are then modeled separately. The model for the periodic error is established by Fourier series approximation using least squares solution of an overdetermined equation to solve for the model parameters. The model for the aperiodic error is established using an online least squares support vector machine (LS-SVM) method. The cross-validation is used to solve model parameters. Simulations and experiments show that the dynamic measurement accuracy of the sensor is greatly improved by error compensation, thereby reducing filling material waste and improving the economic efficiency.