Multiscale problems, such as modelling flows through porous media or predicting the mechanical properties of composite materials, are of great interest in many scientific areas. Analytical models describing these phenomena are rarely available, and one must recur to numerical simulations. This represents a great computational challenge, because of the prohibitive computational cost of resolving the small scales. Multiscale numerical methods are therefore necessary to solve multiscale problems within reasonable computational time and resources. In particular, numerical homogenization techniques aim to capture the macroscopic behaviour with equations whose coefficients are computed numerically from the solutions of corrector problems at the microscale. A lack of knowledge of the coupling conditions between the micro- and the macro-scales brings in the so-called resonance error, which affects the accuracy of all multiscale methods. This source of error often dominates the numerical discretization errors and increasing its rate of decay is crucial for improving the accuracy of multiscale methods. In this work, we propose two novel upscaling schemes with arbitrarily high convergence rates of the resonance error to approximate the homogenized coefficients of scalar, linear second order elliptic differential equations. The first one is based on a parabolic equation, inspired by a model employed to compute the effective diffusive coefficients in stochastic diffusion processes. By using the approximation properties of smooth filtering functions, the homogenized coefficients can be approximated with arbitrary rates of accuracy. This claim is proved through an a priori convergence analysis, under the assumption of smooth periodic multiscale coefficients. Numerical experiments verify the expected convergence rates also under more general assumptions, such as discontinuous and random coefficients. The second method originates from the first by integrating the parabolic equation over a finite time interval. This method is referred to as the modified elliptic approach, because of the presence of a right-hand side which can be interpreted in terms of continuous semigroups and can be approximated numerically by Krylov subspace methods. The same convergence results as in the parabolic approach hold true. As a last step, a convergence analysis of the resonance error for the modified elliptic approach in the context of equations with random coefficients is performed. In this case, the resonance error is composed of a variance and a bias term, which can be bounded from above by a function decaying to zero. Numerical experiments reveal that the convergence rate of the resonance error for random coefficients is hampered, in comparison to the case of periodic coefficients, but the modified elliptic approach nevertheless outperforms standard methods.